From 5420d27c338a5fd4d48b214db8ee4d72d1983160 Mon Sep 17 00:00:00 2001 From: Philip Gregor Date: Tue, 27 Feb 2024 16:24:41 -0800 Subject: [PATCH] ZAP-generated Matter TV Casting Attribute and Cluster objects --- .../project.pbxproj | 56 +- .../MCAttributeObjects.mm | 109 - .../MCAttribute_Internal.h | 42 +- .../MatterTvCastingBridge/MCCluster.mm | 2 +- .../MatterTvCastingBridge/MCClusterObjects.h | 47 - .../MatterTvCastingBridge/MCClusterObjects.mm | 52 - .../MatterTvCastingBridge/MCEndpoint.mm | 2 +- .../MatterTvCastingBridge.h | 4 +- ...ributeObjects.h => NSDataSpanConversion.h} | 23 +- .../NSStringSpanConversion.h | 39 + .../templates/MCAttributeObjects-src.zapt | 75 + .../templates/MCAttributeObjects.zapt | 28 + .../templates/MCClusterObjects-src.zapt | 53 + .../templates/MCClusterObjects.zapt | 48 + .../templates/MCCommandObjects-src.zapt | 3 + .../templates/MCCommandObjects.zapt | 3 + .../templates/availability.yaml | 8664 +++++++++++++++++ .../templates/config-data.yaml | 36 + .../templates/partials/decode_value.zapt | 57 + .../templates/templates.json | 50 + .../zap-generated/MCAttributeObjects.h | 346 + .../zap-generated/MCAttributeObjects.mm | 5629 +++++++++++ .../zap-generated/MCClusterObjects.h | 614 ++ .../zap-generated/MCClusterObjects.mm | 717 ++ .../zap-generated/MCStructsObjc.h | 58 + .../zap-generated/MCStructsObjc.mm | 291 + .../tv-casting-common/core/Attribute.h | 71 +- scripts/tools/zap_regen_all.py | 1 + 28 files changed, 16831 insertions(+), 289 deletions(-) delete mode 100644 examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/MCAttributeObjects.mm delete mode 100644 examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/MCClusterObjects.h delete mode 100644 examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/MCClusterObjects.mm rename examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/{MCAttributeObjects.h => NSDataSpanConversion.h} (58%) create mode 100644 examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/NSStringSpanConversion.h create mode 100644 examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/templates/MCAttributeObjects-src.zapt create mode 100644 examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/templates/MCAttributeObjects.zapt create mode 100644 examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/templates/MCClusterObjects-src.zapt create mode 100644 examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/templates/MCClusterObjects.zapt create mode 100644 examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/templates/MCCommandObjects-src.zapt create mode 100644 examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/templates/MCCommandObjects.zapt create mode 100644 examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/templates/availability.yaml create mode 100644 examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/templates/config-data.yaml create mode 100644 examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/templates/partials/decode_value.zapt create mode 100644 examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/templates/templates.json create mode 100644 examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/zap-generated/MCAttributeObjects.h create mode 100644 examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/zap-generated/MCAttributeObjects.mm create mode 100644 examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/zap-generated/MCClusterObjects.h create mode 100644 examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/zap-generated/MCClusterObjects.mm create mode 100644 examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/zap-generated/MCStructsObjc.h create mode 100644 examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/zap-generated/MCStructsObjc.mm diff --git a/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge.xcodeproj/project.pbxproj b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge.xcodeproj/project.pbxproj index 8e87fc9526c886..f55ca2b5242b20 100644 --- a/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge.xcodeproj/project.pbxproj +++ b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge.xcodeproj/project.pbxproj @@ -7,6 +7,14 @@ objects = { /* Begin PBXBuildFile section */ + 39589F162B91556B00BE040C /* MCStructsObjc.h in Headers */ = {isa = PBXBuildFile; fileRef = 39589F152B91556B00BE040C /* MCStructsObjc.h */; }; + 39589F182B91557700BE040C /* MCStructsObjc.mm in Sources */ = {isa = PBXBuildFile; fileRef = 39589F172B91557700BE040C /* MCStructsObjc.mm */; }; + 39BF57C52B8CFF790081653C /* MCAttributeObjects.h in Headers */ = {isa = PBXBuildFile; fileRef = 39BF57C42B8CFF790081653C /* MCAttributeObjects.h */; }; + 39BF57C72B8CFFB90081653C /* MCAttributeObjects.mm in Sources */ = {isa = PBXBuildFile; fileRef = 39BF57C62B8CFFB90081653C /* MCAttributeObjects.mm */; }; + 39BF57C92B8D66540081653C /* NSStringSpanConversion.h in Headers */ = {isa = PBXBuildFile; fileRef = 39BF57C82B8D66540081653C /* NSStringSpanConversion.h */; }; + 39BF57CB2B8E54F80081653C /* NSDataSpanConversion.h in Headers */ = {isa = PBXBuildFile; fileRef = 39BF57CA2B8E54F80081653C /* NSDataSpanConversion.h */; }; + 39BF57CD2B8FC0EF0081653C /* MCClusterObjects.h in Headers */ = {isa = PBXBuildFile; fileRef = 39BF57CC2B8FC0EF0081653C /* MCClusterObjects.h */; }; + 39BF57CF2B8FC1030081653C /* MCClusterObjects.mm in Sources */ = {isa = PBXBuildFile; fileRef = 39BF57CE2B8FC1030081653C /* MCClusterObjects.mm */; }; 3C0474062B3F7E5F0012AE95 /* MCEndpointFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = 3C0474052B3F7E5F0012AE95 /* MCEndpointFilter.h */; }; 3C04740C2B4604CF0012AE95 /* MCCryptoUtils.h in Headers */ = {isa = PBXBuildFile; fileRef = 3C04740B2B4604CF0012AE95 /* MCCryptoUtils.h */; }; 3C04740E2B4605B40012AE95 /* MCCryptoUtils.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3C04740D2B4605B40012AE95 /* MCCryptoUtils.mm */; }; @@ -34,16 +42,12 @@ 3C4F52282B51DB3000BB8A10 /* MCCommand.h in Headers */ = {isa = PBXBuildFile; fileRef = 3C4F52272B51DB3000BB8A10 /* MCCommand.h */; }; 3C4F522A2B51DFAE00BB8A10 /* MCCommand_Internal.h in Headers */ = {isa = PBXBuildFile; fileRef = 3C4F52292B51DFAE00BB8A10 /* MCCommand_Internal.h */; }; 3C4F522C2B51E02800BB8A10 /* MCCommand.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3C4F522B2B51E02800BB8A10 /* MCCommand.mm */; }; - 3C4F52342B57338B00BB8A10 /* MCClusterObjects.h in Headers */ = {isa = PBXBuildFile; fileRef = 3C4F52332B57338B00BB8A10 /* MCClusterObjects.h */; }; - 3C4F52362B5733A200BB8A10 /* MCClusterObjects.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3C4F52352B5733A200BB8A10 /* MCClusterObjects.mm */; }; 3C621CA12B5F6CF8005CDBA3 /* MCCommandObjects.h in Headers */ = {isa = PBXBuildFile; fileRef = 3C621CA02B5F6CF8005CDBA3 /* MCCommandObjects.h */; }; 3C621CA32B5F6D08005CDBA3 /* MCCommandObjects.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3C621CA22B5F6D08005CDBA3 /* MCCommandObjects.mm */; }; 3C621CA52B605A6A005CDBA3 /* MCAttribute.h in Headers */ = {isa = PBXBuildFile; fileRef = 3C621CA42B605A6A005CDBA3 /* MCAttribute.h */; }; 3C621CA72B605AA1005CDBA3 /* MCObserver.h in Headers */ = {isa = PBXBuildFile; fileRef = 3C621CA62B605AA1005CDBA3 /* MCObserver.h */; }; 3C621CA92B605C52005CDBA3 /* MCAttribute_Internal.h in Headers */ = {isa = PBXBuildFile; fileRef = 3C621CA82B605C52005CDBA3 /* MCAttribute_Internal.h */; }; 3C621CAB2B605C6E005CDBA3 /* MCAttribute.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3C621CAA2B605C6E005CDBA3 /* MCAttribute.mm */; }; - 3C621CAD2B605E94005CDBA3 /* MCAttributeObjects.h in Headers */ = {isa = PBXBuildFile; fileRef = 3C621CAC2B605E94005CDBA3 /* MCAttributeObjects.h */; }; - 3C621CAF2B605EA7005CDBA3 /* MCAttributeObjects.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3C621CAE2B605EA7005CDBA3 /* MCAttributeObjects.mm */; }; 3C66FBFC290327BB00B63FE7 /* AppParameters.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3C66FBFB290327BB00B63FE7 /* AppParameters.mm */; }; 3C6920462AA1093300D0F613 /* MCDeviceAttestationCredentialsProvider.h in Headers */ = {isa = PBXBuildFile; fileRef = 3C6920452AA1093300D0F613 /* MCDeviceAttestationCredentialsProvider.h */; }; 3C6920482AA1094000D0F613 /* MCDeviceAttestationCredentialsProvider.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3C6920472AA1094000D0F613 /* MCDeviceAttestationCredentialsProvider.mm */; }; @@ -80,6 +84,14 @@ /* End PBXBuildFile section */ /* Begin PBXFileReference section */ + 39589F152B91556B00BE040C /* MCStructsObjc.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MCStructsObjc.h; sourceTree = ""; }; + 39589F172B91557700BE040C /* MCStructsObjc.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = MCStructsObjc.mm; sourceTree = ""; }; + 39BF57C42B8CFF790081653C /* MCAttributeObjects.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MCAttributeObjects.h; sourceTree = ""; }; + 39BF57C62B8CFFB90081653C /* MCAttributeObjects.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = MCAttributeObjects.mm; sourceTree = ""; }; + 39BF57C82B8D66540081653C /* NSStringSpanConversion.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NSStringSpanConversion.h; sourceTree = ""; }; + 39BF57CA2B8E54F80081653C /* NSDataSpanConversion.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NSDataSpanConversion.h; sourceTree = ""; }; + 39BF57CC2B8FC0EF0081653C /* MCClusterObjects.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MCClusterObjects.h; sourceTree = ""; }; + 39BF57CE2B8FC1030081653C /* MCClusterObjects.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = MCClusterObjects.mm; sourceTree = ""; }; 3C0474052B3F7E5F0012AE95 /* MCEndpointFilter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MCEndpointFilter.h; sourceTree = ""; }; 3C04740B2B4604CF0012AE95 /* MCCryptoUtils.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MCCryptoUtils.h; sourceTree = ""; }; 3C04740D2B4605B40012AE95 /* MCCryptoUtils.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = MCCryptoUtils.mm; sourceTree = ""; }; @@ -112,16 +124,12 @@ 3C4F52272B51DB3000BB8A10 /* MCCommand.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MCCommand.h; sourceTree = ""; }; 3C4F52292B51DFAE00BB8A10 /* MCCommand_Internal.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MCCommand_Internal.h; sourceTree = ""; }; 3C4F522B2B51E02800BB8A10 /* MCCommand.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = MCCommand.mm; sourceTree = ""; }; - 3C4F52332B57338B00BB8A10 /* MCClusterObjects.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MCClusterObjects.h; sourceTree = ""; }; - 3C4F52352B5733A200BB8A10 /* MCClusterObjects.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = MCClusterObjects.mm; sourceTree = ""; }; 3C621CA02B5F6CF8005CDBA3 /* MCCommandObjects.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MCCommandObjects.h; sourceTree = ""; }; 3C621CA22B5F6D08005CDBA3 /* MCCommandObjects.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = MCCommandObjects.mm; sourceTree = ""; }; 3C621CA42B605A6A005CDBA3 /* MCAttribute.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MCAttribute.h; sourceTree = ""; }; 3C621CA62B605AA1005CDBA3 /* MCObserver.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MCObserver.h; sourceTree = ""; }; 3C621CA82B605C52005CDBA3 /* MCAttribute_Internal.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MCAttribute_Internal.h; sourceTree = ""; }; 3C621CAA2B605C6E005CDBA3 /* MCAttribute.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = MCAttribute.mm; sourceTree = ""; }; - 3C621CAC2B605E94005CDBA3 /* MCAttributeObjects.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MCAttributeObjects.h; sourceTree = ""; usesTabs = 0; }; - 3C621CAE2B605EA7005CDBA3 /* MCAttributeObjects.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = MCAttributeObjects.mm; sourceTree = ""; }; 3C66FBFA2903279A00B63FE7 /* AppParameters.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppParameters.h; sourceTree = ""; }; 3C66FBFB290327BB00B63FE7 /* AppParameters.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = AppParameters.mm; sourceTree = ""; }; 3C6920452AA1093300D0F613 /* MCDeviceAttestationCredentialsProvider.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MCDeviceAttestationCredentialsProvider.h; sourceTree = ""; }; @@ -177,6 +185,19 @@ /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ + 395241F42B854EA700F7DB91 /* zap-generated */ = { + isa = PBXGroup; + children = ( + 39BF57C42B8CFF790081653C /* MCAttributeObjects.h */, + 39BF57C62B8CFFB90081653C /* MCAttributeObjects.mm */, + 39BF57CC2B8FC0EF0081653C /* MCClusterObjects.h */, + 39BF57CE2B8FC1030081653C /* MCClusterObjects.mm */, + 39589F152B91556B00BE040C /* MCStructsObjc.h */, + 39589F172B91557700BE040C /* MCStructsObjc.mm */, + ); + path = "zap-generated"; + sourceTree = ""; + }; 3C94378A2B3654720096E5F4 /* Core */ = { isa = PBXGroup; children = ( @@ -219,6 +240,7 @@ 3CCB871F2869085400771BAD /* MatterTvCastingBridge */ = { isa = PBXGroup; children = ( + 395241F42B854EA700F7DB91 /* zap-generated */, 3C94378A2B3654720096E5F4 /* Core */, 3C94378B2B36547A0096E5F4 /* Support */, 3C94378C2B3654960096E5F4 /* Clusters */, @@ -243,12 +265,8 @@ 3C621CA42B605A6A005CDBA3 /* MCAttribute.h */, 3C621CA82B605C52005CDBA3 /* MCAttribute_Internal.h */, 3C621CAA2B605C6E005CDBA3 /* MCAttribute.mm */, - 3C4F52332B57338B00BB8A10 /* MCClusterObjects.h */, - 3C4F52352B5733A200BB8A10 /* MCClusterObjects.mm */, 3C621CA02B5F6CF8005CDBA3 /* MCCommandObjects.h */, 3C621CA22B5F6D08005CDBA3 /* MCCommandObjects.mm */, - 3C621CAC2B605E94005CDBA3 /* MCAttributeObjects.h */, - 3C621CAE2B605EA7005CDBA3 /* MCAttributeObjects.mm */, 3C4F521F2B507C4A00BB8A10 /* MCEndpointClusterType.h */, 3C4F52132B4F31DC00BB8A10 /* MCDeviceTypeStruct.h */, 3C4F52152B4F31FA00BB8A10 /* MCDeviceTypeStruct.m */, @@ -272,6 +290,8 @@ 3C9437932B3B47A10096E5F4 /* MCErrorUtils.mm */, 3C04740B2B4604CF0012AE95 /* MCCryptoUtils.h */, 3C04740D2B4605B40012AE95 /* MCCryptoUtils.mm */, + 39BF57CA2B8E54F80081653C /* NSDataSpanConversion.h */, + 39BF57C82B8D66540081653C /* NSStringSpanConversion.h */, 3CCB873A286A593700771BAD /* CastingServerBridge.h */, 3CCB873D286A593700771BAD /* CastingServerBridge.mm */, 3C66FBFA2903279A00B63FE7 /* AppParameters.h */, @@ -318,23 +338,26 @@ 3CD6D01A298CDA2100D7569A /* CommissionerDiscoveryDelegateImpl.h in Headers */, 3CF71C0E2A992DA2003A5CE5 /* MCDataSource.h in Headers */, 3C4F52142B4F31DC00BB8A10 /* MCDeviceTypeStruct.h in Headers */, + 39BF57CD2B8FC0EF0081653C /* MCClusterObjects.h in Headers */, 3C26AC8C2926FE0C00BA6881 /* DeviceAttestationCredentialsProviderImpl.hpp in Headers */, 3C621CA52B605A6A005CDBA3 /* MCAttribute.h in Headers */, 3CD73F1C2A9E8396009D82D1 /* MCCommissionableDataProvider.h in Headers */, 3C4F521E2B4F4B3B00BB8A10 /* MCEndpoint_Internal.h in Headers */, + 39BF57C92B8D66540081653C /* NSStringSpanConversion.h in Headers */, 3C4F52262B50899700BB8A10 /* MCCluster_Internal.h in Headers */, 3CF71C0A2A992D0D003A5CE5 /* MCCastingApp.h in Headers */, 3C4F521C2B4F4B1B00BB8A10 /* MCCastingPlayer_Internal.h in Headers */, 3CD73F172A9E6884009D82D1 /* MCRotatingDeviceIdUniqueIdProvider.h in Headers */, 3C4F52102B4E18C800BB8A10 /* MCEndpoint.h in Headers */, 3C4F52282B51DB3000BB8A10 /* MCCommand.h in Headers */, + 39BF57CB2B8E54F80081653C /* NSDataSpanConversion.h in Headers */, 3C621CA92B605C52005CDBA3 /* MCAttribute_Internal.h in Headers */, 3CF71C102A99312D003A5CE5 /* MCCommissionableData.h in Headers */, 3C4F522A2B51DFAE00BB8A10 /* MCCommand_Internal.h in Headers */, 3CD73F202A9EA060009D82D1 /* MCDeviceAttestationCredentials.h in Headers */, 3CCB8740286A593700771BAD /* CastingServerBridge.h in Headers */, - 3C4F52342B57338B00BB8A10 /* MCClusterObjects.h in Headers */, 3CE5ECCE2A673B30007CF331 /* CommissioningCallbackHandlers.h in Headers */, + 39589F162B91556B00BE040C /* MCStructsObjc.h in Headers */, 3CCB8742286A593700771BAD /* ConversionUtils.hpp in Headers */, 3C621CA72B605AA1005CDBA3 /* MCObserver.h in Headers */, 3C9437922B3B478E0096E5F4 /* MCErrorUtils.h in Headers */, @@ -345,7 +368,7 @@ 3C621CA12B5F6CF8005CDBA3 /* MCCommandObjects.h in Headers */, 3C4F52202B507C4A00BB8A10 /* MCEndpointClusterType.h in Headers */, 3C6920462AA1093300D0F613 /* MCDeviceAttestationCredentialsProvider.h in Headers */, - 3C621CAD2B605E94005CDBA3 /* MCAttributeObjects.h in Headers */, + 39BF57C52B8CFF790081653C /* MCAttributeObjects.h in Headers */, 3C04740C2B4604CF0012AE95 /* MCCryptoUtils.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; @@ -450,7 +473,9 @@ 3C4E53B228E5184C00F293E8 /* TargetNavigatorTypes.mm in Sources */, 3C6920482AA1094000D0F613 /* MCDeviceAttestationCredentialsProvider.mm in Sources */, 3CE5ECD02A673E2C007CF331 /* CommissioningCallbackHandlers.m in Sources */, + 39BF57CF2B8FC1030081653C /* MCClusterObjects.mm in Sources */, 3CD73F192A9E68A7009D82D1 /* MCRotatingDeviceIdUniqueIdProvider.mm in Sources */, + 39589F182B91557700BE040C /* MCStructsObjc.mm in Sources */, 3CF8532728E37F1000F07B9F /* MatterError.mm in Sources */, 3C4F522C2B51E02800BB8A10 /* MCCommand.mm in Sources */, 3C4E53B628E5595A00F293E8 /* ContentLauncherTypes.mm in Sources */, @@ -462,10 +487,9 @@ 3C4F52122B4E18ED00BB8A10 /* MCEndpoint.mm in Sources */, 3C4E53B028E4F28100F293E8 /* MediaPlaybackTypes.mm in Sources */, 3C04740E2B4605B40012AE95 /* MCCryptoUtils.mm in Sources */, - 3C4F52362B5733A200BB8A10 /* MCClusterObjects.mm in Sources */, 3CD73F1E2A9E83C1009D82D1 /* MCCommissionableDataProvider.mm in Sources */, 3CD73F222A9EA078009D82D1 /* MCDeviceAttestationCredentials.mm in Sources */, - 3C621CAF2B605EA7005CDBA3 /* MCAttributeObjects.mm in Sources */, + 39BF57C72B8CFFB90081653C /* MCAttributeObjects.mm in Sources */, 3C2346252B362BBB00FA276E /* MCCastingPlayerDiscovery.mm in Sources */, 3C4F52242B507CA800BB8A10 /* MCCluster.mm in Sources */, 3C66FBFC290327BB00B63FE7 /* AppParameters.mm in Sources */, diff --git a/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/MCAttributeObjects.mm b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/MCAttributeObjects.mm deleted file mode 100644 index 5ce91d5ec781bb..00000000000000 --- a/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/MCAttributeObjects.mm +++ /dev/null @@ -1,109 +0,0 @@ -/** - * - * Copyright (c) 2024 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#import "MCAttributeObjects.h" - -#import "MCAttribute_Internal.h" -#import "MCCastingApp.h" -#import "MCErrorUtils.h" - -#include "core/Attribute.h" -#include - -#import - -@implementation MCApplicationBasicClusterVendorIDAttribute -- (void)read:(void * _Nullable)context - completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion -{ - MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, - [self](std::any cppValue) { - return [self getObjTypeFromCpp:cppValue]; - }); - mcAttribute->read(context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { - completion(context, before, after, err); - delete mcAttribute; - }); -} - -- (void)subscribe:(void * _Nullable)context - completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion - minInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval -{ - MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, - [self](std::any cppValue) { - return [self getObjTypeFromCpp:cppValue]; - }); - mcAttribute->subscribe( - context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { - completion(context, before, after, err); - delete mcAttribute; - }, minInterval, maxInterval); -} - -- (id _Nullable)getObjTypeFromCpp:(std::any)cppValue -{ - NSNumber * outValue = nil; - if (cppValue.type() == typeid(std::shared_ptr)) { - std::shared_ptr valueSharedPtr = std::any_cast>(cppValue); - outValue = valueSharedPtr != nil ? [NSNumber numberWithUnsignedInteger:*valueSharedPtr] : nil; - } - return outValue; -} -@end - -@implementation MCMediaPlaybackClusterCurrentStateAttribute -- (void)read:(void * _Nullable)context - completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion -{ - MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, - [self](std::any cppValue) { - return [self getObjTypeFromCpp:cppValue]; - }); - mcAttribute->read(context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { - completion(context, before, after, err); - delete mcAttribute; - }); -} - -- (void)subscribe:(void * _Nullable)context - completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion - minInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval -{ - MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, - [self](std::any cppValue) { - return [self getObjTypeFromCpp:cppValue]; - }); - mcAttribute->subscribe( - context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { - completion(context, before, after, err); - delete mcAttribute; - }, minInterval, maxInterval); -} - -- (id _Nullable)getObjTypeFromCpp:(std::any)cppValue -{ - NSNumber * outValue = nil; - if (cppValue.type() == typeid(std::shared_ptr)) { - std::shared_ptr valueSharedPtr = std::any_cast>(cppValue); - outValue = valueSharedPtr != nil ? [NSNumber numberWithUnsignedInteger:static_cast(*valueSharedPtr)] : nil; - } - return outValue; -} -@end diff --git a/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/MCAttribute_Internal.h b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/MCAttribute_Internal.h index 9a0c7e0385f515..95f05f420a857f 100644 --- a/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/MCAttribute_Internal.h +++ b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/MCAttribute_Internal.h @@ -36,7 +36,7 @@ - (instancetype _Nonnull)initWithCppAttribute:(void * _Nonnull)cppAttribute; -- (id _Nullable)getObjTypeFromCpp:(std::any)cppValue; +- (id _Nullable)getObjCTypeFromCpp:(std::any)cppValue errorCode:(CHIP_ERROR * _Nonnull)aError; @end @@ -44,10 +44,10 @@ template class MCAttributeTemplate { public: MCAttributeTemplate(void * _Nonnull cppAttribute, - std::function getObjTypeFromCppFn) + std::function getObjCTypeFromCppFn) { mCppAttribute = cppAttribute; - mGetObjTypeFromCppFn = getObjTypeFromCppFn; + mGetObjCTypeFromCppFn = getObjCTypeFromCppFn; } void read(void * _Nullable context, std::function completion) @@ -58,18 +58,23 @@ class MCAttributeTemplate { attribute->Read( context, - [clientQueue, completion, this](void * context, chip::Optional before, typename TypeInfo::DecodableArgType after) { + [clientQueue, completion, this](void * context, chip::Optional before, typename TypeInfo::DecodableArgType after) { NSNumber *objCBefore = nil, *objCAfter = nil; + CHIP_ERROR errBefore = CHIP_NO_ERROR, errAfter = CHIP_NO_ERROR; if (before.HasValue()) { ChipLogProgress(AppServer, " converting 'before' value from Cpp to ObjC"); - std::any anyBefore = std::any(std::make_shared(before.Value())); - objCBefore = mGetObjTypeFromCppFn(anyBefore); + std::any anyBefore = std::any(std::make_shared(before.Value())); + objCBefore = mGetObjCTypeFromCppFn(anyBefore, &errBefore); } ChipLogProgress(AppServer, " converting 'after' value from Cpp to ObjC"); - std::any anyAfter = std::any(std::make_shared(after)); - objCAfter = mGetObjTypeFromCppFn(anyAfter); + std::any anyAfter = std::any(std::make_shared(after)); + objCAfter = mGetObjCTypeFromCppFn(anyAfter, &errAfter); dispatch_async(clientQueue, ^{ - completion(context, objCBefore, objCAfter, nil); + if (errBefore == CHIP_NO_ERROR && errAfter == CHIP_NO_ERROR) { + completion(context, objCBefore, objCAfter, nil); + } else { + completion(context, nil, nil, [MCErrorUtils NSErrorFromChipError:(errAfter != CHIP_NO_ERROR ? errAfter : errBefore)]); + } }); }, [clientQueue, completion](void * context, CHIP_ERROR error) { @@ -89,18 +94,23 @@ class MCAttributeTemplate { attribute->Subscribe( context, - [clientQueue, completion, this](void * context, chip::Optional before, typename TypeInfo::DecodableArgType after) { + [clientQueue, completion, this](void * context, chip::Optional before, typename TypeInfo::DecodableArgType after) { NSNumber *objCBefore = nil, *objCAfter = nil; + CHIP_ERROR errBefore = CHIP_NO_ERROR, errAfter = CHIP_NO_ERROR; if (before.HasValue()) { ChipLogProgress(AppServer, " converting 'before' value from Cpp to ObjC"); - std::any anyBefore = std::any(std::make_shared(before.Value())); - objCBefore = mGetObjTypeFromCppFn(anyBefore); + std::any anyBefore = std::any(std::make_shared(before.Value())); + objCBefore = mGetObjCTypeFromCppFn(anyBefore, &errBefore); } ChipLogProgress(AppServer, " converting 'after' value from Cpp to ObjC"); - std::any anyAfter = std::any(std::make_shared(after)); - objCAfter = mGetObjTypeFromCppFn(anyAfter); + std::any anyAfter = std::any(std::make_shared(after)); + objCAfter = mGetObjCTypeFromCppFn(anyAfter, &errAfter); dispatch_async(clientQueue, ^{ - completion(context, objCBefore, objCAfter, nil); + if (errBefore == CHIP_NO_ERROR && errAfter == CHIP_NO_ERROR) { + completion(context, objCBefore, objCAfter, nil); + } else { + completion(context, nil, nil, [MCErrorUtils NSErrorFromChipError:(errAfter != CHIP_NO_ERROR ? errAfter : errBefore)]); + } }); }, [clientQueue, completion](void * context, CHIP_ERROR error) { @@ -115,6 +125,6 @@ class MCAttributeTemplate { private: void * _Nonnull mCppAttribute; - std::function mGetObjTypeFromCppFn; + std::function mGetObjCTypeFromCppFn; }; #endif /* MCAttribute_Internal_h */ diff --git a/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/MCCluster.mm b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/MCCluster.mm index ecb7a9175925d2..7660de0c610017 100644 --- a/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/MCCluster.mm +++ b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/MCCluster.mm @@ -15,7 +15,7 @@ * limitations under the License. */ -#import "MCClusterObjects.h" +#import "zap-generated/MCClusterObjects.h" #import "MCCluster_Internal.h" #import "MCEndpoint_Internal.h" diff --git a/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/MCClusterObjects.h b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/MCClusterObjects.h deleted file mode 100644 index 290b747702e272..00000000000000 --- a/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/MCClusterObjects.h +++ /dev/null @@ -1,47 +0,0 @@ -/** - * - * Copyright (c) 2020-2024 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#import "MCAttributeObjects.h" -#import "MCCluster.h" -#import "MCCommandObjects.h" -#import - -#ifndef MCClusterObjects_h -#define MCClusterObjects_h - -@interface MCContentLauncherCluster : MCCluster -/** - * @brief Returns non-nil pointer to MCContentLauncherClusterLaunchURLCommand if supported, nil otherwise - */ -- (MCContentLauncherClusterLaunchURLCommand * _Nullable)launchURLCommand; -@end - -@interface MCApplicationBasicCluster : MCCluster -/** - * @brief Returns non-nil pointer to MCApplicationBasicClusterVendorIDAttribute if supported, nil otherwise - */ -- (MCApplicationBasicClusterVendorIDAttribute * _Nullable)vendorIDAttribute; -@end - -@interface MCMediaPlaybackCluster : MCCluster -/** - * @brief Returns non-nil pointer to MCMediaPlaybackClusterCurrentStateAttribute if supported, nil otherwise - */ -- (MCMediaPlaybackClusterCurrentStateAttribute * _Nullable)currentStateAttribute; -@end - -#endif /* MCClusterObjects_h */ diff --git a/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/MCClusterObjects.mm b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/MCClusterObjects.mm deleted file mode 100644 index 397dc628ffb405..00000000000000 --- a/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/MCClusterObjects.mm +++ /dev/null @@ -1,52 +0,0 @@ -/** - * - * Copyright (c) 2024 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#import "MCClusterObjects.h" - -#import "MCAttribute_Internal.h" -#import "MCCluster_Internal.h" -#import "MCCommand_Internal.h" - -#include "core/Attribute.h" -#include "core/Command.h" -#include - -#import - -@implementation MCContentLauncherCluster -- (id)launchURLCommand -{ - void * cppCommand = self.cppCluster->GetCommand(chip::app::Clusters::ContentLauncher::Commands::LaunchURL::Id); - return cppCommand != nil ? [[MCContentLauncherClusterLaunchURLCommand alloc] initWithCppCommand:cppCommand] : nil; -} -@end - -@implementation MCApplicationBasicCluster -- (id)vendorIDAttribute -{ - void * cppAttribute = self.cppCluster->GetAttribute(chip::app::Clusters::ApplicationBasic::Attributes::VendorID::Id); - return cppAttribute != nil ? [[MCApplicationBasicClusterVendorIDAttribute alloc] initWithCppAttribute:cppAttribute] : nil; -} -@end - -@implementation MCMediaPlaybackCluster -- (id)currentStateAttribute -{ - void * cppAttribute = self.cppCluster->GetAttribute(chip::app::Clusters::MediaPlayback::Attributes::CurrentState::Id); - return cppAttribute != nil ? [[MCMediaPlaybackClusterCurrentStateAttribute alloc] initWithCppAttribute:cppAttribute] : nil; -} -@end diff --git a/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/MCEndpoint.mm b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/MCEndpoint.mm index 006488aed03eb5..f5e5aac89abb69 100644 --- a/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/MCEndpoint.mm +++ b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/MCEndpoint.mm @@ -21,7 +21,7 @@ #import "MCCluster_Internal.h" #import "MCDeviceTypeStruct.h" -#import "MCClusterObjects.h" +#import "zap-generated/MCClusterObjects.h" #import "clusters/Clusters.h" #import "core/Endpoint.h" diff --git a/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/MatterTvCastingBridge.h b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/MatterTvCastingBridge.h index 093f02b9455b0d..16ce4a0410be68 100644 --- a/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/MatterTvCastingBridge.h +++ b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/MatterTvCastingBridge.h @@ -27,12 +27,12 @@ FOUNDATION_EXPORT const unsigned char MatterTvCastingBridgeVersionString[]; // Add simplified casting API headers here #import "MCAttribute.h" -#import "MCAttributeObjects.h" +#import "zap-generated/MCAttributeObjects.h" #import "MCCastingApp.h" #import "MCCastingPlayer.h" #import "MCCastingPlayerDiscovery.h" #import "MCCluster.h" -#import "MCClusterObjects.h" +#import "zap-generated/MCClusterObjects.h" #import "MCCommand.h" #import "MCCommandObjects.h" #import "MCCommissionableData.h" diff --git a/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/MCAttributeObjects.h b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/NSDataSpanConversion.h similarity index 58% rename from examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/MCAttributeObjects.h rename to examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/NSDataSpanConversion.h index d8f371ee1eebbe..4ebc71c2dd6ff0 100644 --- a/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/MCAttributeObjects.h +++ b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/NSDataSpanConversion.h @@ -1,6 +1,5 @@ /** - * - * Copyright (c) 2020-2024 Project CHIP Authors + * Copyright (c) 2024 Project CHIP Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,16 +14,20 @@ * limitations under the License. */ -#import "MCAttribute.h" +#pragma once + #import -#ifndef MCAttributeObjects_h -#define MCAttributeObjects_h +#include + +NS_ASSUME_NONNULL_BEGIN + +/** + * Utilities for converting between NSData and chip::Span. + */ -@interface MCApplicationBasicClusterVendorIDAttribute : MCAttribute -@end +inline chip::ByteSpan AsByteSpan(NSData * data) { return chip::ByteSpan(static_cast(data.bytes), data.length); } -@interface MCMediaPlaybackClusterCurrentStateAttribute : MCAttribute -@end +inline NSData * AsData(chip::ByteSpan span) { return [NSData dataWithBytes:span.data() length:span.size()]; } -#endif /* MCAttributeObjects_h */ +NS_ASSUME_NONNULL_END diff --git a/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/NSStringSpanConversion.h b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/NSStringSpanConversion.h new file mode 100644 index 00000000000000..8f8b4264546178 --- /dev/null +++ b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/NSStringSpanConversion.h @@ -0,0 +1,39 @@ +/** + * Copyright (c) 2024 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#import + +#include + +NS_ASSUME_NONNULL_BEGIN + +/** + * Utilities for converting between NSString and chip::CharSpan. + */ + +inline chip::CharSpan AsCharSpan(NSString * str) +{ + return chip::CharSpan([str UTF8String], [str lengthOfBytesUsingEncoding:NSUTF8StringEncoding]); +} + +inline NSString * AsString(chip::CharSpan span) +{ + return [[NSString alloc] initWithBytes:span.data() length:span.size() encoding:NSUTF8StringEncoding]; +} + +NS_ASSUME_NONNULL_END diff --git a/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/templates/MCAttributeObjects-src.zapt b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/templates/MCAttributeObjects-src.zapt new file mode 100644 index 00000000000000..90b0f400523ae9 --- /dev/null +++ b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/templates/MCAttributeObjects-src.zapt @@ -0,0 +1,75 @@ +{{> header excludeZapComment=false}} + +#import "MCAttributeObjects.h" + +#import "../MCAttribute_Internal.h" +#import "../MCCastingApp.h" +#import "../MCErrorUtils.h" +#import "../NSDataSpanConversion.h" +#import "../NSStringSpanConversion.h" + +#include "core/Attribute.h" +#include + +#import + +{{#zcl_clusters}} +{{#if (isSupported (asUpperCamelCase name preserveAcronyms=true))}} +{{#if (isInConfigList name "MatterCastingClusters")}} + +// {{asUpperCamelCase name}} cluster attributes: + +{{#zcl_attributes_server removeKeys='isOptional'}} +{{#if (isSupported (asUpperCamelCase ../name preserveAcronyms=true) attribute=(asUpperCamelCase name preserveAcronyms=true))}} +@implementation MC{{asUpperCamelCase ../name}}Cluster{{asUpperCamelCase name}}Attribute +- (void)read:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->read(context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }); +} + +- (void)subscribe:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion + minInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->subscribe( + context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }, minInterval, maxInterval); +} + +- (id _Nullable)getObjCTypeFromCpp:(std::any)cppValue errorCode:(CHIP_ERROR *)aError +{ + {{asObjectiveCClass type ../name structTypePrefix="MC"}} * value = nil; + if (cppValue.type() == typeid(std::shared_ptr)) { + std::shared_ptr sharedPtr = std::any_cast>(cppValue); + chip::app::Clusters::{{asUpperCamelCase ../name}}::Attributes::{{asUpperCamelCase name}}::TypeInfo::DecodableType _cppValue = *sharedPtr; + //auto & valueSharedPtr = *sharedPtr; + *aError = CHIP_NO_ERROR; + {{asObjectiveCType type parent.name structTypePrefix="MC"}} value; + {{>decode_value target="value" source="_cppValue" cluster=parent.name errorCode="*aError = err; return nil;" depth=0}} + return value; + } + *aError = CHIP_ERROR_INTERNAL; + return value; +} +@end + +{{/if}} +{{/zcl_attributes_server}} +{{/if}} +{{/if}} +{{/zcl_clusters}} \ No newline at end of file diff --git a/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/templates/MCAttributeObjects.zapt b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/templates/MCAttributeObjects.zapt new file mode 100644 index 00000000000000..10cef411bf341a --- /dev/null +++ b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/templates/MCAttributeObjects.zapt @@ -0,0 +1,28 @@ +{{> header excludeZapComment=false}} + +#import "MCStructsObjc.h" + +#import "../MCAttribute.h" +#import + +#ifndef MCAttributeObjects_h +#define MCAttributeObjects_h + +{{#zcl_clusters}} +{{#if (isSupported (asUpperCamelCase name))}} +{{#if (isInConfigList name "MatterCastingClusters")}} + +// {{asUpperCamelCase name}} cluster attributes: + +{{#zcl_attributes_server}} +{{#if (isSupported (asUpperCamelCase ../name preserveAcronyms=true) attribute=(asUpperCamelCase name preserveAcronyms=true))}} +@interface MC{{asUpperCamelCase ../name}}Cluster{{asUpperCamelCase name}}Attribute : MCAttribute <{{asObjectiveCClass type ../name structTypePrefix="MC"}} *> +@end + +{{/if}} +{{/zcl_attributes_server}} +{{/if}} +{{/if}} +{{/zcl_clusters}} + +#endif /* MCAttributeObjects_h */ \ No newline at end of file diff --git a/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/templates/MCClusterObjects-src.zapt b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/templates/MCClusterObjects-src.zapt new file mode 100644 index 00000000000000..53223b2f8e4b43 --- /dev/null +++ b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/templates/MCClusterObjects-src.zapt @@ -0,0 +1,53 @@ +{{> header excludeZapComment=false}} + +#import "MCClusterObjects.h" + +#import "../MCAttribute_Internal.h" +#import "../MCCluster_Internal.h" +#import "../MCCommand_Internal.h" + +#include "core/Attribute.h" +#include "core/Command.h" +#include + +#import + +{{#zcl_clusters}} +{{#if (isSupported (asUpperCamelCase name))}} +{{#if (isInConfigList name "MatterCastingClusters")}} + +// {{asUpperCamelCase name}} cluster: + +@implementation MC{{asUpperCamelCase name}}Cluster + +// {{asUpperCamelCase name}} cluster commands: + +{{#zcl_commands}} +{{#if (isSupported (asUpperCamelCase ../name preserveAcronyms=true) command=(asUpperCamelCase name preserveAcronyms=true))}} +{{#if (isInConfigList name "MatterCastingImplementedCommands")}} + +- (id){{asMethodName name}}Command +{ + void * cppCommand = self.cppCluster->GetCommand(chip::app::Clusters::{{asUpperCamelCase ../name}}::Commands::{{asUpperCamelCase name}}::Id); + return cppCommand != nil ? [[MC{{asUpperCamelCase ../name}}Cluster{{asUpperCamelCase name}}Command alloc] initWithCppCommand:cppCommand] : nil; +} + +{{/if}} +{{/if}} +{{/zcl_commands}} + +// {{asUpperCamelCase name}} cluster attributes: +{{#zcl_attributes_server}} +{{#if (isSupported (asUpperCamelCase ../name preserveAcronyms=true) attribute=(asUpperCamelCase name preserveAcronyms=true))}} + +- (id){{asMethodName name}}Attribute +{ + void * cppAttribute = self.cppCluster->GetAttribute(chip::app::Clusters::{{asUpperCamelCase ../name}}::Attributes::{{asUpperCamelCase name}}::Id); + return cppAttribute != nil ? [[MC{{asUpperCamelCase ../name}}Cluster{{asUpperCamelCase name}}Attribute alloc] initWithCppAttribute:cppAttribute] : nil; +} +{{/if}} +{{/zcl_attributes_server}} +@end +{{/if}} +{{/if}} +{{/zcl_clusters}} \ No newline at end of file diff --git a/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/templates/MCClusterObjects.zapt b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/templates/MCClusterObjects.zapt new file mode 100644 index 00000000000000..07d5ee8e8b128c --- /dev/null +++ b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/templates/MCClusterObjects.zapt @@ -0,0 +1,48 @@ +{{> header excludeZapComment=false}} + +#import "MCAttributeObjects.h" +#import "../MCCluster.h" +#import "../MCCommandObjects.h" +#import + +#ifndef MCClusterObjects_h +#define MCClusterObjects_h + +{{#zcl_clusters}} +{{#if (isSupported (asUpperCamelCase name))}} +{{#if (isInConfigList name "MatterCastingClusters")}} + +// {{asUpperCamelCase name}} cluster: + +@interface MC{{asUpperCamelCase name}}Cluster : MCCluster + +// {{asUpperCamelCase name}} cluster commands: + +{{#zcl_commands}} +{{#if (isSupported (asUpperCamelCase ../name preserveAcronyms=true) command=(asUpperCamelCase name preserveAcronyms=true))}} +{{#if (isInConfigList name "MatterCastingImplementedCommands")}} + +/** + * @brief Returns non-nil pointer to MC{{asUpperCamelCase ../name}}Cluster{{asUpperCamelCase name}}Command if supported, nil otherwise. + */ +- (MC{{asUpperCamelCase ../name}}Cluster{{asUpperCamelCase name}}Command * _Nullable){{asMethodName name}}Command; +{{/if}} +{{/if}} +{{/zcl_commands}} + +// {{asUpperCamelCase name}} cluster attributes: +{{#zcl_attributes_server}} +{{#if (isSupported (asUpperCamelCase ../name preserveAcronyms=true) attribute=(asUpperCamelCase name preserveAcronyms=true))}} + +/** + * @brief Returns non-nil pointer to MC{{asUpperCamelCase ../name}}Cluster{{asUpperCamelCase name}}Attribute if supported, nil otherwise. + */ +- (MC{{asUpperCamelCase ../name}}Cluster{{asUpperCamelCase name}}Attribute * _Nullable){{asMethodName name}}Attribute; +{{/if}} +{{/zcl_attributes_server}} +@end +{{/if}} +{{/if}} +{{/zcl_clusters}} + +#endif /* MCClusterObjects_h */ \ No newline at end of file diff --git a/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/templates/MCCommandObjects-src.zapt b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/templates/MCCommandObjects-src.zapt new file mode 100644 index 00000000000000..6ea810b687b028 --- /dev/null +++ b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/templates/MCCommandObjects-src.zapt @@ -0,0 +1,3 @@ +{{> header excludeZapComment=false}} + +// TODO: To be implemented in the following PR. \ No newline at end of file diff --git a/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/templates/MCCommandObjects.zapt b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/templates/MCCommandObjects.zapt new file mode 100644 index 00000000000000..6ea810b687b028 --- /dev/null +++ b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/templates/MCCommandObjects.zapt @@ -0,0 +1,3 @@ +{{> header excludeZapComment=false}} + +// TODO: To be implemented in the following PR. \ No newline at end of file diff --git a/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/templates/availability.yaml b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/templates/availability.yaml new file mode 100644 index 00000000000000..aa94eeb919f6dc --- /dev/null +++ b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/templates/availability.yaml @@ -0,0 +1,8664 @@ +# The magic value "future" for versions can be used once we are +# tracking a release but don't know what its version numbers will be. +# +# Each release has: +# * A name (labeled "release") +# * A versions field which is either a dictionary of per-OS versions, or "future" +# * "introduced" and "deprecated" fields, which are dictionaries with the following keys: +# * "clusters": An array of cluster names +# * "attributes": A dictionary with cluster names as keys and arrays of +# attribute names as values. +# * "commands": A dictionary with cluster names as keys and arrays of +# command names as values. +# * "command fields": A dictionary with cluster names as keys and dictionaries +# as values. Those dictionaries have command names as +# keys and arrays of field names as values. +# * "structs": A dictionary with cluster names as keys and arrays of +# struct names as values. +# * "struct fields": A dictionary with cluster names as keys and dictionaries +# as values. Those dictionaries have struct names as +# keys and arrays of field names as values. +# * "events": A dictionary with cluster names as keys and arrays of +# event names as values. +# * "event fields": A dictionary with cluster names as keys and dictionaries +# as values. Those dictionaries have event names as +# keys and arrays of field names as values. +# * "enums": A dictionary with cluster names as keys and arrays of +# enum names as values. +# * "enum values": A dictionary with cluster names as keys and dictionaries +# as values. Those dictionaries have enum names as +# keys and arrays of enum value names as values. +# * "bitmaps": A dictionary with cluster names as keys and arrays of +# bitmap names as values. +# * "bitmap values": A dictionary with cluster names as keys and dictionaries +# as values. Those dictionaries have bitmap names as +# keys and arrays of bitmap value names as values. +# * "ids": Can contain clusters, attributes, commands, events as described +# above inside it, but just indicates whether the id was +# introduced/deprecated, not the construct itself. +# * "command payloads": Lists commands only, if we introduced the payload without +# actually exposing API for the command. +# * "global attributes": An array of names of global attributes. +# * "apis": An array of API labels that codegen can use. +# +# * "renames": Can contain clusters, attributes, etc as described +# above for "introduced" and "deprecated", with the one +# difference that instead of an array the value is a hash +# with new names as keys and old names as values. +# +# * "removed": Can contain clusters, commands, attributes, etc as described +# above for "introduced" and "deprecated". Items can be removed +# without ever being introduced, if they are added to the XML but +# we have never shipped generated APIs for them. +# NOTE: support for "removed" may not be complete in the templates. +# Please examine codegen carefully when using "removed" to make +# sure all the things that should have been removed have been. +# +# * "swiftUnavailable": Can contain clusters, commands, attributes, etc as +# described above for "introduced" and "deprecated". This +# can be used to mark APIs with NS_SWIFT_UNAVAILABLE, +# typically when an API was renamed between two names that +# map to the same Swift name and then both names were +# deprecated. +# +# * "provisional": Can contain clusters, commands, attributes, etc as described +# above for "introduced" and "deprecated". Items can be +# defined as provisional to prevent code generation for them. +# If they are then listed as introduced in a release that is +# later than the one where they were marked provisional, +# they will start being code-generated. +# NOTE: support for "provisional" may not be complete in the +# templates. Please examine codegen carefully when using +# "provisional" to make sure all the things that should have +# been omitted have been. + +- release: "Initial release" + versions: + iOS: "16.1" + macOS: "13.0" + watchOS: "9.1" + tvOS: "16.1" + introduced: + clusters: + - Identify + - Groups + - Scenes + - OnOff + - OnOffSwitchConfiguration + - LevelControl + - BinaryInputBasic + - Descriptor + - Binding + - AccessControl + - Actions + - Basic + - OtaSoftwareUpdateProvider + - OtaSoftwareUpdateRequestor + - LocalizationConfiguration + - TimeFormatLocalization + - UnitLocalization + - PowerSourceConfiguration + - PowerSource + - GeneralCommissioning + - NetworkCommissioning + - DiagnosticLogs + - GeneralDiagnostics + - SoftwareDiagnostics + - ThreadNetworkDiagnostics + - WiFiNetworkDiagnostics + - EthernetNetworkDiagnostics + - BridgedDeviceBasic + - Switch + - AdministratorCommissioning + - OperationalCredentials + - GroupKeyManagement + - FixedLabel + - UserLabel + - BooleanState + - ModeSelect + - DoorLock + - WindowCovering + - BarrierControl + - PumpConfigurationAndControl + - Thermostat + - FanControl + - ThermostatUserInterfaceConfiguration + - ColorControl + - BallastConfiguration + - IlluminanceMeasurement + - TemperatureMeasurement + - PressureMeasurement + - FlowMeasurement + - RelativeHumidityMeasurement + - OccupancySensing + - WakeOnLan + - Channel + - TargetNavigator + - MediaPlayback + - MediaInput + - LowPower + - KeypadInput + - ContentLauncher + - AudioOutput + - ApplicationLauncher + - ApplicationBasic + - AccountLogin + - ElectricalMeasurement + - TestCluster + attributes: + Identify: + - IdentifyTime + - IdentifyType + - GeneratedCommandList + - AcceptedCommandList + - AttributeList + - FeatureMap + - ClusterRevision + Groups: + - NameSupport + - GeneratedCommandList + - AcceptedCommandList + - AttributeList + - FeatureMap + - ClusterRevision + Scenes: + - SceneCount + - CurrentScene + - CurrentGroup + - SceneValid + - NameSupport + - LastConfiguredBy + - GeneratedCommandList + - AcceptedCommandList + - AttributeList + - FeatureMap + - ClusterRevision + OnOff: + - OnOff + - GlobalSceneControl + - OnTime + - OffWaitTime + - StartUpOnOff + - GeneratedCommandList + - AcceptedCommandList + - AttributeList + - FeatureMap + - ClusterRevision + OnOffSwitchConfiguration: + - SwitchType + - SwitchActions + - GeneratedCommandList + - AcceptedCommandList + - AttributeList + - FeatureMap + - ClusterRevision + LevelControl: + - CurrentLevel + - RemainingTime + - MinLevel + - MaxLevel + - CurrentFrequency + - MinFrequency + - MaxFrequency + - Options + - OnOffTransitionTime + - OnLevel + - OnTransitionTime + - OffTransitionTime + - DefaultMoveRate + - StartUpCurrentLevel + - GeneratedCommandList + - AcceptedCommandList + - AttributeList + - FeatureMap + - ClusterRevision + BinaryInputBasic: + - ActiveText + - Description + - InactiveText + - OutOfService + - Polarity + - PresentValue + - Reliability + - StatusFlags + - ApplicationType + - GeneratedCommandList + - AcceptedCommandList + - AttributeList + - FeatureMap + - ClusterRevision + Descriptor: + - DeviceList + - ServerList + - ClientList + - PartsList + - GeneratedCommandList + - AcceptedCommandList + - AttributeList + - FeatureMap + - ClusterRevision + Binding: + - Binding + - GeneratedCommandList + - AcceptedCommandList + - AttributeList + - FeatureMap + - ClusterRevision + AccessControl: + - Acl + - Extension + - SubjectsPerAccessControlEntry + - TargetsPerAccessControlEntry + - AccessControlEntriesPerFabric + - GeneratedCommandList + - AcceptedCommandList + - AttributeList + - FeatureMap + - ClusterRevision + Actions: + - ActionList + - EndpointLists + - SetupURL + - GeneratedCommandList + - AcceptedCommandList + - AttributeList + - FeatureMap + - ClusterRevision + Basic: + - DataModelRevision + - VendorName + - VendorID + - ProductName + - ProductID + - NodeLabel + - Location + - HardwareVersion + - HardwareVersionString + - SoftwareVersion + - SoftwareVersionString + - ManufacturingDate + - PartNumber + - ProductURL + - ProductLabel + - SerialNumber + - LocalConfigDisabled + - Reachable + - UniqueID + - CapabilityMinima + - GeneratedCommandList + - AcceptedCommandList + - AttributeList + - FeatureMap + - ClusterRevision + OtaSoftwareUpdateProvider: + - GeneratedCommandList + - AcceptedCommandList + - AttributeList + - FeatureMap + - ClusterRevision + OtaSoftwareUpdateRequestor: + - DefaultOtaProviders + - UpdatePossible + - UpdateState + - UpdateStateProgress + - GeneratedCommandList + - AcceptedCommandList + - AttributeList + - FeatureMap + - ClusterRevision + LocalizationConfiguration: + - ActiveLocale + - SupportedLocales + - GeneratedCommandList + - AcceptedCommandList + - AttributeList + - FeatureMap + - ClusterRevision + TimeFormatLocalization: + - HourFormat + - ActiveCalendarType + - SupportedCalendarTypes + - GeneratedCommandList + - AcceptedCommandList + - AttributeList + - FeatureMap + - ClusterRevision + UnitLocalization: + - TemperatureUnit + - GeneratedCommandList + - AcceptedCommandList + - AttributeList + - FeatureMap + - ClusterRevision + PowerSourceConfiguration: + - Sources + - GeneratedCommandList + - AcceptedCommandList + - AttributeList + - FeatureMap + - ClusterRevision + PowerSource: + - Status + - Order + - Description + - WiredAssessedInputVoltage + - WiredAssessedInputFrequency + - WiredCurrentType + - WiredAssessedCurrent + - WiredNominalVoltage + - WiredMaximumCurrent + - WiredPresent + - ActiveWiredFaults + - BatVoltage + - BatPercentRemaining + - BatTimeRemaining + - BatChargeLevel + - BatReplacementNeeded + - BatReplaceability + - BatPresent + - ActiveBatFaults + - BatReplacementDescription + - BatCommonDesignation + - BatANSIDesignation + - BatIECDesignation + - BatApprovedChemistry + - BatCapacity + - BatQuantity + - BatChargeState + - BatTimeToFullCharge + - BatFunctionalWhileCharging + - BatChargingCurrent + - ActiveBatChargeFaults + - GeneratedCommandList + - AcceptedCommandList + - AttributeList + - FeatureMap + - ClusterRevision + GeneralCommissioning: + - Breadcrumb + - BasicCommissioningInfo + - RegulatoryConfig + - LocationCapability + - SupportsConcurrentConnection + - GeneratedCommandList + - AcceptedCommandList + - AttributeList + - FeatureMap + - ClusterRevision + NetworkCommissioning: + - MaxNetworks + - Networks + - ScanMaxTimeSeconds + - ConnectMaxTimeSeconds + - InterfaceEnabled + - LastNetworkingStatus + - LastNetworkID + - LastConnectErrorValue + - GeneratedCommandList + - AcceptedCommandList + - AttributeList + - FeatureMap + - ClusterRevision + DiagnosticLogs: + - GeneratedCommandList + - AcceptedCommandList + - AttributeList + - FeatureMap + - ClusterRevision + GeneralDiagnostics: + - NetworkInterfaces + - RebootCount + - UpTime + - TotalOperationalHours + - BootReasons + - ActiveHardwareFaults + - ActiveRadioFaults + - ActiveNetworkFaults + - TestEventTriggersEnabled + - GeneratedCommandList + - AcceptedCommandList + - AttributeList + - FeatureMap + - ClusterRevision + SoftwareDiagnostics: + - ThreadMetrics + - CurrentHeapFree + - CurrentHeapUsed + - CurrentHeapHighWatermark + - GeneratedCommandList + - AcceptedCommandList + - AttributeList + - FeatureMap + - ClusterRevision + ThreadNetworkDiagnostics: + - Channel + - RoutingRole + - NetworkName + - PanId + - ExtendedPanId + - MeshLocalPrefix + - OverrunCount + - NeighborTableList + - RouteTableList + - PartitionId + - Weighting + - DataVersion + - StableDataVersion + - LeaderRouterId + - DetachedRoleCount + - ChildRoleCount + - RouterRoleCount + - LeaderRoleCount + - AttachAttemptCount + - PartitionIdChangeCount + - BetterPartitionAttachAttemptCount + - ParentChangeCount + - TxTotalCount + - TxUnicastCount + - TxBroadcastCount + - TxAckRequestedCount + - TxAckedCount + - TxNoAckRequestedCount + - TxDataCount + - TxDataPollCount + - TxBeaconCount + - TxBeaconRequestCount + - TxOtherCount + - TxRetryCount + - TxDirectMaxRetryExpiryCount + - TxIndirectMaxRetryExpiryCount + - TxErrCcaCount + - TxErrAbortCount + - TxErrBusyChannelCount + - RxTotalCount + - RxUnicastCount + - RxBroadcastCount + - RxDataCount + - RxDataPollCount + - RxBeaconCount + - RxBeaconRequestCount + - RxOtherCount + - RxAddressFilteredCount + - RxDestAddrFilteredCount + - RxDuplicatedCount + - RxErrNoFrameCount + - RxErrUnknownNeighborCount + - RxErrInvalidSrcAddrCount + - RxErrSecCount + - RxErrFcsCount + - RxErrOtherCount + - ActiveTimestamp + - PendingTimestamp + - Delay + - SecurityPolicy + - ChannelPage0Mask + - OperationalDatasetComponents + - ActiveNetworkFaultsList + - GeneratedCommandList + - AcceptedCommandList + - AttributeList + - FeatureMap + - ClusterRevision + WiFiNetworkDiagnostics: + - Bssid + - SecurityType + - WiFiVersion + - ChannelNumber + - Rssi + - BeaconLostCount + - BeaconRxCount + - PacketMulticastRxCount + - PacketMulticastTxCount + - PacketUnicastRxCount + - PacketUnicastTxCount + - CurrentMaxRate + - OverrunCount + - GeneratedCommandList + - AcceptedCommandList + - AttributeList + - FeatureMap + - ClusterRevision + EthernetNetworkDiagnostics: + - PHYRate + - FullDuplex + - PacketRxCount + - PacketTxCount + - TxErrCount + - CollisionCount + - OverrunCount + - CarrierDetect + - TimeSinceReset + - GeneratedCommandList + - AcceptedCommandList + - AttributeList + - FeatureMap + - ClusterRevision + BridgedDeviceBasic: + - VendorName + - VendorID + - ProductName + - NodeLabel + - HardwareVersion + - HardwareVersionString + - SoftwareVersion + - SoftwareVersionString + - ManufacturingDate + - PartNumber + - ProductURL + - ProductLabel + - SerialNumber + - Reachable + - UniqueID + - GeneratedCommandList + - AcceptedCommandList + - AttributeList + - FeatureMap + - ClusterRevision + Switch: + - NumberOfPositions + - CurrentPosition + - MultiPressMax + - GeneratedCommandList + - AcceptedCommandList + - AttributeList + - FeatureMap + - ClusterRevision + AdministratorCommissioning: + - WindowStatus + - AdminFabricIndex + - AdminVendorId + - GeneratedCommandList + - AcceptedCommandList + - AttributeList + - FeatureMap + - ClusterRevision + OperationalCredentials: + - NOCs + - Fabrics + - SupportedFabrics + - CommissionedFabrics + - TrustedRootCertificates + - CurrentFabricIndex + - GeneratedCommandList + - AcceptedCommandList + - AttributeList + - FeatureMap + - ClusterRevision + GroupKeyManagement: + - GroupKeyMap + - GroupTable + - MaxGroupsPerFabric + - MaxGroupKeysPerFabric + - GeneratedCommandList + - AcceptedCommandList + - AttributeList + - FeatureMap + - ClusterRevision + FixedLabel: + - LabelList + - GeneratedCommandList + - AcceptedCommandList + - AttributeList + - FeatureMap + - ClusterRevision + UserLabel: + - LabelList + - GeneratedCommandList + - AcceptedCommandList + - AttributeList + - FeatureMap + - ClusterRevision + BooleanState: + - StateValue + - GeneratedCommandList + - AcceptedCommandList + - AttributeList + - FeatureMap + - ClusterRevision + ModeSelect: + - Description + - StandardNamespace + - SupportedModes + - CurrentMode + - StartUpMode + - OnMode + - GeneratedCommandList + - AcceptedCommandList + - AttributeList + - FeatureMap + - ClusterRevision + DoorLock: + - LockState + - LockType + - ActuatorEnabled + - DoorState + - DoorOpenEvents + - DoorClosedEvents + - OpenPeriod + - NumberOfTotalUsersSupported + - NumberOfPINUsersSupported + - NumberOfRFIDUsersSupported + - NumberOfWeekDaySchedulesSupportedPerUser + - NumberOfYearDaySchedulesSupportedPerUser + - NumberOfHolidaySchedulesSupported + - MaxPINCodeLength + - MinPINCodeLength + - MaxRFIDCodeLength + - MinRFIDCodeLength + - CredentialRulesSupport + - NumberOfCredentialsSupportedPerUser + - Language + - LEDSettings + - AutoRelockTime + - SoundVolume + - OperatingMode + - SupportedOperatingModes + - DefaultConfigurationRegister + - EnableLocalProgramming + - EnableOneTouchLocking + - EnableInsideStatusLED + - EnablePrivacyModeButton + - LocalProgrammingFeatures + - WrongCodeEntryLimit + - UserCodeTemporaryDisableTime + - SendPINOverTheAir + - RequirePINforRemoteOperation + - ExpiringUserTimeout + - GeneratedCommandList + - AcceptedCommandList + - AttributeList + - FeatureMap + - ClusterRevision + WindowCovering: + - Type + - PhysicalClosedLimitLift + - PhysicalClosedLimitTilt + - CurrentPositionLift + - CurrentPositionTilt + - NumberOfActuationsLift + - NumberOfActuationsTilt + - ConfigStatus + - CurrentPositionLiftPercentage + - CurrentPositionTiltPercentage + - OperationalStatus + - TargetPositionLiftPercent100ths + - TargetPositionTiltPercent100ths + - EndProductType + - CurrentPositionLiftPercent100ths + - CurrentPositionTiltPercent100ths + - InstalledOpenLimitLift + - InstalledClosedLimitLift + - InstalledOpenLimitTilt + - InstalledClosedLimitTilt + - Mode + - SafetyStatus + - GeneratedCommandList + - AcceptedCommandList + - AttributeList + - FeatureMap + - ClusterRevision + BarrierControl: + - BarrierMovingState + - BarrierSafetyStatus + - BarrierCapabilities + - BarrierOpenEvents + - BarrierCloseEvents + - BarrierCommandOpenEvents + - BarrierCommandCloseEvents + - BarrierOpenPeriod + - BarrierClosePeriod + - BarrierPosition + - GeneratedCommandList + - AcceptedCommandList + - AttributeList + - FeatureMap + - ClusterRevision + PumpConfigurationAndControl: + - MaxPressure + - MaxSpeed + - MaxFlow + - MinConstPressure + - MaxConstPressure + - MinCompPressure + - MaxCompPressure + - MinConstSpeed + - MaxConstSpeed + - MinConstFlow + - MaxConstFlow + - MinConstTemp + - MaxConstTemp + - PumpStatus + - EffectiveOperationMode + - EffectiveControlMode + - Capacity + - Speed + - LifetimeRunningHours + - Power + - LifetimeEnergyConsumed + - OperationMode + - ControlMode + - GeneratedCommandList + - AcceptedCommandList + - AttributeList + - FeatureMap + - ClusterRevision + Thermostat: + - LocalTemperature + - OutdoorTemperature + - Occupancy + - AbsMinHeatSetpointLimit + - AbsMaxHeatSetpointLimit + - AbsMinCoolSetpointLimit + - AbsMaxCoolSetpointLimit + - PICoolingDemand + - PIHeatingDemand + - HVACSystemTypeConfiguration + - LocalTemperatureCalibration + - OccupiedCoolingSetpoint + - OccupiedHeatingSetpoint + - UnoccupiedCoolingSetpoint + - UnoccupiedHeatingSetpoint + - MinHeatSetpointLimit + - MaxHeatSetpointLimit + - MinCoolSetpointLimit + - MaxCoolSetpointLimit + - MinSetpointDeadBand + - RemoteSensing + - ControlSequenceOfOperation + - SystemMode + - ThermostatRunningMode + - StartOfWeek + - NumberOfWeeklyTransitions + - NumberOfDailyTransitions + - TemperatureSetpointHold + - TemperatureSetpointHoldDuration + - ThermostatProgrammingOperationMode + - ThermostatRunningState + - SetpointChangeSource + - SetpointChangeAmount + - SetpointChangeSourceTimestamp + - OccupiedSetback + - OccupiedSetbackMin + - OccupiedSetbackMax + - UnoccupiedSetback + - UnoccupiedSetbackMin + - UnoccupiedSetbackMax + - EmergencyHeatDelta + - ACType + - ACCapacity + - ACRefrigerantType + - ACCompressorType + - ACErrorCode + - ACLouverPosition + - ACCoilTemperature + - ACCapacityformat + - GeneratedCommandList + - AcceptedCommandList + - AttributeList + - FeatureMap + - ClusterRevision + FanControl: + - FanMode + - FanModeSequence + - PercentSetting + - PercentCurrent + - SpeedMax + - SpeedSetting + - SpeedCurrent + - RockSupport + - RockSetting + - WindSupport + - WindSetting + - GeneratedCommandList + - AcceptedCommandList + - AttributeList + - FeatureMap + - ClusterRevision + ThermostatUserInterfaceConfiguration: + - TemperatureDisplayMode + - KeypadLockout + - ScheduleProgrammingVisibility + - GeneratedCommandList + - AcceptedCommandList + - AttributeList + - FeatureMap + - ClusterRevision + ColorControl: + - CurrentHue + - CurrentSaturation + - RemainingTime + - CurrentX + - CurrentY + - DriftCompensation + - CompensationText + - ColorTemperatureMireds + - ColorMode + - Options + - NumberOfPrimaries + - Primary1X + - Primary1Y + - Primary1Intensity + - Primary2X + - Primary2Y + - Primary2Intensity + - Primary3X + - Primary3Y + - Primary3Intensity + - Primary4X + - Primary4Y + - Primary4Intensity + - Primary5X + - Primary5Y + - Primary5Intensity + - Primary6X + - Primary6Y + - Primary6Intensity + - WhitePointX + - WhitePointY + - ColorPointRX + - ColorPointRY + - ColorPointRIntensity + - ColorPointGX + - ColorPointGY + - ColorPointGIntensity + - ColorPointBX + - ColorPointBY + - ColorPointBIntensity + - EnhancedCurrentHue + - EnhancedColorMode + - ColorLoopActive + - ColorLoopDirection + - ColorLoopTime + - ColorLoopStartEnhancedHue + - ColorLoopStoredEnhancedHue + - ColorCapabilities + - ColorTempPhysicalMinMireds + - ColorTempPhysicalMaxMireds + - CoupleColorTempToLevelMinMireds + - StartUpColorTemperatureMireds + - GeneratedCommandList + - AcceptedCommandList + - AttributeList + - FeatureMap + - ClusterRevision + BallastConfiguration: + - PhysicalMinLevel + - PhysicalMaxLevel + - BallastStatus + - MinLevel + - MaxLevel + - IntrinsicBalanceFactor + - BallastFactorAdjustment + - LampQuantity + - LampType + - LampManufacturer + - LampRatedHours + - LampBurnHours + - LampAlarmMode + - LampBurnHoursTripPoint + - GeneratedCommandList + - AcceptedCommandList + - AttributeList + - FeatureMap + - ClusterRevision + IlluminanceMeasurement: + - MeasuredValue + - MinMeasuredValue + - MaxMeasuredValue + - Tolerance + - LightSensorType + - GeneratedCommandList + - AcceptedCommandList + - AttributeList + - FeatureMap + - ClusterRevision + TemperatureMeasurement: + - MeasuredValue + - MinMeasuredValue + - MaxMeasuredValue + - Tolerance + - GeneratedCommandList + - AcceptedCommandList + - AttributeList + - FeatureMap + - ClusterRevision + PressureMeasurement: + - MeasuredValue + - MinMeasuredValue + - MaxMeasuredValue + - Tolerance + - ScaledValue + - MinScaledValue + - MaxScaledValue + - ScaledTolerance + - Scale + - GeneratedCommandList + - AcceptedCommandList + - AttributeList + - FeatureMap + - ClusterRevision + FlowMeasurement: + - MeasuredValue + - MinMeasuredValue + - MaxMeasuredValue + - Tolerance + - GeneratedCommandList + - AcceptedCommandList + - AttributeList + - FeatureMap + - ClusterRevision + RelativeHumidityMeasurement: + - MeasuredValue + - MinMeasuredValue + - MaxMeasuredValue + - Tolerance + - GeneratedCommandList + - AcceptedCommandList + - AttributeList + - FeatureMap + - ClusterRevision + OccupancySensing: + - Occupancy + - OccupancySensorType + - OccupancySensorTypeBitmap + - PirOccupiedToUnoccupiedDelay + - PirUnoccupiedToOccupiedDelay + - PirUnoccupiedToOccupiedThreshold + - UltrasonicOccupiedToUnoccupiedDelay + - UltrasonicUnoccupiedToOccupiedDelay + - UltrasonicUnoccupiedToOccupiedThreshold + - PhysicalContactOccupiedToUnoccupiedDelay + - PhysicalContactUnoccupiedToOccupiedDelay + - PhysicalContactUnoccupiedToOccupiedThreshold + - GeneratedCommandList + - AcceptedCommandList + - AttributeList + - FeatureMap + - ClusterRevision + WakeOnLan: + - MACAddress + - GeneratedCommandList + - AcceptedCommandList + - AttributeList + - FeatureMap + - ClusterRevision + Channel: + - ChannelList + - Lineup + - CurrentChannel + - GeneratedCommandList + - AcceptedCommandList + - AttributeList + - FeatureMap + - ClusterRevision + TargetNavigator: + - TargetList + - CurrentTarget + - GeneratedCommandList + - AcceptedCommandList + - AttributeList + - FeatureMap + - ClusterRevision + MediaPlayback: + - CurrentState + - StartTime + - Duration + - SampledPosition + - PlaybackSpeed + - SeekRangeEnd + - SeekRangeStart + - GeneratedCommandList + - AcceptedCommandList + - AttributeList + - FeatureMap + - ClusterRevision + MediaInput: + - InputList + - CurrentInput + - GeneratedCommandList + - AcceptedCommandList + - AttributeList + - FeatureMap + - ClusterRevision + LowPower: + - GeneratedCommandList + - AcceptedCommandList + - AttributeList + - FeatureMap + - ClusterRevision + KeypadInput: + - GeneratedCommandList + - AcceptedCommandList + - AttributeList + - FeatureMap + - ClusterRevision + ContentLauncher: + - AcceptHeader + - SupportedStreamingProtocols + - GeneratedCommandList + - AcceptedCommandList + - AttributeList + - FeatureMap + - ClusterRevision + AudioOutput: + - OutputList + - CurrentOutput + - GeneratedCommandList + - AcceptedCommandList + - AttributeList + - FeatureMap + - ClusterRevision + ApplicationLauncher: + - CatalogList + - CurrentApp + - GeneratedCommandList + - AcceptedCommandList + - AttributeList + - FeatureMap + - ClusterRevision + ApplicationBasic: + - VendorName + - VendorID + - ApplicationName + - ProductID + - Application + - Status + - ApplicationVersion + - AllowedVendorList + - GeneratedCommandList + - AcceptedCommandList + - AttributeList + - FeatureMap + - ClusterRevision + AccountLogin: + - GeneratedCommandList + - AcceptedCommandList + - AttributeList + - FeatureMap + - ClusterRevision + ElectricalMeasurement: + - MeasurementType + - DcVoltage + - DcVoltageMin + - DcVoltageMax + - DcCurrent + - DcCurrentMin + - DcCurrentMax + - DcPower + - DcPowerMin + - DcPowerMax + - DcVoltageMultiplier + - DcVoltageDivisor + - DcCurrentMultiplier + - DcCurrentDivisor + - DcPowerMultiplier + - DcPowerDivisor + - AcFrequency + - AcFrequencyMin + - AcFrequencyMax + - NeutralCurrent + - TotalActivePower + - TotalReactivePower + - TotalApparentPower + - Measured1stHarmonicCurrent + - Measured3rdHarmonicCurrent + - Measured5thHarmonicCurrent + - Measured7thHarmonicCurrent + - Measured9thHarmonicCurrent + - Measured11thHarmonicCurrent + - MeasuredPhase1stHarmonicCurrent + - MeasuredPhase3rdHarmonicCurrent + - MeasuredPhase5thHarmonicCurrent + - MeasuredPhase7thHarmonicCurrent + - MeasuredPhase9thHarmonicCurrent + - MeasuredPhase11thHarmonicCurrent + - AcFrequencyMultiplier + - AcFrequencyDivisor + - PowerMultiplier + - PowerDivisor + - HarmonicCurrentMultiplier + - PhaseHarmonicCurrentMultiplier + - InstantaneousVoltage + - InstantaneousLineCurrent + - InstantaneousActiveCurrent + - InstantaneousReactiveCurrent + - InstantaneousPower + - RmsVoltage + - RmsVoltageMin + - RmsVoltageMax + - RmsCurrent + - RmsCurrentMin + - RmsCurrentMax + - ActivePower + - ActivePowerMin + - ActivePowerMax + - ReactivePower + - ApparentPower + - PowerFactor + - AverageRmsVoltageMeasurementPeriod + - AverageRmsUnderVoltageCounter + - RmsExtremeOverVoltagePeriod + - RmsExtremeUnderVoltagePeriod + - RmsVoltageSagPeriod + - RmsVoltageSwellPeriod + - AcVoltageMultiplier + - AcVoltageDivisor + - AcCurrentMultiplier + - AcCurrentDivisor + - AcPowerMultiplier + - AcPowerDivisor + - OverloadAlarmsMask + - VoltageOverload + - CurrentOverload + - AcOverloadAlarmsMask + - AcVoltageOverload + - AcCurrentOverload + - AcActivePowerOverload + - AcReactivePowerOverload + - AverageRmsOverVoltage + - AverageRmsUnderVoltage + - RmsExtremeOverVoltage + - RmsExtremeUnderVoltage + - RmsVoltageSag + - RmsVoltageSwell + - LineCurrentPhaseB + - ActiveCurrentPhaseB + - ReactiveCurrentPhaseB + - RmsVoltagePhaseB + - RmsVoltageMinPhaseB + - RmsVoltageMaxPhaseB + - RmsCurrentPhaseB + - RmsCurrentMinPhaseB + - RmsCurrentMaxPhaseB + - ActivePowerPhaseB + - ActivePowerMinPhaseB + - ActivePowerMaxPhaseB + - ReactivePowerPhaseB + - ApparentPowerPhaseB + - PowerFactorPhaseB + - AverageRmsVoltageMeasurementPeriodPhaseB + - AverageRmsOverVoltageCounterPhaseB + - AverageRmsUnderVoltageCounterPhaseB + - RmsExtremeOverVoltagePeriodPhaseB + - RmsExtremeUnderVoltagePeriodPhaseB + - RmsVoltageSagPeriodPhaseB + - RmsVoltageSwellPeriodPhaseB + - LineCurrentPhaseC + - ActiveCurrentPhaseC + - ReactiveCurrentPhaseC + - RmsVoltagePhaseC + - RmsVoltageMinPhaseC + - RmsVoltageMaxPhaseC + - RmsCurrentPhaseC + - RmsCurrentMinPhaseC + - RmsCurrentMaxPhaseC + - ActivePowerPhaseC + - ActivePowerMinPhaseC + - ActivePowerMaxPhaseC + - ReactivePowerPhaseC + - ApparentPowerPhaseC + - PowerFactorPhaseC + - AverageRmsVoltageMeasurementPeriodPhaseC + - AverageRmsOverVoltageCounterPhaseC + - AverageRmsUnderVoltageCounterPhaseC + - RmsExtremeOverVoltagePeriodPhaseC + - RmsExtremeUnderVoltagePeriodPhaseC + - RmsVoltageSagPeriodPhaseC + - RmsVoltageSwellPeriodPhaseC + - GeneratedCommandList + - AcceptedCommandList + - AttributeList + - FeatureMap + - ClusterRevision + TestCluster: + - Boolean + - Bitmap8 + - Bitmap16 + - Bitmap32 + - Bitmap64 + - Int8u + - Int16u + - Int24u + - Int32u + - Int40u + - Int48u + - Int56u + - Int64u + - Int8s + - Int16s + - Int24s + - Int32s + - Int40s + - Int48s + - Int56s + - Int64s + - Enum8 + - Enum16 + - FloatSingle + - FloatDouble + - OctetString + - ListInt8u + - ListOctetString + - ListStructOctetString + - LongOctetString + - CharString + - LongCharString + - EpochUs + - EpochS + - VendorId + - ListNullablesAndOptionalsStruct + - EnumAttr + - StructAttr + - RangeRestrictedInt8u + - RangeRestrictedInt8s + - RangeRestrictedInt16u + - RangeRestrictedInt16s + - ListLongOctetString + - ListFabricScoped + - TimedWriteBoolean + - GeneralErrorBoolean + - ClusterErrorBoolean + - Unsupported + - NullableBoolean + - NullableBitmap8 + - NullableBitmap16 + - NullableBitmap32 + - NullableBitmap64 + - NullableInt8u + - NullableInt16u + - NullableInt24u + - NullableInt32u + - NullableInt40u + - NullableInt48u + - NullableInt56u + - NullableInt64u + - NullableInt8s + - NullableInt16s + - NullableInt24s + - NullableInt32s + - NullableInt40s + - NullableInt48s + - NullableInt56s + - NullableInt64s + - NullableEnum8 + - NullableEnum16 + - NullableFloatSingle + - NullableFloatDouble + - NullableOctetString + - NullableCharString + - NullableEnumAttr + - NullableStruct + - NullableRangeRestrictedInt8u + - NullableRangeRestrictedInt8s + - NullableRangeRestrictedInt16u + - NullableRangeRestrictedInt16s + - GeneratedCommandList + - AcceptedCommandList + - AttributeList + - FeatureMap + - ClusterRevision + commands: + Identify: + - Identify + - TriggerEffect + Groups: + - AddGroup + - AddGroupResponse + - ViewGroup + - ViewGroupResponse + - GetGroupMembership + - GetGroupMembershipResponse + - RemoveGroup + - RemoveGroupResponse + - RemoveAllGroups + - AddGroupIfIdentifying + Scenes: + - AddScene + - AddSceneResponse + - ViewScene + - ViewSceneResponse + - RemoveScene + - RemoveSceneResponse + - RemoveAllScenes + - RemoveAllScenesResponse + - StoreScene + - StoreSceneResponse + - RecallScene + - GetSceneMembership + - GetSceneMembershipResponse + - EnhancedAddScene + - EnhancedAddSceneResponse + - EnhancedViewScene + - EnhancedViewSceneResponse + - CopyScene + - CopySceneResponse + OnOff: + - Off + - On + - Toggle + - OffWithEffect + - OnWithRecallGlobalScene + - OnWithTimedOff + LevelControl: + - MoveToLevel + - Move + - Step + - Stop + - MoveToLevelWithOnOff + - MoveWithOnOff + - StepWithOnOff + - StopWithOnOff + - MoveToClosestFrequency + Actions: + - InstantAction + - InstantActionWithTransition + - StartAction + - StartActionWithDuration + - StopAction + - PauseAction + - PauseActionWithDuration + - ResumeAction + - EnableAction + - EnableActionWithDuration + - DisableAction + - DisableActionWithDuration + Basic: + - MfgSpecificPing + OtaSoftwareUpdateProvider: + - QueryImage + - QueryImageResponse + - ApplyUpdateRequest + - ApplyUpdateResponse + - NotifyUpdateApplied + OtaSoftwareUpdateRequestor: + - AnnounceOtaProvider + GeneralCommissioning: + - ArmFailSafe + - ArmFailSafeResponse + - SetRegulatoryConfig + - SetRegulatoryConfigResponse + - CommissioningComplete + - CommissioningCompleteResponse + NetworkCommissioning: + - ScanNetworks + - ScanNetworksResponse + - AddOrUpdateWiFiNetwork + - AddOrUpdateThreadNetwork + - RemoveNetwork + - NetworkConfigResponse + - ConnectNetwork + - ConnectNetworkResponse + - ReorderNetwork + DiagnosticLogs: + - RetrieveLogsRequest + - RetrieveLogsResponse + GeneralDiagnostics: + - TestEventTrigger + SoftwareDiagnostics: + - ResetWatermarks + ThreadNetworkDiagnostics: + - ResetCounts + WiFiNetworkDiagnostics: + - ResetCounts + EthernetNetworkDiagnostics: + - ResetCounts + AdministratorCommissioning: + - OpenCommissioningWindow + - OpenBasicCommissioningWindow + - RevokeCommissioning + OperationalCredentials: + - AttestationRequest + - AttestationResponse + - CertificateChainRequest + - CertificateChainResponse + - CSRRequest + - CSRResponse + - AddNOC + - UpdateNOC + - NOCResponse + - UpdateFabricLabel + - RemoveFabric + - AddTrustedRootCertificate + GroupKeyManagement: + - KeySetWrite + - KeySetRead + - KeySetReadResponse + - KeySetRemove + - KeySetReadAllIndices + - KeySetReadAllIndicesResponse + ModeSelect: + - ChangeToMode + DoorLock: + - LockDoor + - UnlockDoor + - UnlockWithTimeout + - SetWeekDaySchedule + - GetWeekDaySchedule + - GetWeekDayScheduleResponse + - ClearWeekDaySchedule + - SetYearDaySchedule + - GetYearDaySchedule + - GetYearDayScheduleResponse + - ClearYearDaySchedule + - SetHolidaySchedule + - GetHolidaySchedule + - GetHolidayScheduleResponse + - ClearHolidaySchedule + - SetUser + - GetUser + - GetUserResponse + - ClearUser + - SetCredential + - SetCredentialResponse + - GetCredentialStatus + - GetCredentialStatusResponse + - ClearCredential + WindowCovering: + - UpOrOpen + - DownOrClose + - StopMotion + - GoToLiftValue + - GoToLiftPercentage + - GoToTiltValue + - GoToTiltPercentage + BarrierControl: + - BarrierControlGoToPercent + - BarrierControlStop + Thermostat: + - SetpointRaiseLower + - GetWeeklyScheduleResponse + - SetWeeklySchedule + - GetWeeklySchedule + - ClearWeeklySchedule + ColorControl: + - MoveToHue + - MoveHue + - StepHue + - MoveToSaturation + - MoveSaturation + - StepSaturation + - MoveToHueAndSaturation + - MoveToColor + - MoveColor + - StepColor + - MoveToColorTemperature + - EnhancedMoveToHue + - EnhancedMoveHue + - EnhancedStepHue + - EnhancedMoveToHueAndSaturation + - ColorLoopSet + - StopMoveStep + - MoveColorTemperature + - StepColorTemperature + Channel: + - ChangeChannel + - ChangeChannelResponse + - ChangeChannelByNumber + - SkipChannel + TargetNavigator: + - NavigateTarget + - NavigateTargetResponse + MediaPlayback: + - Play + - Pause + - StopPlayback + - StartOver + - Previous + - Next + - Rewind + - FastForward + - SkipForward + - SkipBackward + - PlaybackResponse + - Seek + MediaInput: + - SelectInput + - ShowInputStatus + - HideInputStatus + - RenameInput + LowPower: + - Sleep + KeypadInput: + - SendKey + - SendKeyResponse + ContentLauncher: + - LaunchContent + - LaunchURL + - LaunchResponse + AudioOutput: + - SelectOutput + - RenameOutput + ApplicationLauncher: + - LaunchApp + - StopApp + - HideApp + - LauncherResponse + AccountLogin: + - GetSetupPIN + - GetSetupPINResponse + - Login + - Logout + ElectricalMeasurement: + - GetProfileInfoResponseCommand + - GetProfileInfoCommand + - GetMeasurementProfileResponseCommand + - GetMeasurementProfileCommand + TestCluster: + - Test + - TestSpecificResponse + - TestNotHandled + - TestAddArgumentsResponse + - TestSpecific + - TestSimpleArgumentResponse + - TestUnknownCommand + - TestStructArrayArgumentResponse + - TestAddArguments + - TestListInt8UReverseResponse + - TestSimpleArgumentRequest + - TestEnumsResponse + - TestStructArrayArgumentRequest + - TestNullableOptionalResponse + - TestStructArgumentRequest + - TestComplexNullableOptionalResponse + - TestNestedStructArgumentRequest + - BooleanResponse + - TestListStructArgumentRequest + - SimpleStructResponse + - TestListInt8UArgumentRequest + - TestEmitTestEventResponse + - TestNestedStructListArgumentRequest + - TestEmitTestFabricScopedEventResponse + - TestListNestedStructListArgumentRequest + - TestListInt8UReverseRequest + - TestEnumsRequest + - TestNullableOptionalRequest + - TestComplexNullableOptionalRequest + - SimpleStructEchoRequest + - TimedInvokeRequest + - TestSimpleOptionalArgumentRequest + - TestEmitTestEventRequest + - TestEmitTestFabricScopedEventRequest + command fields: + Identify: + Identify: + - identifyTime + TriggerEffect: + - effectIdentifier + - effectVariant + Groups: + AddGroup: + - groupId + - groupName + AddGroupResponse: + - status + - groupId + ViewGroup: + - groupId + ViewGroupResponse: + - status + - groupId + - groupName + GetGroupMembership: + - groupList + GetGroupMembershipResponse: + - capacity + - groupList + RemoveGroup: + - groupId + RemoveGroupResponse: + - status + - groupId + AddGroupIfIdentifying: + - groupId + - groupName + Scenes: + AddScene: + - groupId + - sceneId + - transitionTime + - sceneName + - extensionFieldSets + AddSceneResponse: + - status + - groupId + - sceneId + ViewScene: + - groupId + - sceneId + ViewSceneResponse: + - status + - groupId + - sceneId + - transitionTime + - sceneName + - extensionFieldSets + RemoveScene: + - groupId + - sceneId + RemoveSceneResponse: + - status + - groupId + - sceneId + RemoveAllScenes: + - groupId + RemoveAllScenesResponse: + - status + - groupId + StoreScene: + - groupId + - sceneId + StoreSceneResponse: + - status + - groupId + - sceneId + RecallScene: + - groupId + - sceneId + - transitionTime + GetSceneMembership: + - groupId + GetSceneMembershipResponse: + - status + - capacity + - groupId + - sceneList + EnhancedAddScene: + - groupId + - sceneId + - transitionTime + - sceneName + - extensionFieldSets + EnhancedAddSceneResponse: + - status + - groupId + - sceneId + EnhancedViewScene: + - groupId + - sceneId + EnhancedViewSceneResponse: + - status + - groupId + - sceneId + - transitionTime + - sceneName + - extensionFieldSets + CopyScene: + - mode + - groupIdFrom + - sceneIdFrom + - groupIdTo + - sceneIdTo + CopySceneResponse: + - status + - groupIdFrom + - sceneIdFrom + OnOff: + OffWithEffect: + - effectId + - effectVariant + OnWithTimedOff: + - onOffControl + - onTime + - offWaitTime + LevelControl: + MoveToLevel: + - level + - transitionTime + - optionsMask + - optionsOverride + Move: + - moveMode + - rate + - optionsMask + - optionsOverride + Step: + - stepMode + - stepSize + - transitionTime + - optionsMask + - optionsOverride + Stop: + - optionsMask + - optionsOverride + MoveToLevelWithOnOff: + - level + - transitionTime + - optionsMask + - optionsOverride + MoveWithOnOff: + - moveMode + - rate + - optionsMask + - optionsOverride + StepWithOnOff: + - stepMode + - stepSize + - transitionTime + - optionsMask + - optionsOverride + StopWithOnOff: + - optionsMask + - optionsOverride + MoveToClosestFrequency: + - frequency + Actions: + InstantAction: + - actionID + - invokeID + InstantActionWithTransition: + - actionID + - invokeID + - transitionTime + StartAction: + - actionID + - invokeID + StartActionWithDuration: + - actionID + - invokeID + - duration + StopAction: + - actionID + - invokeID + PauseAction: + - actionID + - invokeID + PauseActionWithDuration: + - actionID + - invokeID + - duration + ResumeAction: + - actionID + - invokeID + EnableAction: + - actionID + - invokeID + EnableActionWithDuration: + - actionID + - invokeID + - duration + DisableAction: + - actionID + - invokeID + DisableActionWithDuration: + - actionID + - invokeID + - duration + OtaSoftwareUpdateProvider: + QueryImage: + - vendorId + - productId + - softwareVersion + - protocolsSupported + - hardwareVersion + - location + - requestorCanConsent + - metadataForProvider + QueryImageResponse: + - status + - delayedActionTime + - imageURI + - softwareVersion + - softwareVersionString + - updateToken + - userConsentNeeded + - metadataForRequestor + ApplyUpdateRequest: + - updateToken + - newVersion + ApplyUpdateResponse: + - action + - delayedActionTime + NotifyUpdateApplied: + - updateToken + - softwareVersion + OtaSoftwareUpdateRequestor: + AnnounceOtaProvider: + - providerNodeId + - vendorId + - announcementReason + - metadataForNode + - endpoint + GeneralCommissioning: + ArmFailSafe: + - expiryLengthSeconds + - breadcrumb + ArmFailSafeResponse: + - errorCode + - debugText + SetRegulatoryConfig: + - newRegulatoryConfig + - countryCode + - breadcrumb + SetRegulatoryConfigResponse: + - errorCode + - debugText + CommissioningCompleteResponse: + - errorCode + - debugText + NetworkCommissioning: + ScanNetworks: + - ssid + - breadcrumb + ScanNetworksResponse: + - networkingStatus + - debugText + - wiFiScanResults + - threadScanResults + AddOrUpdateWiFiNetwork: + - ssid + - credentials + - breadcrumb + AddOrUpdateThreadNetwork: + - operationalDataset + - breadcrumb + RemoveNetwork: + - networkID + - breadcrumb + NetworkConfigResponse: + - networkingStatus + - debugText + - networkIndex + ConnectNetwork: + - networkID + - breadcrumb + ConnectNetworkResponse: + - networkingStatus + - debugText + - errorValue + ReorderNetwork: + - networkID + - networkIndex + - breadcrumb + DiagnosticLogs: + RetrieveLogsRequest: + - intent + - requestedProtocol + RetrieveLogsResponse: + - status + - content + - timeStamp + - timeSinceBoot + GeneralDiagnostics: + TestEventTrigger: + - enableKey + - eventTrigger + SoftwareDiagnostics: + ThreadNetworkDiagnostics: + WiFiNetworkDiagnostics: + EthernetNetworkDiagnostics: + TimeSynchronization: + SetUtcTime: + - utcTime + - granularity + - timeSource + AdministratorCommissioning: + OpenCommissioningWindow: + - commissioningTimeout + - pakeVerifier + - discriminator + - iterations + - salt + OpenBasicCommissioningWindow: + - commissioningTimeout + OperationalCredentials: + AttestationRequest: + - attestationNonce + AttestationResponse: + - attestationElements + - signature + CertificateChainRequest: + - certificateType + CertificateChainResponse: + - certificate + CSRRequest: + - csrNonce + - isForUpdateNOC + CSRResponse: + - nocsrElements + - attestationSignature + AddNOC: + - nocValue + - icacValue + - ipkValue + - caseAdminSubject + - adminVendorId + UpdateNOC: + - nocValue + - icacValue + NOCResponse: + - statusCode + - fabricIndex + - debugText + UpdateFabricLabel: + - label + RemoveFabric: + - fabricIndex + AddTrustedRootCertificate: + - rootCertificate + GroupKeyManagement: + KeySetWrite: + - groupKeySet + KeySetRead: + - groupKeySetID + KeySetReadResponse: + - groupKeySet + KeySetRemove: + - groupKeySetID + KeySetReadAllIndices: + - groupKeySetIDs + KeySetReadAllIndicesResponse: + - groupKeySetIDs + ModeSelect: + ChangeToMode: + - newMode + DoorLock: + LockDoor: + - pinCode + UnlockDoor: + - pinCode + UnlockWithTimeout: + - timeout + - pinCode + SetWeekDaySchedule: + - weekDayIndex + - userIndex + - daysMask + - startHour + - startMinute + - endHour + - endMinute + GetWeekDaySchedule: + - weekDayIndex + - userIndex + GetWeekDayScheduleResponse: + - weekDayIndex + - userIndex + - status + - daysMask + - startHour + - startMinute + - endHour + - endMinute + ClearWeekDaySchedule: + - weekDayIndex + - userIndex + SetYearDaySchedule: + - yearDayIndex + - userIndex + - localStartTime + - localEndTime + GetYearDaySchedule: + - yearDayIndex + - userIndex + GetYearDayScheduleResponse: + - yearDayIndex + - userIndex + - status + - localStartTime + - localEndTime + ClearYearDaySchedule: + - yearDayIndex + - userIndex + SetHolidaySchedule: + - holidayIndex + - localStartTime + - localEndTime + - operatingMode + GetHolidaySchedule: + - holidayIndex + GetHolidayScheduleResponse: + - holidayIndex + - status + - localStartTime + - localEndTime + - operatingMode + ClearHolidaySchedule: + - holidayIndex + SetUser: + - operationType + - userIndex + - userName + - userUniqueId + - userStatus + - userType + - credentialRule + GetUser: + - userIndex + GetUserResponse: + - userIndex + - userName + - userUniqueId + - userStatus + - userType + - credentialRule + - credentials + - creatorFabricIndex + - lastModifiedFabricIndex + - nextUserIndex + ClearUser: + - userIndex + SetCredential: + - operationType + - credential + - credentialData + - userIndex + - userStatus + - userType + SetCredentialResponse: + - status + - userIndex + - nextCredentialIndex + GetCredentialStatus: + - credential + GetCredentialStatusResponse: + - credentialExists + - userIndex + - creatorFabricIndex + - lastModifiedFabricIndex + - nextCredentialIndex + ClearCredential: + - credential + WindowCovering: + GoToLiftValue: + - liftValue + GoToLiftPercentage: + - liftPercent100thsValue + GoToTiltValue: + - tiltValue + GoToTiltPercentage: + - tiltPercent100thsValue + BarrierControl: + BarrierControlGoToPercent: + - percentOpen + Thermostat: + SetpointRaiseLower: + - mode + - amount + GetWeeklyScheduleResponse: + - numberOfTransitionsForSequence + - dayOfWeekForSequence + - modeForSequence + - transitions + SetWeeklySchedule: + - numberOfTransitionsForSequence + - dayOfWeekForSequence + - modeForSequence + - transitions + GetWeeklySchedule: + - daysToReturn + - modeToReturn + ColorControl: + MoveToHue: + - hue + - direction + - transitionTime + - optionsMask + - optionsOverride + MoveHue: + - moveMode + - rate + - optionsMask + - optionsOverride + StepHue: + - stepMode + - stepSize + - transitionTime + - optionsMask + - optionsOverride + MoveToSaturation: + - saturation + - transitionTime + - optionsMask + - optionsOverride + MoveSaturation: + - moveMode + - rate + - optionsMask + - optionsOverride + StepSaturation: + - stepMode + - stepSize + - transitionTime + - optionsMask + - optionsOverride + MoveToHueAndSaturation: + - hue + - saturation + - transitionTime + - optionsMask + - optionsOverride + MoveToColor: + - colorX + - colorY + - transitionTime + - optionsMask + - optionsOverride + MoveColor: + - rateX + - rateY + - optionsMask + - optionsOverride + StepColor: + - stepX + - stepY + - transitionTime + - optionsMask + - optionsOverride + MoveToColorTemperature: + - colorTemperature + - transitionTime + - optionsMask + - optionsOverride + EnhancedMoveToHue: + - enhancedHue + - direction + - transitionTime + - optionsMask + - optionsOverride + EnhancedMoveHue: + - moveMode + - rate + - optionsMask + - optionsOverride + EnhancedStepHue: + - stepMode + - stepSize + - transitionTime + - optionsMask + - optionsOverride + EnhancedMoveToHueAndSaturation: + - enhancedHue + - saturation + - transitionTime + - optionsMask + - optionsOverride + ColorLoopSet: + - updateFlags + - action + - direction + - time + - startHue + - optionsMask + - optionsOverride + StopMoveStep: + - optionsMask + - optionsOverride + MoveColorTemperature: + - moveMode + - rate + - colorTemperatureMinimumMireds + - colorTemperatureMaximumMireds + - optionsMask + - optionsOverride + StepColorTemperature: + - stepMode + - stepSize + - transitionTime + - colorTemperatureMinimumMireds + - colorTemperatureMaximumMireds + - optionsMask + - optionsOverride + Channel: + ChangeChannel: + - match + ChangeChannelResponse: + - status + - data + ChangeChannelByNumber: + - majorNumber + - minorNumber + SkipChannel: + - count + TargetNavigator: + NavigateTarget: + - target + - data + NavigateTargetResponse: + - status + - data + MediaPlayback: + SkipForward: + - deltaPositionMilliseconds + SkipBackward: + - deltaPositionMilliseconds + PlaybackResponse: + - status + - data + Seek: + - position + MediaInput: + SelectInput: + - index + RenameInput: + - index + - name + LowPower: + KeypadInput: + SendKey: + - keyCode + SendKeyResponse: + - status + ContentLauncher: + LaunchContent: + - search + - autoPlay + - data + LaunchURL: + - contentURL + - displayString + - brandingInformation + LaunchResponse: + - status + - data + AudioOutput: + SelectOutput: + - index + RenameOutput: + - index + - name + ApplicationLauncher: + LaunchApp: + - application + - data + StopApp: + - application + HideApp: + - application + LauncherResponse: + - status + - data + AccountLogin: + GetSetupPIN: + - tempAccountIdentifier + GetSetupPINResponse: + - setupPIN + Login: + - tempAccountIdentifier + - setupPIN + ElectricalMeasurement: + GetProfileInfoResponseCommand: + - profileCount + - profileIntervalPeriod + - maxNumberOfIntervals + - listOfAttributes + GetMeasurementProfileResponseCommand: + - startTime + - status + - profileIntervalPeriod + - numberOfIntervalsDelivered + - attributeId + - intervals + GetMeasurementProfileCommand: + - attributeId + - startTime + - numberOfIntervals + TestCluster: + TestSpecificResponse: + - returnValue + TestAddArgumentsResponse: + - returnValue + TestSimpleArgumentResponse: + - returnValue + TestStructArrayArgumentResponse: + - arg1 + - arg2 + - arg3 + - arg4 + - arg5 + - arg6 + TestAddArguments: + - arg1 + - arg2 + TestListInt8UReverseResponse: + - arg1 + TestSimpleArgumentRequest: + - arg1 + TestEnumsResponse: + - arg1 + - arg2 + TestStructArrayArgumentRequest: + - arg1 + - arg2 + - arg3 + - arg4 + - arg5 + - arg6 + TestNullableOptionalResponse: + - wasPresent + - wasNull + - value + - originalValue + TestStructArgumentRequest: + - arg1 + TestComplexNullableOptionalResponse: + - nullableIntWasNull + - nullableIntValue + - optionalIntWasPresent + - optionalIntValue + - nullableOptionalIntWasPresent + - nullableOptionalIntWasNull + - nullableOptionalIntValue + - nullableStringWasNull + - nullableStringValue + - optionalStringWasPresent + - optionalStringValue + - nullableOptionalStringWasPresent + - nullableOptionalStringWasNull + - nullableOptionalStringValue + - nullableStructWasNull + - nullableStructValue + - optionalStructWasPresent + - optionalStructValue + - nullableOptionalStructWasPresent + - nullableOptionalStructWasNull + - nullableOptionalStructValue + - nullableListWasNull + - nullableListValue + - optionalListWasPresent + - optionalListValue + - nullableOptionalListWasPresent + - nullableOptionalListWasNull + - nullableOptionalListValue + TestNestedStructArgumentRequest: + - arg1 + BooleanResponse: + - value + TestListStructArgumentRequest: + - arg1 + SimpleStructResponse: + - arg1 + TestListInt8UArgumentRequest: + - arg1 + TestEmitTestEventResponse: + - value + TestNestedStructListArgumentRequest: + - arg1 + TestEmitTestFabricScopedEventResponse: + - value + TestListNestedStructListArgumentRequest: + - arg1 + TestListInt8UReverseRequest: + - arg1 + TestEnumsRequest: + - arg1 + - arg2 + TestNullableOptionalRequest: + - arg1 + TestComplexNullableOptionalRequest: + - nullableInt + - optionalInt + - nullableOptionalInt + - nullableString + - optionalString + - nullableOptionalString + - nullableStruct + - optionalStruct + - nullableOptionalStruct + - nullableList + - optionalList + - nullableOptionalList + SimpleStructEchoRequest: + - arg1 + TestSimpleOptionalArgumentRequest: + - arg1 + TestEmitTestEventRequest: + - arg1 + - arg2 + - arg3 + TestEmitTestFabricScopedEventRequest: + - arg1 + FaultInjection: + FailAtFault: + - type + - id + - numCallsToSkip + - numCallsToFail + - takeMutex + FailRandomlyAtFault: + - type + - id + - percentage + structs: + Scenes: + - AttributeValuePair + - ExtensionFieldSet + Descriptor: + - DeviceType + Binding: + - TargetStruct + AccessControl: + - Target + - AccessControlEntry + - ExtensionEntry + Actions: + - ActionStruct + - EndpointListStruct + Basic: + - CapabilityMinimaStruct + OtaSoftwareUpdateRequestor: + - ProviderLocation + PowerSource: + - BatChargeFaultChangeType + - BatFaultChangeType + - WiredFaultChangeType + GeneralCommissioning: + - BasicCommissioningInfo + NetworkCommissioning: + - NetworkInfo + - ThreadInterfaceScanResult + - WiFiInterfaceScanResult + GeneralDiagnostics: + - NetworkInterfaceType + SoftwareDiagnostics: + - ThreadMetrics + ThreadNetworkDiagnostics: + - NeighborTable + - OperationalDatasetComponents + - RouteTable + - SecurityPolicy + TimeSynchronization: + - DstOffsetType + - TimeZoneType + OperationalCredentials: + - FabricDescriptor + - NOCStruct + GroupKeyManagement: + - GroupInfoMapStruct + - GroupKeyMapStruct + - GroupKeySetStruct + FixedLabel: + - LabelStruct + UserLabel: + - LabelStruct + ModeSelect: + - SemanticTag + - ModeOptionStruct + DoorLock: + - DlCredential + Thermostat: + - ThermostatScheduleTransition + Channel: + - ChannelInfo + - LineupInfo + TargetNavigator: + - TargetInfo + MediaPlayback: + - PlaybackPosition + MediaInput: + - InputInfo + ContentLauncher: + - Dimension + - AdditionalInfo + - Parameter + - ContentSearch + - StyleInformation + - BrandingInformation + AudioOutput: + - OutputInfo + ApplicationLauncher: + - Application + - ApplicationEP + ApplicationBasic: + - ApplicationBasicApplication + TestCluster: + - SimpleStruct + - TestFabricScoped + - NullablesAndOptionalsStruct + - NestedStruct + - NestedStructList + - DoubleNestedStructList + - TestListStructOctet + struct fields: + Scenes: + AttributeValuePair: + - attributeId + - attributeValue + ExtensionFieldSet: + - clusterId + - attributeValueList + Descriptor: + DeviceType: + - type + - revision + Binding: + TargetStruct: + - node + - group + - endpoint + - cluster + - fabricIndex + AccessControl: + Target: + - cluster + - endpoint + - deviceType + AccessControlEntry: + - privilege + - authMode + - subjects + - targets + - fabricIndex + ExtensionEntry: + - data + - fabricIndex + Actions: + ActionStruct: + - actionID + - name + - type + - endpointListID + - supportedCommands + - state + EndpointListStruct: + - endpointListID + - name + - type + - endpoints + Basic: + CapabilityMinimaStruct: + - caseSessionsPerFabric + - subscriptionsPerFabric + OtaSoftwareUpdateRequestor: + ProviderLocation: + - providerNodeID + - endpoint + - fabricIndex + PowerSource: + BatChargeFaultChangeType: + - current + - previous + BatFaultChangeType: + - current + - previous + WiredFaultChangeType: + - current + - previous + GeneralCommissioning: + BasicCommissioningInfo: + - failSafeExpiryLengthSeconds + - maxCumulativeFailsafeSeconds + NetworkCommissioning: + NetworkInfo: + - networkID + - connected + ThreadInterfaceScanResult: + - panId + - extendedPanId + - networkName + - channel + - version + - extendedAddress + - rssi + - lqi + WiFiInterfaceScanResult: + - security + - ssid + - bssid + - channel + - wiFiBand + - rssi + GeneralDiagnostics: + NetworkInterfaceType: + - name + - isOperational + - offPremiseServicesReachableIPv4 + - offPremiseServicesReachableIPv6 + - hardwareAddress + - iPv4Addresses + - iPv6Addresses + - type + SoftwareDiagnostics: + ThreadMetrics: + - id + - name + - stackFreeCurrent + - stackFreeMinimum + - stackSize + ThreadNetworkDiagnostics: + NeighborTable: + - extAddress + - age + - rloc16 + - linkFrameCounter + - mleFrameCounter + - lqi + - averageRssi + - lastRssi + - frameErrorRate + - messageErrorRate + - rxOnWhenIdle + - fullThreadDevice + - fullNetworkData + - isChild + OperationalDatasetComponents: + - activeTimestampPresent + - pendingTimestampPresent + - masterKeyPresent + - networkNamePresent + - extendedPanIdPresent + - meshLocalPrefixPresent + - delayPresent + - panIdPresent + - channelPresent + - pskcPresent + - securityPolicyPresent + - channelMaskPresent + RouteTable: + - extAddress + - rloc16 + - routerId + - nextHop + - pathCost + - lqiIn + - lqiOut + - age + - allocated + - linkEstablished + SecurityPolicy: + - rotationTime + - flags + TimeSynchronization: + DstOffsetType: + - offset + - validStarting + - validUntil + TimeZoneType: + - offset + - validAt + - name + OperationalCredentials: + FabricDescriptor: + - rootPublicKey + - vendorId + - fabricId + - nodeId + - label + - fabricIndex + NOCStruct: + - noc + - icac + - fabricIndex + GroupKeyManagement: + GroupInfoMapStruct: + - groupId + - endpoints + - groupName + - fabricIndex + GroupKeyMapStruct: + - groupId + - groupKeySetID + - fabricIndex + GroupKeySetStruct: + - groupKeySetID + - groupKeySecurityPolicy + - epochKey0 + - epochStartTime0 + - epochKey1 + - epochStartTime1 + - epochKey2 + - epochStartTime2 + FixedLabel: + LabelStruct: + - label + - value + UserLabel: + LabelStruct: + - label + - value + ModeSelect: + SemanticTag: + - mfgCode + - value + ModeOptionStruct: + - label + - mode + - semanticTags + DoorLock: + DlCredential: + - credentialType + - credentialIndex + Thermostat: + ThermostatScheduleTransition: + - transitionTime + - heatSetpoint + - coolSetpoint + Channel: + ChannelInfo: + - majorNumber + - minorNumber + - name + - callSign + - affiliateCallSign + LineupInfo: + - operatorName + - lineupName + - postalCode + - lineupInfoType + TargetNavigator: + TargetInfo: + - identifier + - name + MediaPlayback: + PlaybackPosition: + - updatedAt + - position + MediaInput: + InputInfo: + - index + - inputType + - name + - descriptionString + ContentLauncher: + Dimension: + - width + - height + - metric + AdditionalInfo: + - name + - value + Parameter: + - type + - value + - externalIDList + ContentSearch: + - parameterList + StyleInformation: + - imageUrl + - color + - size + BrandingInformation: + - providerName + - background + - logo + - progressBar + - splash + - waterMark + AudioOutput: + OutputInfo: + - index + - outputType + - name + ApplicationLauncher: + Application: + - catalogVendorId + - applicationId + ApplicationEP: + - application + - endpoint + ApplicationBasic: + ApplicationBasicApplication: + - catalogVendorId + - applicationId + TestCluster: + SimpleStruct: + - a + - b + - c + - d + - e + - f + - g + - h + TestFabricScoped: + - fabricSensitiveInt8u + - optionalFabricSensitiveInt8u + - nullableFabricSensitiveInt8u + - nullableOptionalFabricSensitiveInt8u + - fabricSensitiveCharString + - fabricSensitiveStruct + - fabricSensitiveInt8uList + - fabricIndex + NullablesAndOptionalsStruct: + - nullableInt + - optionalInt + - nullableOptionalInt + - nullableString + - optionalString + - nullableOptionalString + - nullableStruct + - optionalStruct + - nullableOptionalStruct + - nullableList + - optionalList + - nullableOptionalList + NestedStruct: + - a + - b + - c + NestedStructList: + - a + - b + - c + - d + - e + - f + - g + DoubleNestedStructList: + - a + TestListStructOctet: + - member1 + - member2 + events: + AccessControl: + - AccessControlEntryChanged + - AccessControlExtensionChanged + Actions: + - StateChanged + - ActionFailed + Basic: + - StartUp + - ShutDown + - Leave + - ReachableChanged + OtaSoftwareUpdateRequestor: + - StateTransition + - VersionApplied + - DownloadError + GeneralDiagnostics: + - HardwareFaultChange + - RadioFaultChange + - NetworkFaultChange + - BootReason + SoftwareDiagnostics: + - SoftwareFault + ThreadNetworkDiagnostics: + - ConnectionStatus + - NetworkFaultChange + WiFiNetworkDiagnostics: + - Disconnection + - AssociationFailure + - ConnectionStatus + BridgedDeviceBasic: + - StartUp + - ShutDown + - Leave + - ReachableChanged + Switch: + - SwitchLatched + - InitialPress + - LongPress + - ShortRelease + - LongRelease + - MultiPressOngoing + - MultiPressComplete + BooleanState: + - StateChange + DoorLock: + - DoorLockAlarm + - DoorStateChange + - LockOperation + - LockOperationError + - LockUserChange + PumpConfigurationAndControl: + - SupplyVoltageLow + - SupplyVoltageHigh + - PowerMissingPhase + - SystemPressureLow + - SystemPressureHigh + - DryRunning + - MotorTemperatureHigh + - PumpMotorFatalFailure + - ElectronicTemperatureHigh + - PumpBlocked + - SensorFailure + - ElectronicNonFatalFailure + - ElectronicFatalFailure + - GeneralFault + - Leakage + - AirDetection + - TurbineOperation + TestCluster: + - TestEvent + - TestFabricScopedEvent + event fields: + AccessControl: + AccessControlEntryChanged: + - adminNodeID + - adminPasscodeID + - changeType + - latestValue + - fabricIndex + AccessControlExtensionChanged: + - adminNodeID + - adminPasscodeID + - changeType + - latestValue + - fabricIndex + Actions: + StateChanged: + - actionID + - invokeID + - newState + ActionFailed: + - actionID + - invokeID + - newState + - error + Basic: + StartUp: + - softwareVersion + Leave: + - fabricIndex + ReachableChanged: + - reachableNewValue + OtaSoftwareUpdateRequestor: + StateTransition: + - previousState + - newState + - reason + - targetSoftwareVersion + VersionApplied: + - softwareVersion + - productID + DownloadError: + - softwareVersion + - bytesDownloaded + - progressPercent + - platformCode + GeneralDiagnostics: + HardwareFaultChange: + - current + - previous + RadioFaultChange: + - current + - previous + NetworkFaultChange: + - current + - previous + BootReason: + - bootReason + SoftwareDiagnostics: + SoftwareFault: + - id + - name + - faultRecording + ThreadNetworkDiagnostics: + ConnectionStatus: + - connectionStatus + NetworkFaultChange: + - current + - previous + WiFiNetworkDiagnostics: + Disconnection: + - reasonCode + AssociationFailure: + - associationFailure + - status + ConnectionStatus: + - connectionStatus + BridgedDeviceBasic: + StartUp: + - softwareVersion + ReachableChanged: + - reachableNewValue + Switch: + SwitchLatched: + - newPosition + InitialPress: + - newPosition + LongPress: + - newPosition + ShortRelease: + - previousPosition + LongRelease: + - previousPosition + MultiPressOngoing: + - newPosition + - currentNumberOfPressesCounted + MultiPressComplete: + - newPosition + - totalNumberOfPressesCounted + BooleanState: + StateChange: + - stateValue + DoorLock: + DoorLockAlarm: + - alarmCode + DoorStateChange: + - doorState + LockOperation: + - lockOperationType + - operationSource + - userIndex + - fabricIndex + - sourceNode + - credentials + LockOperationError: + - lockOperationType + - operationSource + - operationError + - userIndex + - fabricIndex + - sourceNode + - credentials + LockUserChange: + - lockDataType + - dataOperationType + - operationSource + - userIndex + - fabricIndex + - sourceNode + - dataIndex + PumpConfigurationAndControl: + TestCluster: + TestEvent: + - arg1 + - arg2 + - arg3 + - arg4 + - arg5 + - arg6 + TestFabricScopedEvent: + - fabricIndex + enums: + Identify: + # EffectIdentifierEnum, EffectVariantEnum, and IdentifyTypeEnum + # were originally named IdentifyEffectIdentifier, + # IdentifyEffectVariant, and IdentifyIdentifyType, but we generate + # the same API for the names with/without "Enum" at the end, and + # with/without the cluster name at the beginning, so the name can + # just change here. + - EffectIdentifierEnum + - EffectVariantEnum + - IdentifyTypeEnum + OnOff: + # DelayedOnOffEffectVariantEnum, DyingLightEffectVariantEnum, + # EffectIdentifierEnum, and StartUpOnOffEnum were originally named + # OnOffDelayedAllOffEffectVariant, + # OnOffDelayedAllOffEffectVariant, OnOffEffectIdentifier, and + # OnOffStartUpOnOff, but we generate the same API for the names + # with/without "Enum" at the end, and with/without the cluster + # name at the beginning, so the name can just change here. + - DelayedAllOffEffectVariantEnum + - DyingLightEffectVariantEnum + - EffectIdentifierEnum + - StartUpOnOffEnum + LevelControl: + # MoveModeEnum and StepModeEnum were originally named MoveMode and + # StepMode, but we generate the same API for the names + # with/without "Enum" at the end, and with/without the cluster + # name at the beginning, so the name can just change here. + - MoveModeEnum + - StepModeEnum + AccessControl: + - AuthMode + - ChangeTypeEnum + - Privilege + Actions: + - ActionErrorEnum + - ActionStateEnum + - ActionTypeEnum + - EndpointListTypeEnum + OtaSoftwareUpdateProvider: + - OTAApplyUpdateAction + - OTADownloadProtocol + - OTAQueryStatus + OtaSoftwareUpdateRequestor: + - OTAAnnouncementReason + - OTAChangeReasonEnum + - OTAUpdateStateEnum + TimeFormatLocalization: + # CalendarTypeEnum and HourFormatEnum were originally just named + # CalendarType and HourFormat, but we generate the same API for + # the names with/without "Enum" at the end, so the name can just + # change here. + - CalendarTypeEnum + - HourFormatEnum + UnitLocalization: + # TempUnitEnum was originally just named TempUnit, but + # we generate the same API for both of those names, so the name + # can just change here. + - TempUnitEnum + PowerSource: + # All the PowerSource enums originally did not have the "Enum" + # suffix, but we generate the same API whether that suffix is + # there or not, so the names can just change here. + - BatChargeFaultEnum + - BatChargeLevelEnum + - BatChargeStateEnum + - BatFaultEnum + - BatReplaceabilityEnum + - PowerSourceStatusEnum + - WiredCurrentTypeEnum + - WiredFaultEnum + GeneralCommissioning: + # CommissioningErrorEnum was originally just named + # CommissioningError, but we generate the same API + # for both of those names, so the name can just change + # here. + - CommissioningErrorEnum + # RegulatoryLocationTypeEnum was originally just named + # RegulatoryLocationType, but we generate the same API + # for both of those names, so the name can just change + # here. + - RegulatoryLocationTypeEnum + NetworkCommissioning: + # NetworkCommissioningStatusEnum and WiFiBandEnum were originally + # just named NetworkCommissioningStatus and WiFiBand, but we + # generate the same API for both of those names, so the name can + # just change here. + - NetworkCommissioningStatusEnum + - WiFiBandEnum + DiagnosticLogs: + - LogsIntent + - LogsStatus + - LogsTransferProtocol + GeneralDiagnostics: + - BootReasonType + - HardwareFaultType + # InterfaceTypeEnum was originally just named InterfaceType, but + # we generate the same API for both of those names, so the name + # can just change here. + - InterfaceTypeEnum + - NetworkFaultType + - RadioFaultType + ThreadNetworkDiagnostics: + # NetworkFaultEnum and RoutingRoleEnum were originally just named + # NetworkFault and RoutingRole, but we generate the same API for + # both of those names, so the name can just change here. + - NetworkFaultEnum + - RoutingRoleEnum + - ThreadConnectionStatus + WiFiNetworkDiagnostics: + # AssociationFailureCauseEnum was originally just named + # AssociationFailureCause, but we generate the same API for both + # of those names, so the name can just change here. + - AssociationFailureCauseEnum + # SecurityTypeEnum was originally just named SecurityType, but we + # generate the same API for both of those names, so the name can + # just change here. + - SecurityTypeEnum + - WiFiConnectionStatus + - WiFiVersionType + EthernetNetworkDiagnostics: + - PHYRateType + TimeSynchronization: + - GranularityEnum + - TimeSourceEnum + AdministratorCommissioning: + # CommissioningWindowStatusEnum was originally just named + # CommissioningWindowStatus, but we generate the same API for both + # of those names, so the name can just change here. + - CommissioningWindowStatusEnum + - StatusCode + OperationalCredentials: + - OperationalCertStatus + GroupKeyManagement: + # GroupKeySecurityPolicyEnum was originally just named + # GroupKeySecurityPolicy, but we generate the same API for both of + # those names, so the name can just change here. + - GroupKeySecurityPolicyEnum + DoorLock: + - DlAlarmCode + - DlCredentialRule + - DlCredentialType + - DlDataOperationType + - DlDoorState + - DlLockDataType + - DlLockOperationType + - DlLockState + - DlLockType + - DlOperatingMode + - DlOperationError + - DlOperationSource + - DlStatus + - DlUserStatus + - DlUserType + - DoorLockOperationEventCode + - DoorLockProgrammingEventCode + - DoorLockSetPinOrIdStatus + - DoorLockUserStatus + - DoorLockUserType + # UserTypeEnum and UserStatusEnum use the same generated name as + # DoorLockUserStatus and DoorLockUserType, so need to be + # considered as introduced at the same time. + - UserStatusEnum + - UserTypeEnum + WindowCovering: + - EndProductType + - Type + PumpConfigurationAndControl: + - PumpControlMode + - PumpOperationMode + Thermostat: + - SetpointAdjustMode + - ThermostatControlSequence + # ThermostatRunningModeEnum was originally named + # ThermostatRunningMode, but we generate the same API for the + # names with/without "Enum" at the end, so the name can just + # change here. + - ThermostatRunningModeEnum + # SystemModeEnum was originally named ThermostatSystemMode, but we + # generate the same API for the names with/without "Enum" at the + # end and the cluster name present/absent at the beginning, so the + # name can just change here. + - SystemModeEnum + FanControl: + - FanModeSequenceType + - FanModeType + ColorControl: + - ColorLoopAction + - ColorLoopDirection + - ColorMode + - HueDirection + - HueMoveMode + - HueStepMode + - SaturationMoveMode + - SaturationStepMode + IlluminanceMeasurement: + # LightSensorTypeEnum was originally named LightSensorType, but we + # generate the same API for the names with/without "Enum" at the + # end, so the name can just change here. + - LightSensorTypeEnum + Channel: + # StatusEnum was originally named ChannelStatusEnum, but we + # generate the same API for the names with/without the cluster + # name at the beginning, so the name can just change here. + - StatusEnum + - LineupInfoTypeEnum + TargetNavigator: + # StatusEnum was originally named TargetNavigatorStatusEnum, but + # we generate the same API for the names with/without the cluster + # name at the beginning, so the name can just change here. + - StatusEnum + MediaPlayback: + # StatusEnum was originally named MediaPlaybackStatusEnum, but we + # generate the same API for the names with/without the cluster + # name at the beginning, so the name can just change here. + - StatusEnum + - PlaybackStateEnum + MediaInput: + - InputTypeEnum + KeypadInput: + - CecKeyCode + # StatusEnum was originally named KeypadInputStatusEnum, but we + # generate the same API for the names with/without the cluster + # name at the beginning, so the name can just change here. + - StatusEnum + ContentLauncher: + - ContentLaunchStatusEnum + - MetricTypeEnum + - ParameterEnum + AudioOutput: + - OutputTypeEnum + ApplicationLauncher: + # StatusEnum was originally named ApplicationLauncherStatusEnum, but we + # generate the same API for the names with/without the cluster name at the + # beginning, so the name can just change here. + - StatusEnum + ApplicationBasic: + - ApplicationStatusEnum + TestCluster: + - SimpleEnum + FaultInjection: + - FaultType + enum values: + Identify: + # EffectIdentifierEnum, EffectVariantEnum, and IdentifyTypeEnum + # were originally named IdentifyEffectIdentifier, + # IdentifyEffectVariant, and IdentifyIdentifyType, but we generate + # the same API for the names with/without "Enum" at the end, and + # with/without the cluster name at the beginning, so the name can + # just change here. + EffectIdentifierEnum: + - Blink + - Breathe + - Okay + - ChannelChange + - FinishEffect + - StopEffect + EffectVariantEnum: + - Default + IdentifyTypeEnum: + - None + - VisibleLight + - VisibleLED + - AudibleBeep + - Display + - Actuator + OnOff: + # DelayedOnOffEffectVariantEnum, DyingLightEffectVariantEnum, + # EffectIdentifierEnum, and StartUpOnOffEnum were originally named + # OnOffDelayedAllOffEffectVariant, + # OnOffDelayedAllOffEffectVariant, OnOffEffectIdentifier, and + # OnOffStartUpOnOff, but we generate the same API for the names + # with/without "Enum" at the end, and with/without the cluster + # name at the beginning, so the name can just change here. + DelayedAllOffEffectVariantEnum: + - FadeToOffIn0p8Seconds + - NoFade + - 50PercentDimDownIn0p8SecondsThenFadeToOffIn12Seconds + DyingLightEffectVariantEnum: + - 20PercenterDimUpIn0p5SecondsThenFadeToOffIn1Second + EffectIdentifierEnum: + - DelayedAllOff + - DyingLight + StartUpOnOffEnum: + - Off + - On + - TogglePreviousOnOff + LevelControl: + # MoveModeEnum and StepModeEnum were originally named MoveMode and + # StepMode, but we generate the same API for the names + # with/without "Enum" at the end, and with/without the cluster + # name at the beginning, so the name can just change here. + MoveModeEnum: + - Up + - Down + StepModeEnum: + - Up + - Down + AccessControl: + AuthMode: + - PASE + - CASE + - Group + ChangeTypeEnum: + - Changed + - Added + - Removed + Privilege: + - View + - ProxyView + - Operate + - Manage + - Administer + Actions: + ActionErrorEnum: + - Unknown + - Interrupted + ActionStateEnum: + - Inactive + - Active + - Paused + - Disabled + ActionTypeEnum: + - Other + - Scene + - Sequence + - Automation + - Exception + - Notification + - Alarm + EndpointListTypeEnum: + - Other + - Room + - Zone + OtaSoftwareUpdateProvider: + OTAApplyUpdateAction: + - Proceed + - AwaitNextAction + - Discontinue + OTADownloadProtocol: + - BDXSynchronous + - BDXAsynchronous + - HTTPS + - VendorSpecific + OTAQueryStatus: + - UpdateAvailable + - Busy + - NotAvailable + - DownloadProtocolNotSupported + OtaSoftwareUpdateRequestor: + OTAAnnouncementReason: + - SimpleAnnouncement + - UpdateAvailable + - UrgentUpdateAvailable + OTAChangeReasonEnum: + - Unknown + - Success + - Failure + - TimeOut + - DelayByProvider + OTAUpdateStateEnum: + - Unknown + - Idle + - Querying + - DelayedOnQuery + - Downloading + - Applying + - DelayedOnApply + - RollingBack + - DelayedOnUserConsent + TimeFormatLocalization: + # CalendarTypeEnum and HourFormatEnum were originally just named + # CalendarType and HourFormat, but we generate the same API for + # the names with/without "Enum" at the end, so the name can just + # change here. + CalendarTypeEnum: + - Buddhist + - Chinese + - Coptic + - Ethiopian + - Gregorian + - Hebrew + - Indian + - Islamic + - Japanese + - Korean + - Persian + - Taiwanese + HourFormatEnum: + - 12hr + - 24hr + UnitLocalization: + # TempUnitEnum was originally just named TempUnit, but + # we generate the same API for both of those names, so the name + # can just change here. + TempUnitEnum: + - Fahrenheit + - Celsius + - Kelvin + PowerSource: + # All the PowerSource enums originally did not have the "Enum" + # suffix, but we generate the same API whether that suffix is + # there or not, so the names can just change here. + BatChargeFaultEnum: + - Unspecfied + - AmbientTooHot + - AmbientTooCold + - BatteryTooHot + - BatteryTooCold + - BatteryAbsent + - BatteryOverVoltage + - BatteryUnderVoltage + - ChargerOverVoltage + - ChargerUnderVoltage + - SafetyTimeout + BatChargeLevelEnum: + - Ok + - Warning + - Critical + BatChargeStateEnum: + - Unknown + - IsCharging + - IsAtFullCharge + - IsNotCharging + BatFaultEnum: + - Unspecfied + - OverTemp + - UnderTemp + BatReplaceabilityEnum: + - Unspecified + - NotReplaceable + - UserReplaceable + - FactoryReplaceable + PowerSourceStatusEnum: + - Unspecfied + - Active + - Standby + - Unavailable + WiredCurrentTypeEnum: + - AC + - DC + WiredFaultEnum: + - Unspecfied + - OverVoltage + - UnderVoltage + GeneralCommissioning: + # CommissioningErrorEnum was originally just named + # CommissioningError, but we generate the same API + # for both of those names, so the name can just change + # here. + CommissioningErrorEnum: + - Ok + - ValueOutsideRange + - InvalidAuthentication + - NoFailSafe + - BusyWithOtherAdmin + # RegulatoryLocationTypeEnum was originally just named + # RegulatoryLocationType, but we generate the same API + # for both of those names, so the name can just change + # here. + RegulatoryLocationTypeEnum: + - Indoor + - Outdoor + - IndoorOutdoor + NetworkCommissioning: + # NetworkCommissioningStatusEnum and WiFiBandEnum were originally + # just named NetworkCommissioningStatus and WiFiBand, but we + # generate the same API for both of those names, so the name can + # just change here. + NetworkCommissioningStatusEnum: + - Success + - OutOfRange + - BoundsExceeded + - NetworkIDNotFound + - DuplicateNetworkID + - NetworkNotFound + - RegulatoryError + - AuthFailure + - UnsupportedSecurity + - OtherConnectionFailure + - IPV6Failed + - IPBindFailed + - UnknownError + WiFiBandEnum: + - 2G4 + - 3G65 + - 5G + - 6G + - 60G + DiagnosticLogs: + LogsIntent: + - EndUserSupport + - NetworkDiag + - CrashLogs + LogsStatus: + - Success + - Exhausted + - NoLogs + - Busy + - Denied + LogsTransferProtocol: + - ResponsePayload + - BDX + GeneralDiagnostics: + BootReasonType: + - Unspecified + - PowerOnReboot + - BrownOutReset + - SoftwareWatchdogReset + - HardwareWatchdogReset + - SoftwareUpdateCompleted + - SoftwareReset + HardwareFaultType: + - Unspecified + - Radio + - Sensor + - ResettableOverTemp + - NonResettableOverTemp + - PowerSource + - VisualDisplayFault + - AudioOutputFault + - UserInterfaceFault + - NonVolatileMemoryError + - TamperDetected + # InterfaceTypeEnum was originally just named InterfaceType, but + # we generate the same API for both of those names, so the name + # can just change here. + InterfaceTypeEnum: + - Unspecified + - WiFi + - Ethernet + - Cellular + - Thread + NetworkFaultType: + - Unspecified + - HardwareFailure + - NetworkJammed + - ConnectionFailed + RadioFaultType: + - Unspecified + - WiFiFault + - CellularFault + - ThreadFault + - NFCFault + - BLEFault + - EthernetFault + ThreadNetworkDiagnostics: + # NetworkFaultEnum and RoutingRoleEnum were originally just named + # NetworkFault and RoutingRole, but we generate the same API for + # both of those names, so the name can just change here. + NetworkFaultEnum: + - Unspecified + - LinkDown + - HardwareFailure + - NetworkJammed + RoutingRoleEnum: + - Unspecified + - Unassigned + - SleepyEndDevice + - EndDevice + - REED + - Router + - Leader + ThreadConnectionStatus: + - Connected + - NotConnected + WiFiNetworkDiagnostics: + # AssociationFailureCauseEnum was originally just named + # AssociationFailureCause, but we generate the same API for both + # of those names, so the name can just change here. + AssociationFailureCauseEnum: + - Unknown + - AssociationFailed + - AuthenticationFailed + - SsidNotFound + # SecurityTypeEnum was originally just named SecurityType, but we + # generate the same API for both of those names, so the name can + # just change here. + SecurityTypeEnum: + - Unspecified + - None + - WEP + - WPA + - WPA2 + - WPA3 + WiFiConnectionStatus: + - Connected + - NotConnected + WiFiVersionType: + - 80211a + - 80211b + - 80211g + - 80211n + - 80211ac + - 80211ax + EthernetNetworkDiagnostics: + PHYRateType: + - 10M + - 100M + - 1000M + - 25G + - 5G + - 10G + - 40G + - 100G + - 200G + - 400G + TimeSynchronization: + GranularityEnum: + - NoTimeGranularity + - MinutesGranularity + - SecondsGranularity + - MillisecondsGranularity + - MicrosecondsGranularity + TimeSourceEnum: + - None + - Unknown + - Admin + - NodeTimeCluster + - NonFabricSntp + - NonFabricNtp + - FabricSntp + - FabricNtp + - MixedNtp + - NonFabricSntpNts + - NonFabricNtpNts + - FabricSntpNts + - FabricNtpNts + - MixedNtpNts + - CloudSource + - Ptp + - Gnss + AdministratorCommissioning: + # CommissioningWindowStatusEnum was originally just named + # CommissioningWindowStatus, but we generate the same API for both + # of those names, so the name can just change here. + CommissioningWindowStatusEnum: + - WindowNotOpen + - EnhancedWindowOpen + - BasicWindowOpen + StatusCode: + - Busy + - PAKEParameterError + - WindowNotOpen + OperationalCredentials: + OperationalCertStatus: + - SUCCESS + - InvalidPublicKey + - InvalidNodeOpId + - InvalidNOC + - MissingCsr + - TableFull + - InvalidAdminSubject + - FabricConflict + - LabelConflict + - InvalidFabricIndex + GroupKeyManagement: + # GroupKeySecurityPolicyEnum was originally just named + # GroupKeySecurityPolicy, but we generate the same API for both of + # those names, so the name can just change here. + GroupKeySecurityPolicyEnum: + - TrustFirst + - CacheAndSync + DoorLock: + DlAlarmCode: + - LockJammed + - LockFactoryReset + - LockRadioPowerCycled + - WrongCodeEntryLimit + - FrontEsceutcheonRemoved + - DoorForcedOpen + - DoorAjar + - ForcedUser + DlCredentialRule: + - Single + - Double + - Tri + DlCredentialType: + - ProgrammingPIN + - PIN + - RFID + - Fingerprint + - FingerVein + - Face + DlDataOperationType: + - Add + - Clear + - Modify + DlDoorState: + - DoorOpen + - DoorClosed + - DoorJammed + - DoorForcedOpen + - DoorUnspecifiedError + - DoorAjar + DlLockDataType: + - Unspecified + - ProgrammingCode + - UserIndex + - WeekDaySchedule + - YearDaySchedule + - HolidaySchedule + - PIN + - RFID + - Fingerprint + DlLockOperationType: + - Lock + - Unlock + - NonAccessUserEvent + - ForcedUserEvent + DlLockState: + - NotFullyLocked + - Locked + - Unlocked + DlLockType: + - DeadBolt + - Magnetic + - Other + - Mortise + - Rim + - LatchBolt + - CylindricalLock + - TubularLock + - InterconnectedLock + - DeadLatch + - DoorFurniture + DlOperatingMode: + - Normal + - Vacation + - Privacy + - NoRemoteLockUnlock + - Passage + DlOperationError: + - Unspecified + - InvalidCredential + - DisabledUserDenied + - Restricted + - InsufficientBattery + DlOperationSource: + - Unspecified + - Manual + - ProprietaryRemote + - Keypad + - Auto + - Button + - Schedule + - Remote + - RFID + - Biometric + DlStatus: + - Success + - Failure + - Duplicate + - Occupied + - InvalidField + - ResourceExhausted + - NotFound + DlUserStatus: + - Available + - OccupiedEnabled + - OccupiedDisabled + DlUserType: + - UnrestrictedUser + - YearDayScheduleUser + - WeekDayScheduleUser + - ProgrammingUser + - NonAccessUser + - ForcedUser + - DisposableUser + - ExpiringUser + - ScheduleRestrictedUser + - RemoteOnlyUser + DoorLockOperationEventCode: + - UnknownOrMfgSpecific + - Lock + - Unlock + - LockInvalidPinOrId + - LockInvalidSchedule + - UnlockInvalidPinOrId + - UnlockInvalidSchedule + - OneTouchLock + - KeyLock + - KeyUnlock + - AutoLock + - ScheduleLock + - ScheduleUnlock + - ManualLock + - ManualUnlock + DoorLockProgrammingEventCode: + - UnknownOrMfgSpecific + - MasterCodeChanged + - PinAdded + - PinDeleted + - PinChanged + - IdAdded + - IdDeleted + DoorLockSetPinOrIdStatus: + - Success + - GeneralFailure + - MemoryFull + - DuplicateCodeError + DoorLockUserStatus: + - Available + - OccupiedEnabled + - OccupiedDisabled + - NotSupported + DoorLockUserType: + - Unrestricted + - YearDayScheduleUser + - WeekDayScheduleUser + - MasterUser + - NonAccessUser + - NotSupported + # UserTypeEnum and UserStatusEnum use the same generated name as + # DoorLockUserStatus and DoorLockUserType, so need to be + # considered as introduced at the same time, with the enum value + # names that match DoorLockUserStatus and DoorLockUserType. + UserStatusEnum: + - Available + - OccupiedEnabled + - OccupiedDisabled + - NotSupported + UserTypeEnum: + - Unrestricted + - YearDayScheduleUser + - WeekDayScheduleUser + - MasterUser + - NonAccessUser + - NotSupported + WindowCovering: + EndProductType: + - RollerShade + - RomanShade + - BalloonShade + - WovenWood + - PleatedShade + - CellularShade + - LayeredShade + - LayeredShade2D + - SheerShade + - TiltOnlyInteriorBlind + - InteriorBlind + - VerticalBlindStripCurtain + - InteriorVenetianBlind + - ExteriorVenetianBlind + - LateralLeftCurtain + - LateralRightCurtain + - CentralCurtain + - RollerShutter + - ExteriorVerticalScreen + - AwningTerracePatio + - AwningVerticalScreen + - TiltOnlyPergola + - SwingingShutter + - SlidingShutter + - Unknown + Type: + - RollerShade + - RollerShade2Motor + - RollerShadeExterior + - RollerShadeExterior2Motor + - Drapery + - Awning + - Shutter + - TiltBlindTiltOnly + - TiltBlindLiftAndTilt + - ProjectorScreen + - Unknown + PumpConfigurationAndControl: + PumpControlMode: + - ConstantSpeed + - ConstantPressure + - ProportionalPressure + - ConstantFlow + - ConstantTemperature + - Automatic + PumpOperationMode: + - Normal + - Minimum + - Maximum + - Local + Thermostat: + SetpointAdjustMode: + - HeatSetpoint + - CoolSetpoint + - HeatAndCoolSetpoints + ThermostatControlSequence: + - CoolingOnly + - CoolingWithReheat + - HeatingOnly + - HeatingWithReheat + - CoolingAndHeating + - CoolingAndHeatingWithReheat + # ThermostatRunningModeEnum was originally named + # ThermostatRunningMode, but we generate the same API for the + # names with/without "Enum" at the end, so the name can just + # change here. + ThermostatRunningModeEnum: + - Off + - Cool + - Heat + # SystemModeEnum was originally named ThermostatSystemMode, but we + # generate the same API for the names with/without "Enum" at the + # end and the cluster name present/absent at the beginning, so the + # name can just change here. + SystemModeEnum: + - Off + - Auto + - Cool + - Heat + - EmergencyHeating + - Precooling + - FanOnly + FanControl: + FanModeSequenceType: + - OffLowMedHigh + - OffLowHigh + - OffLowMedHighAuto + - OffLowHighAuto + - OffOnAuto + - OffOn + FanModeType: + - Off + - Low + - Medium + - High + - On + - Auto + - Smart + ColorControl: + ColorLoopAction: + - Deactivate + - ActivateFromColorLoopStartEnhancedHue + - ActivateFromEnhancedCurrentHue + ColorLoopDirection: + - DecrementHue + - IncrementHue + ColorMode: + - CurrentHueAndCurrentSaturation + - CurrentXAndCurrentY + - ColorTemperature + HueDirection: + - ShortestDistance + - LongestDistance + - Up + - Down + HueMoveMode: + - Stop + - Up + - Down + HueStepMode: + - Up + - Down + SaturationMoveMode: + - Stop + - Up + - Down + SaturationStepMode: + - Up + - Down + IlluminanceMeasurement: + LightSensorTypeEnum: + - Photodiode + - CMOS + Channel: + # StatusEnum was originally named ChannelStatusEnum, but we + # generate the same API for the names with/without the cluster + # name at the beginning, so the name can just change here. + StatusEnum: + - Success + - MultipleMatches + - NoMatches + LineupInfoTypeEnum: + - Mso + TargetNavigator: + # StatusEnum was originally named TargetNavigatorStatusEnum, but + # we generate the same API for the names with/without the cluster + # name at the beginning, so the name can just change here. + StatusEnum: + - Success + - TargetNotFound + - NotAllowed + MediaPlayback: + # StatusEnum was originally named MediaPlaybackStatusEnum, but we + # generate the same API for the names with/without the cluster + # name at the beginning, so the name can just change here. + StatusEnum: + - Success + - InvalidStateForCommand + - NotAllowed + - NotActive + - SpeedOutOfRange + - SeekOutOfRange + PlaybackStateEnum: + - Playing + - Paused + - NotPlaying + - Buffering + MediaInput: + InputTypeEnum: + - Internal + - Aux + - Coax + - Composite + - Hdmi + - Input + - Line + - Optical + - Video + - Scart + - Usb + - Other + KeypadInput: + CecKeyCode: + - Select + - Up + - Down + - Left + - Right + - RightUp + - RightDown + - LeftUp + - LeftDown + - RootMenu + - SetupMenu + - ContentsMenu + - FavoriteMenu + - Exit + - MediaTopMenu + - MediaContextSensitiveMenu + - NumberEntryMode + - Number11 + - Number12 + - Number0OrNumber10 + - Numbers1 + - Numbers2 + - Numbers3 + - Numbers4 + - Numbers5 + - Numbers6 + - Numbers7 + - Numbers8 + - Numbers9 + - Dot + - Enter + - Clear + - NextFavorite + - ChannelUp + - ChannelDown + - PreviousChannel + - SoundSelect + - InputSelect + - DisplayInformation + - Help + - PageUp + - PageDown + - Power + - VolumeUp + - VolumeDown + - Mute + - Play + - Stop + - Pause + - Record + - Rewind + - FastForward + - Eject + - Forward + - Backward + - StopRecord + - PauseRecord + - Reserved + - Angle + - SubPicture + - VideoOnDemand + - ElectronicProgramGuide + - TimerProgramming + - InitialConfiguration + - SelectBroadcastType + - SelectSoundPresentation + - PlayFunction + - PausePlayFunction + - RecordFunction + - PauseRecordFunction + - StopFunction + - MuteFunction + - RestoreVolumeFunction + - TuneFunction + - SelectMediaFunction + - SelectAvInputFunction + - SelectAudioInputFunction + - PowerToggleFunction + - PowerOffFunction + - PowerOnFunction + - F1Blue + - F2Red + - F3Green + - F4Yellow + - F5 + - Data + # StatusEnum was originally named KeypadInputStatusEnum, but we + # generate the same API for the names with/without the cluster + # name at the beginning, so the name can just change here. + StatusEnum: + - Success + - UnsupportedKey + - InvalidKeyInCurrentState + ContentLauncher: + ContentLaunchStatusEnum: + - Success + - UrlNotAvailable + - AuthFailed + MetricTypeEnum: + - PIXELS + - PERCENTAGE + ParameterEnum: + - Actor + - Channel + - Character + - Director + - Event + - Franchise + - Genre + - League + - Popularity + - Provider + - Sport + - SportsTeam + - Type + AudioOutput: + OutputTypeEnum: + - Hdmi + - Bt + - Optical + - Headphone + - Internal + - Other + ApplicationLauncher: + # StatusEnum was originally named ApplicationLauncherStatusEnum, but we + # generate the same API for the names with/without the cluster name at the + # beginning, so the name can just change here. + StatusEnum: + - Success + - AppNotAvailable + - SystemBusy + ApplicationBasic: + ApplicationStatusEnum: + - Stopped + - ActiveVisibleFocus + - ActiveHidden + - ActiveVisibleNotFocus + TestCluster: + SimpleEnum: + - Unspecified + - ValueA + - ValueB + - ValueC + bitmaps: + Groups: + - GroupClusterFeature + Scenes: + - ScenesCopyMode + OnOff: + - OnOffControl + # Feature was originally named OnOffFeature, but we generate the + # same API for both of those names, so the name can just change + # here. + - Feature + LevelControl: + # Feature was originally named LevelControlFeature, but we generate the + # same API for both of those names, so the name can just change + # here. + - Feature + Actions: + - CommandBits + UnitLocalization: + # Feature was originally named UnitLocalizationFeature, but we generate the + # same API for both of those names, so the name can just change + # here. + - Feature + PowerSource: + # Feature was originally named PowerSourceFeature, but we generate the + # same API for both of those names, so the name can just change + # here. + - Feature + NetworkCommissioning: + # Feature was originally named NetworkCommissioningFeature, but we generate the + # same API for both of those names, so the name can just change + # here. + - Feature + - WiFiSecurity + SoftwareDiagnostics: + # Feature was originally named SoftwareDiagnosticsFeature, but we generate the + # same API for both of those names, so the name can just change + # here. + - Feature + ThreadNetworkDiagnostics: + # Feature was originally named ThreadNetworkDiagnosticsFeature, but we generate the + # same API for both of those names, so the name can just change + # here. + - Feature + ModeSelect: + # Feature was originally named ModeSelectFeature, but we generate the + # same API for both of those names, so the name can just change + # here. + - Feature + DoorLock: + - DlCredentialRuleMask + - DlCredentialRulesSupport + - DlDaysMaskMap + - DlDefaultConfigurationRegister + - DlKeypadOperationEventMask + - DlKeypadProgrammingEventMask + - DlLocalProgrammingFeatures + - DlManualOperationEventMask + - DlRFIDOperationEventMask + - DlRFIDProgrammingEventMask + - DlRemoteOperationEventMask + - DlRemoteProgrammingEventMask + - DlSupportedOperatingModes + - DoorLockDayOfWeek + # Feature was originally named DoorLockFeature, but we generate the + # same API for both of those names, so the name can just change + # here. + - Feature + WindowCovering: + - ConfigStatus + - Feature + - Mode + - OperationalStatus + - SafetyStatus + PumpConfigurationAndControl: + - PumpStatus + Thermostat: + - DayOfWeek + - ModeForSequence + # Feature was originally named ThermostatFeature, but we generate the + # same API for both of those names, so the name can just change + # here. + - Feature + FanControl: + # Feature was originally named FanControlFeature, but + # we generate the same API for both of those names, so the name + # can just change here. + - Feature + - RockSupportMask + - WindSettingMask + - WindSupportMask + ColorControl: + - ColorCapabilities + # Feature was originally named ColorControlFeature, but we generate the + # same API for both of those names, so the name can just change + # here. + - Feature + - ColorLoopUpdateFlags + PressureMeasurement: + - PressureFeature + Channel: + # Feature was originally named ChannelFeature, but we generate the + # same API for both of those names, so the name can just change + # here. + - Feature + MediaInput: + # Feature was originally named MediaInputFeature, but we generate the + # same API for both of those names, so the name can just change + # here. + - Feature + KeypadInput: + # Feature was originally named KeypadInputFeature, but we generate the + # same API for both of those names, so the name can just change + # here. + - Feature + ContentLauncher: + # Feature was originally named ContentLauncherFeature, but we generate the + # same API for both of those names, so the name can just change + # here. + - Feature + - SupportedStreamingProtocol + AudioOutput: + # Feature was originally named AudioOutputFeature, but + # we generate the same API for both of those names, so the name + # can just change here. + - Feature + ApplicationLauncher: + # Feature was originally named ApplicationLauncherFeature, but + # we generate the same API for both of those names, so the name + # can just change here. + - Feature + TestCluster: + - Bitmap16MaskMap + - Bitmap32MaskMap + - Bitmap64MaskMap + - Bitmap8MaskMap + - SimpleBitmap + bitmap values: + Groups: + GroupClusterFeature: + - GroupNames + Scenes: + ScenesCopyMode: + - CopyAllScenes + OnOff: + OnOffControl: + - AcceptOnlyWhenOn + # Feature was originally named OnOffFeature, but we generate the + # same API for both of those names, so the name can just change + # here. + Feature: + - Lighting + LevelControl: + # Feature was originally named LevelControlFeature, but we generate the + # same API for both of those names, so the name can just change + # here. + Feature: + - OnOff + - Lighting + - Frequency + Actions: + CommandBits: + - InstantAction + - InstantActionWithTransition + - StartAction + - StartActionWithDuration + - StopAction + - PauseAction + - PauseActionWithDuration + - ResumeAction + - EnableAction + - EnableActionWithDuration + - DisableAction + - DisableActionWithDuration + UnitLocalization: + # Feature was originally named UnitLocalizationFeature, but we generate the + # same API for both of those names, so the name can just change + # here. + Feature: + - TemperatureUnit + PowerSource: + # Feature was originally named PowerSourceFeature, but we generate the + # same API for both of those names, so the name can just change + # here. + Feature: + - Wired + - Battery + - Rechargeable + - Replaceable + NetworkCommissioning: + # Feature was originally named NetworkCommissioningFeature, but we generate the + # same API for both of those names, so the name can just change + # here. + Feature: + - WiFiNetworkInterface + - ThreadNetworkInterface + - EthernetNetworkInterface + WiFiSecurity: + - Unencrypted + - WepPersonal + - WpaPersonal + - Wpa2Personal + - Wpa3Personal + SoftwareDiagnostics: + # Feature was originally named SoftwareDiagnosticsFeature, but we generate the + # same API for both of those names, so the name can just change + # here. + Feature: + - WaterMarks + ThreadNetworkDiagnostics: + # Feature was originally named ThreadNetworkDiagnosticsFeature, but we generate the + # same API for both of those names, so the name can just change + # here. + Feature: + - PacketCounts + - ErrorCounts + - MLECounts + - MACCounts + ModeSelect: + # Feature was originally named ModeSelectFeature, but we generate the + # same API for both of those names, so the name can just change + # here. + Feature: + - DEPONOFF + DoorLock: + DlCredentialRuleMask: + - Single + - Dual + - Tri + DlCredentialRulesSupport: + - Single + - Dual + - Tri + DlDaysMaskMap: + - Sunday + - Monday + - Tuesday + - Wednesday + - Thursday + - Friday + - Saturday + DlDefaultConfigurationRegister: + - EnableLocalProgrammingEnabled + - KeypadInterfaceDefaultAccessEnabled + - RemoteInterfaceDefaultAccessIsEnabled + - SoundEnabled + - AutoRelockTimeSet + - LEDSettingsSet + DlKeypadOperationEventMask: + - Unknown + - Lock + - Unlock + - LockInvalidPIN + - LockInvalidSchedule + - UnlockInvalidCode + - UnlockInvalidSchedule + - NonAccessUserOpEvent + DlKeypadProgrammingEventMask: + - Unknown + - ProgrammingPINChanged + - PINAdded + - PINCleared + - PINChanged + DlLocalProgrammingFeatures: + - AddUsersCredentialsSchedulesLocally + - ModifyUsersCredentialsSchedulesLocally + - ClearUsersCredentialsSchedulesLocally + - AdjustLockSettingsLocally + DlManualOperationEventMask: + - Unknown + - ThumbturnLock + - ThumbturnUnlock + - OneTouchLock + - KeyLock + - KeyUnlock + - AutoLock + - ScheduleLock + - ScheduleUnlock + - ManualLock + - ManualUnlock + DlRFIDOperationEventMask: + - Unknown + - Lock + - Unlock + - LockInvalidRFID + - LockInvalidSchedule + - UnlockInvalidRFID + - UnlockInvalidSchedule + DlRFIDProgrammingEventMask: + - Unknown + - RFIDCodeAdded + - RFIDCodeCleared + DlRemoteOperationEventMask: + - Unknown + - Lock + - Unlock + - LockInvalidCode + - LockInvalidSchedule + - UnlockInvalidCode + - UnlockInvalidSchedule + DlRemoteProgrammingEventMask: + - Unknown + - ProgrammingPINChanged + - PINAdded + - PINCleared + - PINChanged + - RFIDCodeAdded + - RFIDCodeCleared + DlSupportedOperatingModes: + - Normal + - Vacation + - Privacy + - NoRemoteLockUnlock + - Passage + DoorLockDayOfWeek: + - Sunday + - Monday + - Tuesday + - Wednesday + - Thursday + - Friday + - Saturday + # Feature was originally named DoorLockFeature, but we generate the + # same API for both of those names, so the name can just change + # here. + Feature: + - PINCredentials + - RFIDCredentials + - FingerCredentials + - Logging + - WeekDaySchedules + - DoorPositionSensor + - FaceCredentials + - CredentialsOTA + - UsersManagement + - Notifications + - YearDaySchedules + - HolidaySchedules + WindowCovering: + ConfigStatus: + - Operational + - OnlineReserved + - LiftMovementReversed + - LiftPositionAware + - TiltPositionAware + - LiftEncoderControlled + - TiltEncoderControlled + Feature: + - Lift + - Tilt + - PositionAwareLift + - AbsolutePosition + - PositionAwareTilt + Mode: + - MotorDirectionReversed + - CalibrationMode + - MaintenanceMode + - LedFeedback + OperationalStatus: + - Global + - Lift + - Tilt + SafetyStatus: + - RemoteLockout + - TamperDetection + - FailedCommunication + - PositionFailure + - ThermalProtection + - ObstacleDetected + - Power + - StopInput + - MotorJammed + - HardwareFailure + - ManualOperation + - Protection + PumpConfigurationAndControl: + PumpStatus: + - DeviceFault + - Supplyfault + - SpeedLow + - SpeedHigh + - LocalOverride + - Running + - RemotePressure + - RemoteFlow + - RemoteTemperature + Thermostat: + DayOfWeek: + - Sunday + - Monday + - Tuesday + - Wednesday + - Thursday + - Friday + - Saturday + - AwayOrVacation + ModeForSequence: + - HeatSetpointFieldPresent + - CoolSetpointFieldPresent + # Feature was originally named ThermostatFeature, but we generate the + # same API for both of those names, so the name can just change + # here. + Feature: + - Heating + - Cooling + - Occupancy + - Schedule + - Setback + - Automode + FanControl: + # Feature was originally named FanControlFeature, but + # we generate the same API for both of those names, so the name + # can just change here. + Feature: + - MultiSpeed + - Auto + - Rocking + - Wind + RockSupportMask: + - RockLeftRight + - RockUpDown + - RockRound + WindSettingMask: + - SleepWind + - NaturalWind + WindSupportMask: + - SleepWind + - NaturalWind + ColorControl: + ColorCapabilities: + - HueSaturationSupported + - EnhancedHueSupported + - ColorLoopSupported + - XYAttributesSupported + - ColorTemperatureSupported + # Feature was originally named ColorControlFeature, but we generate the + # same API for both of those names, so the name can just change + # here. + Feature: + - HueAndSaturation + - EnhancedHue + - ColorLoop + - XY + - ColorTemperature + ColorLoopUpdateFlags: + - UpdateAction + - UpdateDirection + - UpdateTime + - UpdateStartHue + PressureMeasurement: + PressureFeature: + - EXT + Channel: + # Feature was originally named ChannelFeature, but we generate the + # same API for both of those names, so the name can just change + # here. + Feature: + - ChannelList + - LineupInfo + MediaInput: + # Feature was originally named MediaInputFeature, but we generate the + # same API for both of those names, so the name can just change + # here. + Feature: + - NameUpdates + KeypadInput: + # Feature was originally named KeypadInputFeature, but we generate the + # same API for both of those names, so the name can just change + # here. + Feature: + - NavigationKeyCodes + - LocationKeys + - NumberKeys + ContentLauncher: + # Feature was originally named ContentLauncherFeature, but we generate the + # same API for both of those names, so the name can just change + # here. + Feature: + - ContentSearch + - URLPlayback + SupportedStreamingProtocol: + - DASH + - HLS + AudioOutput: + # Feature was originally named AudioOutputFeature, but + # we generate the same API for both of those names, so the name + # can just change here. + Feature: + - NameUpdates + ApplicationLauncher: + # Feature was originally named ApplicationLauncherFeature, but + # we generate the same API for both of those names, so the name + # can just change here. + Feature: + - ApplicationPlatform + TestCluster: + Bitmap16MaskMap: + - MaskVal1 + - MaskVal2 + - MaskVal3 + - MaskVal4 + Bitmap32MaskMap: + - MaskVal1 + - MaskVal2 + - MaskVal3 + - MaskVal4 + Bitmap64MaskMap: + - MaskVal1 + - MaskVal2 + - MaskVal3 + - MaskVal4 + Bitmap8MaskMap: + - MaskVal1 + - MaskVal2 + - MaskVal3 + - MaskVal4 + SimpleBitmap: + - ValueA + - ValueB + - ValueC + ids: + clusters: + - PulseWidthModulation + - TimeSynchronization + attributes: + PulseWidthModulation: + - GeneratedCommandList + - AcceptedCommandList + - AttributeList + - FeatureMap + - ClusterRevision + TimeSynchronization: + - GeneratedCommandList + - AcceptedCommandList + - AttributeList + - FeatureMap + - ClusterRevision + - UTCTime + - Granularity + - TimeSource + - TrustedTimeNodeId + - DefaultNtp + - TimeZone + - DstOffset + - LocalTime + - TimeZoneDatabase + - NtpServerPort + commands: + TimeSynchronization: + - SetUtcTime + command payloads: + TimeSynchronization: + - SetUtcTime + global attributes: + - FeatureMap + - ClusterRevision + - AttributeList + - GeneratedCommandList + - AcceptedCommandList + apis: + - Timed Invoke for server to client commands + - Deprecated global attribute names + provisional: + clusters: + - PulseWidthModulation + - TimeSynchronization + +- release: "First dot-release" + versions: + iOS: "16.2" + macOS: "13.1" + watchOS: "9.2" + tvOS: "16.2" + introduced: + attributes: + TestCluster: + - WriteOnlyInt8u + structs: + Descriptor: + - DeviceTypeStruct + struct fields: + Descriptor: + DeviceTypeStruct: + - type + - revision + bitmaps: + Switch: + # Feature was originally named SwitchFeature, but we generate the + # same API for both of those names, so the name can just change + # here. + - Feature + MediaPlayback: + # Feature was originally named MediaPlaybackFeature, but we generate the + # same API for both of those names, so the name can just change + # here. + - Feature + bitmap values: + Switch: + # Feature was originally named SwitchFeature, but we generate the + # same API for both of those names, so the name can just change + # here. + Feature: + - LatchingSwitch + - MomentarySwitch + - MomentarySwitchRelease + - MomentarySwitchLongPress + - MomentarySwitchMultiPress + MediaPlayback: + # Feature was originally named MediaPlaybackFeature, but we generate the + # same API for both of those names, so the name can just change + # here. + Feature: + - AdvancedSeek + - VariableSpeed + ids: + attributes: + Descriptor: + - DeviceTypeList + renames: + structs: + Descriptor: + DeviceTypeStruct: DeviceType + +- release: "First major API revamp" + versions: + iOS: "16.4" + macOS: "13.3" + watchOS: "9.4" + tvOS: "16.4" + introduced: + clusters: + - OTASoftwareUpdateProvider + - OTASoftwareUpdateRequestor + - UnitTesting + - WakeOnLAN + - BasicInformation + - BridgedDeviceBasicInformation + attributes: + Descriptor: + # We really only started treating DeviceTypeList as DeviceTypeList in the API revamp, + # except in the list of attribute ids. + - DeviceTypeList + AccessControl: + - ACL + BallastConfiguration: + - IntrinsicBallastFactor + OccupancySensing: + - PIROccupiedToUnoccupiedDelay + - PIRUnoccupiedToOccupiedDelay + - PIRUnoccupiedToOccupiedThreshold + UnitTesting: + - Boolean + - Bitmap8 + - Bitmap16 + - Bitmap32 + - Bitmap64 + - Int8u + - Int16u + - Int24u + - Int32u + - Int40u + - Int48u + - Int56u + - Int64u + - Int8s + - Int16s + - Int24s + - Int32s + - Int40s + - Int48s + - Int56s + - Int64s + - Enum8 + - Enum16 + - FloatSingle + - FloatDouble + - OctetString + - ListInt8u + - ListOctetString + - ListStructOctetString + - LongOctetString + - CharString + - LongCharString + - EpochUs + - EpochS + - VendorId + - ListNullablesAndOptionalsStruct + - EnumAttr + - StructAttr + - RangeRestrictedInt8u + - RangeRestrictedInt8s + - RangeRestrictedInt16u + - RangeRestrictedInt16s + - ListLongOctetString + - ListFabricScoped + - TimedWriteBoolean + - GeneralErrorBoolean + - ClusterErrorBoolean + - Unsupported + - NullableBoolean + - NullableBitmap8 + - NullableBitmap16 + - NullableBitmap32 + - NullableBitmap64 + - NullableInt8u + - NullableInt16u + - NullableInt24u + - NullableInt32u + - NullableInt40u + - NullableInt48u + - NullableInt56u + - NullableInt64u + - NullableInt8s + - NullableInt16s + - NullableInt24s + - NullableInt32s + - NullableInt40s + - NullableInt48s + - NullableInt56s + - NullableInt64s + - NullableEnum8 + - NullableEnum16 + - NullableFloatSingle + - NullableFloatDouble + - NullableOctetString + - NullableCharString + - NullableEnumAttr + - NullableStruct + - NullableRangeRestrictedInt8u + - NullableRangeRestrictedInt8s + - NullableRangeRestrictedInt16u + - NullableRangeRestrictedInt16s + - GeneratedCommandList + - AcceptedCommandList + - AttributeList + - FeatureMap + - ClusterRevision + - WriteOnlyInt8u + OTASoftwareUpdateProvider: + - GeneratedCommandList + - AcceptedCommandList + - AttributeList + - FeatureMap + - ClusterRevision + OTASoftwareUpdateRequestor: + - DefaultOTAProviders + - UpdatePossible + - UpdateState + - UpdateStateProgress + - GeneratedCommandList + - AcceptedCommandList + - AttributeList + - FeatureMap + - ClusterRevision + WakeOnLAN: + - MACAddress + - GeneratedCommandList + - AcceptedCommandList + - AttributeList + - FeatureMap + - ClusterRevision + BasicInformation: + - DataModelRevision + - VendorName + - VendorID + - ProductName + - ProductID + - NodeLabel + - Location + - HardwareVersion + - HardwareVersionString + - SoftwareVersion + - SoftwareVersionString + - ManufacturingDate + - PartNumber + - ProductURL + - ProductLabel + - SerialNumber + - LocalConfigDisabled + - Reachable + - UniqueID + - CapabilityMinima + - GeneratedCommandList + - AcceptedCommandList + - AttributeList + - FeatureMap + - ClusterRevision + ThreadNetworkDiagnostics: + - NeighborTable + - RouteTable + WiFiNetworkDiagnostics: + - BSSID + - RSSI + GeneralDiagnostics: + - BootReason + BridgedDeviceBasicInformation: + - VendorName + - VendorID + - ProductName + - NodeLabel + - HardwareVersion + - HardwareVersionString + - SoftwareVersion + - SoftwareVersionString + - ManufacturingDate + - PartNumber + - ProductURL + - ProductLabel + - SerialNumber + - Reachable + - UniqueID + - GeneratedCommandList + - AcceptedCommandList + - AttributeList + - FeatureMap + - ClusterRevision + commands: + OTASoftwareUpdateProvider: + - QueryImage + - QueryImageResponse + - ApplyUpdateRequest + - ApplyUpdateResponse + - NotifyUpdateApplied + OTASoftwareUpdateRequestor: + - AnnounceOTAProvider + UnitTesting: + - Test + - TestSpecificResponse + - TestNotHandled + - TestAddArgumentsResponse + - TestSpecific + - TestSimpleArgumentResponse + - TestUnknownCommand + - TestStructArrayArgumentResponse + - TestAddArguments + - TestListInt8UReverseResponse + - TestSimpleArgumentRequest + - TestEnumsResponse + - TestStructArrayArgumentRequest + - TestNullableOptionalResponse + - TestStructArgumentRequest + - TestComplexNullableOptionalResponse + - TestNestedStructArgumentRequest + - BooleanResponse + - TestListStructArgumentRequest + - SimpleStructResponse + - TestListInt8UArgumentRequest + - TestEmitTestEventResponse + - TestNestedStructListArgumentRequest + - TestEmitTestFabricScopedEventResponse + - TestListNestedStructListArgumentRequest + - TestListInt8UReverseRequest + - TestEnumsRequest + - TestNullableOptionalRequest + - TestComplexNullableOptionalRequest + - SimpleStructEchoRequest + - TimedInvokeRequest + - TestSimpleOptionalArgumentRequest + - TestEmitTestEventRequest + - TestEmitTestFabricScopedEventRequest + ContentLauncher: + - LauncherResponse + MediaPlayback: + - Stop + command fields: + UnitTesting: + TestSpecificResponse: + - returnValue + TestAddArgumentsResponse: + - returnValue + TestSimpleArgumentResponse: + - returnValue + TestStructArrayArgumentResponse: + - arg1 + - arg2 + - arg3 + - arg4 + - arg5 + - arg6 + TestAddArguments: + - arg1 + - arg2 + TestListInt8UReverseResponse: + - arg1 + TestSimpleArgumentRequest: + - arg1 + TestEnumsResponse: + - arg1 + - arg2 + TestStructArrayArgumentRequest: + - arg1 + - arg2 + - arg3 + - arg4 + - arg5 + - arg6 + TestNullableOptionalResponse: + - wasPresent + - wasNull + - value + - originalValue + TestStructArgumentRequest: + - arg1 + TestComplexNullableOptionalResponse: + - nullableIntWasNull + - nullableIntValue + - optionalIntWasPresent + - optionalIntValue + - nullableOptionalIntWasPresent + - nullableOptionalIntWasNull + - nullableOptionalIntValue + - nullableStringWasNull + - nullableStringValue + - optionalStringWasPresent + - optionalStringValue + - nullableOptionalStringWasPresent + - nullableOptionalStringWasNull + - nullableOptionalStringValue + - nullableStructWasNull + - nullableStructValue + - optionalStructWasPresent + - optionalStructValue + - nullableOptionalStructWasPresent + - nullableOptionalStructWasNull + - nullableOptionalStructValue + - nullableListWasNull + - nullableListValue + - optionalListWasPresent + - optionalListValue + - nullableOptionalListWasPresent + - nullableOptionalListWasNull + - nullableOptionalListValue + TestNestedStructArgumentRequest: + - arg1 + BooleanResponse: + - value + TestListStructArgumentRequest: + - arg1 + SimpleStructResponse: + - arg1 + TestListInt8UArgumentRequest: + - arg1 + TestEmitTestEventResponse: + - value + TestNestedStructListArgumentRequest: + - arg1 + TestEmitTestFabricScopedEventResponse: + - value + TestListNestedStructListArgumentRequest: + - arg1 + TestListInt8UReverseRequest: + - arg1 + TestEnumsRequest: + - arg1 + - arg2 + TestNullableOptionalRequest: + - arg1 + TestComplexNullableOptionalRequest: + - nullableInt + - optionalInt + - nullableOptionalInt + - nullableString + - optionalString + - nullableOptionalString + - nullableStruct + - optionalStruct + - nullableOptionalStruct + - nullableList + - optionalList + - nullableOptionalList + SimpleStructEchoRequest: + - arg1 + TestSimpleOptionalArgumentRequest: + - arg1 + TestEmitTestEventRequest: + - arg1 + - arg2 + - arg3 + TestEmitTestFabricScopedEventRequest: + - arg1 + OTASoftwareUpdateProvider: + QueryImage: + - vendorID + - productID + - softwareVersion + - protocolsSupported + - hardwareVersion + - location + - requestorCanConsent + - metadataForProvider + # Next two were introduced and deprecated at the same time, effectively + - vendorId + - productId + QueryImageResponse: + - status + - delayedActionTime + - imageURI + - softwareVersion + - softwareVersionString + - updateToken + - userConsentNeeded + - metadataForRequestor + ApplyUpdateRequest: + - updateToken + - newVersion + ApplyUpdateResponse: + - action + - delayedActionTime + NotifyUpdateApplied: + - updateToken + - softwareVersion + OTASoftwareUpdateRequestor: + AnnounceOTAProvider: + - providerNodeID + - vendorID + - announcementReason + - metadataForNode + - endpoint + # Next two were introduced and deprecated at the same time, effectively + - providerNodeId + - vendorId + Groups: + AddGroup: + - groupID + AddGroupIfIdentifying: + - groupID + AddGroupResponse: + - groupID + RemoveGroup: + - groupID + RemoveGroupResponse: + - groupID + ViewGroup: + - groupID + ViewGroupResponse: + - groupID + OnOff: + OffWithEffect: + - effectIdentifier + DiagnosticLogs: + RetrieveLogsResponse: + - logContent + - utcTimeStamp + AdministratorCommissioning: + OpenCommissioningWindow: + - pakePasscodeVerifier + OperationalCredentials: + AttestationResponse: + - attestationSignature + AddTrustedRootCertificate: + - rootCACertificate + DoorLock: + SetUser: + - userUniqueID + GetUserResponse: + - userUniqueID + ColorControl: + MoveToColorTemperature: + - colorTemperatureMireds + ContentLauncher: + LauncherResponse: + - status + - data + Scenes: + AddScene: + - groupID + - sceneID + ViewScene: + - groupID + - sceneID + RemoveScene: + - groupID + - sceneID + RemoveAllScenes: + - groupID + StoreScene: + - groupID + - sceneID + RecallScene: + - groupID + - sceneID + GetSceneMembership: + - groupID + EnhancedAddScene: + - groupID + - sceneID + EnhancedViewScene: + - groupID + - sceneID + CopyScene: + - groupIdentifierFrom + - sceneIdentifierFrom + - groupIdentifierTo + - sceneIdentifierTo + AddSceneResponse: + - groupID + - sceneID + ViewSceneResponse: + - groupID + - sceneID + RemoveSceneResponse: + - groupID + - sceneID + RemoveAllScenesResponse: + - groupID + StoreSceneResponse: + - groupID + - sceneID + GetSceneMembershipResponse: + - groupID + EnhancedAddSceneResponse: + - groupID + - sceneID + EnhancedViewSceneResponse: + - groupID + - sceneID + CopySceneResponse: + - groupIdentifierFrom + - sceneIdentifierFrom + structs: + OTASoftwareUpdateRequestor: + - ProviderLocation + UnitTesting: + - SimpleStruct + - TestFabricScoped + - NullablesAndOptionalsStruct + - NestedStruct + - NestedStructList + - DoubleNestedStructList + - TestListStructOctet + BasicInformation: + - CapabilityMinimaStruct + AccessControl: + - AccessControlEntryStruct + - AccessControlExtensionStruct + SoftwareDiagnostics: + - ThreadMetricsStruct + GeneralDiagnostics: + - NetworkInterface + ModeSelect: + - SemanticTagStruct + OperationalCredentials: + - FabricDescriptorStruct + DoorLock: + - CredentialStruct + MediaPlayback: + - PlaybackPositionStruct + TargetNavigator: + - TargetInfoStruct + MediaInput: + - InputInfoStruct + AudioOutput: + - OutputInfoStruct + Channel: + - ChannelInfoStruct + - LineupInfoStruct + ContentLauncher: + - DimensionStruct + - AdditionalInfoStruct + - ParameterStruct + - ContentSearchStruct + - StyleInformationStruct + - BrandingInformationStruct + ApplicationLauncher: + - ApplicationStruct + - ApplicationEPStruct + ApplicationBasic: + - ApplicationStruct + struct fields: + UnitTesting: + SimpleStruct: + - a + - b + - c + - d + - e + - f + - g + - h + TestFabricScoped: + - fabricSensitiveInt8u + - optionalFabricSensitiveInt8u + - nullableFabricSensitiveInt8u + - nullableOptionalFabricSensitiveInt8u + - fabricSensitiveCharString + - fabricSensitiveStruct + - fabricSensitiveInt8uList + - fabricIndex + NullablesAndOptionalsStruct: + - nullableInt + - optionalInt + - nullableOptionalInt + - nullableString + - optionalString + - nullableOptionalString + - nullableStruct + - optionalStruct + - nullableOptionalStruct + - nullableList + - optionalList + - nullableOptionalList + NestedStruct: + - a + - b + - c + NestedStructList: + - a + - b + - c + - d + - e + - f + - g + DoubleNestedStructList: + - a + TestListStructOctet: + - member1 + - member2 + OTASoftwareUpdateRequestor: + ProviderLocation: + - providerNodeID + - endpoint + - fabricIndex + BasicInformation: + CapabilityMinimaStruct: + - caseSessionsPerFabric + - subscriptionsPerFabric + Descriptor: + DeviceTypeStruct: + - deviceType + AccessControl: + AccessControlEntryStruct: + - privilege + - authMode + - subjects + - targets + - fabricIndex + AccessControlExtensionStruct: + - data + - fabricIndex + SoftwareDiagnostics: + ThreadMetricsStruct: + - id + - name + - stackFreeCurrent + - stackFreeMinimum + - stackSize + GeneralDiagnostics: + NetworkInterface: + - name + - isOperational + - offPremiseServicesReachableIPv4 + - offPremiseServicesReachableIPv6 + - hardwareAddress + - iPv4Addresses + - iPv6Addresses + - type + ModeSelect: + SemanticTagStruct: + - mfgCode + - value + OperationalCredentials: + FabricDescriptorStruct: + - rootPublicKey + - vendorID + - fabricID + - nodeID + - label + - fabricIndex + # Values that are actually deprecated, but we effectively + # introduced them in this release. + - vendorId + - fabricId + - nodeId + DoorLock: + CredentialStruct: + - credentialType + - credentialIndex + MediaPlayback: + PlaybackPositionStruct: + - updatedAt + - position + TargetNavigator: + TargetInfoStruct: + - identifier + - name + MediaInput: + InputInfoStruct: + - index + - inputType + - name + - descriptionString + AudioOutput: + OutputInfoStruct: + - index + - outputType + - name + Channel: + ChannelInfoStruct: + - majorNumber + - minorNumber + - name + - callSign + - affiliateCallSign + LineupInfoStruct: + - operatorName + - lineupName + - postalCode + - lineupInfoType + ContentLauncher: + DimensionStruct: + - width + - height + - metric + AdditionalInfoStruct: + - name + - value + ParameterStruct: + - type + - value + - externalIDList + ContentSearchStruct: + - parameterList + StyleInformationStruct: + - imageURL + - color + - size + # Member that is actually deprecated, but we effectively + # introduced it in this release. + - imageUrl + BrandingInformationStruct: + - providerName + - background + - logo + - progressBar + - splash + - waterMark + ApplicationLauncher: + ApplicationStruct: + - catalogVendorID + - applicationID + # Values that are actually deprecated, but we effectively + # introduced them in this release. + - catalogVendorId + - applicationId + ApplicationEPStruct: + - application + - endpoint + ApplicationBasic: + ApplicationStruct: + - catalogVendorID + - applicationID + # Values that are actually deprecated, but we effectively + # introduced them in this release. + - catalogVendorId + - applicationId + Scenes: + AttributeValuePair: + - attributeID + ExtensionFieldSet: + - clusterID + events: + OTASoftwareUpdateRequestor: + - StateTransition + - VersionApplied + - DownloadError + UnitTesting: + - TestEvent + - TestFabricScopedEvent + BasicInformation: + - StartUp + - ShutDown + - Leave + - ReachableChanged + PowerSource: + - WiredFaultChange + - BatFaultChange + - BatChargeFaultChange + BridgedDeviceBasicInformation: + - StartUp + - ShutDown + - Leave + - ReachableChanged + event fields: + Switch: + MultiPressComplete: + - previousPosition + UnitTesting: + TestEvent: + - arg1 + - arg2 + - arg3 + - arg4 + - arg5 + - arg6 + TestFabricScopedEvent: + - fabricIndex + OTASoftwareUpdateRequestor: + StateTransition: + - previousState + - newState + - reason + - targetSoftwareVersion + VersionApplied: + - softwareVersion + - productID + DownloadError: + - softwareVersion + - bytesDownloaded + - progressPercent + - platformCode + BasicInformation: + StartUp: + - softwareVersion + Leave: + - fabricIndex + ReachableChanged: + - reachableNewValue + PowerSource: + WiredFaultChange: + - current + - previous + BatFaultChange: + - current + - previous + BatChargeFaultChange: + - current + - previous + BridgedDeviceBasicInformation: + StartUp: + - softwareVersion + ReachableChanged: + - reachableNewValue + enums: + OTASoftwareUpdateProvider: + - OTAApplyUpdateAction + - OTADownloadProtocol + - OTAQueryStatus + OTASoftwareUpdateRequestor: + - OTAAnnouncementReason + - OTAChangeReasonEnum + - OTAUpdateStateEnum + UnitTesting: + - SimpleEnum + AccessControl: + - AccessControlEntryPrivilegeEnum + - AccessControlEntryAuthModeEnum + ThreadNetworkDiagnostics: + - ConnectionStatusEnum + EthernetNetworkDiagnostics: + - PHYRateEnum + GeneralDiagnostics: + - HardwareFaultEnum + - RadioFaultEnum + - BootReasonEnum + - NetworkFaultEnum + OperationalCredentials: + - NodeOperationalCertStatusEnum + - CertificateChainTypeEnum + DoorLock: + - AlarmCodeEnum + - CredentialRuleEnum + - CredentialTypeEnum + - DataOperationTypeEnum + - DoorStateEnum + - LockDataTypeEnum + - LockOperationTypeEnum + - OperationErrorEnum + - OperatingModeEnum + - OperationSourceEnum + enum values: + OTASoftwareUpdateProvider: + OTAApplyUpdateAction: + - Proceed + - AwaitNextAction + - Discontinue + OTADownloadProtocol: + - BDXSynchronous + - BDXAsynchronous + - HTTPS + - VendorSpecific + OTAQueryStatus: + - UpdateAvailable + - Busy + - NotAvailable + - DownloadProtocolNotSupported + OTASoftwareUpdateRequestor: + OTAAnnouncementReason: + - SimpleAnnouncement + - UpdateAvailable + - UrgentUpdateAvailable + OTAChangeReasonEnum: + - Unknown + - Success + - Failure + - TimeOut + - DelayByProvider + OTAUpdateStateEnum: + - Unknown + - Idle + - Querying + - DelayedOnQuery + - Downloading + - Applying + - DelayedOnApply + - RollingBack + - DelayedOnUserConsent + UnitTesting: + SimpleEnum: + - Unspecified + - ValueA + - ValueB + - ValueC + GeneralCommissioning: + # CommissioningErrorEnum was originally just named + # CommissioningError, but we generate the same API + # for both of those names, so the name can just change + # here. + CommissioningErrorEnum: + - OK + AccessControl: + AccessControlEntryPrivilegeEnum: + - View + - ProxyView + - Operate + - Manage + - Administer + AccessControlEntryAuthModeEnum: + - PASE + - CASE + - Group + PowerSource: + BatChargeLevelEnum: + - OK + BatChargeFaultEnum: + - Unspecified + PowerSourceStatusEnum: + - Unspecified + ThreadNetworkDiagnostics: + ConnectionStatusEnum: + - Connected + - NotConnected + WiFiNetworkDiagnostics: + WiFiVersionType: + - A + - B + - G + - N + - Ac + - Ax + EthernetNetworkDiagnostics: + PHYRateEnum: + - Rate10M + - Rate100M + - Rate1G + - Rate25G + - Rate5G + - Rate10G + - Rate40G + - Rate100G + - Rate200G + - Rate400G + GeneralDiagnostics: + HardwareFaultEnum: + - Unspecified + - Radio + - Sensor + - ResettableOverTemp + - NonResettableOverTemp + - PowerSource + - VisualDisplayFault + - AudioOutputFault + - UserInterfaceFault + - NonVolatileMemoryError + - TamperDetected + RadioFaultEnum: + - Unspecified + - WiFiFault + - CellularFault + - ThreadFault + - NFCFault + - BLEFault + - EthernetFault + BootReasonEnum: + - Unspecified + - PowerOnReboot + - BrownOutReset + - SoftwareWatchdogReset + - HardwareWatchdogReset + - SoftwareUpdateCompleted + - SoftwareReset + NetworkFaultEnum: + - Unspecified + - HardwareFailure + - NetworkJammed + - ConnectionFailed + OperationalCredentials: + NodeOperationalCertStatusEnum: + - OK + - InvalidPublicKey + - InvalidNodeOpId + - InvalidNOC + - MissingCsr + - TableFull + - InvalidAdminSubject + - FabricConflict + - LabelConflict + - InvalidFabricIndex + CertificateChainTypeEnum: + - DACCertificate + - PAICertificate + DoorLock: + AlarmCodeEnum: + - LockJammed + - LockFactoryReset + - LockRadioPowerCycled + - WrongCodeEntryLimit + - FrontEsceutcheonRemoved + - DoorForcedOpen + - DoorAjar + - ForcedUser + CredentialRuleEnum: + - Single + - Dual + - Tri + CredentialTypeEnum: + - ProgrammingPIN + - PIN + - RFID + - Fingerprint + - FingerVein + - Face + DataOperationTypeEnum: + - Add + - Clear + - Modify + DoorStateEnum: + - DoorOpen + - DoorClosed + - DoorJammed + - DoorForcedOpen + - DoorUnspecifiedError + - DoorAjar + LockDataTypeEnum: + - Unspecified + - ProgrammingCode + - UserIndex + - WeekDaySchedule + - YearDaySchedule + - HolidaySchedule + - PIN + - RFID + - Fingerprint + LockOperationTypeEnum: + - Lock + - Unlock + - NonAccessUserEvent + - ForcedUserEvent + OperationErrorEnum: + - Unspecified + - InvalidCredential + - DisabledUserDenied + - Restricted + - InsufficientBattery + OperatingModeEnum: + - Normal + - Vacation + - Privacy + - NoRemoteLockUnlock + - Passage + OperationSourceEnum: + - Unspecified + - Manual + - ProprietaryRemote + - Keypad + - Auto + - Button + - Schedule + - Remote + - RFID + - Biometric + UserTypeEnum: + - UnrestrictedUser + - ProgrammingUser + - ForcedUser + - DisposableUser + - ExpiringUser + - ScheduleRestrictedUser + - RemoteOnlyUser + MediaInput: + InputTypeEnum: + - HDMI + - SCART + - USB + AudioOutput: + OutputTypeEnum: + - HDMI + - BT + Channel: + LineupInfoTypeEnum: + - MSO + ContentLauncher: + MetricTypeEnum: + - Pixels + - Percentage + ParameterEnum: + - Video + Thermostat: + # SystemModeEnum was originally named ThermostatSystemMode, but we + # generate the same API for the names with/without "Enum" at the + # end and the cluster name present/absent at the beginning, so the + # name can just change here. + SystemModeEnum: + - EmergencyHeat + - Dry + - Sleep + SetpointAdjustMode: + - Heat + - Cool + - Both + bitmaps: + UnitTesting: + - Bitmap8MaskMap + - Bitmap16MaskMap + - Bitmap32MaskMap + - Bitmap64MaskMap + - SimpleBitmap + LevelControl: + - LevelControlOptions + DoorLock: + - DaysMaskMap + PumpConfigurationAndControl: + - PumpFeature + WiFiNetworkDiagnostics: + # Feature was originally named WiFiNetworkDiagnosticsFeature, but + # we generate the same API for both of those names, so the name + # can just change here. + - Feature + EthernetNetworkDiagnostics: + # Feature was originally named EthernetNetworkDiagnosticsFeature, but + # we generate the same API for both of those names, so the name + # can just change here. + - Feature + bitmap values: + UnitTesting: + Bitmap8MaskMap: + - MaskVal1 + - MaskVal2 + - MaskVal3 + - MaskVal4 + Bitmap16MaskMap: + - MaskVal1 + - MaskVal2 + - MaskVal3 + - MaskVal4 + Bitmap32MaskMap: + - MaskVal1 + - MaskVal2 + - MaskVal3 + - MaskVal4 + Bitmap64MaskMap: + - MaskVal1 + - MaskVal2 + - MaskVal3 + - MaskVal4 + SimpleBitmap: + - ValueA + - ValueB + - ValueC + LevelControl: + LevelControlOptions: + - ExecuteIfOff + - CoupleColorTempToLevel + NetworkCommissioning: + WiFiSecurity: + - WEP + - WPAPersonal + - WPA2Personal + - WPA3Personal + PressureMeasurement: + PressureFeature: + - Extended + DoorLock: + DaysMaskMap: + - Sunday + - Monday + - Tuesday + - Wednesday + - Thursday + - Friday + - Saturday + # Feature was originally named DoorLockFeature, but we generate the + # same API for both of those names, so the name can just change + # here. + Feature: + - PINCredential + - RFIDCredential + - WeekDayAccessSchedules + - CredentialsOverTheAirAccess + - User + - Notification + - YearDayAccessSchedules + PumpConfigurationAndControl: + PumpFeature: + - ConstantPressure + - CompensatedPressure + - ConstantFlow + - ConstantSpeed + - ConstantTemperature + - Automatic + - Local + Thermostat: + # Feature was originally named ThermostatFeature, but we generate the + # same API for both of those names, so the name can just change + # here. + Feature: + - ScheduleConfiguration + - AutoMode + DayOfWeek: + - Away + ModeForSequence: + - HeatSetpointPresent + - CoolSetpointPresent + WiFiNetworkDiagnostics: + # Feature was originally named WiFiNetworkDiagnosticsFeature, but + # we generate the same API for both of those names, so the name + # can just change here. + Feature: + - PacketCounts + - ErrorCounts + EthernetNetworkDiagnostics: + # Feature was originally named EthernetNetworkDiagnosticsFeature, but + # we generate the same API for both of those names, so the name + # can just change here. + Feature: + - PacketCounts + - ErrorCounts + deprecated: + clusters: + - OtaSoftwareUpdateProvider + - OtaSoftwareUpdateRequestor + - TestCluster + - WakeOnLan + - Basic + attributes: + Descriptor: + - DeviceList + AccessControl: + - Acl + BallastConfiguration: + - IntrinsicBalanceFactor + OccupancySensing: + - PirOccupiedToUnoccupiedDelay + - PirUnoccupiedToOccupiedDelay + - PirUnoccupiedToOccupiedThreshold + ThreadNetworkDiagnostics: + - NeighborTableList + - RouteTableList + WiFiNetworkDiagnostics: + - Bssid + - Rssi + GeneralDiagnostics: + - BootReasons + commands: + ContentLauncher: + - LaunchResponse + MediaPlayback: + - StopPlayback + command fields: + Groups: + AddGroup: + - groupId + AddGroupIfIdentifying: + - groupId + AddGroupResponse: + - groupId + RemoveGroup: + - groupId + RemoveGroupResponse: + - groupId + ViewGroup: + - groupId + ViewGroupResponse: + - groupId + OnOff: + OffWithEffect: + - effectId + DiagnosticLogs: + RetrieveLogsResponse: + - content + - timeStamp + AdministratorCommissioning: + OpenCommissioningWindow: + - pakeVerifier + OperationalCredentials: + AttestationResponse: + - signature + AddTrustedRootCertificate: + - rootCertificate + DoorLock: + SetUser: + - userUniqueId + GetUserResponse: + - userUniqueId + ColorControl: + MoveToColorTemperature: + - colorTemperature + OTASoftwareUpdateProvider: + QueryImage: + - vendorId + - productId + OTASoftwareUpdateRequestor: + AnnounceOTAProvider: + - providerNodeId + - vendorId + Scenes: + AddScene: + - groupId + - sceneId + ViewScene: + - groupId + - sceneId + RemoveScene: + - groupId + - sceneId + RemoveAllScenes: + - groupId + StoreScene: + - groupId + - sceneId + RecallScene: + - groupId + - sceneId + GetSceneMembership: + - groupId + EnhancedAddScene: + - groupId + - sceneId + EnhancedViewScene: + - groupId + - sceneId + CopyScene: + - groupIdFrom + - sceneIdFrom + - groupIdTo + - sceneIdTo + AddSceneResponse: + - groupId + - sceneId + ViewSceneResponse: + - groupId + - sceneId + RemoveSceneResponse: + - groupId + - sceneId + RemoveAllScenesResponse: + - groupId + StoreSceneResponse: + - groupId + - sceneId + GetSceneMembershipResponse: + - groupId + EnhancedAddSceneResponse: + - groupId + - sceneId + EnhancedViewSceneResponse: + - groupId + - sceneId + CopySceneResponse: + - groupIdFrom + - sceneIdFrom + structs: + Descriptor: + - DeviceType + AccessControl: + - AccessControlEntry + - ExtensionEntry + PowerSource: + - WiredFaultChangeType + - BatFaultChangeType + - BatChargeFaultChangeType + SoftwareDiagnostics: + - ThreadMetrics + GeneralDiagnostics: + - NetworkInterfaceType + ModeSelect: + - SemanticTag + OperationalCredentials: + - FabricDescriptor + DoorLock: + - DlCredential + MediaPlayback: + - PlaybackPosition + TargetNavigator: + - TargetInfo + MediaInput: + - InputInfo + AudioOutput: + - OutputInfo + Channel: + - ChannelInfo + - LineupInfo + ContentLauncher: + - Dimension + - AdditionalInfo + - Parameter + - ContentSearch + - StyleInformation + - BrandingInformation + ApplicationLauncher: + - Application + - ApplicationEP + ApplicationBasic: + - ApplicationBasicApplication + struct fields: + Descriptor: + DeviceTypeStruct: + - type + OperationalCredentials: + FabricDescriptorStruct: + - vendorId + - fabricId + - nodeId + ContentLauncher: + StyleInformationStruct: + - imageUrl + ApplicationLauncher: + ApplicationStruct: + - catalogVendorId + - applicationId + ApplicationBasic: + ApplicationStruct: + - catalogVendorId + - applicationId + Scenes: + AttributeValuePair: + - attributeId + ExtensionFieldSet: + - clusterId + event fields: + Switch: + MultiPressComplete: + - newPosition + enums: + AccessControl: + - Privilege + - AuthMode + ThreadNetworkDiagnostics: + - ThreadConnectionStatus + EthernetNetworkDiagnostics: + - PHYRateType + GeneralDiagnostics: + - HardwareFaultType + - RadioFaultType + - BootReasonType + - NetworkFaultType + OperationalCredentials: + - OperationalCertStatus + DoorLock: + - DlAlarmCode + - DlCredentialRule + - DlCredentialType + - DlDataOperationType + - DlDoorState + - DlLockDataType + - DlLockOperationType + - DlOperationError + - DlOperatingMode + - DlOperationSource + - DlUserStatus + - DlUserType + # The enums after this come from the draft/types/door-lock.xml, not the + # door lock cluster XML + # + # DoorLockUserStatus is not marked deprecated here because the + # UserStatusEnum from the spec ends up with the same enum name + # (MTRDoorLockUserStatus) but is missing one of the values + # compared to DoorLockUserStatus. So we have to keep + # DoorLockUserStatus for now and just deprecate its one extra name. + - DoorLockUserStatus + - DoorLockUserType + - DoorLockDayOfWeek + - DoorLockSetPinOrIdStatus + - DoorLockOperationEventCode + - DoorLockProgrammingEventCode + enum values: + GeneralCommissioning: + # CommissioningErrorEnum was originally just named + # CommissioningError, but we generate the same API + # for both of those names, so the name can just change + # here. + CommissioningErrorEnum: + - Ok + PowerSource: + BatChargeLevelEnum: + - Ok + BatChargeFaultEnum: + - Unspecfied + PowerSourceStatusEnum: + - Unspecfied + WiFiNetworkDiagnostics: + WiFiVersionType: + - 80211a + - 80211b + - 80211g + - 80211n + - 80211ac + - 80211ax + DoorLock: + UserStatusEnum: + - NotSupported + UserTypeEnum: + - NotSupported + - Unrestricted + - MasterUser + MediaInput: + InputTypeEnum: + - Hdmi + - Scart + - Usb + AudioOutput: + OutputTypeEnum: + - Hdmi + - Bt + Channel: + LineupInfoTypeEnum: + - Mso + ContentLauncher: + MetricTypeEnum: + - PIXELS + - PERCENTAGE + Thermostat: + # SystemModeEnum was originally named ThermostatSystemMode, but we + # generate the same API for the names with/without "Enum" at the + # end and the cluster name present/absent at the beginning, so the + # name can just change here. + SystemModeEnum: + - EmergencyHeating + SetpointAdjustMode: + - HeatSetpoint + - CoolSetpoint + - HeatAndCoolSetpoints + bitmaps: + DoorLock: + - DlDaysMaskMap + bitmap values: + NetworkCommissioning: + WiFiSecurity: + - WepPersonal + - WpaPersonal + - Wpa2Personal + - Wpa3Personal + PressureMeasurement: + PressureFeature: + - EXT + DoorLock: + # Feature was originally named DoorLockFeature, but we generate the + # same API for both of those names, so the name can just change + # here. + Feature: + - PINCredentials + - RFIDCredentials + - WeekDaySchedules + - CredentialsOTA + - UsersManagement + - Notifications + - YearDaySchedules + Thermostat: + # Feature was originally named ThermostatFeature, but we generate the + # same API for both of those names, so the name can just change + # here. + Feature: + - Schedule + - Automode + DayOfWeek: + - AwayOrVacation + ModeForSequence: + - HeatSetpointFieldPresent + - CoolSetpointFieldPresent + apis: + - Timed Invoke for server to client commands + - Deprecated global attribute names + removed: + commands: + BasicInformation: + - MfgSpecificPing + command fields: + # Cases where the cluster/command got renamed and the fields got + # renamed, so the old command name never had the new fields. + OtaSoftwareUpdateProvider: + QueryImage: + - vendorID + - productID + enums: + # DoorLockUserStatus (non-spec) and UserStatusEnum (from the spec) end + # up with the same enum name (MTRDoorLockUserStatus), so just remove + # the non-spec one. + DoorLock: + - DoorLockUserStatus + - DoorLockUserType + enum values: + EthernetNetworkDiagnostics: + # Both the enum and the values got renamed, so don't output the + # old values with the new enum name. + PHYRateEnum: + - 10M + - 100M + - 1000M + - 25G + - 5G + - 10G + - 40G + - 100G + - 200G + - 400G + OperationalCredentials: + # Both the enum and the value got renamed, so don't output the + # old value with the new enum name. + NodeOperationalCertStatusEnum: + - SUCCESS + DoorLock: + # Both the enum and the values got renamed, so don't output the + # old value with the new enum name. + CredentialRuleEnum: + - Double + renames: + clusters: + UnitTesting: TestCluster + BasicInformation: Basic + OTASoftwareUpdateProvider: OtaSoftwareUpdateProvider + OTASoftwareUpdateRequestor: OtaSoftwareUpdateRequestor + WakeOnLAN: WakeOnLan + BridgedDeviceBasicInformation: BridgedDeviceBasic + attributes: + Descriptor: + DeviceTypeList: DeviceList + AccessControl: + ACL: Acl + BallastConfiguration: + IntrinsicBallastFactor: IntrinsicBalanceFactor + OccupancySensing: + PIROccupiedToUnoccupiedDelay: PirOccupiedToUnoccupiedDelay + PIRUnoccupiedToOccupiedDelay: PirUnoccupiedToOccupiedDelay + PIRUnoccupiedToOccupiedThreshold: PirUnoccupiedToOccupiedThreshold + OTASoftwareUpdateRequestor: + DefaultOTAProviders: DefaultOtaProviders + ThreadNetworkDiagnostics: + NeighborTable: NeighborTableList + RouteTable: RouteTableList + WiFiNetworkDiagnostics: + BSSID: Bssid + RSSI: Rssi + GeneralDiagnostics: + BootReason: BootReasons + commands: + OTASoftwareUpdateRequestor: + AnnounceOTAProvider: AnnounceOtaProvider + ContentLauncher: + LauncherResponse: LaunchResponse + MediaPlayback: + Stop: StopPlayback + command fields: + OTASoftwareUpdateProvider: + QueryImage: + vendorID: vendorId + productID: productId + OTASoftwareUpdateRequestor: + AnnounceOTAProvider: + providerNodeID: providerNodeId + vendorID: vendorId + Groups: + AddGroup: + groupID: groupId + AddGroupIfIdentifying: + groupID: groupId + AddGroupResponse: + groupID: groupId + RemoveGroup: + groupID: groupId + RemoveGroupResponse: + groupID: groupId + ViewGroup: + groupID: groupId + ViewGroupResponse: + groupID: groupId + OnOff: + OffWithEffect: + effectIdentifier: effectId + DiagnosticLogs: + RetrieveLogsResponse: + logContent: content + utcTimeStamp: timeStamp + AdministratorCommissioning: + OpenCommissioningWindow: + pakePasscodeVerifier: pakeVerifier + OperationalCredentials: + AttestationResponse: + attestationSignature: signature + AddTrustedRootCertificate: + rootCACertificate: rootCertificate + DoorLock: + SetUser: + userUniqueID: userUniqueId + GetUserResponse: + userUniqueID: userUniqueId + ColorControl: + MoveToColorTemperature: + colorTemperatureMireds: colorTemperature + Scenes: + AddScene: + groupID: groupId + sceneID: sceneId + ViewScene: + groupID: groupId + sceneID: sceneId + RemoveScene: + groupID: groupId + sceneID: sceneId + RemoveAllScenes: + groupID: groupId + StoreScene: + groupID: groupId + sceneID: sceneId + RecallScene: + groupID: groupId + sceneID: sceneId + GetSceneMembership: + groupID: groupId + EnhancedAddScene: + groupID: groupId + sceneID: sceneId + EnhancedViewScene: + groupID: groupId + sceneID: sceneId + CopyScene: + groupIdentifierFrom: groupIdFrom + sceneIdentifierFrom: sceneIdFrom + groupIdentifierTo: groupIdTo + sceneIdentifierTo: sceneIdTo + AddSceneResponse: + groupID: groupId + sceneID: sceneId + ViewSceneResponse: + groupID: groupId + sceneID: sceneId + RemoveSceneResponse: + groupID: groupId + sceneID: sceneId + RemoveAllScenesResponse: + groupID: groupId + StoreSceneResponse: + groupID: groupId + sceneID: sceneId + GetSceneMembershipResponse: + groupID: groupId + EnhancedAddSceneResponse: + groupID: groupId + sceneID: sceneId + EnhancedViewSceneResponse: + groupID: groupId + sceneID: sceneId + CopySceneResponse: + groupIdentifierFrom: groupIdFrom + sceneIdentifierFrom: sceneIdFrom + structs: + AccessControl: + AccessControlEntryStruct: AccessControlEntry + AccessControlExtensionStruct: ExtensionEntry + SoftwareDiagnostics: + ThreadMetricsStruct: ThreadMetrics + GeneralDiagnostics: + NetworkInterface: NetworkInterfaceType + ModeSelect: + SemanticTagStruct: SemanticTag + OperationalCredentials: + FabricDescriptorStruct: FabricDescriptor + DoorLock: + CredentialStruct: DlCredential + MediaPlayback: + PlaybackPositionStruct: PlaybackPosition + TargetNavigator: + TargetInfoStruct: TargetInfo + MediaInput: + InputInfoStruct: InputInfo + AudioOutput: + OutputInfoStruct: OutputInfo + Channel: + ChannelInfoStruct: ChannelInfo + LineupInfoStruct: LineupInfo + ContentLauncher: + DimensionStruct: Dimension + AdditionalInfoStruct: AdditionalInfo + ParameterStruct: Parameter + ContentSearchStruct: ContentSearch + StyleInformationStruct: StyleInformation + BrandingInformationStruct: BrandingInformation + ApplicationLauncher: + ApplicationStruct: Application + ApplicationEPStruct: ApplicationEP + ApplicationBasic: + ApplicationStruct: ApplicationBasicApplication + struct fields: + Descriptor: + DeviceTypeStruct: + deviceType: type + OperationalCredentials: + FabricDescriptorStruct: + vendorID: vendorId + fabricID: fabricId + nodeID: nodeId + ContentLauncher: + StyleInformationStruct: + imageURL: imageUrl + ApplicationLauncher: + ApplicationStruct: + catalogVendorID: catalogVendorId + applicationID: applicationId + ApplicationBasic: + ApplicationStruct: + catalogVendorID: catalogVendorId + applicationID: applicationId + Scenes: + AttributeValuePair: + attributeID: attributeId + ExtensionFieldSet: + clusterID: clusterId + event fields: + Switch: + MultiPressComplete: + previousPosition: newPosition + enums: + AccessControl: + AccessControlEntryPrivilegeEnum: Privilege + AccessControlEntryAuthModeEnum: AuthMode + ThreadNetworkDiagnostics: + ConnectionStatusEnum: ThreadConnectionStatus + EthernetNetworkDiagnostics: + PHYRateEnum: PHYRateType + GeneralDiagnostics: + HardwareFaultEnum: HardwareFaultType + RadioFaultEnum: RadioFaultType + BootReasonEnum: BootReasonType + NetworkFaultEnum: NetworkFaultType + OperationalCredentials: + NodeOperationalCertStatusEnum: OperationalCertStatus + DoorLock: + AlarmCodeEnum: DlAlarmCode + CredentialRuleEnum: DlCredentialRule + CredentialTypeEnum: DlCredentialType + DataOperationTypeEnum: DlDataOperationType + DoorStateEnum: DlDoorState + LockDataTypeEnum: DlLockDataType + LockOperationTypeEnum: DlLockOperationType + OperationErrorEnum: DlOperationError + OperatingModeEnum: DlOperatingMode + OperationSourceEnum: DlOperationSource + UserStatusEnum: DlUserStatus + UserTypeEnum: DlUserType + enum values: + GeneralCommissioning: + # CommissioningErrorEnum was originally just named + # CommissioningError, but we generate the same API + # for both of those names, so the name can just change + # here. + CommissioningErrorEnum: + OK: Ok + PowerSource: + BatChargeLevelEnum: + OK: Ok + BatChargeFaultEnum: + Unspecified: Unspecfied + PowerSourceStatusEnum: + Unspecified: Unspecfied + WiFiNetworkDiagnostics: + WiFiVersionType: + A: 80211a + B: 80211b + G: 80211g + N: 80211n + Ac: 80211ac + Ax: 80211ax + EthernetNetworkDiagnostics: + PHYRateEnum: + Rate10M: 10M + Rate100M: 100M + Rate1G: 1000M + Rate25G: 25G + Rate5G: 5G + Rate10G: 10G + Rate40G: 40G + Rate100G: 100G + Rate200G: 200G + Rate400G: 400G + PHYRateType: + Rate10M: 10M + Rate100M: 100M + Rate1G: 1000M + Rate25G: 25G + Rate5G: 5G + Rate10G: 10G + Rate40G: 40G + Rate100G: 100G + Rate200G: 200G + Rate400G: 400G + OperationalCredentials: + NodeOperationalCertStatusEnum: + OK: SUCCESS + OperationalCertStatus: + OK: SUCCESS + DoorLock: + CredentialRuleEnum: + Dual: Double + UserTypeEnum: + UnrestrictedUser: Unrestricted + ProgrammingUser: MasterUser + MediaInput: + InputTypeEnum: + HDMI: Hdmi + SCART: Scart + USB: Usb + AudioOutput: + OutputTypeEnum: + HDMI: Hdmi + BT: Bt + Channel: + LineupInfoTypeEnum: + MSO: Mso + ContentLauncher: + MetricTypeEnum: + Pixels: PIXELS + Percentage: PERCENTAGE + Thermostat: + # SystemModeEnum was originally named ThermostatSystemMode, but we + # generate the same API for the names with/without "Enum" at the + # end and the cluster name present/absent at the beginning, so the + # name can just change here. + SystemModeEnum: + EmergencyHeat: EmergencyHeating + SetpointAdjustMode: + Heat: HeatSetpoint + Cool: CoolSetpoint + Both: HeatAndCoolSetpoints + bitmaps: + DoorLock: + DaysMaskMap: DlDaysMaskMap + bitmap values: + NetworkCommissioning: + WiFiSecurity: + WEP: WepPersonal + WPAPersonal: WpaPersonal + WPA2Personal: Wpa2Personal + WPA3Personal: Wpa3Personal + PressureMeasurement: + PressureFeature: + Extended: EXT + DoorLock: + # Feature was originally named DoorLockFeature, but we generate the + # same API for both of those names, so the name can just change + # here. + Feature: + PINCredential: PINCredentials + RFIDCredential: RFIDCredentials + WeekDayAccessSchedules: WeekDaySchedules + CredentialsOverTheAirAccess: CredentialsOTA + User: UsersManagement + Notification: Notifications + YearDayAccessSchedules: YearDaySchedules + Thermostat: + # Feature was originally named ThermostatFeature, but we generate the + # same API for both of those names, so the name can just change + # here. + Feature: + ScheduleConfiguration: Schedule + AutoMode: Automode + DayOfWeek: + Away: AwayOrVacation + ModeForSequence: + HeatSetpointPresent: HeatSetpointFieldPresent + CoolSetpointPresent: CoolSetpointFieldPresent + +- release: "First after major API revamp" + versions: + iOS: "16.5" + macOS: "13.4" + watchOS: "9.5" + tvOS: "16.5" + introduced: + ids: + attributes: + TimeSynchronization: + - DSTOffset + command fields: + DiagnosticLogs: + RetrieveLogsRequest: + # Not really usable in earlier releases: wrong type. + - transferFileDesignator + structs: + TimeSynchronization: + - DSTOffsetStruct + - TimeZoneStruct + struct fields: + TimeSynchronization: + DSTOffsetStruct: + - offset + - validStarting + - validUntil + TimeZoneStruct: + - offset + - validAt + - name + enums: + DiagnosticLogs: + - IntentEnum + - StatusEnum + - TransferProtocolEnum + OccupancySensing: + - OccupancySensorTypeEnum + WiFiNetworkDiagnostics: + - ConnectionStatusEnum + - WiFiVersionEnum + PumpConfigurationAndControl: + - ControlModeEnum + - OperationModeEnum + PowerSource: + - BatCommonDesignationEnum + - BatApprovedChemistryEnum + enum values: + DoorLock: + LockDataTypeEnum: + - FingerVein + - Face + DiagnosticLogs: + IntentEnum: + - EndUserSupport + - NetworkDiag + - CrashLogs + StatusEnum: + - Success + - Exhausted + - NoLogs + - Busy + - Denied + TransferProtocolEnum: + - ResponsePayload + - BDX + OccupancySensing: + OccupancySensorTypeEnum: + - PIR + - Ultrasonic + - PIRAndUltrasonic + - PhysicalContact + WiFiNetworkDiagnostics: + ConnectionStatusEnum: + - Connected + - NotConnected + WiFiVersionEnum: + - A + - B + - G + - N + - Ac + - Ax + PumpConfigurationAndControl: + ControlModeEnum: + - ConstantSpeed + - ConstantPressure + - ProportionalPressure + - ConstantFlow + - ConstantTemperature + - Automatic + OperationModeEnum: + - Normal + - Minimum + - Maximum + - Local + PowerSource: + WiredFaultEnum: + - Unspecified + BatFaultEnum: + - Unspecified + BatCommonDesignationEnum: + - Unspecified + - AAA + - AA + - C + - D + - 4v5 + - 6v0 + - 9v0 + - 12AA + - AAAA + - A + - B + - F + - N + - No6 + - SubC + - A23 + - A27 + - BA5800 + - Duplex + - 4SR44 + - "523" + - "531" + - 15v0 + - 22v5 + - 30v0 + - 45v0 + - 67v5 + - J + - CR123A + - CR2 + - 2CR5 + - CRP2 + - CRV3 + - SR41 + - SR43 + - SR44 + - SR45 + - SR48 + - SR54 + - SR55 + - SR57 + - SR58 + - SR59 + - SR60 + - SR63 + - SR64 + - SR65 + - SR66 + - SR67 + - SR68 + - SR69 + - SR516 + - SR731 + - SR712 + - LR932 + - A5 + - A10 + - A13 + - A312 + - A675 + - AC41E + - "10180" + - "10280" + - "10440" + - "14250" + - "14430" + - "14500" + - "14650" + - "15270" + - "16340" + - RCR123A + - "17500" + - "17670" + - "18350" + - "18500" + - "18650" + - "19670" + - "25500" + - "26650" + - "32600" + BatApprovedChemistryEnum: + - Unspecified + - Alkaline + - LithiumCarbonFluoride + - LithiumChromiumOxide + - LithiumCopperOxide + - LithiumIronDisulfide + - LithiumManganeseDioxide + - LithiumThionylChloride + - Magnesium + - MercuryOxide + - NickelOxyhydride + - SilverOxide + - ZincAir + - ZincCarbon + - ZincChloride + - ZincManganeseDioxide + - LeadAcid + - LithiumCobaltOxide + - LithiumIon + - LithiumIonPolymer + - LithiumIronPhosphate + - LithiumSulfur + - LithiumTitanate + - NickelCadmium + - NickelHydrogen + - NickelIron + - NickelMetalHydride + - NickelZinc + - SilverZinc + - SodiumIon + - SodiumSulfur + - ZincBromide + - ZincCerium + bitmaps: + OccupancySensing: + - OccupancyBitmap + - OccupancySensorTypeBitmap + PumpConfigurationAndControl: + - PumpStatusBitmap + bitmap values: + OccupancySensing: + OccupancyBitmap: + - Occupied + OccupancySensorTypeBitmap: + - PIR + - Ultrasonic + - PhysicalContact + PumpConfigurationAndControl: + PumpFeature: + - LocalOperation + PumpStatusBitmap: + - DeviceFault + - Supplyfault + - SpeedLow + - SpeedHigh + - LocalOverride + - Running + - RemotePressure + - RemoteFlow + - RemoteTemperature + deprecated: + attributes: + TimeSynchronization: + - DstOffset + structs: + TimeSynchronization: + - DstOffsetType + - TimeZoneType + enums: + DiagnosticLogs: + - LogsIntent + - LogsStatus + - LogsTransferProtocol + WiFiNetworkDiagnostics: + - WiFiConnectionStatus + - WiFiVersionType + PumpConfigurationAndControl: + - PumpControlMode + - PumpOperationMode + enum values: + PowerSource: + WiredFaultEnum: + - Unspecfied + BatFaultEnum: + - Unspecfied + bitmaps: + PumpConfigurationAndControl: + - PumpStatus + bitmap values: + PumpConfigurationAndControl: + PumpFeature: + - Local + renames: + attributes: + TimeSynchronization: + DSTOffset: DstOffset + structs: + TimeSynchronization: + DSTOffsetStruct: DstOffsetType + TimeZoneStruct: TimeZoneType + enums: + DiagnosticLogs: + IntentEnum: LogsIntent + StatusEnum: LogsStatus + TransferProtocolEnum: LogsTransferProtocol + WiFiNetworkDiagnostics: + ConnectionStatusEnum: WiFiConnectionStatus + WiFiVersionEnum: WiFiVersionType + PumpConfigurationAndControl: + ControlModeEnum: PumpControlMode + OperationModeEnum: PumpOperationMode + enum values: + PowerSource: + WiredFaultEnum: + Unspecified: Unspecfied + BatFaultEnum: + Unspecified: Unspecfied + bitmaps: + PumpConfigurationAndControl: + PumpStatusBitmap: PumpStatus + bitmap values: + PumpConfigurationAndControl: + PumpFeature: + LocalOperation: Local + +- release: "Fall 2023" + versions: + iOS: "17.0" + macOS: "14.0" + watchOS: "10.0" + tvOS: "17.0" + introduced: + attributes: + BasicInformation: + - ProductAppearance + BridgedDeviceBasicInformation: + - ProductAppearance + structs: + AccessControl: + - AccessControlTargetStruct + BasicInformation: + - ProductAppearanceStruct + BridgedDeviceBasicInformation: + - ProductAppearanceStruct + NetworkCommissioning: + - WiFiInterfaceScanResultStruct + - ThreadInterfaceScanResultStruct + - NetworkInfoStruct + ThreadNetworkDiagnostics: + - NeighborTableStruct + - RouteTableStruct + struct fields: + AccessControl: + AccessControlTargetStruct: + - cluster + - endpoint + - deviceType + BasicInformation: + ProductAppearanceStruct: + - finish + - primaryColor + BridgedDeviceBasicInformation: + ProductAppearanceStruct: + - finish + - primaryColor + NetworkCommissioning: + WiFiInterfaceScanResultStruct: + - security + - ssid + - bssid + - channel + - wiFiBand + - rssi + ThreadInterfaceScanResultStruct: + - panId + - extendedPanId + - networkName + - channel + - version + - extendedAddress + - rssi + - lqi + NetworkInfoStruct: + - networkID + - connected + ThreadNetworkDiagnostics: + NeighborTableStruct: + - extAddress + - age + - rloc16 + - linkFrameCounter + - mleFrameCounter + - lqi + - averageRssi + - lastRssi + - frameErrorRate + - messageErrorRate + - rxOnWhenIdle + - fullThreadDevice + - fullNetworkData + - isChild + RouteTableStruct: + - extAddress + - rloc16 + - routerId + - nextHop + - pathCost + - lqiIn + - lqiOut + - age + - allocated + - linkEstablished + enums: + BasicInformation: + - ColorEnum + - ProductFinishEnum + BridgedDeviceBasicInformation: + - ColorEnum + - ProductFinishEnum + FanControl: + - FanModeEnum + - FanModeSequenceEnum + enum values: + BasicInformation: + ColorEnum: + - Black + - Navy + - Green + - Teal + - Maroon + - Purple + - Olive + - Gray + - Blue + - Lime + - Aqua + - Red + - Fuchsia + - Yellow + - White + - Nickel + - Chrome + - Brass + - Copper + - Silver + - Gold + ProductFinishEnum: + - Matte + - Satin + - Polished + - Rugged + - Fabric + - Other + BridgedDeviceBasicInformation: + ColorEnum: + - Black + - Navy + - Green + - Teal + - Maroon + - Purple + - Olive + - Gray + - Blue + - Lime + - Aqua + - Red + - Fuchsia + - Yellow + - White + - Nickel + - Chrome + - Brass + - Copper + - Silver + - Gold + ProductFinishEnum: + - Matte + - Satin + - Polished + - Rugged + - Fabric + - Other + FanControl: + FanModeEnum: + - Off + - Low + - Medium + - High + - On + - Auto + - Smart + FanModeSequenceEnum: + - OffLowMedHigh + - OffLowHigh + - OffLowMedHighAuto + - OffLowHighAuto + - OffOnAuto + - OffOn + NetworkCommissioning: + # WiFiBandEnum was originally just named WiFiBand, but we generate + # the same API for both of those names, so the name can just + # change here. + WiFiBandEnum: + - 1G + WiFiNetworkDiagnostics: + WiFiVersionEnum: + - Ah + Identify: + IdentifyTypeEnum: + - LightOutput + - VisibleIndicator + bitmaps: + Groups: + - Feature + - NameSupportBitmap + NetworkCommissioning: + - WiFiSecurityBitmap + PressureMeasurement: + - Feature + PumpConfigurationAndControl: + - Feature + Scenes: + - Feature + FanControl: + - RockBitmap + - WindBitmap + bitmap values: + FanControl: + RockBitmap: + - RockLeftRight + - RockUpDown + - RockRound + WindBitmap: + - SleepWind + - NaturalWind + Groups: + Feature: + - GroupNames + NameSupportBitmap: + - GroupNames + ModeSelect: + Feature: + - OnOff + NetworkCommissioning: + WiFiSecurityBitmap: + - Unencrypted + - WEP + - WPAPersonal + - WPA2Personal + - WPA3Personal + PressureMeasurement: + Feature: + - Extended + PumpConfigurationAndControl: + Feature: + - ConstantPressure + - CompensatedPressure + - ConstantFlow + - ConstantSpeed + - ConstantTemperature + - Automatic + - LocalOperation + Scenes: + Feature: + - SceneNames + Thermostat: + Feature: + - LocalTemperatureNotExposed + ids: + attributes: + TimeSynchronization: + - TrustedTimeSource + - DefaultNTP + - NTPServerAvailable + deprecated: + clusters: + # We apparently forgot to deprecate BridgedDeviceBasic when we + # introduced BridgedDeviceBasicInformation. + - BridgedDeviceBasic + enum values: + Identify: + IdentifyTypeEnum: + - VisibleLight + - VisibleLED + structs: + AccessControl: + - Target + NetworkCommissioning: + - WiFiInterfaceScanResult + - ThreadInterfaceScanResult + - NetworkInfo + ThreadNetworkDiagnostics: + - NeighborTable + - RouteTable + enums: + FanControl: + - FanModeType + - FanModeSequenceType + bitmaps: + Groups: + - GroupClusterFeature + NetworkCommissioning: + - WiFiSecurity + PressureMeasurement: + - PressureFeature + PumpConfigurationAndControl: + - PumpFeature + FanControl: + - RockSupportMask + - WindSupportMask + bitmap values: + ModeSelect: + Feature: + - DEPONOFF + renames: + attributes: + TimeSynchronization: + TrustedTimeSource: TrustedTimeNodeId + DefaultNTP: DefaultNtp + NTPServerAvailable: NtpServerPort + commands: + TimeSynchronization: + SetUTCTime: SetUtcTime + structs: + AccessControl: + AccessControlTargetStruct: Target + NetworkCommissioning: + WiFiInterfaceScanResultStruct: WiFiInterfaceScanResult + ThreadInterfaceScanResultStruct: ThreadInterfaceScanResult + NetworkInfoStruct: NetworkInfo + ThreadNetworkDiagnostics: + NeighborTableStruct: NeighborTable + RouteTableStruct: RouteTable + enums: + FanControl: + FanModeEnum: FanModeType + FanModeSequenceEnum: FanModeSequenceType + enum values: + TimeSynchronization: + TimeSourceEnum: + NonMatterSNTP: NonFabricSntp + NonMatterNTP: NonFabricNtp + MatterSNTP: FabricSntp + MatterNTP: FabricNtp + MixedNTP: MixedNtp + NonMatterSNTPNTS: NonFabricSntpNts + NonMatterNTPNTS: NonFabricNtpNts + MatterSNTPNTS: FabricSntpNts + MatterNTPNTS: FabricNtpNts + MixedNTPNTS: MixedNtpNts + PTP: Ptp + GNSS: Gnss + Identify: + IdentifyTypeEnum: + LightOutput: VisibleLight + VisibleIndicator: VisibleLED + bitmaps: + Groups: + Feature: GroupClusterFeature + NetworkCommissioning: + WiFiSecurityBitmap: WiFiSecurity + PressureMeasurement: + Feature: PressureFeature + PumpConfigurationAndControl: + Feature: PumpFeature + FanControl: + RockBitmap: RockSupportMask + WindBitmap: WindSupportMask + bitmap values: + ModeSelect: + Feature: + OnOff: DEPONOFF + swiftUnavailable: + bitmap values: + NetworkCommissioning: + WiFiSecurity: + # The bitmap got renamed to WiFiSecurityBitmap, so now both + # the Wpa* and WPA* names on WiFiSecurity are deprecated. + # They get mapped to Swift with identical names, which leads + # to the names being ambiguous. Mark the "Wpa*" as + # unavailable to Swift to work around this. + - WpaPersonal + - Wpa2Personal + - Wpa3Personal + provisional: + clusters: + ## Not ready at cutoff + - AirQuality + # Replaceable Monitoring clusters + - HEPAFilterMonitoring + - ActivatedCarbonFilterMonitoring + # Concentration Measurement clusters + - CarbonDioxideConcentrationMeasurement + - CarbonMonoxideConcentrationMeasurement + - FormaldehydeConcentrationMeasurement + - NitrogenDioxideConcentrationMeasurement + - OzoneConcentrationMeasurement + - PM10ConcentrationMeasurement + - PM1ConcentrationMeasurement + - PM25ConcentrationMeasurement + - RadonConcentrationMeasurement + - TotalVolatileOrganicCompoundsConcentrationMeasurement + - RefrigeratorAlarm + - TemperatureControl + - SmokeCOAlarm + ## Not ready to be public API yet. + - ICDManagement + - LaundryWasherMode + - RefrigeratorAndTemperatureControlledCabinetMode + - DishwasherMode + - LaundryWasherControls + - DishwasherAlarm + - SampleMEI + attributes: + Scenes: + # New scenes bits not stable yet. + - SceneTableSize + FanControl: + # New Fan Control bits not stable yet. + - AirflowDirection + RVCCleanMode: + # People are trying to deprecate this one + - OnMode + RVCRunMode: + # People are trying to deprecate this one + - OnMode + commands: + FanControl: + # Not stable yet + - Step + DoorLock: + # Not stable yet + - UnboltDoor + RVCOperationalState: + # Disallowed in the spec, but present in our XML? + - Start + - Stop + enums: + FanControl: + # Not stable yet. + - StepDirectionEnum + - AirflowDirectionEnum + enum values: + DoorLock: + # Not stable yet + DlLockState: + - Unlatched + DlLockType: + - Eurocylinder + LockOperationTypeEnum: + - Unlatch + TimeSynchronization: + TimeSourceEnum: + - NonMatterSNTP + - NonMatterNTP + - MatterSNTP + - MatterNTP + - MixedNTP + - NonMatterSNTPNTS + - NonMatterNTPNTS + - MatterSNTPNTS + - MatterNTPNTS + - MixedNTPNTS + - PTP + - GNSS + bitmap values: + DoorLock: + # Not stable yet + # Feature was originally named DoorLockFeature, but we generate the + # same API for both of those names, so the name can just change + # here. + Feature: + - Unbolt + FanControl: + # Not stable yet + Feature: + - Step + - AirflowDirection + RVCRunMode: + Feature: + # People are trying to deprecate this one + - OnOff + RVCCleanMode: + Feature: + # People are trying to deprecate this one + - OnOff + global attributes: + - EventList + # Once we actually unmark TimeSynchronization as provisional, all these bits except EventList should go away too, and we should instead + # mark things as introduced/deprecated as needed. The "ids" entries should go away, in particular. + ids: + attributes: + TimeSynchronization: + - TimeZoneListMaxSize + - DSTOffsetListMaxSize + - SupportsDNSResolve + # Because we are special-casing ids for TimeSynchronization + # above, we need to explicitly mark the EventList id + # provisional. + - EventList + PulseWidthModulation: + # Because we are special-casing ids for PulseWidthModulation + # above, we need to explicitly mark the EventList id + # provisional. + - EventList + commands: + TimeSynchronization: + - SetUTCTime + - SetTrustedTimeSource + - SetTimeZone + - SetTimeZoneResponse + - SetDSTOffset + - SetDefaultNTP + events: + TimeSynchronization: + - DSTTableEmpty + - DSTStatus + - TimeZoneStatus + - TimeFailure + - MissingTrustedTimeSource + +- release: "Fall 2023 #2" + versions: + iOS: "17.1" + macOS: "14.1" + watchOS: "10.1" + tvOS: "17.1" + introduced: + bitmaps: + TimeFormatLocalization: + - Feature + bitmap values: + OnOff: + Feature: + - DeadFront + TimeFormatLocalization: + Feature: + - CalendarFormat + provisional: + attributes: + Descriptor: + - TagList + structs: + # New things, not quite finalized. + Descriptor: + - SemanticTagStruct + struct fields: + # New things, not quite finalized. + Descriptor: + SemanticTagStruct: + - mfgCode + - namespaceID + - tag + - label + bitmaps: + # CacheAndSync is provisional in the spec. + GroupKeyManagement: + - Feature + # New things, not quite finalized. + Descriptor: + - Feature + bitmap values: + # New things, not quite finalized. + Descriptor: + Feature: + - TagList + # CacheAndSync is provisional in the spec. + GroupKeyManagement: + Feature: + - CacheAndSync + # Scenes are generally provisional for now. + Scenes: + Feature: + - Explicit + - TableSize + - FabricScenes + removed: + clusters: + # Clusters that really should just not be exposed, even if they're in our XML. + - FaultInjection + # Clusters that are not going to end up shipping in their current form, + # so we should not be exposing the bits we expose now. + - ProxyConfiguration + - ProxyDiscovery + - ProxyValid + +- release: "Fall 2023 #3" + versions: + iOS: "17.2" + macOS: "14.2" + watchOS: "10.2" + tvOS: "17.2" + introduced: + command payloads: + TimeSynchronization: + - SetUTCTime + command fields: + TimeSynchronization: + SetUTCTime: + - utcTime + - granularity + - timeSource + enums: + OTASoftwareUpdateProvider: + - StatusEnum + - ApplyUpdateActionEnum + - DownloadProtocolEnum + OTASoftwareUpdateRequestor: + - AnnouncementReasonEnum + - UpdateStateEnum + - ChangeReasonEnum + enum values: + OTASoftwareUpdateProvider: + StatusEnum: + - UpdateAvailable + - Busy + - NotAvailable + - DownloadProtocolNotSupported + ApplyUpdateActionEnum: + - Proceed + - AwaitNextAction + - Discontinue + DownloadProtocolEnum: + - BDXSynchronous + - BDXAsynchronous + - HTTPS + - VendorSpecific + OTASoftwareUpdateRequestor: + AnnouncementReasonEnum: + - SimpleAnnouncement + - UpdateAvailable + - UrgentUpdateAvailable + UpdateStateEnum: + - Unknown + - Idle + - Querying + - DelayedOnQuery + - Downloading + - Applying + - DelayedOnApply + - RollingBack + - DelayedOnUserConsent + ChangeReasonEnum: + - Unknown + - Success + - Failure + - TimeOut + - DelayByProvider + OnOff: + DelayedAllOffEffectVariantEnum: + - DelayedOffFastFade + - DelayedOffSlowFade + DyingLightEffectVariantEnum: + - DyingLightFadeOff + StartUpOnOffEnum: + - Toggle + bitmaps: + OnOff: + - OnOffControlBitmap + bitmap values: + OnOff: + Feature: + - DeadFrontBehavior + OnOffControlBitmap: + - AcceptOnlyWhenOn + deprecated: + enums: + OTASoftwareUpdateProvider: + - OTAQueryStatus + - OTAApplyUpdateAction + - OTADownloadProtocol + OTASoftwareUpdateRequestor: + - OTAAnnouncementReason + - OTAUpdateStateEnum + - OTAChangeReasonEnum + enum values: + OnOff: + DelayedAllOffEffectVariantEnum: + - FadeToOffIn0p8Seconds + - 50PercentDimDownIn0p8SecondsThenFadeToOffIn12Seconds + DyingLightEffectVariantEnum: + - 20PercenterDimUpIn0p5SecondsThenFadeToOffIn1Second + StartUpOnOffEnum: + - TogglePreviousOnOff + bitmaps: + OnOff: + - OnOffControl + bitmap values: + OnOff: + Feature: + - DeadFront + provisional: + bitmaps: + BarrierControl: + - BarrierControlCapabilities + - BarrierControlSafetyStatus + BallastConfiguration: + # The BallastConfiguration cluster is provisional for now, but not marked that way. + - BallastStatusBitmap + - LampAlarmModeBitmap + attributes: + GeneralDiagnostics: + # Not in the spec yet. + - AverageWearCount + # New things, not quite finalized. + renames: + enums: + OTASoftwareUpdateProvider: + StatusEnum: OTAQueryStatus + ApplyUpdateActionEnum: OTAApplyUpdateAction + DownloadProtocolEnum: OTADownloadProtocol + OTASoftwareUpdateRequestor: + AnnouncementReasonEnum: OTAAnnouncementReason + UpdateStateEnum: OTAUpdateStateEnum + ChangeReasonEnum: OTAChangeReasonEnum + enum values: + OnOff: + DelayedAllOffEffectVariantEnum: + DelayedOffFastFade: FadeToOffIn0p8Seconds + DelayedOffSlowFade: 50PercentDimDownIn0p8SecondsThenFadeToOffIn12Seconds + DyingLightEffectVariantEnum: + DyingLightFadeOff: 20PercenterDimUpIn0p5SecondsThenFadeToOffIn1Second + StartUpOnOffEnum: + Toggle: TogglePreviousOnOff + bitmaps: + OnOff: + OnOffControlBitmap: OnOffControl + bitmap values: + OnOff: + Feature: + DeadFrontBehavior: DeadFront + +- release: "Early 2024" + versions: + iOS: "17.4" + macOS: "14.4" + watchOS: "10.4" + tvOS: "17.4" + introduced: + clusters: + - RVCRunMode + - RVCCleanMode + - RVCOperationalState + - OperationalState + attributes: + RVCRunMode: + - SupportedModes + - CurrentMode + - GeneratedCommandList + - AcceptedCommandList + - AttributeList + - FeatureMap + - ClusterRevision + RVCCleanMode: + - SupportedModes + - CurrentMode + - GeneratedCommandList + - AcceptedCommandList + - AttributeList + - FeatureMap + - ClusterRevision + RVCOperationalState: + - PhaseList + - CurrentPhase + - CountdownTime + - OperationalStateList + - OperationalState + - OperationalError + - GeneratedCommandList + - AcceptedCommandList + - AttributeList + - FeatureMap + - ClusterRevision + OperationalState: + - PhaseList + - CurrentPhase + - CountdownTime + - OperationalStateList + - OperationalState + - OperationalError + - GeneratedCommandList + - AcceptedCommandList + - AttributeList + - FeatureMap + - ClusterRevision + PowerSource: + - EndpointList + commands: + RVCRunMode: + - ChangeToMode + - ChangeToModeResponse + RVCCleanMode: + - ChangeToMode + - ChangeToModeResponse + RVCOperationalState: + - Pause + - Resume + - OperationalCommandResponse + OperationalState: + - Start + - Stop + - Pause + - Resume + - OperationalCommandResponse + command fields: + RVCRunMode: + ChangeToMode: + - newMode + ChangeToModeResponse: + - status + - statusText + RVCCleanMode: + ChangeToMode: + - newMode + ChangeToModeResponse: + - status + - statusText + RVCOperationalState: + OperationalCommandResponse: + - commandResponseState + OperationalState: + OperationalCommandResponse: + - commandResponseState + structs: + RVCOperationalState: + - OperationalStateStruct + - ErrorStateStruct + RVCRunMode: + - ModeTagStruct + - ModeOptionStruct + RVCCleanMode: + - ModeTagStruct + - ModeOptionStruct + OperationalState: + - OperationalStateStruct + - ErrorStateStruct + Thermostat: + - WeeklyScheduleTransitionStruct + struct fields: + RVCOperationalState: + OperationalStateStruct: + - operationalStateID + - operationalStateLabel + ErrorStateStruct: + - errorStateID + - errorStateLabel + - errorStateDetails + RVCRunMode: + ModeTagStruct: + - mfgCode + - value + ModeOptionStruct: + - label + - mode + - modeTags + RVCCleanMode: + ModeTagStruct: + - mfgCode + - value + ModeOptionStruct: + - label + - mode + - modeTags + OperationalState: + OperationalStateStruct: + - operationalStateID + - operationalStateLabel + ErrorStateStruct: + - errorStateID + - errorStateLabel + - errorStateDetails + Thermostat: + WeeklyScheduleTransitionStruct: + - transitionTime + - heatSetpoint + - coolSetpoint + events: + RVCOperationalState: + - OperationalError + - OperationCompletion + OperationalState: + - OperationalError + - OperationCompletion + event fields: + WiFiNetworkDiagnostics: + AssociationFailure: + - associationFailureCause + RVCOperationalState: + OperationalError: + - errorState + OperationCompletion: + - completionErrorCode + - totalOperationalTime + - pausedTime + OperationalState: + OperationalError: + - errorState + OperationCompletion: + - completionErrorCode + - totalOperationalTime + - pausedTime + enums: + ContentLauncher: + - StatusEnum + KeypadInput: + - CECKeyCodeEnum + ThermostatUserInterfaceConfiguration: + - KeypadLockoutEnum + - ScheduleProgrammingVisibilityEnum + - TemperatureDisplayModeEnum + RVCOperationalState: + - OperationalStateEnum + - ErrorStateEnum + RVCRunMode: + - ModeTag + - StatusCode + RVCCleanMode: + - ModeTag + - StatusCode + OperationalState: + - OperationalStateEnum + - ErrorStateEnum + Thermostat: + - ControlSequenceOfOperationEnum + - SetpointRaiseLowerModeEnum + enum values: + ContentLauncher: + StatusEnum: + - Success + - URLNotAvailable + - AuthFailed + FanControl: + FanModeSequenceEnum: + - OffHighAuto + - OffHigh + KeypadInput: + CECKeyCodeEnum: + - Select + - Up + - Down + - Left + - Right + - RightUp + - RightDown + - LeftUp + - LeftDown + - RootMenu + - SetupMenu + - ContentsMenu + - FavoriteMenu + - Exit + - MediaTopMenu + - MediaContextSensitiveMenu + - NumberEntryMode + - Number11 + - Number12 + - Number0OrNumber10 + - Numbers1 + - Numbers2 + - Numbers3 + - Numbers4 + - Numbers5 + - Numbers6 + - Numbers7 + - Numbers8 + - Numbers9 + - Dot + - Enter + - Clear + - NextFavorite + - ChannelUp + - ChannelDown + - PreviousChannel + - SoundSelect + - InputSelect + - DisplayInformation + - Help + - PageUp + - PageDown + - Power + - VolumeUp + - VolumeDown + - Mute + - Play + - Stop + - Pause + - Record + - Rewind + - FastForward + - Eject + - Forward + - Backward + - StopRecord + - PauseRecord + - Reserved + - Angle + - SubPicture + - VideoOnDemand + - ElectronicProgramGuide + - TimerProgramming + - InitialConfiguration + - SelectBroadcastType + - SelectSoundPresentation + - PlayFunction + - PausePlayFunction + - RecordFunction + - PauseRecordFunction + - StopFunction + - MuteFunction + - RestoreVolumeFunction + - TuneFunction + - SelectMediaFunction + - SelectAvInputFunction + - SelectAudioInputFunction + - PowerToggleFunction + - PowerOffFunction + - PowerOnFunction + - F1Blue + - F2Red + - F3Green + - F4Yellow + - F5 + - Data + ThermostatUserInterfaceConfiguration: + KeypadLockoutEnum: + - NoLockout + - Lockout1 + - Lockout2 + - Lockout3 + - Lockout4 + - Lockout5 + ScheduleProgrammingVisibilityEnum: + - ScheduleProgrammingPermitted + - ScheduleProgrammingDenied + TemperatureDisplayModeEnum: + - Celsius + - Fahrenheit + RVCOperationalState: + OperationalStateEnum: + - SeekingCharger + - Charging + - Docked + ErrorStateEnum: + - FailedToFindChargingDock + - Stuck + - DustBinMissing + - DustBinFull + - WaterTankEmpty + - WaterTankMissing + - WaterTankLidOpen + - MopCleaningPadMissing + RVCRunMode: + ModeTag: + - Idle + - Cleaning + StatusCode: + - Stuck + - DustBinMissing + - DustBinFull + - WaterTankEmpty + - WaterTankMissing + - WaterTankLidOpen + - MopCleaningPadMissing + - BatteryLow + RVCCleanMode: + ModeTag: + - DeepClean + - Vacuum + - Mop + StatusCode: + - CleaningInProgress + OperationalState: + OperationalStateEnum: + - Stopped + - Running + - Paused + - Error + ErrorStateEnum: + - NoError + - UnableToStartOrResume + - UnableToCompleteOperation + - CommandInvalidInState + Thermostat: + ControlSequenceOfOperationEnum: + - CoolingOnly + - CoolingWithReheat + - HeatingOnly + - HeatingWithReheat + - CoolingAndHeating + - CoolingAndHeatingWithReheat + SetpointRaiseLowerModeEnum: + - Heat + - Cool + - Both + bitmaps: + Scenes: + - CopyModeBitmap + AdministratorCommissioning: + - Feature + ContentLauncher: + - SupportedProtocolsBitmap + LevelControl: + - OptionsBitmap + RVCRunMode: + - Feature + RVCCleanMode: + - Feature + Thermostat: + - ScheduleDayOfWeekBitmap + - ScheduleModeBitmap + bitmap values: + PumpConfigurationAndControl: + PumpStatusBitmap: + - SupplyFault + Scenes: + CopyModeBitmap: + - CopyAllScenes + SoftwareDiagnostics: + Feature: + - Watermarks + AdministratorCommissioning: + Feature: + - Basic + ContentLauncher: + SupportedProtocolsBitmap: + - DASH + - HLS + LevelControl: + OptionsBitmap: + - ExecuteIfOff + - CoupleColorTempToLevel + Thermostat: + ScheduleDayOfWeekBitmap: + - Sunday + - Monday + - Tuesday + - Wednesday + - Thursday + - Friday + - Saturday + - Away + ScheduleModeBitmap: + - HeatSetpointPresent + - CoolSetpointPresent + deprecated: + structs: + Thermostat: + - ThermostatScheduleTransition + event fields: + WiFiNetworkDiagnostics: + AssociationFailure: + - associationFailure + enums: + ContentLauncher: + - ContentLaunchStatusEnum + KeypadInput: + - CecKeyCode + Thermostat: + - ThermostatControlSequence + - SetpointAdjustMode + enum values: + FanControl: + FanModeSequenceEnum: + - OffOnAuto + - OffOn + bitmaps: + Scenes: + - ScenesCopyMode + ContentLauncher: + - SupportedStreamingProtocol + LevelControl: + - LevelControlOptions + Thermostat: + - DayOfWeek + - ModeForSequence + bitmap values: + PumpConfigurationAndControl: + PumpStatusBitmap: + - Supplyfault + SoftwareDiagnostics: + Feature: + - WaterMarks + provisional: + clusters: + # Targeting Spring 2024 Matter release + - MicrowaveOvenControl + - MicrowaveOvenMode + - DemandResponseLoadControl + - BooleanStateConfiguration + - ValveConfigurationAndControl + - Timer + - OvenMode + - LaundryDryerControls + - EnergyEVSE + - OvenCavityOperationalState + - ContentControl + - ContentAppObserver + - DeviceEnergyManagement + - ElectricalEnergyMeasurement + - EnergyPreference + - ScenesManagement + attributes: + NetworkCommissioning: + # Targeting Spring 2024 Matter release + - SupportedWiFiBands + - SupportedThreadFeatures + - ThreadVersion + WakeOnLAN: + # Targeting Spring 2024 Matter release + - LinkLocalAddress + BasicInformation: + # Targeting Spring 2024 Matter release + - SpecificationVersion + - MaxPathsPerInvoke + Scenes: + # Targeting Spring 2024 Matter release + - FabricSceneInfo + MediaPlayback: + # Targeting Spring 2024 Matter release + - ActiveAudioTrack + - AvailableAudioTracks + - ActiveTextTrack + - AvailableTextTracks + commands: + GeneralDiagnostics: + # Targeting Spring 2024 Matter release + - TimeSnapshot + - TimeSnapshotResponse + NetworkCommissioning: + # Targeting Spring 2024 Matter release + - QueryIdentity + - QueryIdentityResponse + Channel: + # Targeting Spring 2024 Matter release + - GetProgramGuide + - ProgramGuideResponse + - RecordProgram + - CancelRecordProgram + MediaPlayback: + # Targeting Spring 2024 Matter release + - ActivateAudioTrack + - ActivateTextTrack + - DeactivateTextTrack + UnitTesting: + # Ideally none of UnitTesting would be exposed as public API, but + # for now just start doing that for new additions to it. + - TestBatchHelperResponse + - TestBatchHelperRequest + - TestSecondBatchHelperRequest + command fields: + NetworkCommissioning: + # Targeting Spring 2024 Matter release + AddOrUpdateWiFiNetwork: + - networkIdentity + - clientIdentifier + - possessionNonce + NetworkConfigResponse: + - clientIdentity + - possessionSignature + QueryIdentity: + - keyIdentifier + - possessionNonce + QueryIdentityResponse: + - identity + - possessionSignature + MediaPlayback: + # Targeting Spring 2024 Matter release + Rewind: + - audioAdvanceUnmuted + FastForward: + - audioAdvanceUnmuted + ContentLauncher: + # Targeting Spring 2024 Matter release + LaunchContent: + - playbackPreferences + - useCurrentContext + AccountLogin: + # Targeting Spring 2024 Matter release + Login: + - node + Logout: + - node + structs: + Scenes: + # Targeting Spring 2024 Matter release + - SceneInfoStruct + Channel: + # Targeting Spring 2024 Matter release + - ProgramStruct + - SeriesInfoStruct + - ProgramCategoryStruct + - ProgramCastStruct + - PageTokenStruct + - ChannelPagingStruct + - AdditionalInfoStruct + MediaPlayback: + # Targeting Spring 2024 Matter release + - TrackStruct + - TrackAttributesStruct + ContentLauncher: + # Targeting Spring 2024 Matter release + - PlaybackPreferencesStruct + - TrackPreferenceStruct + struct fields: + NetworkCommissioning: + # Targeting Spring 2024 Matter release + NetworkInfoStruct: + - networkIdentifier + - clientIdentifier + Channel: + # Targeting Spring 2024 Matter release + ChannelInfoStruct: + - identifier + - type + events: + MediaPlayback: + # Targeting Spring 2024 Matter release + - StateChanged + AccountLogin: + # Targeting Spring 2024 Matter release + - LoggedOut + TargetNavigator: + # Targeting Spring 2024 Matter release + - TargetUpdated + enums: + Thermostat: + # Targeting Spring 2024 Matter release + - StartOfWeekEnum + - TemperatureSetpointHoldEnum + - ACCapacityFormatEnum + - ACCompressorTypeEnum + - ACLouverPositionEnum + - ACRefrigerantTypeEnum + - ACTypeEnum + - SetpointChangeSourceEnum + Channel: + # Targeting Spring 2024 Matter release + - ChannelTypeEnum + MediaPlayback: + # Targeting Spring 2024 Matter release + - CharacteristicEnum + ContentLauncher: + # Targeting Spring 2024 Matter release + - CharacteristicEnum + enum values: + ContentLauncher: + # Targeting Spring 2024 Matter release + ParameterEnum: + - Season + - Episode + - Any + StatusEnum: + - TextTrackNotAvailable + - AudioTrackNotAvailable + TimeFormatLocalization: + CalendarTypeEnum: + - UseActiveLocale + HourFormatEnum: + - UseActiveLocale + bitmaps: + NetworkCommissioning: + # Targeting Spring 2024 Matter release + - ThreadCapabilitiesBitmap + Scenes: + # Targeting Spring 2024 Matter release + - NameSupportBitmap + Thermostat: + # Targeting Spring 2024 Matter release + - ACErrorCodeBitmap + - HVACSystemTypeBitmap + - ProgrammingOperationModeBitmap + - RelayStateBitmap + - RemoteSensingBitmap + Channel: + # Targeting Spring 2024 Matter release + - RecordingFlagBitmap + bitmap values: + OnOff: + Feature: + # Targeting Spring 2024 Matter release + - OffOnly + NetworkCommissioning: + # Targeting Spring 2024 Matter release + Feature: + - PerDeviceCredentials + WiFiSecurityBitmap: + - WPA3MatterPDC + Channel: + # Targeting Spring 2024 Matter release + Feature: + - ElectronicGuide + - RecordProgram + MediaPlayback: + # Targeting Spring 2024 Matter release + Feature: + - TextTracks + - AudioTracks + - AudioAdvance + ContentLauncher: + # Targeting Spring 2024 Matter release + SupportedProtocolsBitmap: + - WebRTC + Feature: + - AdvancedSeek + - TextTracks + - AudioTracks + renames: + structs: + Thermostat: + WeeklyScheduleTransitionStruct: ThermostatScheduleTransition + event fields: + WiFiNetworkDiagnostics: + AssociationFailure: + associationFailureCause: associationFailure + enums: + ContentLauncher: + StatusEnum: ContentLaunchStatusEnum + KeypadInput: + CECKeyCodeEnum: CecKeyCode + Thermostat: + ControlSequenceOfOperationEnum: ThermostatControlSequence + SetpointRaiseLowerModeEnum: SetpointAdjustMode + enum values: + ContentLauncher: + # The URLNotAvailable value got renamed at the same time + # as the enum. Record the rename here so that the old + # value name is generated for the old enum name. + ContentLaunchStatusEnum: + URLNotAvailable: UrlNotAvailable + FanControl: + FanModeSequenceEnum: + OffHighAuto: OffOnAuto + OffHigh: OffOn + # FanModeSequenceType is the old name of + # FanModeSequenceEnum; we need this rename annotation + # here so we don't lose the old values under that old + # name. + FanModeSequenceType: + OffHighAuto: OffOnAuto + OffHigh: OffOn + bitmaps: + Scenes: + CopyModeBitmap: ScenesCopyMode + ContentLauncher: + SupportedProtocolsBitmap: SupportedStreamingProtocol + LevelControl: + OptionsBitmap: LevelControlOptions + Thermostat: + ScheduleDayOfWeekBitmap: DayOfWeek + ScheduleModeBitmap: ModeForSequence + bitmap values: + PumpConfigurationAndControl: + PumpStatusBitmap: + SupplyFault: Supplyfault + SoftwareDiagnostics: + Feature: + Watermarks: WaterMarks + removed: + clusters: + # Should never have been exposed in the shape it was in, and now is + # getting renamed and getting a new cluster id, so just removing it + # seems like the most sensible thing. + - Scenes + enum values: + ContentLauncher: + # The URLNotAvailable value got renamed at the same time + # as the enum. The old enum name never had the new value name. + ContentLaunchStatusEnum: + - URLNotAvailable + +- release: "Future" + versions: "future" + provisional: + clusters: + # Targeting Spring 2024 Matter release + - EnergyEVSEMode + - DeviceEnergyManagementMode + - Messages + attributes: + DoorLock: + # Aliro is not ready yet. + - AliroReaderVerificationKey + - AliroReaderGroupIdentifier + - AliroReaderGroupSubIdentifier + - AliroExpeditedTransactionSupportedProtocolVersions + - AliroGroupResolvingKey + - AliroSupportedBLEUWBProtocolVersions + - AliroBLEAdvertisingVersion + - NumberOfAliroCredentialIssuerKeysSupported + - NumberOfAliroEndpointKeysSupported + ICDManagement: + # Targeting Spring 2024 Matter release + - OperatingMode + Thermostat: + # Targeting Spring 2024 Matter release + - PresetTypes + - ScheduleTypes + - NumberOfPresets + - NumberOfSchedules + - NumberOfScheduleTransitions + - NumberOfScheduleTransitionPerDay + - ActivePresetHandle + - Presets + - Schedules + - PresetsSchedulesEditable + - TemperatureSetpointHoldPolicy + - SetpointHoldExpiryTimestamp + - QueuedPreset + - ActiveScheduleHandle + UnitTesting: + # Ideally none of UnitTesting would be exposed as public API, but + # for now just start doing that for new additions to it. + - MeiInt8u + commands: + DoorLock: + # Aliro is not ready yet. + - SetAliroReaderConfig + - ClearAliroReaderConfig + Thermostat: + # Targeting Spring 2024 Matter release + - SetActiveScheduleRequest + - SetActivePresetRequest + - StartPresetsSchedulesEditRequest + - CancelPresetsSchedulesEditRequest + - CommitPresetsSchedulesRequest + - CancelSetActivePresetRequest + - SetTemperatureSetpointHoldPolicy + RVCOperationalState: + # Targeting Spring 2024 Matter release + - GoHome + UnitTesting: + # Ideally none of UnitTesting would be exposed as public API, but + # for now just start doing that for new additions to it. + - TestDifferentVendorMeiRequest + - TestDifferentVendorMeiResponse + structs: + Thermostat: + # Targeting Spring 2024 Matter release + - ScheduleTransitionStruct + - ScheduleStruct + - PresetStruct + - PresetTypeStruct + - ScheduleTypeStruct + - QueuedPresetStruct + events: + UnitTesting: + # Ideally none of UnitTesting would be exposed as public API, but + # for now just start doing that for new additions to it. + - TestDifferentVendorMeiEvent + enums: + Thermostat: + # Targeting Spring 2024 Matter release + - PresetScenarioEnum + enum values: + DoorLock: + CredentialTypeEnum: + # Aliro is not ready yet. + - AliroCredentialIssuerKey + - AliroEvictableEndpointKey + - AliroNonEvictableEndpointKey + LockDataTypeEnum: + # Aliro is not ready yet. + - AliroCredentialIssuerKey + - AliroEvictableEndpointKey + - AliroNonEvictableEndpointKey + OperationSourceEnum: + # Aliro is not ready yet. + - Aliro + RVCRunMode: + ModeTag: + # Targeting Spring 2024 Matter release + - Mapping + bitmaps: + Thermostat: + # Targeting Spring 2024 Matter release + - PresetTypeFeaturesBitmap + - ScheduleTypeFeaturesBitmap + - TemperatureSetpointHoldPolicyBitmap + bitmap values: + DoorLock: + Feature: + # Aliro is not ready yet. + - AliroProvisioning + - AliroBLEUWB + Thermostat: + Feature: + # Targeting Spring 2024 Matter release + - QueuedPresetsSupported + - Setpoints + - Presets + - MatterScheduleConfiguration diff --git a/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/templates/config-data.yaml b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/templates/config-data.yaml new file mode 100644 index 00000000000000..2567306d5cb5e0 --- /dev/null +++ b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/templates/config-data.yaml @@ -0,0 +1,36 @@ +DarwinForceWritable: + # Work-around for not allowing changes from writable to read-only + # happened in https://github.com/project-chip/connectedhomeip/pull/30134 + - ApplicationLauncher::CurrentApp + - ContentLauncher::SupportedStreamingProtocols + - FanControl::FanModeSequence + +# A list of commands that used to have only optional arguments before we started +# generating the no-params-needed variants of methods for that case. These +# declarations need to have availability based on when we started generating +# those variants, not the command's own availability. +LegacyCommandsWithOnlyOptionalArguments: + - NetworkCommissioning::ScanNetworks + - DoorLock::LockDoor + - DoorLock::UnlockDoor + - ApplicationLauncher::LaunchApp + - ApplicationLauncher::StopApp + - ApplicationLauncher::HideApp + - UnitTesting::TestNullableOptionalRequest + - UnitTesting::TestSimpleOptionalArgumentRequest + +# The media clusters relevant to Matter Casting +MatterCastingClusters: + - Application Basic + - Application Launcher + - Content Launcher + - Keypad Input + - Level Control + - Media Playback + - On/Off + - Target Navigator + - Wake on LAN + +# The commands currently implemented for Matter Casting in MCCommandObjects.h/mm. We will ZAP generate this file in the next PR. +MatterCastingImplementedCommands: + - LaunchURL \ No newline at end of file diff --git a/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/templates/partials/decode_value.zapt b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/templates/partials/decode_value.zapt new file mode 100644 index 00000000000000..2900ce04a0561d --- /dev/null +++ b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/templates/partials/decode_value.zapt @@ -0,0 +1,57 @@ +{{#if isOptional}} + if ({{source}}.HasValue()) { + {{>decode_value target=target source=(concat source ".Value()") cluster=cluster errorCode=errorCode depth=(incrementDepth depth) isOptional=false}} + } else { + {{target}} = nil; + } +{{else if isNullable}} + if ({{source}}.IsNull()) { + {{target}} = nil; + } else { + {{>decode_value target=target source=(concat source ".Value()") cluster=cluster errorCode=errorCode depth=(incrementDepth depth) isNullable=false}} + } +{{else if isArray}} + { // Scope for our temporary variables + auto * array_{{depth}} = [NSMutableArray new]; + auto iter_{{depth}} = {{source}}.begin(); + while (iter_{{depth}}.Next()) { + auto & entry_{{depth}} = iter_{{depth}}.GetValue(); + {{asObjectiveCClass type cluster forceNotList=true structTypePrefix="MC"}} * newElement_{{depth}}; + {{>decode_value target=(concat "newElement_" depth) source=(concat "entry_" depth) cluster=cluster errorCode=errorCode depth=(incrementDepth depth) isArray=false}} + [array_{{depth}} addObject:newElement_{{depth}}]; + } + CHIP_ERROR err = iter_{{depth}}.GetStatus(); + if (err != CHIP_NO_ERROR) { + {{errorCode}} + } + {{target}} = array_{{depth}}; + } +{{else}} + {{#if_is_struct type}} + {{target}} = [{{asObjectiveCClass type cluster forceNotList=true structTypePrefix="MC"}} new]; + {{#zcl_struct_items_by_struct_and_cluster_name type cluster}} + {{#if (isSupported (asUpperCamelCase ../cluster preserveAcronyms=true) struct=(asUpperCamelCase ../type preserveAcronyms=true) structField=(asStructPropertyName label))}} + {{>decode_value target=(concat ../target "." (asStructPropertyName label)) source=(concat ../source "." (asLowerCamelCase label)) cluster=../cluster errorCode=../errorCode depth=(incrementDepth ../depth) }} + {{/if}} + {{/zcl_struct_items_by_struct_and_cluster_name}} + {{else}} + {{#if_is_strongly_typed_chip_enum type}} + {{target}} = [NSNumber numberWith{{asObjectiveCNumberType "" type false}}:chip::to_underlying({{source}})]; + {{else}} + {{#if_is_strongly_typed_bitmap type}} + {{target}} = [NSNumber numberWith{{asObjectiveCNumberType "" type false}}:{{source}}.Raw()]; + {{else if (isOctetString type)}} + {{target}} = AsData({{source}}); + {{else if (isCharString type)}} + {{target}} = AsString({{source}}); + if ({{target}} == nil) { + {{! Invalid UTF-8. Just make up an error for now. }} + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + {{errorCode}} + } + {{else}} + {{target}} = [NSNumber numberWith{{asObjectiveCNumberType "" type false}}:{{source}}]; + {{/if_is_strongly_typed_bitmap}} + {{/if_is_strongly_typed_chip_enum}} + {{/if_is_struct}} +{{/if}} diff --git a/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/templates/templates.json b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/templates/templates.json new file mode 100644 index 00000000000000..b746adbd625967 --- /dev/null +++ b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/templates/templates.json @@ -0,0 +1,50 @@ +{ + "name": "Framework templates", + "version": "chip-v1", + "helpers": [ + "partials/helper.js", + "common/ChipTypesHelper.js", + "common/StringHelper.js", + "templates/app/helper.js", + "templates/chip/helper.js", + "common/ClusterTestGeneration.js", + "darwin/Framework/CHIP/templates/helper.js" + ], + "resources": { + "availability-data": "availability.yaml", + "config-data": "config-data.yaml" + }, + "override": "../../../../../../src/app/zap-templates/common/override.js", + "partials": [ + { + "name": "header", + "path": "../../../../../../src/app/zap-templates/partials/header.zapt" + }, + { + "name": "decode_value", + "path": "partials/decode_value.zapt" + } + ], + "templates": [ + { + "path": "MCAttributeObjects.zapt", + "name": "Objc ZCL asynchronous API Internal Header", + "output": "examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/zap-generated/MCAttributeObjects.h" + }, + { + "path": "MCAttributeObjects-src.zapt", + "name": "Objc ZCL asynchronous API Internal Header", + "output": "examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/zap-generated/MCAttributeObjects.mm" + }, + { + "path": "MCClusterObjects.zapt", + "name": "Objc ZCL asynchronous API Internal Header", + "output": "examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/zap-generated/MCClusterObjects.h" + }, + { + "path": "MCClusterObjects-src.zapt", + "name": "Objc ZCL asynchronous API Internal Header", + "output": "examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/zap-generated/MCClusterObjects.mm" + } + ] +} \ No newline at end of file diff --git a/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/zap-generated/MCAttributeObjects.h b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/zap-generated/MCAttributeObjects.h new file mode 100644 index 00000000000000..6f15e77447e914 --- /dev/null +++ b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/zap-generated/MCAttributeObjects.h @@ -0,0 +1,346 @@ +/* + * + * Copyright (c) 2022 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// THIS FILE IS GENERATED BY ZAP + +#import "MCStructsObjc.h" + +#import "../MCAttribute.h" +#import + +#ifndef MCAttributeObjects_h +#define MCAttributeObjects_h + +// OnOff cluster attributes: + +@interface MCOnOffClusterOnOffAttribute : MCAttribute +@end + +@interface MCOnOffClusterGlobalSceneControlAttribute : MCAttribute +@end + +@interface MCOnOffClusterOnTimeAttribute : MCAttribute +@end + +@interface MCOnOffClusterOffWaitTimeAttribute : MCAttribute +@end + +@interface MCOnOffClusterStartUpOnOffAttribute : MCAttribute +@end + +@interface MCOnOffClusterGeneratedCommandListAttribute : MCAttribute +@end + +@interface MCOnOffClusterAcceptedCommandListAttribute : MCAttribute +@end + +@interface MCOnOffClusterEventListAttribute : MCAttribute +@end + +@interface MCOnOffClusterAttributeListAttribute : MCAttribute +@end + +@interface MCOnOffClusterFeatureMapAttribute : MCAttribute +@end + +@interface MCOnOffClusterClusterRevisionAttribute : MCAttribute +@end + +// LevelControl cluster attributes: + +@interface MCLevelControlClusterCurrentLevelAttribute : MCAttribute +@end + +@interface MCLevelControlClusterRemainingTimeAttribute : MCAttribute +@end + +@interface MCLevelControlClusterMinLevelAttribute : MCAttribute +@end + +@interface MCLevelControlClusterMaxLevelAttribute : MCAttribute +@end + +@interface MCLevelControlClusterCurrentFrequencyAttribute : MCAttribute +@end + +@interface MCLevelControlClusterMinFrequencyAttribute : MCAttribute +@end + +@interface MCLevelControlClusterMaxFrequencyAttribute : MCAttribute +@end + +@interface MCLevelControlClusterOptionsAttribute : MCAttribute +@end + +@interface MCLevelControlClusterOnOffTransitionTimeAttribute : MCAttribute +@end + +@interface MCLevelControlClusterOnLevelAttribute : MCAttribute +@end + +@interface MCLevelControlClusterOnTransitionTimeAttribute : MCAttribute +@end + +@interface MCLevelControlClusterOffTransitionTimeAttribute : MCAttribute +@end + +@interface MCLevelControlClusterDefaultMoveRateAttribute : MCAttribute +@end + +@interface MCLevelControlClusterStartUpCurrentLevelAttribute : MCAttribute +@end + +@interface MCLevelControlClusterGeneratedCommandListAttribute : MCAttribute +@end + +@interface MCLevelControlClusterAcceptedCommandListAttribute : MCAttribute +@end + +@interface MCLevelControlClusterEventListAttribute : MCAttribute +@end + +@interface MCLevelControlClusterAttributeListAttribute : MCAttribute +@end + +@interface MCLevelControlClusterFeatureMapAttribute : MCAttribute +@end + +@interface MCLevelControlClusterClusterRevisionAttribute : MCAttribute +@end + +// WakeOnLan cluster attributes: + +@interface MCWakeOnLanClusterMACAddressAttribute : MCAttribute +@end + +@interface MCWakeOnLanClusterLinkLocalAddressAttribute : MCAttribute +@end + +@interface MCWakeOnLanClusterGeneratedCommandListAttribute : MCAttribute +@end + +@interface MCWakeOnLanClusterAcceptedCommandListAttribute : MCAttribute +@end + +@interface MCWakeOnLanClusterEventListAttribute : MCAttribute +@end + +@interface MCWakeOnLanClusterAttributeListAttribute : MCAttribute +@end + +@interface MCWakeOnLanClusterFeatureMapAttribute : MCAttribute +@end + +@interface MCWakeOnLanClusterClusterRevisionAttribute : MCAttribute +@end + +// TargetNavigator cluster attributes: + +@interface MCTargetNavigatorClusterTargetListAttribute : MCAttribute +@end + +@interface MCTargetNavigatorClusterCurrentTargetAttribute : MCAttribute +@end + +@interface MCTargetNavigatorClusterGeneratedCommandListAttribute : MCAttribute +@end + +@interface MCTargetNavigatorClusterAcceptedCommandListAttribute : MCAttribute +@end + +@interface MCTargetNavigatorClusterEventListAttribute : MCAttribute +@end + +@interface MCTargetNavigatorClusterAttributeListAttribute : MCAttribute +@end + +@interface MCTargetNavigatorClusterFeatureMapAttribute : MCAttribute +@end + +@interface MCTargetNavigatorClusterClusterRevisionAttribute : MCAttribute +@end + +// MediaPlayback cluster attributes: + +@interface MCMediaPlaybackClusterCurrentStateAttribute : MCAttribute +@end + +@interface MCMediaPlaybackClusterStartTimeAttribute : MCAttribute +@end + +@interface MCMediaPlaybackClusterDurationAttribute : MCAttribute +@end + +@interface MCMediaPlaybackClusterSampledPositionAttribute : MCAttribute +@end + +@interface MCMediaPlaybackClusterPlaybackSpeedAttribute : MCAttribute +@end + +@interface MCMediaPlaybackClusterSeekRangeEndAttribute : MCAttribute +@end + +@interface MCMediaPlaybackClusterSeekRangeStartAttribute : MCAttribute +@end + +@interface MCMediaPlaybackClusterActiveAudioTrackAttribute : MCAttribute +@end + +@interface MCMediaPlaybackClusterAvailableAudioTracksAttribute : MCAttribute +@end + +@interface MCMediaPlaybackClusterActiveTextTrackAttribute : MCAttribute +@end + +@interface MCMediaPlaybackClusterAvailableTextTracksAttribute : MCAttribute +@end + +@interface MCMediaPlaybackClusterGeneratedCommandListAttribute : MCAttribute +@end + +@interface MCMediaPlaybackClusterAcceptedCommandListAttribute : MCAttribute +@end + +@interface MCMediaPlaybackClusterEventListAttribute : MCAttribute +@end + +@interface MCMediaPlaybackClusterAttributeListAttribute : MCAttribute +@end + +@interface MCMediaPlaybackClusterFeatureMapAttribute : MCAttribute +@end + +@interface MCMediaPlaybackClusterClusterRevisionAttribute : MCAttribute +@end + +// KeypadInput cluster attributes: + +@interface MCKeypadInputClusterGeneratedCommandListAttribute : MCAttribute +@end + +@interface MCKeypadInputClusterAcceptedCommandListAttribute : MCAttribute +@end + +@interface MCKeypadInputClusterEventListAttribute : MCAttribute +@end + +@interface MCKeypadInputClusterAttributeListAttribute : MCAttribute +@end + +@interface MCKeypadInputClusterFeatureMapAttribute : MCAttribute +@end + +@interface MCKeypadInputClusterClusterRevisionAttribute : MCAttribute +@end + +// ContentLauncher cluster attributes: + +@interface MCContentLauncherClusterAcceptHeaderAttribute : MCAttribute +@end + +@interface MCContentLauncherClusterSupportedStreamingProtocolsAttribute : MCAttribute +@end + +@interface MCContentLauncherClusterGeneratedCommandListAttribute : MCAttribute +@end + +@interface MCContentLauncherClusterAcceptedCommandListAttribute : MCAttribute +@end + +@interface MCContentLauncherClusterEventListAttribute : MCAttribute +@end + +@interface MCContentLauncherClusterAttributeListAttribute : MCAttribute +@end + +@interface MCContentLauncherClusterFeatureMapAttribute : MCAttribute +@end + +@interface MCContentLauncherClusterClusterRevisionAttribute : MCAttribute +@end + +// ApplicationLauncher cluster attributes: + +@interface MCApplicationLauncherClusterCatalogListAttribute : MCAttribute +@end + +@interface MCApplicationLauncherClusterCurrentAppAttribute : MCAttribute +@end + +@interface MCApplicationLauncherClusterGeneratedCommandListAttribute : MCAttribute +@end + +@interface MCApplicationLauncherClusterAcceptedCommandListAttribute : MCAttribute +@end + +@interface MCApplicationLauncherClusterEventListAttribute : MCAttribute +@end + +@interface MCApplicationLauncherClusterAttributeListAttribute : MCAttribute +@end + +@interface MCApplicationLauncherClusterFeatureMapAttribute : MCAttribute +@end + +@interface MCApplicationLauncherClusterClusterRevisionAttribute : MCAttribute +@end + +// ApplicationBasic cluster attributes: + +@interface MCApplicationBasicClusterVendorNameAttribute : MCAttribute +@end + +@interface MCApplicationBasicClusterVendorIDAttribute : MCAttribute +@end + +@interface MCApplicationBasicClusterApplicationNameAttribute : MCAttribute +@end + +@interface MCApplicationBasicClusterProductIDAttribute : MCAttribute +@end + +@interface MCApplicationBasicClusterApplicationAttribute : MCAttribute +@end + +@interface MCApplicationBasicClusterStatusAttribute : MCAttribute +@end + +@interface MCApplicationBasicClusterApplicationVersionAttribute : MCAttribute +@end + +@interface MCApplicationBasicClusterAllowedVendorListAttribute : MCAttribute +@end + +@interface MCApplicationBasicClusterGeneratedCommandListAttribute : MCAttribute +@end + +@interface MCApplicationBasicClusterAcceptedCommandListAttribute : MCAttribute +@end + +@interface MCApplicationBasicClusterEventListAttribute : MCAttribute +@end + +@interface MCApplicationBasicClusterAttributeListAttribute : MCAttribute +@end + +@interface MCApplicationBasicClusterFeatureMapAttribute : MCAttribute +@end + +@interface MCApplicationBasicClusterClusterRevisionAttribute : MCAttribute +@end + +#endif /* MCAttributeObjects_h */ \ No newline at end of file diff --git a/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/zap-generated/MCAttributeObjects.mm b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/zap-generated/MCAttributeObjects.mm new file mode 100644 index 00000000000000..e5191ee0bbaba7 --- /dev/null +++ b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/zap-generated/MCAttributeObjects.mm @@ -0,0 +1,5629 @@ +/* + * + * Copyright (c) 2022 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// THIS FILE IS GENERATED BY ZAP + +#import "MCAttributeObjects.h" + +#import "../MCAttribute_Internal.h" +#import "../MCCastingApp.h" +#import "../MCErrorUtils.h" +#import "../NSDataSpanConversion.h" +#import "../NSStringSpanConversion.h" + +#include "core/Attribute.h" +#include + +#import + +// OnOff cluster attributes: + +@implementation MCOnOffClusterOnOffAttribute +- (void)read:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->read(context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }); +} + +- (void)subscribe:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion + minInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->subscribe( + context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }, minInterval, maxInterval); +} + +- (id _Nullable)getObjCTypeFromCpp:(std::any)cppValue errorCode:(CHIP_ERROR *)aError +{ + NSNumber * value = nil; + if (cppValue.type() == typeid(std::shared_ptr)) { + std::shared_ptr sharedPtr = std::any_cast>(cppValue); + chip::app::Clusters::OnOff::Attributes::OnOff::TypeInfo::DecodableType _cppValue = *sharedPtr; + // auto & valueSharedPtr = *sharedPtr; + *aError = CHIP_NO_ERROR; + NSNumber * _Nonnull value; + value = [NSNumber numberWithBool:_cppValue]; + return value; + } + *aError = CHIP_ERROR_INTERNAL; + return value; +} +@end + +@implementation MCOnOffClusterGlobalSceneControlAttribute +- (void)read:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->read(context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }); +} + +- (void)subscribe:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion + minInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->subscribe( + context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }, minInterval, maxInterval); +} + +- (id _Nullable)getObjCTypeFromCpp:(std::any)cppValue errorCode:(CHIP_ERROR *)aError +{ + NSNumber * value = nil; + if (cppValue.type() == typeid(std::shared_ptr)) { + std::shared_ptr sharedPtr = std::any_cast>(cppValue); + chip::app::Clusters::OnOff::Attributes::GlobalSceneControl::TypeInfo::DecodableType _cppValue = *sharedPtr; + // auto & valueSharedPtr = *sharedPtr; + *aError = CHIP_NO_ERROR; + NSNumber * _Nonnull value; + value = [NSNumber numberWithBool:_cppValue]; + return value; + } + *aError = CHIP_ERROR_INTERNAL; + return value; +} +@end + +@implementation MCOnOffClusterOnTimeAttribute +- (void)read:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->read(context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }); +} + +- (void)subscribe:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion + minInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->subscribe( + context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }, minInterval, maxInterval); +} + +- (id _Nullable)getObjCTypeFromCpp:(std::any)cppValue errorCode:(CHIP_ERROR *)aError +{ + NSNumber * value = nil; + if (cppValue.type() == typeid(std::shared_ptr)) { + std::shared_ptr sharedPtr = std::any_cast>(cppValue); + chip::app::Clusters::OnOff::Attributes::OnTime::TypeInfo::DecodableType _cppValue = *sharedPtr; + // auto & valueSharedPtr = *sharedPtr; + *aError = CHIP_NO_ERROR; + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:_cppValue]; + return value; + } + *aError = CHIP_ERROR_INTERNAL; + return value; +} +@end + +@implementation MCOnOffClusterOffWaitTimeAttribute +- (void)read:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->read(context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }); +} + +- (void)subscribe:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion + minInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->subscribe( + context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }, minInterval, maxInterval); +} + +- (id _Nullable)getObjCTypeFromCpp:(std::any)cppValue errorCode:(CHIP_ERROR *)aError +{ + NSNumber * value = nil; + if (cppValue.type() == typeid(std::shared_ptr)) { + std::shared_ptr sharedPtr = std::any_cast>(cppValue); + chip::app::Clusters::OnOff::Attributes::OffWaitTime::TypeInfo::DecodableType _cppValue = *sharedPtr; + // auto & valueSharedPtr = *sharedPtr; + *aError = CHIP_NO_ERROR; + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:_cppValue]; + return value; + } + *aError = CHIP_ERROR_INTERNAL; + return value; +} +@end + +@implementation MCOnOffClusterStartUpOnOffAttribute +- (void)read:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->read(context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }); +} + +- (void)subscribe:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion + minInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->subscribe( + context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }, minInterval, maxInterval); +} + +- (id _Nullable)getObjCTypeFromCpp:(std::any)cppValue errorCode:(CHIP_ERROR *)aError +{ + NSNumber * value = nil; + if (cppValue.type() == typeid(std::shared_ptr)) { + std::shared_ptr sharedPtr = std::any_cast>(cppValue); + chip::app::Clusters::OnOff::Attributes::StartUpOnOff::TypeInfo::DecodableType _cppValue = *sharedPtr; + // auto & valueSharedPtr = *sharedPtr; + *aError = CHIP_NO_ERROR; + NSNumber * _Nullable value; + if (_cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(_cppValue.Value())]; + } + return value; + } + *aError = CHIP_ERROR_INTERNAL; + return value; +} +@end + +@implementation MCOnOffClusterGeneratedCommandListAttribute +- (void)read:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->read(context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }); +} + +- (void)subscribe:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion + minInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->subscribe( + context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }, minInterval, maxInterval); +} + +- (id _Nullable)getObjCTypeFromCpp:(std::any)cppValue errorCode:(CHIP_ERROR *)aError +{ + NSArray * value = nil; + if (cppValue.type() == typeid(std::shared_ptr)) { + std::shared_ptr sharedPtr = std::any_cast>(cppValue); + chip::app::Clusters::OnOff::Attributes::GeneratedCommandList::TypeInfo::DecodableType _cppValue = *sharedPtr; + // auto & valueSharedPtr = *sharedPtr; + *aError = CHIP_NO_ERROR; + 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 numberWithUnsignedInt: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; + } + *aError = CHIP_ERROR_INTERNAL; + return value; +} +@end + +@implementation MCOnOffClusterAcceptedCommandListAttribute +- (void)read:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->read(context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }); +} + +- (void)subscribe:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion + minInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->subscribe( + context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }, minInterval, maxInterval); +} + +- (id _Nullable)getObjCTypeFromCpp:(std::any)cppValue errorCode:(CHIP_ERROR *)aError +{ + NSArray * value = nil; + if (cppValue.type() == typeid(std::shared_ptr)) { + std::shared_ptr sharedPtr = std::any_cast>(cppValue); + chip::app::Clusters::OnOff::Attributes::AcceptedCommandList::TypeInfo::DecodableType _cppValue = *sharedPtr; + // auto & valueSharedPtr = *sharedPtr; + *aError = CHIP_NO_ERROR; + 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 numberWithUnsignedInt: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; + } + *aError = CHIP_ERROR_INTERNAL; + return value; +} +@end + +@implementation MCOnOffClusterEventListAttribute +- (void)read:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->read(context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }); +} + +- (void)subscribe:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion + minInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->subscribe( + context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }, minInterval, maxInterval); +} + +- (id _Nullable)getObjCTypeFromCpp:(std::any)cppValue errorCode:(CHIP_ERROR *)aError +{ + NSArray * value = nil; + if (cppValue.type() == typeid(std::shared_ptr)) { + std::shared_ptr sharedPtr = std::any_cast>(cppValue); + chip::app::Clusters::OnOff::Attributes::EventList::TypeInfo::DecodableType _cppValue = *sharedPtr; + // auto & valueSharedPtr = *sharedPtr; + *aError = CHIP_NO_ERROR; + 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 numberWithUnsignedInt: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; + } + *aError = CHIP_ERROR_INTERNAL; + return value; +} +@end + +@implementation MCOnOffClusterAttributeListAttribute +- (void)read:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->read(context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }); +} + +- (void)subscribe:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion + minInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->subscribe( + context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }, minInterval, maxInterval); +} + +- (id _Nullable)getObjCTypeFromCpp:(std::any)cppValue errorCode:(CHIP_ERROR *)aError +{ + NSArray * value = nil; + if (cppValue.type() == typeid(std::shared_ptr)) { + std::shared_ptr sharedPtr = std::any_cast>(cppValue); + chip::app::Clusters::OnOff::Attributes::AttributeList::TypeInfo::DecodableType _cppValue = *sharedPtr; + // auto & valueSharedPtr = *sharedPtr; + *aError = CHIP_NO_ERROR; + 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 numberWithUnsignedInt: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; + } + *aError = CHIP_ERROR_INTERNAL; + return value; +} +@end + +@implementation MCOnOffClusterFeatureMapAttribute +- (void)read:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->read(context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }); +} + +- (void)subscribe:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion + minInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->subscribe( + context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }, minInterval, maxInterval); +} + +- (id _Nullable)getObjCTypeFromCpp:(std::any)cppValue errorCode:(CHIP_ERROR *)aError +{ + NSNumber * value = nil; + if (cppValue.type() == typeid(std::shared_ptr)) { + std::shared_ptr sharedPtr = std::any_cast>(cppValue); + chip::app::Clusters::OnOff::Attributes::FeatureMap::TypeInfo::DecodableType _cppValue = *sharedPtr; + // auto & valueSharedPtr = *sharedPtr; + *aError = CHIP_NO_ERROR; + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedInt:_cppValue]; + return value; + } + *aError = CHIP_ERROR_INTERNAL; + return value; +} +@end + +@implementation MCOnOffClusterClusterRevisionAttribute +- (void)read:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->read(context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }); +} + +- (void)subscribe:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion + minInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->subscribe( + context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }, minInterval, maxInterval); +} + +- (id _Nullable)getObjCTypeFromCpp:(std::any)cppValue errorCode:(CHIP_ERROR *)aError +{ + NSNumber * value = nil; + if (cppValue.type() == typeid(std::shared_ptr)) { + std::shared_ptr sharedPtr = std::any_cast>(cppValue); + chip::app::Clusters::OnOff::Attributes::ClusterRevision::TypeInfo::DecodableType _cppValue = *sharedPtr; + // auto & valueSharedPtr = *sharedPtr; + *aError = CHIP_NO_ERROR; + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:_cppValue]; + return value; + } + *aError = CHIP_ERROR_INTERNAL; + return value; +} +@end + +// LevelControl cluster attributes: + +@implementation MCLevelControlClusterCurrentLevelAttribute +- (void)read:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->read(context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }); +} + +- (void)subscribe:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion + minInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->subscribe( + context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }, minInterval, maxInterval); +} + +- (id _Nullable)getObjCTypeFromCpp:(std::any)cppValue errorCode:(CHIP_ERROR *)aError +{ + NSNumber * value = nil; + if (cppValue.type() == typeid(std::shared_ptr)) { + std::shared_ptr sharedPtr = std::any_cast>(cppValue); + chip::app::Clusters::LevelControl::Attributes::CurrentLevel::TypeInfo::DecodableType _cppValue = *sharedPtr; + // auto & valueSharedPtr = *sharedPtr; + *aError = CHIP_NO_ERROR; + NSNumber * _Nullable value; + if (_cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedChar:_cppValue.Value()]; + } + return value; + } + *aError = CHIP_ERROR_INTERNAL; + return value; +} +@end + +@implementation MCLevelControlClusterRemainingTimeAttribute +- (void)read:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->read(context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }); +} + +- (void)subscribe:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion + minInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->subscribe( + context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }, minInterval, maxInterval); +} + +- (id _Nullable)getObjCTypeFromCpp:(std::any)cppValue errorCode:(CHIP_ERROR *)aError +{ + NSNumber * value = nil; + if (cppValue.type() == typeid(std::shared_ptr)) { + std::shared_ptr sharedPtr = std::any_cast>(cppValue); + chip::app::Clusters::LevelControl::Attributes::RemainingTime::TypeInfo::DecodableType _cppValue = *sharedPtr; + // auto & valueSharedPtr = *sharedPtr; + *aError = CHIP_NO_ERROR; + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:_cppValue]; + return value; + } + *aError = CHIP_ERROR_INTERNAL; + return value; +} +@end + +@implementation MCLevelControlClusterMinLevelAttribute +- (void)read:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->read(context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }); +} + +- (void)subscribe:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion + minInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->subscribe( + context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }, minInterval, maxInterval); +} + +- (id _Nullable)getObjCTypeFromCpp:(std::any)cppValue errorCode:(CHIP_ERROR *)aError +{ + NSNumber * value = nil; + if (cppValue.type() == typeid(std::shared_ptr)) { + std::shared_ptr sharedPtr = std::any_cast>(cppValue); + chip::app::Clusters::LevelControl::Attributes::MinLevel::TypeInfo::DecodableType _cppValue = *sharedPtr; + // auto & valueSharedPtr = *sharedPtr; + *aError = CHIP_NO_ERROR; + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:_cppValue]; + return value; + } + *aError = CHIP_ERROR_INTERNAL; + return value; +} +@end + +@implementation MCLevelControlClusterMaxLevelAttribute +- (void)read:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->read(context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }); +} + +- (void)subscribe:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion + minInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->subscribe( + context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }, minInterval, maxInterval); +} + +- (id _Nullable)getObjCTypeFromCpp:(std::any)cppValue errorCode:(CHIP_ERROR *)aError +{ + NSNumber * value = nil; + if (cppValue.type() == typeid(std::shared_ptr)) { + std::shared_ptr sharedPtr = std::any_cast>(cppValue); + chip::app::Clusters::LevelControl::Attributes::MaxLevel::TypeInfo::DecodableType _cppValue = *sharedPtr; + // auto & valueSharedPtr = *sharedPtr; + *aError = CHIP_NO_ERROR; + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:_cppValue]; + return value; + } + *aError = CHIP_ERROR_INTERNAL; + return value; +} +@end + +@implementation MCLevelControlClusterCurrentFrequencyAttribute +- (void)read:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->read(context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }); +} + +- (void)subscribe:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion + minInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->subscribe( + context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }, minInterval, maxInterval); +} + +- (id _Nullable)getObjCTypeFromCpp:(std::any)cppValue errorCode:(CHIP_ERROR *)aError +{ + NSNumber * value = nil; + if (cppValue.type() == typeid(std::shared_ptr)) { + std::shared_ptr sharedPtr = std::any_cast>(cppValue); + chip::app::Clusters::LevelControl::Attributes::CurrentFrequency::TypeInfo::DecodableType _cppValue = *sharedPtr; + // auto & valueSharedPtr = *sharedPtr; + *aError = CHIP_NO_ERROR; + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:_cppValue]; + return value; + } + *aError = CHIP_ERROR_INTERNAL; + return value; +} +@end + +@implementation MCLevelControlClusterMinFrequencyAttribute +- (void)read:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->read(context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }); +} + +- (void)subscribe:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion + minInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->subscribe( + context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }, minInterval, maxInterval); +} + +- (id _Nullable)getObjCTypeFromCpp:(std::any)cppValue errorCode:(CHIP_ERROR *)aError +{ + NSNumber * value = nil; + if (cppValue.type() == typeid(std::shared_ptr)) { + std::shared_ptr sharedPtr = std::any_cast>(cppValue); + chip::app::Clusters::LevelControl::Attributes::MinFrequency::TypeInfo::DecodableType _cppValue = *sharedPtr; + // auto & valueSharedPtr = *sharedPtr; + *aError = CHIP_NO_ERROR; + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:_cppValue]; + return value; + } + *aError = CHIP_ERROR_INTERNAL; + return value; +} +@end + +@implementation MCLevelControlClusterMaxFrequencyAttribute +- (void)read:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->read(context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }); +} + +- (void)subscribe:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion + minInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->subscribe( + context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }, minInterval, maxInterval); +} + +- (id _Nullable)getObjCTypeFromCpp:(std::any)cppValue errorCode:(CHIP_ERROR *)aError +{ + NSNumber * value = nil; + if (cppValue.type() == typeid(std::shared_ptr)) { + std::shared_ptr sharedPtr = std::any_cast>(cppValue); + chip::app::Clusters::LevelControl::Attributes::MaxFrequency::TypeInfo::DecodableType _cppValue = *sharedPtr; + // auto & valueSharedPtr = *sharedPtr; + *aError = CHIP_NO_ERROR; + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:_cppValue]; + return value; + } + *aError = CHIP_ERROR_INTERNAL; + return value; +} +@end + +@implementation MCLevelControlClusterOptionsAttribute +- (void)read:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->read(context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }); +} + +- (void)subscribe:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion + minInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->subscribe( + context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }, minInterval, maxInterval); +} + +- (id _Nullable)getObjCTypeFromCpp:(std::any)cppValue errorCode:(CHIP_ERROR *)aError +{ + NSNumber * value = nil; + if (cppValue.type() == typeid(std::shared_ptr)) { + std::shared_ptr sharedPtr = std::any_cast>(cppValue); + chip::app::Clusters::LevelControl::Attributes::Options::TypeInfo::DecodableType _cppValue = *sharedPtr; + // auto & valueSharedPtr = *sharedPtr; + *aError = CHIP_NO_ERROR; + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:_cppValue.Raw()]; + return value; + } + *aError = CHIP_ERROR_INTERNAL; + return value; +} +@end + +@implementation MCLevelControlClusterOnOffTransitionTimeAttribute +- (void)read:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->read(context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }); +} + +- (void)subscribe:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion + minInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->subscribe( + context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }, minInterval, maxInterval); +} + +- (id _Nullable)getObjCTypeFromCpp:(std::any)cppValue errorCode:(CHIP_ERROR *)aError +{ + NSNumber * value = nil; + if (cppValue.type() == typeid(std::shared_ptr)) { + std::shared_ptr sharedPtr = std::any_cast>(cppValue); + chip::app::Clusters::LevelControl::Attributes::OnOffTransitionTime::TypeInfo::DecodableType _cppValue = *sharedPtr; + // auto & valueSharedPtr = *sharedPtr; + *aError = CHIP_NO_ERROR; + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:_cppValue]; + return value; + } + *aError = CHIP_ERROR_INTERNAL; + return value; +} +@end + +@implementation MCLevelControlClusterOnLevelAttribute +- (void)read:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->read(context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }); +} + +- (void)subscribe:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion + minInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->subscribe( + context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }, minInterval, maxInterval); +} + +- (id _Nullable)getObjCTypeFromCpp:(std::any)cppValue errorCode:(CHIP_ERROR *)aError +{ + NSNumber * value = nil; + if (cppValue.type() == typeid(std::shared_ptr)) { + std::shared_ptr sharedPtr = std::any_cast>(cppValue); + chip::app::Clusters::LevelControl::Attributes::OnLevel::TypeInfo::DecodableType _cppValue = *sharedPtr; + // auto & valueSharedPtr = *sharedPtr; + *aError = CHIP_NO_ERROR; + NSNumber * _Nullable value; + if (_cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedChar:_cppValue.Value()]; + } + return value; + } + *aError = CHIP_ERROR_INTERNAL; + return value; +} +@end + +@implementation MCLevelControlClusterOnTransitionTimeAttribute +- (void)read:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->read(context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }); +} + +- (void)subscribe:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion + minInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->subscribe( + context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }, minInterval, maxInterval); +} + +- (id _Nullable)getObjCTypeFromCpp:(std::any)cppValue errorCode:(CHIP_ERROR *)aError +{ + NSNumber * value = nil; + if (cppValue.type() == typeid(std::shared_ptr)) { + std::shared_ptr sharedPtr = std::any_cast>(cppValue); + chip::app::Clusters::LevelControl::Attributes::OnTransitionTime::TypeInfo::DecodableType _cppValue = *sharedPtr; + // auto & valueSharedPtr = *sharedPtr; + *aError = CHIP_NO_ERROR; + NSNumber * _Nullable value; + if (_cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedShort:_cppValue.Value()]; + } + return value; + } + *aError = CHIP_ERROR_INTERNAL; + return value; +} +@end + +@implementation MCLevelControlClusterOffTransitionTimeAttribute +- (void)read:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->read(context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }); +} + +- (void)subscribe:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion + minInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->subscribe( + context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }, minInterval, maxInterval); +} + +- (id _Nullable)getObjCTypeFromCpp:(std::any)cppValue errorCode:(CHIP_ERROR *)aError +{ + NSNumber * value = nil; + if (cppValue.type() == typeid(std::shared_ptr)) { + std::shared_ptr sharedPtr = std::any_cast>(cppValue); + chip::app::Clusters::LevelControl::Attributes::OffTransitionTime::TypeInfo::DecodableType _cppValue = *sharedPtr; + // auto & valueSharedPtr = *sharedPtr; + *aError = CHIP_NO_ERROR; + NSNumber * _Nullable value; + if (_cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedShort:_cppValue.Value()]; + } + return value; + } + *aError = CHIP_ERROR_INTERNAL; + return value; +} +@end + +@implementation MCLevelControlClusterDefaultMoveRateAttribute +- (void)read:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->read(context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }); +} + +- (void)subscribe:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion + minInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->subscribe( + context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }, minInterval, maxInterval); +} + +- (id _Nullable)getObjCTypeFromCpp:(std::any)cppValue errorCode:(CHIP_ERROR *)aError +{ + NSNumber * value = nil; + if (cppValue.type() == typeid(std::shared_ptr)) { + std::shared_ptr sharedPtr = std::any_cast>(cppValue); + chip::app::Clusters::LevelControl::Attributes::DefaultMoveRate::TypeInfo::DecodableType _cppValue = *sharedPtr; + // auto & valueSharedPtr = *sharedPtr; + *aError = CHIP_NO_ERROR; + NSNumber * _Nullable value; + if (_cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedChar:_cppValue.Value()]; + } + return value; + } + *aError = CHIP_ERROR_INTERNAL; + return value; +} +@end + +@implementation MCLevelControlClusterStartUpCurrentLevelAttribute +- (void)read:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->read(context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }); +} + +- (void)subscribe:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion + minInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->subscribe( + context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }, minInterval, maxInterval); +} + +- (id _Nullable)getObjCTypeFromCpp:(std::any)cppValue errorCode:(CHIP_ERROR *)aError +{ + NSNumber * value = nil; + if (cppValue.type() == typeid(std::shared_ptr)) { + std::shared_ptr sharedPtr = std::any_cast>(cppValue); + chip::app::Clusters::LevelControl::Attributes::StartUpCurrentLevel::TypeInfo::DecodableType _cppValue = *sharedPtr; + // auto & valueSharedPtr = *sharedPtr; + *aError = CHIP_NO_ERROR; + NSNumber * _Nullable value; + if (_cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedChar:_cppValue.Value()]; + } + return value; + } + *aError = CHIP_ERROR_INTERNAL; + return value; +} +@end + +@implementation MCLevelControlClusterGeneratedCommandListAttribute +- (void)read:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->read(context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }); +} + +- (void)subscribe:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion + minInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->subscribe( + context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }, minInterval, maxInterval); +} + +- (id _Nullable)getObjCTypeFromCpp:(std::any)cppValue errorCode:(CHIP_ERROR *)aError +{ + NSArray * value = nil; + if (cppValue.type() == typeid(std::shared_ptr)) { + std::shared_ptr sharedPtr = std::any_cast>(cppValue); + chip::app::Clusters::LevelControl::Attributes::GeneratedCommandList::TypeInfo::DecodableType _cppValue = *sharedPtr; + // auto & valueSharedPtr = *sharedPtr; + *aError = CHIP_NO_ERROR; + 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 numberWithUnsignedInt: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; + } + *aError = CHIP_ERROR_INTERNAL; + return value; +} +@end + +@implementation MCLevelControlClusterAcceptedCommandListAttribute +- (void)read:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->read(context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }); +} + +- (void)subscribe:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion + minInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->subscribe( + context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }, minInterval, maxInterval); +} + +- (id _Nullable)getObjCTypeFromCpp:(std::any)cppValue errorCode:(CHIP_ERROR *)aError +{ + NSArray * value = nil; + if (cppValue.type() == typeid(std::shared_ptr)) { + std::shared_ptr sharedPtr = std::any_cast>(cppValue); + chip::app::Clusters::LevelControl::Attributes::AcceptedCommandList::TypeInfo::DecodableType _cppValue = *sharedPtr; + // auto & valueSharedPtr = *sharedPtr; + *aError = CHIP_NO_ERROR; + 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 numberWithUnsignedInt: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; + } + *aError = CHIP_ERROR_INTERNAL; + return value; +} +@end + +@implementation MCLevelControlClusterEventListAttribute +- (void)read:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->read(context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }); +} + +- (void)subscribe:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion + minInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->subscribe( + context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }, minInterval, maxInterval); +} + +- (id _Nullable)getObjCTypeFromCpp:(std::any)cppValue errorCode:(CHIP_ERROR *)aError +{ + NSArray * value = nil; + if (cppValue.type() == typeid(std::shared_ptr)) { + std::shared_ptr sharedPtr = std::any_cast>(cppValue); + chip::app::Clusters::LevelControl::Attributes::EventList::TypeInfo::DecodableType _cppValue = *sharedPtr; + // auto & valueSharedPtr = *sharedPtr; + *aError = CHIP_NO_ERROR; + 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 numberWithUnsignedInt: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; + } + *aError = CHIP_ERROR_INTERNAL; + return value; +} +@end + +@implementation MCLevelControlClusterAttributeListAttribute +- (void)read:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->read(context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }); +} + +- (void)subscribe:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion + minInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->subscribe( + context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }, minInterval, maxInterval); +} + +- (id _Nullable)getObjCTypeFromCpp:(std::any)cppValue errorCode:(CHIP_ERROR *)aError +{ + NSArray * value = nil; + if (cppValue.type() == typeid(std::shared_ptr)) { + std::shared_ptr sharedPtr = std::any_cast>(cppValue); + chip::app::Clusters::LevelControl::Attributes::AttributeList::TypeInfo::DecodableType _cppValue = *sharedPtr; + // auto & valueSharedPtr = *sharedPtr; + *aError = CHIP_NO_ERROR; + 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 numberWithUnsignedInt: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; + } + *aError = CHIP_ERROR_INTERNAL; + return value; +} +@end + +@implementation MCLevelControlClusterFeatureMapAttribute +- (void)read:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->read(context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }); +} + +- (void)subscribe:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion + minInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->subscribe( + context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }, minInterval, maxInterval); +} + +- (id _Nullable)getObjCTypeFromCpp:(std::any)cppValue errorCode:(CHIP_ERROR *)aError +{ + NSNumber * value = nil; + if (cppValue.type() == typeid(std::shared_ptr)) { + std::shared_ptr sharedPtr = std::any_cast>(cppValue); + chip::app::Clusters::LevelControl::Attributes::FeatureMap::TypeInfo::DecodableType _cppValue = *sharedPtr; + // auto & valueSharedPtr = *sharedPtr; + *aError = CHIP_NO_ERROR; + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedInt:_cppValue]; + return value; + } + *aError = CHIP_ERROR_INTERNAL; + return value; +} +@end + +@implementation MCLevelControlClusterClusterRevisionAttribute +- (void)read:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->read(context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }); +} + +- (void)subscribe:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion + minInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->subscribe( + context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }, minInterval, maxInterval); +} + +- (id _Nullable)getObjCTypeFromCpp:(std::any)cppValue errorCode:(CHIP_ERROR *)aError +{ + NSNumber * value = nil; + if (cppValue.type() == typeid(std::shared_ptr)) { + std::shared_ptr sharedPtr = std::any_cast>(cppValue); + chip::app::Clusters::LevelControl::Attributes::ClusterRevision::TypeInfo::DecodableType _cppValue = *sharedPtr; + // auto & valueSharedPtr = *sharedPtr; + *aError = CHIP_NO_ERROR; + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:_cppValue]; + return value; + } + *aError = CHIP_ERROR_INTERNAL; + return value; +} +@end + +// WakeOnLan cluster attributes: + +@implementation MCWakeOnLanClusterMACAddressAttribute +- (void)read:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->read(context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }); +} + +- (void)subscribe:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion + minInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->subscribe( + context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }, minInterval, maxInterval); +} + +- (id _Nullable)getObjCTypeFromCpp:(std::any)cppValue errorCode:(CHIP_ERROR *)aError +{ + NSString * value = nil; + if (cppValue.type() == typeid(std::shared_ptr)) { + std::shared_ptr sharedPtr = std::any_cast>(cppValue); + chip::app::Clusters::WakeOnLan::Attributes::MACAddress::TypeInfo::DecodableType _cppValue = *sharedPtr; + // auto & valueSharedPtr = *sharedPtr; + *aError = CHIP_NO_ERROR; + NSString * _Nonnull value; + value = AsString(_cppValue); + if (value == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; + return nil; + } + return value; + } + *aError = CHIP_ERROR_INTERNAL; + return value; +} +@end + +@implementation MCWakeOnLanClusterLinkLocalAddressAttribute +- (void)read:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->read(context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }); +} + +- (void)subscribe:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion + minInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->subscribe( + context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }, minInterval, maxInterval); +} + +- (id _Nullable)getObjCTypeFromCpp:(std::any)cppValue errorCode:(CHIP_ERROR *)aError +{ + NSData * value = nil; + if (cppValue.type() == typeid(std::shared_ptr)) { + std::shared_ptr sharedPtr = std::any_cast>(cppValue); + chip::app::Clusters::WakeOnLan::Attributes::LinkLocalAddress::TypeInfo::DecodableType _cppValue = *sharedPtr; + // auto & valueSharedPtr = *sharedPtr; + *aError = CHIP_NO_ERROR; + NSData * _Nonnull value; + value = AsData(_cppValue); + return value; + } + *aError = CHIP_ERROR_INTERNAL; + return value; +} +@end + +@implementation MCWakeOnLanClusterGeneratedCommandListAttribute +- (void)read:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->read(context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }); +} + +- (void)subscribe:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion + minInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->subscribe( + context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }, minInterval, maxInterval); +} + +- (id _Nullable)getObjCTypeFromCpp:(std::any)cppValue errorCode:(CHIP_ERROR *)aError +{ + NSArray * value = nil; + if (cppValue.type() == typeid(std::shared_ptr)) { + std::shared_ptr sharedPtr = std::any_cast>(cppValue); + chip::app::Clusters::WakeOnLan::Attributes::GeneratedCommandList::TypeInfo::DecodableType _cppValue = *sharedPtr; + // auto & valueSharedPtr = *sharedPtr; + *aError = CHIP_NO_ERROR; + 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 numberWithUnsignedInt: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; + } + *aError = CHIP_ERROR_INTERNAL; + return value; +} +@end + +@implementation MCWakeOnLanClusterAcceptedCommandListAttribute +- (void)read:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->read(context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }); +} + +- (void)subscribe:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion + minInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->subscribe( + context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }, minInterval, maxInterval); +} + +- (id _Nullable)getObjCTypeFromCpp:(std::any)cppValue errorCode:(CHIP_ERROR *)aError +{ + NSArray * value = nil; + if (cppValue.type() == typeid(std::shared_ptr)) { + std::shared_ptr sharedPtr = std::any_cast>(cppValue); + chip::app::Clusters::WakeOnLan::Attributes::AcceptedCommandList::TypeInfo::DecodableType _cppValue = *sharedPtr; + // auto & valueSharedPtr = *sharedPtr; + *aError = CHIP_NO_ERROR; + 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 numberWithUnsignedInt: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; + } + *aError = CHIP_ERROR_INTERNAL; + return value; +} +@end + +@implementation MCWakeOnLanClusterEventListAttribute +- (void)read:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->read(context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }); +} + +- (void)subscribe:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion + minInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->subscribe( + context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }, minInterval, maxInterval); +} + +- (id _Nullable)getObjCTypeFromCpp:(std::any)cppValue errorCode:(CHIP_ERROR *)aError +{ + NSArray * value = nil; + if (cppValue.type() == typeid(std::shared_ptr)) { + std::shared_ptr sharedPtr = std::any_cast>(cppValue); + chip::app::Clusters::WakeOnLan::Attributes::EventList::TypeInfo::DecodableType _cppValue = *sharedPtr; + // auto & valueSharedPtr = *sharedPtr; + *aError = CHIP_NO_ERROR; + 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 numberWithUnsignedInt: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; + } + *aError = CHIP_ERROR_INTERNAL; + return value; +} +@end + +@implementation MCWakeOnLanClusterAttributeListAttribute +- (void)read:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->read(context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }); +} + +- (void)subscribe:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion + minInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->subscribe( + context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }, minInterval, maxInterval); +} + +- (id _Nullable)getObjCTypeFromCpp:(std::any)cppValue errorCode:(CHIP_ERROR *)aError +{ + NSArray * value = nil; + if (cppValue.type() == typeid(std::shared_ptr)) { + std::shared_ptr sharedPtr = std::any_cast>(cppValue); + chip::app::Clusters::WakeOnLan::Attributes::AttributeList::TypeInfo::DecodableType _cppValue = *sharedPtr; + // auto & valueSharedPtr = *sharedPtr; + *aError = CHIP_NO_ERROR; + 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 numberWithUnsignedInt: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; + } + *aError = CHIP_ERROR_INTERNAL; + return value; +} +@end + +@implementation MCWakeOnLanClusterFeatureMapAttribute +- (void)read:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->read(context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }); +} + +- (void)subscribe:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion + minInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->subscribe( + context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }, minInterval, maxInterval); +} + +- (id _Nullable)getObjCTypeFromCpp:(std::any)cppValue errorCode:(CHIP_ERROR *)aError +{ + NSNumber * value = nil; + if (cppValue.type() == typeid(std::shared_ptr)) { + std::shared_ptr sharedPtr = std::any_cast>(cppValue); + chip::app::Clusters::WakeOnLan::Attributes::FeatureMap::TypeInfo::DecodableType _cppValue = *sharedPtr; + // auto & valueSharedPtr = *sharedPtr; + *aError = CHIP_NO_ERROR; + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedInt:_cppValue]; + return value; + } + *aError = CHIP_ERROR_INTERNAL; + return value; +} +@end + +@implementation MCWakeOnLanClusterClusterRevisionAttribute +- (void)read:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->read(context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }); +} + +- (void)subscribe:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion + minInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->subscribe( + context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }, minInterval, maxInterval); +} + +- (id _Nullable)getObjCTypeFromCpp:(std::any)cppValue errorCode:(CHIP_ERROR *)aError +{ + NSNumber * value = nil; + if (cppValue.type() == typeid(std::shared_ptr)) { + std::shared_ptr sharedPtr = std::any_cast>(cppValue); + chip::app::Clusters::WakeOnLan::Attributes::ClusterRevision::TypeInfo::DecodableType _cppValue = *sharedPtr; + // auto & valueSharedPtr = *sharedPtr; + *aError = CHIP_NO_ERROR; + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:_cppValue]; + return value; + } + *aError = CHIP_ERROR_INTERNAL; + return value; +} +@end + +// TargetNavigator cluster attributes: + +@implementation MCTargetNavigatorClusterTargetListAttribute +- (void)read:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->read(context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }); +} + +- (void)subscribe:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion + minInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->subscribe( + context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }, minInterval, maxInterval); +} + +- (id _Nullable)getObjCTypeFromCpp:(std::any)cppValue errorCode:(CHIP_ERROR *)aError +{ + NSArray * value = nil; + if (cppValue.type() == typeid(std::shared_ptr)) { + std::shared_ptr sharedPtr = std::any_cast>(cppValue); + chip::app::Clusters::TargetNavigator::Attributes::TargetList::TypeInfo::DecodableType _cppValue = *sharedPtr; + // auto & valueSharedPtr = *sharedPtr; + *aError = CHIP_NO_ERROR; + 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(); + MCTargetNavigatorClusterTargetInfoStruct * newElement_0; + newElement_0 = [MCTargetNavigatorClusterTargetInfoStruct 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; + } + value = array_0; + } + return value; + } + *aError = CHIP_ERROR_INTERNAL; + return value; +} +@end + +@implementation MCTargetNavigatorClusterCurrentTargetAttribute +- (void)read:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->read(context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }); +} + +- (void)subscribe:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion + minInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->subscribe( + context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }, minInterval, maxInterval); +} + +- (id _Nullable)getObjCTypeFromCpp:(std::any)cppValue errorCode:(CHIP_ERROR *)aError +{ + NSNumber * value = nil; + if (cppValue.type() == typeid(std::shared_ptr)) { + std::shared_ptr sharedPtr = std::any_cast>(cppValue); + chip::app::Clusters::TargetNavigator::Attributes::CurrentTarget::TypeInfo::DecodableType _cppValue = *sharedPtr; + // auto & valueSharedPtr = *sharedPtr; + *aError = CHIP_NO_ERROR; + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:_cppValue]; + return value; + } + *aError = CHIP_ERROR_INTERNAL; + return value; +} +@end + +@implementation MCTargetNavigatorClusterGeneratedCommandListAttribute +- (void)read:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->read(context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }); +} + +- (void)subscribe:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion + minInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->subscribe( + context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }, minInterval, maxInterval); +} + +- (id _Nullable)getObjCTypeFromCpp:(std::any)cppValue errorCode:(CHIP_ERROR *)aError +{ + NSArray * value = nil; + if (cppValue.type() == typeid(std::shared_ptr)) { + std::shared_ptr sharedPtr = std::any_cast>(cppValue); + chip::app::Clusters::TargetNavigator::Attributes::GeneratedCommandList::TypeInfo::DecodableType _cppValue = *sharedPtr; + // auto & valueSharedPtr = *sharedPtr; + *aError = CHIP_NO_ERROR; + 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 numberWithUnsignedInt: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; + } + *aError = CHIP_ERROR_INTERNAL; + return value; +} +@end + +@implementation MCTargetNavigatorClusterAcceptedCommandListAttribute +- (void)read:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->read(context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }); +} + +- (void)subscribe:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion + minInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->subscribe( + context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }, minInterval, maxInterval); +} + +- (id _Nullable)getObjCTypeFromCpp:(std::any)cppValue errorCode:(CHIP_ERROR *)aError +{ + NSArray * value = nil; + if (cppValue.type() == typeid(std::shared_ptr)) { + std::shared_ptr sharedPtr = std::any_cast>(cppValue); + chip::app::Clusters::TargetNavigator::Attributes::AcceptedCommandList::TypeInfo::DecodableType _cppValue = *sharedPtr; + // auto & valueSharedPtr = *sharedPtr; + *aError = CHIP_NO_ERROR; + 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 numberWithUnsignedInt: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; + } + *aError = CHIP_ERROR_INTERNAL; + return value; +} +@end + +@implementation MCTargetNavigatorClusterEventListAttribute +- (void)read:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->read(context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }); +} + +- (void)subscribe:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion + minInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->subscribe( + context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }, minInterval, maxInterval); +} + +- (id _Nullable)getObjCTypeFromCpp:(std::any)cppValue errorCode:(CHIP_ERROR *)aError +{ + NSArray * value = nil; + if (cppValue.type() == typeid(std::shared_ptr)) { + std::shared_ptr sharedPtr = std::any_cast>(cppValue); + chip::app::Clusters::TargetNavigator::Attributes::EventList::TypeInfo::DecodableType _cppValue = *sharedPtr; + // auto & valueSharedPtr = *sharedPtr; + *aError = CHIP_NO_ERROR; + 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 numberWithUnsignedInt: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; + } + *aError = CHIP_ERROR_INTERNAL; + return value; +} +@end + +@implementation MCTargetNavigatorClusterAttributeListAttribute +- (void)read:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->read(context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }); +} + +- (void)subscribe:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion + minInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->subscribe( + context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }, minInterval, maxInterval); +} + +- (id _Nullable)getObjCTypeFromCpp:(std::any)cppValue errorCode:(CHIP_ERROR *)aError +{ + NSArray * value = nil; + if (cppValue.type() == typeid(std::shared_ptr)) { + std::shared_ptr sharedPtr = std::any_cast>(cppValue); + chip::app::Clusters::TargetNavigator::Attributes::AttributeList::TypeInfo::DecodableType _cppValue = *sharedPtr; + // auto & valueSharedPtr = *sharedPtr; + *aError = CHIP_NO_ERROR; + 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 numberWithUnsignedInt: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; + } + *aError = CHIP_ERROR_INTERNAL; + return value; +} +@end + +@implementation MCTargetNavigatorClusterFeatureMapAttribute +- (void)read:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->read(context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }); +} + +- (void)subscribe:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion + minInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->subscribe( + context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }, minInterval, maxInterval); +} + +- (id _Nullable)getObjCTypeFromCpp:(std::any)cppValue errorCode:(CHIP_ERROR *)aError +{ + NSNumber * value = nil; + if (cppValue.type() == typeid(std::shared_ptr)) { + std::shared_ptr sharedPtr = std::any_cast>(cppValue); + chip::app::Clusters::TargetNavigator::Attributes::FeatureMap::TypeInfo::DecodableType _cppValue = *sharedPtr; + // auto & valueSharedPtr = *sharedPtr; + *aError = CHIP_NO_ERROR; + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedInt:_cppValue]; + return value; + } + *aError = CHIP_ERROR_INTERNAL; + return value; +} +@end + +@implementation MCTargetNavigatorClusterClusterRevisionAttribute +- (void)read:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->read(context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }); +} + +- (void)subscribe:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion + minInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->subscribe( + context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }, minInterval, maxInterval); +} + +- (id _Nullable)getObjCTypeFromCpp:(std::any)cppValue errorCode:(CHIP_ERROR *)aError +{ + NSNumber * value = nil; + if (cppValue.type() == typeid(std::shared_ptr)) { + std::shared_ptr sharedPtr = std::any_cast>(cppValue); + chip::app::Clusters::TargetNavigator::Attributes::ClusterRevision::TypeInfo::DecodableType _cppValue = *sharedPtr; + // auto & valueSharedPtr = *sharedPtr; + *aError = CHIP_NO_ERROR; + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:_cppValue]; + return value; + } + *aError = CHIP_ERROR_INTERNAL; + return value; +} +@end + +// MediaPlayback cluster attributes: + +@implementation MCMediaPlaybackClusterCurrentStateAttribute +- (void)read:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->read(context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }); +} + +- (void)subscribe:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion + minInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->subscribe( + context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }, minInterval, maxInterval); +} + +- (id _Nullable)getObjCTypeFromCpp:(std::any)cppValue errorCode:(CHIP_ERROR *)aError +{ + NSNumber * value = nil; + if (cppValue.type() == typeid(std::shared_ptr)) { + std::shared_ptr sharedPtr = std::any_cast>(cppValue); + chip::app::Clusters::MediaPlayback::Attributes::CurrentState::TypeInfo::DecodableType _cppValue = *sharedPtr; + // auto & valueSharedPtr = *sharedPtr; + *aError = CHIP_NO_ERROR; + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(_cppValue)]; + return value; + } + *aError = CHIP_ERROR_INTERNAL; + return value; +} +@end + +@implementation MCMediaPlaybackClusterStartTimeAttribute +- (void)read:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->read(context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }); +} + +- (void)subscribe:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion + minInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->subscribe( + context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }, minInterval, maxInterval); +} + +- (id _Nullable)getObjCTypeFromCpp:(std::any)cppValue errorCode:(CHIP_ERROR *)aError +{ + NSNumber * value = nil; + if (cppValue.type() == typeid(std::shared_ptr)) { + std::shared_ptr sharedPtr = std::any_cast>(cppValue); + chip::app::Clusters::MediaPlayback::Attributes::StartTime::TypeInfo::DecodableType _cppValue = *sharedPtr; + // auto & valueSharedPtr = *sharedPtr; + *aError = CHIP_NO_ERROR; + NSNumber * _Nullable value; + if (_cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedLongLong:_cppValue.Value()]; + } + return value; + } + *aError = CHIP_ERROR_INTERNAL; + return value; +} +@end + +@implementation MCMediaPlaybackClusterDurationAttribute +- (void)read:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->read(context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }); +} + +- (void)subscribe:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion + minInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->subscribe( + context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }, minInterval, maxInterval); +} + +- (id _Nullable)getObjCTypeFromCpp:(std::any)cppValue errorCode:(CHIP_ERROR *)aError +{ + NSNumber * value = nil; + if (cppValue.type() == typeid(std::shared_ptr)) { + std::shared_ptr sharedPtr = std::any_cast>(cppValue); + chip::app::Clusters::MediaPlayback::Attributes::Duration::TypeInfo::DecodableType _cppValue = *sharedPtr; + // auto & valueSharedPtr = *sharedPtr; + *aError = CHIP_NO_ERROR; + NSNumber * _Nullable value; + if (_cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedLongLong:_cppValue.Value()]; + } + return value; + } + *aError = CHIP_ERROR_INTERNAL; + return value; +} +@end + +@implementation MCMediaPlaybackClusterSampledPositionAttribute +- (void)read:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->read(context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }); +} + +- (void)subscribe:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion + minInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->subscribe( + context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }, minInterval, maxInterval); +} + +- (id _Nullable)getObjCTypeFromCpp:(std::any)cppValue errorCode:(CHIP_ERROR *)aError +{ + MCMediaPlaybackClusterPlaybackPositionStruct * value = nil; + if (cppValue.type() == typeid(std::shared_ptr)) { + std::shared_ptr sharedPtr = std::any_cast>(cppValue); + chip::app::Clusters::MediaPlayback::Attributes::SampledPosition::TypeInfo::DecodableType _cppValue = *sharedPtr; + // auto & valueSharedPtr = *sharedPtr; + *aError = CHIP_NO_ERROR; + MCMediaPlaybackClusterPlaybackPositionStruct * _Nullable value; + if (_cppValue.IsNull()) { + value = nil; + } else { + value = [MCMediaPlaybackClusterPlaybackPositionStruct new]; + value.updatedAt = [NSNumber numberWithUnsignedLongLong:_cppValue.Value().updatedAt]; + if (_cppValue.Value().position.IsNull()) { + value.position = nil; + } else { + value.position = [NSNumber numberWithUnsignedLongLong:_cppValue.Value().position.Value()]; + } + } + return value; + } + *aError = CHIP_ERROR_INTERNAL; + return value; +} +@end + +@implementation MCMediaPlaybackClusterPlaybackSpeedAttribute +- (void)read:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->read(context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }); +} + +- (void)subscribe:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion + minInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->subscribe( + context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }, minInterval, maxInterval); +} + +- (id _Nullable)getObjCTypeFromCpp:(std::any)cppValue errorCode:(CHIP_ERROR *)aError +{ + NSNumber * value = nil; + if (cppValue.type() == typeid(std::shared_ptr)) { + std::shared_ptr sharedPtr = std::any_cast>(cppValue); + chip::app::Clusters::MediaPlayback::Attributes::PlaybackSpeed::TypeInfo::DecodableType _cppValue = *sharedPtr; + // auto & valueSharedPtr = *sharedPtr; + *aError = CHIP_NO_ERROR; + NSNumber * _Nonnull value; + value = [NSNumber numberWithFloat:_cppValue]; + return value; + } + *aError = CHIP_ERROR_INTERNAL; + return value; +} +@end + +@implementation MCMediaPlaybackClusterSeekRangeEndAttribute +- (void)read:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->read(context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }); +} + +- (void)subscribe:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion + minInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->subscribe( + context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }, minInterval, maxInterval); +} + +- (id _Nullable)getObjCTypeFromCpp:(std::any)cppValue errorCode:(CHIP_ERROR *)aError +{ + NSNumber * value = nil; + if (cppValue.type() == typeid(std::shared_ptr)) { + std::shared_ptr sharedPtr = std::any_cast>(cppValue); + chip::app::Clusters::MediaPlayback::Attributes::SeekRangeEnd::TypeInfo::DecodableType _cppValue = *sharedPtr; + // auto & valueSharedPtr = *sharedPtr; + *aError = CHIP_NO_ERROR; + NSNumber * _Nullable value; + if (_cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedLongLong:_cppValue.Value()]; + } + return value; + } + *aError = CHIP_ERROR_INTERNAL; + return value; +} +@end + +@implementation MCMediaPlaybackClusterSeekRangeStartAttribute +- (void)read:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->read(context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }); +} + +- (void)subscribe:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion + minInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->subscribe( + context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }, minInterval, maxInterval); +} + +- (id _Nullable)getObjCTypeFromCpp:(std::any)cppValue errorCode:(CHIP_ERROR *)aError +{ + NSNumber * value = nil; + if (cppValue.type() == typeid(std::shared_ptr)) { + std::shared_ptr sharedPtr = std::any_cast>(cppValue); + chip::app::Clusters::MediaPlayback::Attributes::SeekRangeStart::TypeInfo::DecodableType _cppValue = *sharedPtr; + // auto & valueSharedPtr = *sharedPtr; + *aError = CHIP_NO_ERROR; + NSNumber * _Nullable value; + if (_cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedLongLong:_cppValue.Value()]; + } + return value; + } + *aError = CHIP_ERROR_INTERNAL; + return value; +} +@end + +@implementation MCMediaPlaybackClusterActiveAudioTrackAttribute +- (void)read:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->read(context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }); +} + +- (void)subscribe:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion + minInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->subscribe( + context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }, minInterval, maxInterval); +} + +- (id _Nullable)getObjCTypeFromCpp:(std::any)cppValue errorCode:(CHIP_ERROR *)aError +{ + MCMediaPlaybackClusterTrackStruct * value = nil; + if (cppValue.type() == typeid(std::shared_ptr)) { + std::shared_ptr sharedPtr = std::any_cast>(cppValue); + chip::app::Clusters::MediaPlayback::Attributes::ActiveAudioTrack::TypeInfo::DecodableType _cppValue = *sharedPtr; + // auto & valueSharedPtr = *sharedPtr; + *aError = CHIP_NO_ERROR; + MCMediaPlaybackClusterTrackStruct * _Nullable value; + if (_cppValue.IsNull()) { + value = nil; + } else { + value = [MCMediaPlaybackClusterTrackStruct 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 = [MCMediaPlaybackClusterTrackAttributesStruct 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; + } + *aError = CHIP_ERROR_INTERNAL; + return value; +} +@end + +@implementation MCMediaPlaybackClusterAvailableAudioTracksAttribute +- (void)read:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->read(context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }); +} + +- (void)subscribe:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion + minInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->subscribe( + context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }, minInterval, maxInterval); +} + +- (id _Nullable)getObjCTypeFromCpp:(std::any)cppValue errorCode:(CHIP_ERROR *)aError +{ + NSArray * value = nil; + if (cppValue.type() == typeid(std::shared_ptr)) { + std::shared_ptr sharedPtr = std::any_cast>(cppValue); + chip::app::Clusters::MediaPlayback::Attributes::AvailableAudioTracks::TypeInfo::DecodableType _cppValue = *sharedPtr; + // auto & valueSharedPtr = *sharedPtr; + *aError = CHIP_NO_ERROR; + 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(); + MCMediaPlaybackClusterTrackStruct * newElement_1; + newElement_1 = [MCMediaPlaybackClusterTrackStruct 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 = [MCMediaPlaybackClusterTrackAttributesStruct 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; + } + *aError = CHIP_ERROR_INTERNAL; + return value; +} +@end + +@implementation MCMediaPlaybackClusterActiveTextTrackAttribute +- (void)read:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->read(context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }); +} + +- (void)subscribe:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion + minInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->subscribe( + context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }, minInterval, maxInterval); +} + +- (id _Nullable)getObjCTypeFromCpp:(std::any)cppValue errorCode:(CHIP_ERROR *)aError +{ + MCMediaPlaybackClusterTrackStruct * value = nil; + if (cppValue.type() == typeid(std::shared_ptr)) { + std::shared_ptr sharedPtr = std::any_cast>(cppValue); + chip::app::Clusters::MediaPlayback::Attributes::ActiveTextTrack::TypeInfo::DecodableType _cppValue = *sharedPtr; + // auto & valueSharedPtr = *sharedPtr; + *aError = CHIP_NO_ERROR; + MCMediaPlaybackClusterTrackStruct * _Nullable value; + if (_cppValue.IsNull()) { + value = nil; + } else { + value = [MCMediaPlaybackClusterTrackStruct 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 = [MCMediaPlaybackClusterTrackAttributesStruct 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; + } + *aError = CHIP_ERROR_INTERNAL; + return value; +} +@end + +@implementation MCMediaPlaybackClusterAvailableTextTracksAttribute +- (void)read:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->read(context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }); +} + +- (void)subscribe:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion + minInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->subscribe( + context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }, minInterval, maxInterval); +} + +- (id _Nullable)getObjCTypeFromCpp:(std::any)cppValue errorCode:(CHIP_ERROR *)aError +{ + NSArray * value = nil; + if (cppValue.type() == typeid(std::shared_ptr)) { + std::shared_ptr sharedPtr = std::any_cast>(cppValue); + chip::app::Clusters::MediaPlayback::Attributes::AvailableTextTracks::TypeInfo::DecodableType _cppValue = *sharedPtr; + // auto & valueSharedPtr = *sharedPtr; + *aError = CHIP_NO_ERROR; + 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(); + MCMediaPlaybackClusterTrackStruct * newElement_1; + newElement_1 = [MCMediaPlaybackClusterTrackStruct 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 = [MCMediaPlaybackClusterTrackAttributesStruct 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; + } + *aError = CHIP_ERROR_INTERNAL; + return value; +} +@end + +@implementation MCMediaPlaybackClusterGeneratedCommandListAttribute +- (void)read:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->read(context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }); +} + +- (void)subscribe:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion + minInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->subscribe( + context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }, minInterval, maxInterval); +} + +- (id _Nullable)getObjCTypeFromCpp:(std::any)cppValue errorCode:(CHIP_ERROR *)aError +{ + NSArray * value = nil; + if (cppValue.type() == typeid(std::shared_ptr)) { + std::shared_ptr sharedPtr = std::any_cast>(cppValue); + chip::app::Clusters::MediaPlayback::Attributes::GeneratedCommandList::TypeInfo::DecodableType _cppValue = *sharedPtr; + // auto & valueSharedPtr = *sharedPtr; + *aError = CHIP_NO_ERROR; + 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 numberWithUnsignedInt: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; + } + *aError = CHIP_ERROR_INTERNAL; + return value; +} +@end + +@implementation MCMediaPlaybackClusterAcceptedCommandListAttribute +- (void)read:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->read(context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }); +} + +- (void)subscribe:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion + minInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->subscribe( + context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }, minInterval, maxInterval); +} + +- (id _Nullable)getObjCTypeFromCpp:(std::any)cppValue errorCode:(CHIP_ERROR *)aError +{ + NSArray * value = nil; + if (cppValue.type() == typeid(std::shared_ptr)) { + std::shared_ptr sharedPtr = std::any_cast>(cppValue); + chip::app::Clusters::MediaPlayback::Attributes::AcceptedCommandList::TypeInfo::DecodableType _cppValue = *sharedPtr; + // auto & valueSharedPtr = *sharedPtr; + *aError = CHIP_NO_ERROR; + 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 numberWithUnsignedInt: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; + } + *aError = CHIP_ERROR_INTERNAL; + return value; +} +@end + +@implementation MCMediaPlaybackClusterEventListAttribute +- (void)read:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->read(context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }); +} + +- (void)subscribe:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion + minInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->subscribe( + context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }, minInterval, maxInterval); +} + +- (id _Nullable)getObjCTypeFromCpp:(std::any)cppValue errorCode:(CHIP_ERROR *)aError +{ + NSArray * value = nil; + if (cppValue.type() == typeid(std::shared_ptr)) { + std::shared_ptr sharedPtr = std::any_cast>(cppValue); + chip::app::Clusters::MediaPlayback::Attributes::EventList::TypeInfo::DecodableType _cppValue = *sharedPtr; + // auto & valueSharedPtr = *sharedPtr; + *aError = CHIP_NO_ERROR; + 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 numberWithUnsignedInt: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; + } + *aError = CHIP_ERROR_INTERNAL; + return value; +} +@end + +@implementation MCMediaPlaybackClusterAttributeListAttribute +- (void)read:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->read(context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }); +} + +- (void)subscribe:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion + minInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->subscribe( + context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }, minInterval, maxInterval); +} + +- (id _Nullable)getObjCTypeFromCpp:(std::any)cppValue errorCode:(CHIP_ERROR *)aError +{ + NSArray * value = nil; + if (cppValue.type() == typeid(std::shared_ptr)) { + std::shared_ptr sharedPtr = std::any_cast>(cppValue); + chip::app::Clusters::MediaPlayback::Attributes::AttributeList::TypeInfo::DecodableType _cppValue = *sharedPtr; + // auto & valueSharedPtr = *sharedPtr; + *aError = CHIP_NO_ERROR; + 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 numberWithUnsignedInt: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; + } + *aError = CHIP_ERROR_INTERNAL; + return value; +} +@end + +@implementation MCMediaPlaybackClusterFeatureMapAttribute +- (void)read:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->read(context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }); +} + +- (void)subscribe:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion + minInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->subscribe( + context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }, minInterval, maxInterval); +} + +- (id _Nullable)getObjCTypeFromCpp:(std::any)cppValue errorCode:(CHIP_ERROR *)aError +{ + NSNumber * value = nil; + if (cppValue.type() == typeid(std::shared_ptr)) { + std::shared_ptr sharedPtr = std::any_cast>(cppValue); + chip::app::Clusters::MediaPlayback::Attributes::FeatureMap::TypeInfo::DecodableType _cppValue = *sharedPtr; + // auto & valueSharedPtr = *sharedPtr; + *aError = CHIP_NO_ERROR; + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedInt:_cppValue]; + return value; + } + *aError = CHIP_ERROR_INTERNAL; + return value; +} +@end + +@implementation MCMediaPlaybackClusterClusterRevisionAttribute +- (void)read:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->read(context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }); +} + +- (void)subscribe:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion + minInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->subscribe( + context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }, minInterval, maxInterval); +} + +- (id _Nullable)getObjCTypeFromCpp:(std::any)cppValue errorCode:(CHIP_ERROR *)aError +{ + NSNumber * value = nil; + if (cppValue.type() == typeid(std::shared_ptr)) { + std::shared_ptr sharedPtr = std::any_cast>(cppValue); + chip::app::Clusters::MediaPlayback::Attributes::ClusterRevision::TypeInfo::DecodableType _cppValue = *sharedPtr; + // auto & valueSharedPtr = *sharedPtr; + *aError = CHIP_NO_ERROR; + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:_cppValue]; + return value; + } + *aError = CHIP_ERROR_INTERNAL; + return value; +} +@end + +// KeypadInput cluster attributes: + +@implementation MCKeypadInputClusterGeneratedCommandListAttribute +- (void)read:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->read(context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }); +} + +- (void)subscribe:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion + minInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->subscribe( + context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }, minInterval, maxInterval); +} + +- (id _Nullable)getObjCTypeFromCpp:(std::any)cppValue errorCode:(CHIP_ERROR *)aError +{ + NSArray * value = nil; + if (cppValue.type() == typeid(std::shared_ptr)) { + std::shared_ptr sharedPtr = std::any_cast>(cppValue); + chip::app::Clusters::KeypadInput::Attributes::GeneratedCommandList::TypeInfo::DecodableType _cppValue = *sharedPtr; + // auto & valueSharedPtr = *sharedPtr; + *aError = CHIP_NO_ERROR; + 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 numberWithUnsignedInt: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; + } + *aError = CHIP_ERROR_INTERNAL; + return value; +} +@end + +@implementation MCKeypadInputClusterAcceptedCommandListAttribute +- (void)read:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->read(context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }); +} + +- (void)subscribe:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion + minInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->subscribe( + context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }, minInterval, maxInterval); +} + +- (id _Nullable)getObjCTypeFromCpp:(std::any)cppValue errorCode:(CHIP_ERROR *)aError +{ + NSArray * value = nil; + if (cppValue.type() == typeid(std::shared_ptr)) { + std::shared_ptr sharedPtr = std::any_cast>(cppValue); + chip::app::Clusters::KeypadInput::Attributes::AcceptedCommandList::TypeInfo::DecodableType _cppValue = *sharedPtr; + // auto & valueSharedPtr = *sharedPtr; + *aError = CHIP_NO_ERROR; + 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 numberWithUnsignedInt: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; + } + *aError = CHIP_ERROR_INTERNAL; + return value; +} +@end + +@implementation MCKeypadInputClusterEventListAttribute +- (void)read:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->read(context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }); +} + +- (void)subscribe:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion + minInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->subscribe( + context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }, minInterval, maxInterval); +} + +- (id _Nullable)getObjCTypeFromCpp:(std::any)cppValue errorCode:(CHIP_ERROR *)aError +{ + NSArray * value = nil; + if (cppValue.type() == typeid(std::shared_ptr)) { + std::shared_ptr sharedPtr = std::any_cast>(cppValue); + chip::app::Clusters::KeypadInput::Attributes::EventList::TypeInfo::DecodableType _cppValue = *sharedPtr; + // auto & valueSharedPtr = *sharedPtr; + *aError = CHIP_NO_ERROR; + 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 numberWithUnsignedInt: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; + } + *aError = CHIP_ERROR_INTERNAL; + return value; +} +@end + +@implementation MCKeypadInputClusterAttributeListAttribute +- (void)read:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->read(context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }); +} + +- (void)subscribe:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion + minInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->subscribe( + context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }, minInterval, maxInterval); +} + +- (id _Nullable)getObjCTypeFromCpp:(std::any)cppValue errorCode:(CHIP_ERROR *)aError +{ + NSArray * value = nil; + if (cppValue.type() == typeid(std::shared_ptr)) { + std::shared_ptr sharedPtr = std::any_cast>(cppValue); + chip::app::Clusters::KeypadInput::Attributes::AttributeList::TypeInfo::DecodableType _cppValue = *sharedPtr; + // auto & valueSharedPtr = *sharedPtr; + *aError = CHIP_NO_ERROR; + 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 numberWithUnsignedInt: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; + } + *aError = CHIP_ERROR_INTERNAL; + return value; +} +@end + +@implementation MCKeypadInputClusterFeatureMapAttribute +- (void)read:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->read(context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }); +} + +- (void)subscribe:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion + minInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->subscribe( + context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }, minInterval, maxInterval); +} + +- (id _Nullable)getObjCTypeFromCpp:(std::any)cppValue errorCode:(CHIP_ERROR *)aError +{ + NSNumber * value = nil; + if (cppValue.type() == typeid(std::shared_ptr)) { + std::shared_ptr sharedPtr = std::any_cast>(cppValue); + chip::app::Clusters::KeypadInput::Attributes::FeatureMap::TypeInfo::DecodableType _cppValue = *sharedPtr; + // auto & valueSharedPtr = *sharedPtr; + *aError = CHIP_NO_ERROR; + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedInt:_cppValue]; + return value; + } + *aError = CHIP_ERROR_INTERNAL; + return value; +} +@end + +@implementation MCKeypadInputClusterClusterRevisionAttribute +- (void)read:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->read(context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }); +} + +- (void)subscribe:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion + minInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->subscribe( + context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }, minInterval, maxInterval); +} + +- (id _Nullable)getObjCTypeFromCpp:(std::any)cppValue errorCode:(CHIP_ERROR *)aError +{ + NSNumber * value = nil; + if (cppValue.type() == typeid(std::shared_ptr)) { + std::shared_ptr sharedPtr = std::any_cast>(cppValue); + chip::app::Clusters::KeypadInput::Attributes::ClusterRevision::TypeInfo::DecodableType _cppValue = *sharedPtr; + // auto & valueSharedPtr = *sharedPtr; + *aError = CHIP_NO_ERROR; + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:_cppValue]; + return value; + } + *aError = CHIP_ERROR_INTERNAL; + return value; +} +@end + +// ContentLauncher cluster attributes: + +@implementation MCContentLauncherClusterAcceptHeaderAttribute +- (void)read:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->read(context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }); +} + +- (void)subscribe:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion + minInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->subscribe( + context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }, minInterval, maxInterval); +} + +- (id _Nullable)getObjCTypeFromCpp:(std::any)cppValue errorCode:(CHIP_ERROR *)aError +{ + NSArray * value = nil; + if (cppValue.type() == typeid(std::shared_ptr)) { + std::shared_ptr sharedPtr = std::any_cast>(cppValue); + chip::app::Clusters::ContentLauncher::Attributes::AcceptHeader::TypeInfo::DecodableType _cppValue = *sharedPtr; + // auto & valueSharedPtr = *sharedPtr; + *aError = CHIP_NO_ERROR; + 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(); + NSString * newElement_0; + newElement_0 = AsString(entry_0); + if (newElement_0 == 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; + } + value = array_0; + } + return value; + } + *aError = CHIP_ERROR_INTERNAL; + return value; +} +@end + +@implementation MCContentLauncherClusterSupportedStreamingProtocolsAttribute +- (void)read:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->read(context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }); +} + +- (void)subscribe:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion + minInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->subscribe( + context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }, minInterval, maxInterval); +} + +- (id _Nullable)getObjCTypeFromCpp:(std::any)cppValue errorCode:(CHIP_ERROR *)aError +{ + NSNumber * value = nil; + if (cppValue.type() == typeid(std::shared_ptr)) { + std::shared_ptr sharedPtr = std::any_cast>(cppValue); + chip::app::Clusters::ContentLauncher::Attributes::SupportedStreamingProtocols::TypeInfo::DecodableType _cppValue = *sharedPtr; + // auto & valueSharedPtr = *sharedPtr; + *aError = CHIP_NO_ERROR; + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedInt:_cppValue.Raw()]; + return value; + } + *aError = CHIP_ERROR_INTERNAL; + return value; +} +@end + +@implementation MCContentLauncherClusterGeneratedCommandListAttribute +- (void)read:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->read(context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }); +} + +- (void)subscribe:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion + minInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->subscribe( + context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }, minInterval, maxInterval); +} + +- (id _Nullable)getObjCTypeFromCpp:(std::any)cppValue errorCode:(CHIP_ERROR *)aError +{ + NSArray * value = nil; + if (cppValue.type() == typeid(std::shared_ptr)) { + std::shared_ptr sharedPtr = std::any_cast>(cppValue); + chip::app::Clusters::ContentLauncher::Attributes::GeneratedCommandList::TypeInfo::DecodableType _cppValue = *sharedPtr; + // auto & valueSharedPtr = *sharedPtr; + *aError = CHIP_NO_ERROR; + 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 numberWithUnsignedInt: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; + } + *aError = CHIP_ERROR_INTERNAL; + return value; +} +@end + +@implementation MCContentLauncherClusterAcceptedCommandListAttribute +- (void)read:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->read(context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }); +} + +- (void)subscribe:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion + minInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->subscribe( + context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }, minInterval, maxInterval); +} + +- (id _Nullable)getObjCTypeFromCpp:(std::any)cppValue errorCode:(CHIP_ERROR *)aError +{ + NSArray * value = nil; + if (cppValue.type() == typeid(std::shared_ptr)) { + std::shared_ptr sharedPtr = std::any_cast>(cppValue); + chip::app::Clusters::ContentLauncher::Attributes::AcceptedCommandList::TypeInfo::DecodableType _cppValue = *sharedPtr; + // auto & valueSharedPtr = *sharedPtr; + *aError = CHIP_NO_ERROR; + 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 numberWithUnsignedInt: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; + } + *aError = CHIP_ERROR_INTERNAL; + return value; +} +@end + +@implementation MCContentLauncherClusterEventListAttribute +- (void)read:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->read(context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }); +} + +- (void)subscribe:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion + minInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->subscribe( + context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }, minInterval, maxInterval); +} + +- (id _Nullable)getObjCTypeFromCpp:(std::any)cppValue errorCode:(CHIP_ERROR *)aError +{ + NSArray * value = nil; + if (cppValue.type() == typeid(std::shared_ptr)) { + std::shared_ptr sharedPtr = std::any_cast>(cppValue); + chip::app::Clusters::ContentLauncher::Attributes::EventList::TypeInfo::DecodableType _cppValue = *sharedPtr; + // auto & valueSharedPtr = *sharedPtr; + *aError = CHIP_NO_ERROR; + 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 numberWithUnsignedInt: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; + } + *aError = CHIP_ERROR_INTERNAL; + return value; +} +@end + +@implementation MCContentLauncherClusterAttributeListAttribute +- (void)read:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->read(context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }); +} + +- (void)subscribe:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion + minInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->subscribe( + context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }, minInterval, maxInterval); +} + +- (id _Nullable)getObjCTypeFromCpp:(std::any)cppValue errorCode:(CHIP_ERROR *)aError +{ + NSArray * value = nil; + if (cppValue.type() == typeid(std::shared_ptr)) { + std::shared_ptr sharedPtr = std::any_cast>(cppValue); + chip::app::Clusters::ContentLauncher::Attributes::AttributeList::TypeInfo::DecodableType _cppValue = *sharedPtr; + // auto & valueSharedPtr = *sharedPtr; + *aError = CHIP_NO_ERROR; + 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 numberWithUnsignedInt: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; + } + *aError = CHIP_ERROR_INTERNAL; + return value; +} +@end + +@implementation MCContentLauncherClusterFeatureMapAttribute +- (void)read:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->read(context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }); +} + +- (void)subscribe:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion + minInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->subscribe( + context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }, minInterval, maxInterval); +} + +- (id _Nullable)getObjCTypeFromCpp:(std::any)cppValue errorCode:(CHIP_ERROR *)aError +{ + NSNumber * value = nil; + if (cppValue.type() == typeid(std::shared_ptr)) { + std::shared_ptr sharedPtr = std::any_cast>(cppValue); + chip::app::Clusters::ContentLauncher::Attributes::FeatureMap::TypeInfo::DecodableType _cppValue = *sharedPtr; + // auto & valueSharedPtr = *sharedPtr; + *aError = CHIP_NO_ERROR; + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedInt:_cppValue]; + return value; + } + *aError = CHIP_ERROR_INTERNAL; + return value; +} +@end + +@implementation MCContentLauncherClusterClusterRevisionAttribute +- (void)read:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->read(context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }); +} + +- (void)subscribe:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion + minInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->subscribe( + context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }, minInterval, maxInterval); +} + +- (id _Nullable)getObjCTypeFromCpp:(std::any)cppValue errorCode:(CHIP_ERROR *)aError +{ + NSNumber * value = nil; + if (cppValue.type() == typeid(std::shared_ptr)) { + std::shared_ptr sharedPtr = std::any_cast>(cppValue); + chip::app::Clusters::ContentLauncher::Attributes::ClusterRevision::TypeInfo::DecodableType _cppValue = *sharedPtr; + // auto & valueSharedPtr = *sharedPtr; + *aError = CHIP_NO_ERROR; + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:_cppValue]; + return value; + } + *aError = CHIP_ERROR_INTERNAL; + return value; +} +@end + +// ApplicationLauncher cluster attributes: + +@implementation MCApplicationLauncherClusterCatalogListAttribute +- (void)read:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->read(context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }); +} + +- (void)subscribe:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion + minInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->subscribe( + context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }, minInterval, maxInterval); +} + +- (id _Nullable)getObjCTypeFromCpp:(std::any)cppValue errorCode:(CHIP_ERROR *)aError +{ + NSArray * value = nil; + if (cppValue.type() == typeid(std::shared_ptr)) { + std::shared_ptr sharedPtr = std::any_cast>(cppValue); + chip::app::Clusters::ApplicationLauncher::Attributes::CatalogList::TypeInfo::DecodableType _cppValue = *sharedPtr; + // auto & valueSharedPtr = *sharedPtr; + *aError = CHIP_NO_ERROR; + 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 numberWithUnsignedShort: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; + } + *aError = CHIP_ERROR_INTERNAL; + return value; +} +@end + +@implementation MCApplicationLauncherClusterCurrentAppAttribute +- (void)read:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->read(context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }); +} + +- (void)subscribe:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion + minInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->subscribe( + context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }, minInterval, maxInterval); +} + +- (id _Nullable)getObjCTypeFromCpp:(std::any)cppValue errorCode:(CHIP_ERROR *)aError +{ + MCApplicationLauncherClusterApplicationEPStruct * value = nil; + if (cppValue.type() == typeid(std::shared_ptr)) { + std::shared_ptr sharedPtr = std::any_cast>(cppValue); + chip::app::Clusters::ApplicationLauncher::Attributes::CurrentApp::TypeInfo::DecodableType _cppValue = *sharedPtr; + // auto & valueSharedPtr = *sharedPtr; + *aError = CHIP_NO_ERROR; + MCApplicationLauncherClusterApplicationEPStruct * _Nullable value; + if (_cppValue.IsNull()) { + value = nil; + } else { + value = [MCApplicationLauncherClusterApplicationEPStruct new]; + value.application = [MCApplicationLauncherClusterApplicationStruct new]; + value.application.catalogVendorID = [NSNumber numberWithUnsignedShort:_cppValue.Value().application.catalogVendorID]; + value.application.applicationID = AsString(_cppValue.Value().application.applicationID); + if (value.application.applicationID == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; + return nil; + } + if (_cppValue.Value().endpoint.HasValue()) { + value.endpoint = [NSNumber numberWithUnsignedShort:_cppValue.Value().endpoint.Value()]; + } else { + value.endpoint = nil; + } + } + return value; + } + *aError = CHIP_ERROR_INTERNAL; + return value; +} +@end + +@implementation MCApplicationLauncherClusterGeneratedCommandListAttribute +- (void)read:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->read(context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }); +} + +- (void)subscribe:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion + minInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->subscribe( + context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }, minInterval, maxInterval); +} + +- (id _Nullable)getObjCTypeFromCpp:(std::any)cppValue errorCode:(CHIP_ERROR *)aError +{ + NSArray * value = nil; + if (cppValue.type() == typeid(std::shared_ptr)) { + std::shared_ptr sharedPtr = std::any_cast>(cppValue); + chip::app::Clusters::ApplicationLauncher::Attributes::GeneratedCommandList::TypeInfo::DecodableType _cppValue = *sharedPtr; + // auto & valueSharedPtr = *sharedPtr; + *aError = CHIP_NO_ERROR; + 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 numberWithUnsignedInt: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; + } + *aError = CHIP_ERROR_INTERNAL; + return value; +} +@end + +@implementation MCApplicationLauncherClusterAcceptedCommandListAttribute +- (void)read:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->read(context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }); +} + +- (void)subscribe:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion + minInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->subscribe( + context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }, minInterval, maxInterval); +} + +- (id _Nullable)getObjCTypeFromCpp:(std::any)cppValue errorCode:(CHIP_ERROR *)aError +{ + NSArray * value = nil; + if (cppValue.type() == typeid(std::shared_ptr)) { + std::shared_ptr sharedPtr = std::any_cast>(cppValue); + chip::app::Clusters::ApplicationLauncher::Attributes::AcceptedCommandList::TypeInfo::DecodableType _cppValue = *sharedPtr; + // auto & valueSharedPtr = *sharedPtr; + *aError = CHIP_NO_ERROR; + 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 numberWithUnsignedInt: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; + } + *aError = CHIP_ERROR_INTERNAL; + return value; +} +@end + +@implementation MCApplicationLauncherClusterEventListAttribute +- (void)read:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->read(context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }); +} + +- (void)subscribe:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion + minInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->subscribe( + context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }, minInterval, maxInterval); +} + +- (id _Nullable)getObjCTypeFromCpp:(std::any)cppValue errorCode:(CHIP_ERROR *)aError +{ + NSArray * value = nil; + if (cppValue.type() == typeid(std::shared_ptr)) { + std::shared_ptr sharedPtr = std::any_cast>(cppValue); + chip::app::Clusters::ApplicationLauncher::Attributes::EventList::TypeInfo::DecodableType _cppValue = *sharedPtr; + // auto & valueSharedPtr = *sharedPtr; + *aError = CHIP_NO_ERROR; + 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 numberWithUnsignedInt: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; + } + *aError = CHIP_ERROR_INTERNAL; + return value; +} +@end + +@implementation MCApplicationLauncherClusterAttributeListAttribute +- (void)read:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->read(context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }); +} + +- (void)subscribe:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion + minInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->subscribe( + context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }, minInterval, maxInterval); +} + +- (id _Nullable)getObjCTypeFromCpp:(std::any)cppValue errorCode:(CHIP_ERROR *)aError +{ + NSArray * value = nil; + if (cppValue.type() == typeid(std::shared_ptr)) { + std::shared_ptr sharedPtr = std::any_cast>(cppValue); + chip::app::Clusters::ApplicationLauncher::Attributes::AttributeList::TypeInfo::DecodableType _cppValue = *sharedPtr; + // auto & valueSharedPtr = *sharedPtr; + *aError = CHIP_NO_ERROR; + 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 numberWithUnsignedInt: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; + } + *aError = CHIP_ERROR_INTERNAL; + return value; +} +@end + +@implementation MCApplicationLauncherClusterFeatureMapAttribute +- (void)read:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->read(context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }); +} + +- (void)subscribe:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion + minInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->subscribe( + context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }, minInterval, maxInterval); +} + +- (id _Nullable)getObjCTypeFromCpp:(std::any)cppValue errorCode:(CHIP_ERROR *)aError +{ + NSNumber * value = nil; + if (cppValue.type() == typeid(std::shared_ptr)) { + std::shared_ptr sharedPtr = std::any_cast>(cppValue); + chip::app::Clusters::ApplicationLauncher::Attributes::FeatureMap::TypeInfo::DecodableType _cppValue = *sharedPtr; + // auto & valueSharedPtr = *sharedPtr; + *aError = CHIP_NO_ERROR; + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedInt:_cppValue]; + return value; + } + *aError = CHIP_ERROR_INTERNAL; + return value; +} +@end + +@implementation MCApplicationLauncherClusterClusterRevisionAttribute +- (void)read:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->read(context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }); +} + +- (void)subscribe:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion + minInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->subscribe( + context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }, minInterval, maxInterval); +} + +- (id _Nullable)getObjCTypeFromCpp:(std::any)cppValue errorCode:(CHIP_ERROR *)aError +{ + NSNumber * value = nil; + if (cppValue.type() == typeid(std::shared_ptr)) { + std::shared_ptr sharedPtr = std::any_cast>(cppValue); + chip::app::Clusters::ApplicationLauncher::Attributes::ClusterRevision::TypeInfo::DecodableType _cppValue = *sharedPtr; + // auto & valueSharedPtr = *sharedPtr; + *aError = CHIP_NO_ERROR; + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:_cppValue]; + return value; + } + *aError = CHIP_ERROR_INTERNAL; + return value; +} +@end + +// ApplicationBasic cluster attributes: + +@implementation MCApplicationBasicClusterVendorNameAttribute +- (void)read:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->read(context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }); +} + +- (void)subscribe:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion + minInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->subscribe( + context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }, minInterval, maxInterval); +} + +- (id _Nullable)getObjCTypeFromCpp:(std::any)cppValue errorCode:(CHIP_ERROR *)aError +{ + NSString * value = nil; + if (cppValue.type() == typeid(std::shared_ptr)) { + std::shared_ptr sharedPtr = std::any_cast>(cppValue); + chip::app::Clusters::ApplicationBasic::Attributes::VendorName::TypeInfo::DecodableType _cppValue = *sharedPtr; + // auto & valueSharedPtr = *sharedPtr; + *aError = CHIP_NO_ERROR; + NSString * _Nonnull value; + value = AsString(_cppValue); + if (value == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; + return nil; + } + return value; + } + *aError = CHIP_ERROR_INTERNAL; + return value; +} +@end + +@implementation MCApplicationBasicClusterVendorIDAttribute +- (void)read:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->read(context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }); +} + +- (void)subscribe:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion + minInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->subscribe( + context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }, minInterval, maxInterval); +} + +- (id _Nullable)getObjCTypeFromCpp:(std::any)cppValue errorCode:(CHIP_ERROR *)aError +{ + NSNumber * value = nil; + if (cppValue.type() == typeid(std::shared_ptr)) { + std::shared_ptr sharedPtr = std::any_cast>(cppValue); + chip::app::Clusters::ApplicationBasic::Attributes::VendorID::TypeInfo::DecodableType _cppValue = *sharedPtr; + // auto & valueSharedPtr = *sharedPtr; + *aError = CHIP_NO_ERROR; + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:chip::to_underlying(_cppValue)]; + return value; + } + *aError = CHIP_ERROR_INTERNAL; + return value; +} +@end + +@implementation MCApplicationBasicClusterApplicationNameAttribute +- (void)read:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->read(context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }); +} + +- (void)subscribe:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion + minInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->subscribe( + context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }, minInterval, maxInterval); +} + +- (id _Nullable)getObjCTypeFromCpp:(std::any)cppValue errorCode:(CHIP_ERROR *)aError +{ + NSString * value = nil; + if (cppValue.type() == typeid(std::shared_ptr)) { + std::shared_ptr sharedPtr = std::any_cast>(cppValue); + chip::app::Clusters::ApplicationBasic::Attributes::ApplicationName::TypeInfo::DecodableType _cppValue = *sharedPtr; + // auto & valueSharedPtr = *sharedPtr; + *aError = CHIP_NO_ERROR; + NSString * _Nonnull value; + value = AsString(_cppValue); + if (value == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; + return nil; + } + return value; + } + *aError = CHIP_ERROR_INTERNAL; + return value; +} +@end + +@implementation MCApplicationBasicClusterProductIDAttribute +- (void)read:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->read(context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }); +} + +- (void)subscribe:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion + minInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->subscribe( + context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }, minInterval, maxInterval); +} + +- (id _Nullable)getObjCTypeFromCpp:(std::any)cppValue errorCode:(CHIP_ERROR *)aError +{ + NSNumber * value = nil; + if (cppValue.type() == typeid(std::shared_ptr)) { + std::shared_ptr sharedPtr = std::any_cast>(cppValue); + chip::app::Clusters::ApplicationBasic::Attributes::ProductID::TypeInfo::DecodableType _cppValue = *sharedPtr; + // auto & valueSharedPtr = *sharedPtr; + *aError = CHIP_NO_ERROR; + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:_cppValue]; + return value; + } + *aError = CHIP_ERROR_INTERNAL; + return value; +} +@end + +@implementation MCApplicationBasicClusterApplicationAttribute +- (void)read:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->read(context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }); +} + +- (void)subscribe:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion + minInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->subscribe( + context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }, minInterval, maxInterval); +} + +- (id _Nullable)getObjCTypeFromCpp:(std::any)cppValue errorCode:(CHIP_ERROR *)aError +{ + MCApplicationBasicClusterApplicationStruct * value = nil; + if (cppValue.type() == typeid(std::shared_ptr)) { + std::shared_ptr sharedPtr = std::any_cast>(cppValue); + chip::app::Clusters::ApplicationBasic::Attributes::Application::TypeInfo::DecodableType _cppValue = *sharedPtr; + // auto & valueSharedPtr = *sharedPtr; + *aError = CHIP_NO_ERROR; + MCApplicationBasicClusterApplicationStruct * _Nonnull value; + value = [MCApplicationBasicClusterApplicationStruct new]; + value.catalogVendorID = [NSNumber numberWithUnsignedShort:_cppValue.catalogVendorID]; + value.applicationID = AsString(_cppValue.applicationID); + if (value.applicationID == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; + return nil; + } + return value; + } + *aError = CHIP_ERROR_INTERNAL; + return value; +} +@end + +@implementation MCApplicationBasicClusterStatusAttribute +- (void)read:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->read(context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }); +} + +- (void)subscribe:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion + minInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->subscribe( + context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }, minInterval, maxInterval); +} + +- (id _Nullable)getObjCTypeFromCpp:(std::any)cppValue errorCode:(CHIP_ERROR *)aError +{ + NSNumber * value = nil; + if (cppValue.type() == typeid(std::shared_ptr)) { + std::shared_ptr sharedPtr = std::any_cast>(cppValue); + chip::app::Clusters::ApplicationBasic::Attributes::Status::TypeInfo::DecodableType _cppValue = *sharedPtr; + // auto & valueSharedPtr = *sharedPtr; + *aError = CHIP_NO_ERROR; + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(_cppValue)]; + return value; + } + *aError = CHIP_ERROR_INTERNAL; + return value; +} +@end + +@implementation MCApplicationBasicClusterApplicationVersionAttribute +- (void)read:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->read(context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }); +} + +- (void)subscribe:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion + minInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->subscribe( + context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }, minInterval, maxInterval); +} + +- (id _Nullable)getObjCTypeFromCpp:(std::any)cppValue errorCode:(CHIP_ERROR *)aError +{ + NSString * value = nil; + if (cppValue.type() == typeid(std::shared_ptr)) { + std::shared_ptr sharedPtr = std::any_cast>(cppValue); + chip::app::Clusters::ApplicationBasic::Attributes::ApplicationVersion::TypeInfo::DecodableType _cppValue = *sharedPtr; + // auto & valueSharedPtr = *sharedPtr; + *aError = CHIP_NO_ERROR; + NSString * _Nonnull value; + value = AsString(_cppValue); + if (value == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; + return nil; + } + return value; + } + *aError = CHIP_ERROR_INTERNAL; + return value; +} +@end + +@implementation MCApplicationBasicClusterAllowedVendorListAttribute +- (void)read:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->read(context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }); +} + +- (void)subscribe:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion + minInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->subscribe( + context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }, minInterval, maxInterval); +} + +- (id _Nullable)getObjCTypeFromCpp:(std::any)cppValue errorCode:(CHIP_ERROR *)aError +{ + NSArray * value = nil; + if (cppValue.type() == typeid(std::shared_ptr)) { + std::shared_ptr sharedPtr = std::any_cast>(cppValue); + chip::app::Clusters::ApplicationBasic::Attributes::AllowedVendorList::TypeInfo::DecodableType _cppValue = *sharedPtr; + // auto & valueSharedPtr = *sharedPtr; + *aError = CHIP_NO_ERROR; + 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 numberWithUnsignedShort: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; + } + *aError = CHIP_ERROR_INTERNAL; + return value; +} +@end + +@implementation MCApplicationBasicClusterGeneratedCommandListAttribute +- (void)read:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->read(context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }); +} + +- (void)subscribe:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion + minInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->subscribe( + context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }, minInterval, maxInterval); +} + +- (id _Nullable)getObjCTypeFromCpp:(std::any)cppValue errorCode:(CHIP_ERROR *)aError +{ + NSArray * value = nil; + if (cppValue.type() == typeid(std::shared_ptr)) { + std::shared_ptr sharedPtr = std::any_cast>(cppValue); + chip::app::Clusters::ApplicationBasic::Attributes::GeneratedCommandList::TypeInfo::DecodableType _cppValue = *sharedPtr; + // auto & valueSharedPtr = *sharedPtr; + *aError = CHIP_NO_ERROR; + 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 numberWithUnsignedInt: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; + } + *aError = CHIP_ERROR_INTERNAL; + return value; +} +@end + +@implementation MCApplicationBasicClusterAcceptedCommandListAttribute +- (void)read:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->read(context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }); +} + +- (void)subscribe:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion + minInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->subscribe( + context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }, minInterval, maxInterval); +} + +- (id _Nullable)getObjCTypeFromCpp:(std::any)cppValue errorCode:(CHIP_ERROR *)aError +{ + NSArray * value = nil; + if (cppValue.type() == typeid(std::shared_ptr)) { + std::shared_ptr sharedPtr = std::any_cast>(cppValue); + chip::app::Clusters::ApplicationBasic::Attributes::AcceptedCommandList::TypeInfo::DecodableType _cppValue = *sharedPtr; + // auto & valueSharedPtr = *sharedPtr; + *aError = CHIP_NO_ERROR; + 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 numberWithUnsignedInt: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; + } + *aError = CHIP_ERROR_INTERNAL; + return value; +} +@end + +@implementation MCApplicationBasicClusterEventListAttribute +- (void)read:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->read(context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }); +} + +- (void)subscribe:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion + minInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->subscribe( + context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }, minInterval, maxInterval); +} + +- (id _Nullable)getObjCTypeFromCpp:(std::any)cppValue errorCode:(CHIP_ERROR *)aError +{ + NSArray * value = nil; + if (cppValue.type() == typeid(std::shared_ptr)) { + std::shared_ptr sharedPtr = std::any_cast>(cppValue); + chip::app::Clusters::ApplicationBasic::Attributes::EventList::TypeInfo::DecodableType _cppValue = *sharedPtr; + // auto & valueSharedPtr = *sharedPtr; + *aError = CHIP_NO_ERROR; + 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 numberWithUnsignedInt: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; + } + *aError = CHIP_ERROR_INTERNAL; + return value; +} +@end + +@implementation MCApplicationBasicClusterAttributeListAttribute +- (void)read:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->read(context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }); +} + +- (void)subscribe:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion + minInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->subscribe( + context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }, minInterval, maxInterval); +} + +- (id _Nullable)getObjCTypeFromCpp:(std::any)cppValue errorCode:(CHIP_ERROR *)aError +{ + NSArray * value = nil; + if (cppValue.type() == typeid(std::shared_ptr)) { + std::shared_ptr sharedPtr = std::any_cast>(cppValue); + chip::app::Clusters::ApplicationBasic::Attributes::AttributeList::TypeInfo::DecodableType _cppValue = *sharedPtr; + // auto & valueSharedPtr = *sharedPtr; + *aError = CHIP_NO_ERROR; + 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 numberWithUnsignedInt: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; + } + *aError = CHIP_ERROR_INTERNAL; + return value; +} +@end + +@implementation MCApplicationBasicClusterFeatureMapAttribute +- (void)read:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->read(context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }); +} + +- (void)subscribe:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion + minInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->subscribe( + context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }, minInterval, maxInterval); +} + +- (id _Nullable)getObjCTypeFromCpp:(std::any)cppValue errorCode:(CHIP_ERROR *)aError +{ + NSNumber * value = nil; + if (cppValue.type() == typeid(std::shared_ptr)) { + std::shared_ptr sharedPtr = std::any_cast>(cppValue); + chip::app::Clusters::ApplicationBasic::Attributes::FeatureMap::TypeInfo::DecodableType _cppValue = *sharedPtr; + // auto & valueSharedPtr = *sharedPtr; + *aError = CHIP_NO_ERROR; + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedInt:_cppValue]; + return value; + } + *aError = CHIP_ERROR_INTERNAL; + return value; +} +@end + +@implementation MCApplicationBasicClusterClusterRevisionAttribute +- (void)read:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->read(context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }); +} + +- (void)subscribe:(void * _Nullable)context + completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion + minInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval +{ + MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, + [self](std::any cppValue, CHIP_ERROR * errPtr) { + return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; + }); + mcAttribute->subscribe( + context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { + completion(context, before, after, err); + delete mcAttribute; + }, minInterval, maxInterval); +} + +- (id _Nullable)getObjCTypeFromCpp:(std::any)cppValue errorCode:(CHIP_ERROR *)aError +{ + NSNumber * value = nil; + if (cppValue.type() == typeid(std::shared_ptr)) { + std::shared_ptr sharedPtr = std::any_cast>(cppValue); + chip::app::Clusters::ApplicationBasic::Attributes::ClusterRevision::TypeInfo::DecodableType _cppValue = *sharedPtr; + // auto & valueSharedPtr = *sharedPtr; + *aError = CHIP_NO_ERROR; + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:_cppValue]; + return value; + } + *aError = CHIP_ERROR_INTERNAL; + return value; +} +@end diff --git a/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/zap-generated/MCClusterObjects.h b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/zap-generated/MCClusterObjects.h new file mode 100644 index 00000000000000..7593df0ebe1331 --- /dev/null +++ b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/zap-generated/MCClusterObjects.h @@ -0,0 +1,614 @@ +/* + * + * Copyright (c) 2022 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// THIS FILE IS GENERATED BY ZAP + +#import "../MCCluster.h" +#import "../MCCommandObjects.h" +#import "MCAttributeObjects.h" +#import + +#ifndef MCClusterObjects_h +#define MCClusterObjects_h + +// OnOff cluster: + +@interface MCOnOffCluster : MCCluster + +// OnOff cluster commands: + +// OnOff cluster attributes: + +/** + * @brief Returns non-nil pointer to MCOnOffClusterOnOffAttribute if supported, nil otherwise. + */ +- (MCOnOffClusterOnOffAttribute * _Nullable)onOffAttribute; + +/** + * @brief Returns non-nil pointer to MCOnOffClusterGlobalSceneControlAttribute if supported, nil otherwise. + */ +- (MCOnOffClusterGlobalSceneControlAttribute * _Nullable)globalSceneControlAttribute; + +/** + * @brief Returns non-nil pointer to MCOnOffClusterOnTimeAttribute if supported, nil otherwise. + */ +- (MCOnOffClusterOnTimeAttribute * _Nullable)onTimeAttribute; + +/** + * @brief Returns non-nil pointer to MCOnOffClusterOffWaitTimeAttribute if supported, nil otherwise. + */ +- (MCOnOffClusterOffWaitTimeAttribute * _Nullable)offWaitTimeAttribute; + +/** + * @brief Returns non-nil pointer to MCOnOffClusterStartUpOnOffAttribute if supported, nil otherwise. + */ +- (MCOnOffClusterStartUpOnOffAttribute * _Nullable)startUpOnOffAttribute; + +/** + * @brief Returns non-nil pointer to MCOnOffClusterGeneratedCommandListAttribute if supported, nil otherwise. + */ +- (MCOnOffClusterGeneratedCommandListAttribute * _Nullable)generatedCommandListAttribute; + +/** + * @brief Returns non-nil pointer to MCOnOffClusterAcceptedCommandListAttribute if supported, nil otherwise. + */ +- (MCOnOffClusterAcceptedCommandListAttribute * _Nullable)acceptedCommandListAttribute; + +/** + * @brief Returns non-nil pointer to MCOnOffClusterEventListAttribute if supported, nil otherwise. + */ +- (MCOnOffClusterEventListAttribute * _Nullable)eventListAttribute; + +/** + * @brief Returns non-nil pointer to MCOnOffClusterAttributeListAttribute if supported, nil otherwise. + */ +- (MCOnOffClusterAttributeListAttribute * _Nullable)attributeListAttribute; + +/** + * @brief Returns non-nil pointer to MCOnOffClusterFeatureMapAttribute if supported, nil otherwise. + */ +- (MCOnOffClusterFeatureMapAttribute * _Nullable)featureMapAttribute; + +/** + * @brief Returns non-nil pointer to MCOnOffClusterClusterRevisionAttribute if supported, nil otherwise. + */ +- (MCOnOffClusterClusterRevisionAttribute * _Nullable)clusterRevisionAttribute; +@end + +// LevelControl cluster: + +@interface MCLevelControlCluster : MCCluster + +// LevelControl cluster commands: + +// LevelControl cluster attributes: + +/** + * @brief Returns non-nil pointer to MCLevelControlClusterCurrentLevelAttribute if supported, nil otherwise. + */ +- (MCLevelControlClusterCurrentLevelAttribute * _Nullable)currentLevelAttribute; + +/** + * @brief Returns non-nil pointer to MCLevelControlClusterRemainingTimeAttribute if supported, nil otherwise. + */ +- (MCLevelControlClusterRemainingTimeAttribute * _Nullable)remainingTimeAttribute; + +/** + * @brief Returns non-nil pointer to MCLevelControlClusterMinLevelAttribute if supported, nil otherwise. + */ +- (MCLevelControlClusterMinLevelAttribute * _Nullable)minLevelAttribute; + +/** + * @brief Returns non-nil pointer to MCLevelControlClusterMaxLevelAttribute if supported, nil otherwise. + */ +- (MCLevelControlClusterMaxLevelAttribute * _Nullable)maxLevelAttribute; + +/** + * @brief Returns non-nil pointer to MCLevelControlClusterCurrentFrequencyAttribute if supported, nil otherwise. + */ +- (MCLevelControlClusterCurrentFrequencyAttribute * _Nullable)currentFrequencyAttribute; + +/** + * @brief Returns non-nil pointer to MCLevelControlClusterMinFrequencyAttribute if supported, nil otherwise. + */ +- (MCLevelControlClusterMinFrequencyAttribute * _Nullable)minFrequencyAttribute; + +/** + * @brief Returns non-nil pointer to MCLevelControlClusterMaxFrequencyAttribute if supported, nil otherwise. + */ +- (MCLevelControlClusterMaxFrequencyAttribute * _Nullable)maxFrequencyAttribute; + +/** + * @brief Returns non-nil pointer to MCLevelControlClusterOptionsAttribute if supported, nil otherwise. + */ +- (MCLevelControlClusterOptionsAttribute * _Nullable)optionsAttribute; + +/** + * @brief Returns non-nil pointer to MCLevelControlClusterOnOffTransitionTimeAttribute if supported, nil otherwise. + */ +- (MCLevelControlClusterOnOffTransitionTimeAttribute * _Nullable)onOffTransitionTimeAttribute; + +/** + * @brief Returns non-nil pointer to MCLevelControlClusterOnLevelAttribute if supported, nil otherwise. + */ +- (MCLevelControlClusterOnLevelAttribute * _Nullable)onLevelAttribute; + +/** + * @brief Returns non-nil pointer to MCLevelControlClusterOnTransitionTimeAttribute if supported, nil otherwise. + */ +- (MCLevelControlClusterOnTransitionTimeAttribute * _Nullable)onTransitionTimeAttribute; + +/** + * @brief Returns non-nil pointer to MCLevelControlClusterOffTransitionTimeAttribute if supported, nil otherwise. + */ +- (MCLevelControlClusterOffTransitionTimeAttribute * _Nullable)offTransitionTimeAttribute; + +/** + * @brief Returns non-nil pointer to MCLevelControlClusterDefaultMoveRateAttribute if supported, nil otherwise. + */ +- (MCLevelControlClusterDefaultMoveRateAttribute * _Nullable)defaultMoveRateAttribute; + +/** + * @brief Returns non-nil pointer to MCLevelControlClusterStartUpCurrentLevelAttribute if supported, nil otherwise. + */ +- (MCLevelControlClusterStartUpCurrentLevelAttribute * _Nullable)startUpCurrentLevelAttribute; + +/** + * @brief Returns non-nil pointer to MCLevelControlClusterGeneratedCommandListAttribute if supported, nil otherwise. + */ +- (MCLevelControlClusterGeneratedCommandListAttribute * _Nullable)generatedCommandListAttribute; + +/** + * @brief Returns non-nil pointer to MCLevelControlClusterAcceptedCommandListAttribute if supported, nil otherwise. + */ +- (MCLevelControlClusterAcceptedCommandListAttribute * _Nullable)acceptedCommandListAttribute; + +/** + * @brief Returns non-nil pointer to MCLevelControlClusterEventListAttribute if supported, nil otherwise. + */ +- (MCLevelControlClusterEventListAttribute * _Nullable)eventListAttribute; + +/** + * @brief Returns non-nil pointer to MCLevelControlClusterAttributeListAttribute if supported, nil otherwise. + */ +- (MCLevelControlClusterAttributeListAttribute * _Nullable)attributeListAttribute; + +/** + * @brief Returns non-nil pointer to MCLevelControlClusterFeatureMapAttribute if supported, nil otherwise. + */ +- (MCLevelControlClusterFeatureMapAttribute * _Nullable)featureMapAttribute; + +/** + * @brief Returns non-nil pointer to MCLevelControlClusterClusterRevisionAttribute if supported, nil otherwise. + */ +- (MCLevelControlClusterClusterRevisionAttribute * _Nullable)clusterRevisionAttribute; +@end + +// WakeOnLan cluster: + +@interface MCWakeOnLanCluster : MCCluster + +// WakeOnLan cluster commands: + +// WakeOnLan cluster attributes: + +/** + * @brief Returns non-nil pointer to MCWakeOnLanClusterMACAddressAttribute if supported, nil otherwise. + */ +- (MCWakeOnLanClusterMACAddressAttribute * _Nullable)macAddressAttribute; + +/** + * @brief Returns non-nil pointer to MCWakeOnLanClusterLinkLocalAddressAttribute if supported, nil otherwise. + */ +- (MCWakeOnLanClusterLinkLocalAddressAttribute * _Nullable)linkLocalAddressAttribute; + +/** + * @brief Returns non-nil pointer to MCWakeOnLanClusterGeneratedCommandListAttribute if supported, nil otherwise. + */ +- (MCWakeOnLanClusterGeneratedCommandListAttribute * _Nullable)generatedCommandListAttribute; + +/** + * @brief Returns non-nil pointer to MCWakeOnLanClusterAcceptedCommandListAttribute if supported, nil otherwise. + */ +- (MCWakeOnLanClusterAcceptedCommandListAttribute * _Nullable)acceptedCommandListAttribute; + +/** + * @brief Returns non-nil pointer to MCWakeOnLanClusterEventListAttribute if supported, nil otherwise. + */ +- (MCWakeOnLanClusterEventListAttribute * _Nullable)eventListAttribute; + +/** + * @brief Returns non-nil pointer to MCWakeOnLanClusterAttributeListAttribute if supported, nil otherwise. + */ +- (MCWakeOnLanClusterAttributeListAttribute * _Nullable)attributeListAttribute; + +/** + * @brief Returns non-nil pointer to MCWakeOnLanClusterFeatureMapAttribute if supported, nil otherwise. + */ +- (MCWakeOnLanClusterFeatureMapAttribute * _Nullable)featureMapAttribute; + +/** + * @brief Returns non-nil pointer to MCWakeOnLanClusterClusterRevisionAttribute if supported, nil otherwise. + */ +- (MCWakeOnLanClusterClusterRevisionAttribute * _Nullable)clusterRevisionAttribute; +@end + +// TargetNavigator cluster: + +@interface MCTargetNavigatorCluster : MCCluster + +// TargetNavigator cluster commands: + +// TargetNavigator cluster attributes: + +/** + * @brief Returns non-nil pointer to MCTargetNavigatorClusterTargetListAttribute if supported, nil otherwise. + */ +- (MCTargetNavigatorClusterTargetListAttribute * _Nullable)targetListAttribute; + +/** + * @brief Returns non-nil pointer to MCTargetNavigatorClusterCurrentTargetAttribute if supported, nil otherwise. + */ +- (MCTargetNavigatorClusterCurrentTargetAttribute * _Nullable)currentTargetAttribute; + +/** + * @brief Returns non-nil pointer to MCTargetNavigatorClusterGeneratedCommandListAttribute if supported, nil otherwise. + */ +- (MCTargetNavigatorClusterGeneratedCommandListAttribute * _Nullable)generatedCommandListAttribute; + +/** + * @brief Returns non-nil pointer to MCTargetNavigatorClusterAcceptedCommandListAttribute if supported, nil otherwise. + */ +- (MCTargetNavigatorClusterAcceptedCommandListAttribute * _Nullable)acceptedCommandListAttribute; + +/** + * @brief Returns non-nil pointer to MCTargetNavigatorClusterEventListAttribute if supported, nil otherwise. + */ +- (MCTargetNavigatorClusterEventListAttribute * _Nullable)eventListAttribute; + +/** + * @brief Returns non-nil pointer to MCTargetNavigatorClusterAttributeListAttribute if supported, nil otherwise. + */ +- (MCTargetNavigatorClusterAttributeListAttribute * _Nullable)attributeListAttribute; + +/** + * @brief Returns non-nil pointer to MCTargetNavigatorClusterFeatureMapAttribute if supported, nil otherwise. + */ +- (MCTargetNavigatorClusterFeatureMapAttribute * _Nullable)featureMapAttribute; + +/** + * @brief Returns non-nil pointer to MCTargetNavigatorClusterClusterRevisionAttribute if supported, nil otherwise. + */ +- (MCTargetNavigatorClusterClusterRevisionAttribute * _Nullable)clusterRevisionAttribute; +@end + +// MediaPlayback cluster: + +@interface MCMediaPlaybackCluster : MCCluster + +// MediaPlayback cluster commands: + +// MediaPlayback cluster attributes: + +/** + * @brief Returns non-nil pointer to MCMediaPlaybackClusterCurrentStateAttribute if supported, nil otherwise. + */ +- (MCMediaPlaybackClusterCurrentStateAttribute * _Nullable)currentStateAttribute; + +/** + * @brief Returns non-nil pointer to MCMediaPlaybackClusterStartTimeAttribute if supported, nil otherwise. + */ +- (MCMediaPlaybackClusterStartTimeAttribute * _Nullable)startTimeAttribute; + +/** + * @brief Returns non-nil pointer to MCMediaPlaybackClusterDurationAttribute if supported, nil otherwise. + */ +- (MCMediaPlaybackClusterDurationAttribute * _Nullable)durationAttribute; + +/** + * @brief Returns non-nil pointer to MCMediaPlaybackClusterSampledPositionAttribute if supported, nil otherwise. + */ +- (MCMediaPlaybackClusterSampledPositionAttribute * _Nullable)sampledPositionAttribute; + +/** + * @brief Returns non-nil pointer to MCMediaPlaybackClusterPlaybackSpeedAttribute if supported, nil otherwise. + */ +- (MCMediaPlaybackClusterPlaybackSpeedAttribute * _Nullable)playbackSpeedAttribute; + +/** + * @brief Returns non-nil pointer to MCMediaPlaybackClusterSeekRangeEndAttribute if supported, nil otherwise. + */ +- (MCMediaPlaybackClusterSeekRangeEndAttribute * _Nullable)seekRangeEndAttribute; + +/** + * @brief Returns non-nil pointer to MCMediaPlaybackClusterSeekRangeStartAttribute if supported, nil otherwise. + */ +- (MCMediaPlaybackClusterSeekRangeStartAttribute * _Nullable)seekRangeStartAttribute; + +/** + * @brief Returns non-nil pointer to MCMediaPlaybackClusterActiveAudioTrackAttribute if supported, nil otherwise. + */ +- (MCMediaPlaybackClusterActiveAudioTrackAttribute * _Nullable)activeAudioTrackAttribute; + +/** + * @brief Returns non-nil pointer to MCMediaPlaybackClusterAvailableAudioTracksAttribute if supported, nil otherwise. + */ +- (MCMediaPlaybackClusterAvailableAudioTracksAttribute * _Nullable)availableAudioTracksAttribute; + +/** + * @brief Returns non-nil pointer to MCMediaPlaybackClusterActiveTextTrackAttribute if supported, nil otherwise. + */ +- (MCMediaPlaybackClusterActiveTextTrackAttribute * _Nullable)activeTextTrackAttribute; + +/** + * @brief Returns non-nil pointer to MCMediaPlaybackClusterAvailableTextTracksAttribute if supported, nil otherwise. + */ +- (MCMediaPlaybackClusterAvailableTextTracksAttribute * _Nullable)availableTextTracksAttribute; + +/** + * @brief Returns non-nil pointer to MCMediaPlaybackClusterGeneratedCommandListAttribute if supported, nil otherwise. + */ +- (MCMediaPlaybackClusterGeneratedCommandListAttribute * _Nullable)generatedCommandListAttribute; + +/** + * @brief Returns non-nil pointer to MCMediaPlaybackClusterAcceptedCommandListAttribute if supported, nil otherwise. + */ +- (MCMediaPlaybackClusterAcceptedCommandListAttribute * _Nullable)acceptedCommandListAttribute; + +/** + * @brief Returns non-nil pointer to MCMediaPlaybackClusterEventListAttribute if supported, nil otherwise. + */ +- (MCMediaPlaybackClusterEventListAttribute * _Nullable)eventListAttribute; + +/** + * @brief Returns non-nil pointer to MCMediaPlaybackClusterAttributeListAttribute if supported, nil otherwise. + */ +- (MCMediaPlaybackClusterAttributeListAttribute * _Nullable)attributeListAttribute; + +/** + * @brief Returns non-nil pointer to MCMediaPlaybackClusterFeatureMapAttribute if supported, nil otherwise. + */ +- (MCMediaPlaybackClusterFeatureMapAttribute * _Nullable)featureMapAttribute; + +/** + * @brief Returns non-nil pointer to MCMediaPlaybackClusterClusterRevisionAttribute if supported, nil otherwise. + */ +- (MCMediaPlaybackClusterClusterRevisionAttribute * _Nullable)clusterRevisionAttribute; +@end + +// KeypadInput cluster: + +@interface MCKeypadInputCluster : MCCluster + +// KeypadInput cluster commands: + +// KeypadInput cluster attributes: + +/** + * @brief Returns non-nil pointer to MCKeypadInputClusterGeneratedCommandListAttribute if supported, nil otherwise. + */ +- (MCKeypadInputClusterGeneratedCommandListAttribute * _Nullable)generatedCommandListAttribute; + +/** + * @brief Returns non-nil pointer to MCKeypadInputClusterAcceptedCommandListAttribute if supported, nil otherwise. + */ +- (MCKeypadInputClusterAcceptedCommandListAttribute * _Nullable)acceptedCommandListAttribute; + +/** + * @brief Returns non-nil pointer to MCKeypadInputClusterEventListAttribute if supported, nil otherwise. + */ +- (MCKeypadInputClusterEventListAttribute * _Nullable)eventListAttribute; + +/** + * @brief Returns non-nil pointer to MCKeypadInputClusterAttributeListAttribute if supported, nil otherwise. + */ +- (MCKeypadInputClusterAttributeListAttribute * _Nullable)attributeListAttribute; + +/** + * @brief Returns non-nil pointer to MCKeypadInputClusterFeatureMapAttribute if supported, nil otherwise. + */ +- (MCKeypadInputClusterFeatureMapAttribute * _Nullable)featureMapAttribute; + +/** + * @brief Returns non-nil pointer to MCKeypadInputClusterClusterRevisionAttribute if supported, nil otherwise. + */ +- (MCKeypadInputClusterClusterRevisionAttribute * _Nullable)clusterRevisionAttribute; +@end + +// ContentLauncher cluster: + +@interface MCContentLauncherCluster : MCCluster + +// ContentLauncher cluster commands: + +/** + * @brief Returns non-nil pointer to MCContentLauncherClusterLaunchURLCommand if supported, nil otherwise. + */ +- (MCContentLauncherClusterLaunchURLCommand * _Nullable)launchURLCommand; + +// ContentLauncher cluster attributes: + +/** + * @brief Returns non-nil pointer to MCContentLauncherClusterAcceptHeaderAttribute if supported, nil otherwise. + */ +- (MCContentLauncherClusterAcceptHeaderAttribute * _Nullable)acceptHeaderAttribute; + +/** + * @brief Returns non-nil pointer to MCContentLauncherClusterSupportedStreamingProtocolsAttribute if supported, nil otherwise. + */ +- (MCContentLauncherClusterSupportedStreamingProtocolsAttribute * _Nullable)supportedStreamingProtocolsAttribute; + +/** + * @brief Returns non-nil pointer to MCContentLauncherClusterGeneratedCommandListAttribute if supported, nil otherwise. + */ +- (MCContentLauncherClusterGeneratedCommandListAttribute * _Nullable)generatedCommandListAttribute; + +/** + * @brief Returns non-nil pointer to MCContentLauncherClusterAcceptedCommandListAttribute if supported, nil otherwise. + */ +- (MCContentLauncherClusterAcceptedCommandListAttribute * _Nullable)acceptedCommandListAttribute; + +/** + * @brief Returns non-nil pointer to MCContentLauncherClusterEventListAttribute if supported, nil otherwise. + */ +- (MCContentLauncherClusterEventListAttribute * _Nullable)eventListAttribute; + +/** + * @brief Returns non-nil pointer to MCContentLauncherClusterAttributeListAttribute if supported, nil otherwise. + */ +- (MCContentLauncherClusterAttributeListAttribute * _Nullable)attributeListAttribute; + +/** + * @brief Returns non-nil pointer to MCContentLauncherClusterFeatureMapAttribute if supported, nil otherwise. + */ +- (MCContentLauncherClusterFeatureMapAttribute * _Nullable)featureMapAttribute; + +/** + * @brief Returns non-nil pointer to MCContentLauncherClusterClusterRevisionAttribute if supported, nil otherwise. + */ +- (MCContentLauncherClusterClusterRevisionAttribute * _Nullable)clusterRevisionAttribute; +@end + +// ApplicationLauncher cluster: + +@interface MCApplicationLauncherCluster : MCCluster + +// ApplicationLauncher cluster commands: + +// ApplicationLauncher cluster attributes: + +/** + * @brief Returns non-nil pointer to MCApplicationLauncherClusterCatalogListAttribute if supported, nil otherwise. + */ +- (MCApplicationLauncherClusterCatalogListAttribute * _Nullable)catalogListAttribute; + +/** + * @brief Returns non-nil pointer to MCApplicationLauncherClusterCurrentAppAttribute if supported, nil otherwise. + */ +- (MCApplicationLauncherClusterCurrentAppAttribute * _Nullable)currentAppAttribute; + +/** + * @brief Returns non-nil pointer to MCApplicationLauncherClusterGeneratedCommandListAttribute if supported, nil otherwise. + */ +- (MCApplicationLauncherClusterGeneratedCommandListAttribute * _Nullable)generatedCommandListAttribute; + +/** + * @brief Returns non-nil pointer to MCApplicationLauncherClusterAcceptedCommandListAttribute if supported, nil otherwise. + */ +- (MCApplicationLauncherClusterAcceptedCommandListAttribute * _Nullable)acceptedCommandListAttribute; + +/** + * @brief Returns non-nil pointer to MCApplicationLauncherClusterEventListAttribute if supported, nil otherwise. + */ +- (MCApplicationLauncherClusterEventListAttribute * _Nullable)eventListAttribute; + +/** + * @brief Returns non-nil pointer to MCApplicationLauncherClusterAttributeListAttribute if supported, nil otherwise. + */ +- (MCApplicationLauncherClusterAttributeListAttribute * _Nullable)attributeListAttribute; + +/** + * @brief Returns non-nil pointer to MCApplicationLauncherClusterFeatureMapAttribute if supported, nil otherwise. + */ +- (MCApplicationLauncherClusterFeatureMapAttribute * _Nullable)featureMapAttribute; + +/** + * @brief Returns non-nil pointer to MCApplicationLauncherClusterClusterRevisionAttribute if supported, nil otherwise. + */ +- (MCApplicationLauncherClusterClusterRevisionAttribute * _Nullable)clusterRevisionAttribute; +@end + +// ApplicationBasic cluster: + +@interface MCApplicationBasicCluster : MCCluster + +// ApplicationBasic cluster commands: + +// ApplicationBasic cluster attributes: + +/** + * @brief Returns non-nil pointer to MCApplicationBasicClusterVendorNameAttribute if supported, nil otherwise. + */ +- (MCApplicationBasicClusterVendorNameAttribute * _Nullable)vendorNameAttribute; + +/** + * @brief Returns non-nil pointer to MCApplicationBasicClusterVendorIDAttribute if supported, nil otherwise. + */ +- (MCApplicationBasicClusterVendorIDAttribute * _Nullable)vendorIDAttribute; + +/** + * @brief Returns non-nil pointer to MCApplicationBasicClusterApplicationNameAttribute if supported, nil otherwise. + */ +- (MCApplicationBasicClusterApplicationNameAttribute * _Nullable)applicationNameAttribute; + +/** + * @brief Returns non-nil pointer to MCApplicationBasicClusterProductIDAttribute if supported, nil otherwise. + */ +- (MCApplicationBasicClusterProductIDAttribute * _Nullable)productIDAttribute; + +/** + * @brief Returns non-nil pointer to MCApplicationBasicClusterApplicationAttribute if supported, nil otherwise. + */ +- (MCApplicationBasicClusterApplicationAttribute * _Nullable)applicationAttribute; + +/** + * @brief Returns non-nil pointer to MCApplicationBasicClusterStatusAttribute if supported, nil otherwise. + */ +- (MCApplicationBasicClusterStatusAttribute * _Nullable)statusAttribute; + +/** + * @brief Returns non-nil pointer to MCApplicationBasicClusterApplicationVersionAttribute if supported, nil otherwise. + */ +- (MCApplicationBasicClusterApplicationVersionAttribute * _Nullable)applicationVersionAttribute; + +/** + * @brief Returns non-nil pointer to MCApplicationBasicClusterAllowedVendorListAttribute if supported, nil otherwise. + */ +- (MCApplicationBasicClusterAllowedVendorListAttribute * _Nullable)allowedVendorListAttribute; + +/** + * @brief Returns non-nil pointer to MCApplicationBasicClusterGeneratedCommandListAttribute if supported, nil otherwise. + */ +- (MCApplicationBasicClusterGeneratedCommandListAttribute * _Nullable)generatedCommandListAttribute; + +/** + * @brief Returns non-nil pointer to MCApplicationBasicClusterAcceptedCommandListAttribute if supported, nil otherwise. + */ +- (MCApplicationBasicClusterAcceptedCommandListAttribute * _Nullable)acceptedCommandListAttribute; + +/** + * @brief Returns non-nil pointer to MCApplicationBasicClusterEventListAttribute if supported, nil otherwise. + */ +- (MCApplicationBasicClusterEventListAttribute * _Nullable)eventListAttribute; + +/** + * @brief Returns non-nil pointer to MCApplicationBasicClusterAttributeListAttribute if supported, nil otherwise. + */ +- (MCApplicationBasicClusterAttributeListAttribute * _Nullable)attributeListAttribute; + +/** + * @brief Returns non-nil pointer to MCApplicationBasicClusterFeatureMapAttribute if supported, nil otherwise. + */ +- (MCApplicationBasicClusterFeatureMapAttribute * _Nullable)featureMapAttribute; + +/** + * @brief Returns non-nil pointer to MCApplicationBasicClusterClusterRevisionAttribute if supported, nil otherwise. + */ +- (MCApplicationBasicClusterClusterRevisionAttribute * _Nullable)clusterRevisionAttribute; +@end + +#endif /* MCClusterObjects_h */ \ No newline at end of file diff --git a/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/zap-generated/MCClusterObjects.mm b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/zap-generated/MCClusterObjects.mm new file mode 100644 index 00000000000000..c7fb3697d67885 --- /dev/null +++ b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/zap-generated/MCClusterObjects.mm @@ -0,0 +1,717 @@ +/* + * + * Copyright (c) 2022 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// THIS FILE IS GENERATED BY ZAP + +#import "MCClusterObjects.h" + +#import "../MCAttribute_Internal.h" +#import "../MCCluster_Internal.h" +#import "../MCCommand_Internal.h" + +#include "core/Attribute.h" +#include "core/Command.h" +#include + +#import + +// OnOff cluster: + +@implementation MCOnOffCluster + +// OnOff cluster commands: + +// OnOff cluster attributes: + +- (id)onOffAttribute +{ + void * cppAttribute = self.cppCluster->GetAttribute(chip::app::Clusters::OnOff::Attributes::OnOff::Id); + return cppAttribute != nil ? [[MCOnOffClusterOnOffAttribute alloc] initWithCppAttribute:cppAttribute] : nil; +} + +- (id)globalSceneControlAttribute +{ + void * cppAttribute = self.cppCluster->GetAttribute(chip::app::Clusters::OnOff::Attributes::GlobalSceneControl::Id); + return cppAttribute != nil ? [[MCOnOffClusterGlobalSceneControlAttribute alloc] initWithCppAttribute:cppAttribute] : nil; +} + +- (id)onTimeAttribute +{ + void * cppAttribute = self.cppCluster->GetAttribute(chip::app::Clusters::OnOff::Attributes::OnTime::Id); + return cppAttribute != nil ? [[MCOnOffClusterOnTimeAttribute alloc] initWithCppAttribute:cppAttribute] : nil; +} + +- (id)offWaitTimeAttribute +{ + void * cppAttribute = self.cppCluster->GetAttribute(chip::app::Clusters::OnOff::Attributes::OffWaitTime::Id); + return cppAttribute != nil ? [[MCOnOffClusterOffWaitTimeAttribute alloc] initWithCppAttribute:cppAttribute] : nil; +} + +- (id)startUpOnOffAttribute +{ + void * cppAttribute = self.cppCluster->GetAttribute(chip::app::Clusters::OnOff::Attributes::StartUpOnOff::Id); + return cppAttribute != nil ? [[MCOnOffClusterStartUpOnOffAttribute alloc] initWithCppAttribute:cppAttribute] : nil; +} + +- (id)generatedCommandListAttribute +{ + void * cppAttribute = self.cppCluster->GetAttribute(chip::app::Clusters::OnOff::Attributes::GeneratedCommandList::Id); + return cppAttribute != nil ? [[MCOnOffClusterGeneratedCommandListAttribute alloc] initWithCppAttribute:cppAttribute] : nil; +} + +- (id)acceptedCommandListAttribute +{ + void * cppAttribute = self.cppCluster->GetAttribute(chip::app::Clusters::OnOff::Attributes::AcceptedCommandList::Id); + return cppAttribute != nil ? [[MCOnOffClusterAcceptedCommandListAttribute alloc] initWithCppAttribute:cppAttribute] : nil; +} + +- (id)eventListAttribute +{ + void * cppAttribute = self.cppCluster->GetAttribute(chip::app::Clusters::OnOff::Attributes::EventList::Id); + return cppAttribute != nil ? [[MCOnOffClusterEventListAttribute alloc] initWithCppAttribute:cppAttribute] : nil; +} + +- (id)attributeListAttribute +{ + void * cppAttribute = self.cppCluster->GetAttribute(chip::app::Clusters::OnOff::Attributes::AttributeList::Id); + return cppAttribute != nil ? [[MCOnOffClusterAttributeListAttribute alloc] initWithCppAttribute:cppAttribute] : nil; +} + +- (id)featureMapAttribute +{ + void * cppAttribute = self.cppCluster->GetAttribute(chip::app::Clusters::OnOff::Attributes::FeatureMap::Id); + return cppAttribute != nil ? [[MCOnOffClusterFeatureMapAttribute alloc] initWithCppAttribute:cppAttribute] : nil; +} + +- (id)clusterRevisionAttribute +{ + void * cppAttribute = self.cppCluster->GetAttribute(chip::app::Clusters::OnOff::Attributes::ClusterRevision::Id); + return cppAttribute != nil ? [[MCOnOffClusterClusterRevisionAttribute alloc] initWithCppAttribute:cppAttribute] : nil; +} +@end + +// LevelControl cluster: + +@implementation MCLevelControlCluster + +// LevelControl cluster commands: + +// LevelControl cluster attributes: + +- (id)currentLevelAttribute +{ + void * cppAttribute = self.cppCluster->GetAttribute(chip::app::Clusters::LevelControl::Attributes::CurrentLevel::Id); + return cppAttribute != nil ? [[MCLevelControlClusterCurrentLevelAttribute alloc] initWithCppAttribute:cppAttribute] : nil; +} + +- (id)remainingTimeAttribute +{ + void * cppAttribute = self.cppCluster->GetAttribute(chip::app::Clusters::LevelControl::Attributes::RemainingTime::Id); + return cppAttribute != nil ? [[MCLevelControlClusterRemainingTimeAttribute alloc] initWithCppAttribute:cppAttribute] : nil; +} + +- (id)minLevelAttribute +{ + void * cppAttribute = self.cppCluster->GetAttribute(chip::app::Clusters::LevelControl::Attributes::MinLevel::Id); + return cppAttribute != nil ? [[MCLevelControlClusterMinLevelAttribute alloc] initWithCppAttribute:cppAttribute] : nil; +} + +- (id)maxLevelAttribute +{ + void * cppAttribute = self.cppCluster->GetAttribute(chip::app::Clusters::LevelControl::Attributes::MaxLevel::Id); + return cppAttribute != nil ? [[MCLevelControlClusterMaxLevelAttribute alloc] initWithCppAttribute:cppAttribute] : nil; +} + +- (id)currentFrequencyAttribute +{ + void * cppAttribute = self.cppCluster->GetAttribute(chip::app::Clusters::LevelControl::Attributes::CurrentFrequency::Id); + return cppAttribute != nil ? [[MCLevelControlClusterCurrentFrequencyAttribute alloc] initWithCppAttribute:cppAttribute] : nil; +} + +- (id)minFrequencyAttribute +{ + void * cppAttribute = self.cppCluster->GetAttribute(chip::app::Clusters::LevelControl::Attributes::MinFrequency::Id); + return cppAttribute != nil ? [[MCLevelControlClusterMinFrequencyAttribute alloc] initWithCppAttribute:cppAttribute] : nil; +} + +- (id)maxFrequencyAttribute +{ + void * cppAttribute = self.cppCluster->GetAttribute(chip::app::Clusters::LevelControl::Attributes::MaxFrequency::Id); + return cppAttribute != nil ? [[MCLevelControlClusterMaxFrequencyAttribute alloc] initWithCppAttribute:cppAttribute] : nil; +} + +- (id)optionsAttribute +{ + void * cppAttribute = self.cppCluster->GetAttribute(chip::app::Clusters::LevelControl::Attributes::Options::Id); + return cppAttribute != nil ? [[MCLevelControlClusterOptionsAttribute alloc] initWithCppAttribute:cppAttribute] : nil; +} + +- (id)onOffTransitionTimeAttribute +{ + void * cppAttribute = self.cppCluster->GetAttribute(chip::app::Clusters::LevelControl::Attributes::OnOffTransitionTime::Id); + return cppAttribute != nil ? [[MCLevelControlClusterOnOffTransitionTimeAttribute alloc] initWithCppAttribute:cppAttribute] : nil; +} + +- (id)onLevelAttribute +{ + void * cppAttribute = self.cppCluster->GetAttribute(chip::app::Clusters::LevelControl::Attributes::OnLevel::Id); + return cppAttribute != nil ? [[MCLevelControlClusterOnLevelAttribute alloc] initWithCppAttribute:cppAttribute] : nil; +} + +- (id)onTransitionTimeAttribute +{ + void * cppAttribute = self.cppCluster->GetAttribute(chip::app::Clusters::LevelControl::Attributes::OnTransitionTime::Id); + return cppAttribute != nil ? [[MCLevelControlClusterOnTransitionTimeAttribute alloc] initWithCppAttribute:cppAttribute] : nil; +} + +- (id)offTransitionTimeAttribute +{ + void * cppAttribute = self.cppCluster->GetAttribute(chip::app::Clusters::LevelControl::Attributes::OffTransitionTime::Id); + return cppAttribute != nil ? [[MCLevelControlClusterOffTransitionTimeAttribute alloc] initWithCppAttribute:cppAttribute] : nil; +} + +- (id)defaultMoveRateAttribute +{ + void * cppAttribute = self.cppCluster->GetAttribute(chip::app::Clusters::LevelControl::Attributes::DefaultMoveRate::Id); + return cppAttribute != nil ? [[MCLevelControlClusterDefaultMoveRateAttribute alloc] initWithCppAttribute:cppAttribute] : nil; +} + +- (id)startUpCurrentLevelAttribute +{ + void * cppAttribute = self.cppCluster->GetAttribute(chip::app::Clusters::LevelControl::Attributes::StartUpCurrentLevel::Id); + return cppAttribute != nil ? [[MCLevelControlClusterStartUpCurrentLevelAttribute alloc] initWithCppAttribute:cppAttribute] : nil; +} + +- (id)generatedCommandListAttribute +{ + void * cppAttribute = self.cppCluster->GetAttribute(chip::app::Clusters::LevelControl::Attributes::GeneratedCommandList::Id); + return cppAttribute != nil ? [[MCLevelControlClusterGeneratedCommandListAttribute alloc] initWithCppAttribute:cppAttribute] : nil; +} + +- (id)acceptedCommandListAttribute +{ + void * cppAttribute = self.cppCluster->GetAttribute(chip::app::Clusters::LevelControl::Attributes::AcceptedCommandList::Id); + return cppAttribute != nil ? [[MCLevelControlClusterAcceptedCommandListAttribute alloc] initWithCppAttribute:cppAttribute] : nil; +} + +- (id)eventListAttribute +{ + void * cppAttribute = self.cppCluster->GetAttribute(chip::app::Clusters::LevelControl::Attributes::EventList::Id); + return cppAttribute != nil ? [[MCLevelControlClusterEventListAttribute alloc] initWithCppAttribute:cppAttribute] : nil; +} + +- (id)attributeListAttribute +{ + void * cppAttribute = self.cppCluster->GetAttribute(chip::app::Clusters::LevelControl::Attributes::AttributeList::Id); + return cppAttribute != nil ? [[MCLevelControlClusterAttributeListAttribute alloc] initWithCppAttribute:cppAttribute] : nil; +} + +- (id)featureMapAttribute +{ + void * cppAttribute = self.cppCluster->GetAttribute(chip::app::Clusters::LevelControl::Attributes::FeatureMap::Id); + return cppAttribute != nil ? [[MCLevelControlClusterFeatureMapAttribute alloc] initWithCppAttribute:cppAttribute] : nil; +} + +- (id)clusterRevisionAttribute +{ + void * cppAttribute = self.cppCluster->GetAttribute(chip::app::Clusters::LevelControl::Attributes::ClusterRevision::Id); + return cppAttribute != nil ? [[MCLevelControlClusterClusterRevisionAttribute alloc] initWithCppAttribute:cppAttribute] : nil; +} +@end + +// WakeOnLan cluster: + +@implementation MCWakeOnLanCluster + +// WakeOnLan cluster commands: + +// WakeOnLan cluster attributes: + +- (id)macAddressAttribute +{ + void * cppAttribute = self.cppCluster->GetAttribute(chip::app::Clusters::WakeOnLan::Attributes::MACAddress::Id); + return cppAttribute != nil ? [[MCWakeOnLanClusterMACAddressAttribute alloc] initWithCppAttribute:cppAttribute] : nil; +} + +- (id)linkLocalAddressAttribute +{ + void * cppAttribute = self.cppCluster->GetAttribute(chip::app::Clusters::WakeOnLan::Attributes::LinkLocalAddress::Id); + return cppAttribute != nil ? [[MCWakeOnLanClusterLinkLocalAddressAttribute alloc] initWithCppAttribute:cppAttribute] : nil; +} + +- (id)generatedCommandListAttribute +{ + void * cppAttribute = self.cppCluster->GetAttribute(chip::app::Clusters::WakeOnLan::Attributes::GeneratedCommandList::Id); + return cppAttribute != nil ? [[MCWakeOnLanClusterGeneratedCommandListAttribute alloc] initWithCppAttribute:cppAttribute] : nil; +} + +- (id)acceptedCommandListAttribute +{ + void * cppAttribute = self.cppCluster->GetAttribute(chip::app::Clusters::WakeOnLan::Attributes::AcceptedCommandList::Id); + return cppAttribute != nil ? [[MCWakeOnLanClusterAcceptedCommandListAttribute alloc] initWithCppAttribute:cppAttribute] : nil; +} + +- (id)eventListAttribute +{ + void * cppAttribute = self.cppCluster->GetAttribute(chip::app::Clusters::WakeOnLan::Attributes::EventList::Id); + return cppAttribute != nil ? [[MCWakeOnLanClusterEventListAttribute alloc] initWithCppAttribute:cppAttribute] : nil; +} + +- (id)attributeListAttribute +{ + void * cppAttribute = self.cppCluster->GetAttribute(chip::app::Clusters::WakeOnLan::Attributes::AttributeList::Id); + return cppAttribute != nil ? [[MCWakeOnLanClusterAttributeListAttribute alloc] initWithCppAttribute:cppAttribute] : nil; +} + +- (id)featureMapAttribute +{ + void * cppAttribute = self.cppCluster->GetAttribute(chip::app::Clusters::WakeOnLan::Attributes::FeatureMap::Id); + return cppAttribute != nil ? [[MCWakeOnLanClusterFeatureMapAttribute alloc] initWithCppAttribute:cppAttribute] : nil; +} + +- (id)clusterRevisionAttribute +{ + void * cppAttribute = self.cppCluster->GetAttribute(chip::app::Clusters::WakeOnLan::Attributes::ClusterRevision::Id); + return cppAttribute != nil ? [[MCWakeOnLanClusterClusterRevisionAttribute alloc] initWithCppAttribute:cppAttribute] : nil; +} +@end + +// TargetNavigator cluster: + +@implementation MCTargetNavigatorCluster + +// TargetNavigator cluster commands: + +// TargetNavigator cluster attributes: + +- (id)targetListAttribute +{ + void * cppAttribute = self.cppCluster->GetAttribute(chip::app::Clusters::TargetNavigator::Attributes::TargetList::Id); + return cppAttribute != nil ? [[MCTargetNavigatorClusterTargetListAttribute alloc] initWithCppAttribute:cppAttribute] : nil; +} + +- (id)currentTargetAttribute +{ + void * cppAttribute = self.cppCluster->GetAttribute(chip::app::Clusters::TargetNavigator::Attributes::CurrentTarget::Id); + return cppAttribute != nil ? [[MCTargetNavigatorClusterCurrentTargetAttribute alloc] initWithCppAttribute:cppAttribute] : nil; +} + +- (id)generatedCommandListAttribute +{ + void * cppAttribute = self.cppCluster->GetAttribute(chip::app::Clusters::TargetNavigator::Attributes::GeneratedCommandList::Id); + return cppAttribute != nil ? [[MCTargetNavigatorClusterGeneratedCommandListAttribute alloc] initWithCppAttribute:cppAttribute] : nil; +} + +- (id)acceptedCommandListAttribute +{ + void * cppAttribute = self.cppCluster->GetAttribute(chip::app::Clusters::TargetNavigator::Attributes::AcceptedCommandList::Id); + return cppAttribute != nil ? [[MCTargetNavigatorClusterAcceptedCommandListAttribute alloc] initWithCppAttribute:cppAttribute] : nil; +} + +- (id)eventListAttribute +{ + void * cppAttribute = self.cppCluster->GetAttribute(chip::app::Clusters::TargetNavigator::Attributes::EventList::Id); + return cppAttribute != nil ? [[MCTargetNavigatorClusterEventListAttribute alloc] initWithCppAttribute:cppAttribute] : nil; +} + +- (id)attributeListAttribute +{ + void * cppAttribute = self.cppCluster->GetAttribute(chip::app::Clusters::TargetNavigator::Attributes::AttributeList::Id); + return cppAttribute != nil ? [[MCTargetNavigatorClusterAttributeListAttribute alloc] initWithCppAttribute:cppAttribute] : nil; +} + +- (id)featureMapAttribute +{ + void * cppAttribute = self.cppCluster->GetAttribute(chip::app::Clusters::TargetNavigator::Attributes::FeatureMap::Id); + return cppAttribute != nil ? [[MCTargetNavigatorClusterFeatureMapAttribute alloc] initWithCppAttribute:cppAttribute] : nil; +} + +- (id)clusterRevisionAttribute +{ + void * cppAttribute = self.cppCluster->GetAttribute(chip::app::Clusters::TargetNavigator::Attributes::ClusterRevision::Id); + return cppAttribute != nil ? [[MCTargetNavigatorClusterClusterRevisionAttribute alloc] initWithCppAttribute:cppAttribute] : nil; +} +@end + +// MediaPlayback cluster: + +@implementation MCMediaPlaybackCluster + +// MediaPlayback cluster commands: + +// MediaPlayback cluster attributes: + +- (id)currentStateAttribute +{ + void * cppAttribute = self.cppCluster->GetAttribute(chip::app::Clusters::MediaPlayback::Attributes::CurrentState::Id); + return cppAttribute != nil ? [[MCMediaPlaybackClusterCurrentStateAttribute alloc] initWithCppAttribute:cppAttribute] : nil; +} + +- (id)startTimeAttribute +{ + void * cppAttribute = self.cppCluster->GetAttribute(chip::app::Clusters::MediaPlayback::Attributes::StartTime::Id); + return cppAttribute != nil ? [[MCMediaPlaybackClusterStartTimeAttribute alloc] initWithCppAttribute:cppAttribute] : nil; +} + +- (id)durationAttribute +{ + void * cppAttribute = self.cppCluster->GetAttribute(chip::app::Clusters::MediaPlayback::Attributes::Duration::Id); + return cppAttribute != nil ? [[MCMediaPlaybackClusterDurationAttribute alloc] initWithCppAttribute:cppAttribute] : nil; +} + +- (id)sampledPositionAttribute +{ + void * cppAttribute = self.cppCluster->GetAttribute(chip::app::Clusters::MediaPlayback::Attributes::SampledPosition::Id); + return cppAttribute != nil ? [[MCMediaPlaybackClusterSampledPositionAttribute alloc] initWithCppAttribute:cppAttribute] : nil; +} + +- (id)playbackSpeedAttribute +{ + void * cppAttribute = self.cppCluster->GetAttribute(chip::app::Clusters::MediaPlayback::Attributes::PlaybackSpeed::Id); + return cppAttribute != nil ? [[MCMediaPlaybackClusterPlaybackSpeedAttribute alloc] initWithCppAttribute:cppAttribute] : nil; +} + +- (id)seekRangeEndAttribute +{ + void * cppAttribute = self.cppCluster->GetAttribute(chip::app::Clusters::MediaPlayback::Attributes::SeekRangeEnd::Id); + return cppAttribute != nil ? [[MCMediaPlaybackClusterSeekRangeEndAttribute alloc] initWithCppAttribute:cppAttribute] : nil; +} + +- (id)seekRangeStartAttribute +{ + void * cppAttribute = self.cppCluster->GetAttribute(chip::app::Clusters::MediaPlayback::Attributes::SeekRangeStart::Id); + return cppAttribute != nil ? [[MCMediaPlaybackClusterSeekRangeStartAttribute alloc] initWithCppAttribute:cppAttribute] : nil; +} + +- (id)activeAudioTrackAttribute +{ + void * cppAttribute = self.cppCluster->GetAttribute(chip::app::Clusters::MediaPlayback::Attributes::ActiveAudioTrack::Id); + return cppAttribute != nil ? [[MCMediaPlaybackClusterActiveAudioTrackAttribute alloc] initWithCppAttribute:cppAttribute] : nil; +} + +- (id)availableAudioTracksAttribute +{ + void * cppAttribute = self.cppCluster->GetAttribute(chip::app::Clusters::MediaPlayback::Attributes::AvailableAudioTracks::Id); + return cppAttribute != nil ? [[MCMediaPlaybackClusterAvailableAudioTracksAttribute alloc] initWithCppAttribute:cppAttribute] : nil; +} + +- (id)activeTextTrackAttribute +{ + void * cppAttribute = self.cppCluster->GetAttribute(chip::app::Clusters::MediaPlayback::Attributes::ActiveTextTrack::Id); + return cppAttribute != nil ? [[MCMediaPlaybackClusterActiveTextTrackAttribute alloc] initWithCppAttribute:cppAttribute] : nil; +} + +- (id)availableTextTracksAttribute +{ + void * cppAttribute = self.cppCluster->GetAttribute(chip::app::Clusters::MediaPlayback::Attributes::AvailableTextTracks::Id); + return cppAttribute != nil ? [[MCMediaPlaybackClusterAvailableTextTracksAttribute alloc] initWithCppAttribute:cppAttribute] : nil; +} + +- (id)generatedCommandListAttribute +{ + void * cppAttribute = self.cppCluster->GetAttribute(chip::app::Clusters::MediaPlayback::Attributes::GeneratedCommandList::Id); + return cppAttribute != nil ? [[MCMediaPlaybackClusterGeneratedCommandListAttribute alloc] initWithCppAttribute:cppAttribute] : nil; +} + +- (id)acceptedCommandListAttribute +{ + void * cppAttribute = self.cppCluster->GetAttribute(chip::app::Clusters::MediaPlayback::Attributes::AcceptedCommandList::Id); + return cppAttribute != nil ? [[MCMediaPlaybackClusterAcceptedCommandListAttribute alloc] initWithCppAttribute:cppAttribute] : nil; +} + +- (id)eventListAttribute +{ + void * cppAttribute = self.cppCluster->GetAttribute(chip::app::Clusters::MediaPlayback::Attributes::EventList::Id); + return cppAttribute != nil ? [[MCMediaPlaybackClusterEventListAttribute alloc] initWithCppAttribute:cppAttribute] : nil; +} + +- (id)attributeListAttribute +{ + void * cppAttribute = self.cppCluster->GetAttribute(chip::app::Clusters::MediaPlayback::Attributes::AttributeList::Id); + return cppAttribute != nil ? [[MCMediaPlaybackClusterAttributeListAttribute alloc] initWithCppAttribute:cppAttribute] : nil; +} + +- (id)featureMapAttribute +{ + void * cppAttribute = self.cppCluster->GetAttribute(chip::app::Clusters::MediaPlayback::Attributes::FeatureMap::Id); + return cppAttribute != nil ? [[MCMediaPlaybackClusterFeatureMapAttribute alloc] initWithCppAttribute:cppAttribute] : nil; +} + +- (id)clusterRevisionAttribute +{ + void * cppAttribute = self.cppCluster->GetAttribute(chip::app::Clusters::MediaPlayback::Attributes::ClusterRevision::Id); + return cppAttribute != nil ? [[MCMediaPlaybackClusterClusterRevisionAttribute alloc] initWithCppAttribute:cppAttribute] : nil; +} +@end + +// KeypadInput cluster: + +@implementation MCKeypadInputCluster + +// KeypadInput cluster commands: + +// KeypadInput cluster attributes: + +- (id)generatedCommandListAttribute +{ + void * cppAttribute = self.cppCluster->GetAttribute(chip::app::Clusters::KeypadInput::Attributes::GeneratedCommandList::Id); + return cppAttribute != nil ? [[MCKeypadInputClusterGeneratedCommandListAttribute alloc] initWithCppAttribute:cppAttribute] : nil; +} + +- (id)acceptedCommandListAttribute +{ + void * cppAttribute = self.cppCluster->GetAttribute(chip::app::Clusters::KeypadInput::Attributes::AcceptedCommandList::Id); + return cppAttribute != nil ? [[MCKeypadInputClusterAcceptedCommandListAttribute alloc] initWithCppAttribute:cppAttribute] : nil; +} + +- (id)eventListAttribute +{ + void * cppAttribute = self.cppCluster->GetAttribute(chip::app::Clusters::KeypadInput::Attributes::EventList::Id); + return cppAttribute != nil ? [[MCKeypadInputClusterEventListAttribute alloc] initWithCppAttribute:cppAttribute] : nil; +} + +- (id)attributeListAttribute +{ + void * cppAttribute = self.cppCluster->GetAttribute(chip::app::Clusters::KeypadInput::Attributes::AttributeList::Id); + return cppAttribute != nil ? [[MCKeypadInputClusterAttributeListAttribute alloc] initWithCppAttribute:cppAttribute] : nil; +} + +- (id)featureMapAttribute +{ + void * cppAttribute = self.cppCluster->GetAttribute(chip::app::Clusters::KeypadInput::Attributes::FeatureMap::Id); + return cppAttribute != nil ? [[MCKeypadInputClusterFeatureMapAttribute alloc] initWithCppAttribute:cppAttribute] : nil; +} + +- (id)clusterRevisionAttribute +{ + void * cppAttribute = self.cppCluster->GetAttribute(chip::app::Clusters::KeypadInput::Attributes::ClusterRevision::Id); + return cppAttribute != nil ? [[MCKeypadInputClusterClusterRevisionAttribute alloc] initWithCppAttribute:cppAttribute] : nil; +} +@end + +// ContentLauncher cluster: + +@implementation MCContentLauncherCluster + +// ContentLauncher cluster commands: + +- (id)launchURLCommand +{ + void * cppCommand = self.cppCluster->GetCommand(chip::app::Clusters::ContentLauncher::Commands::LaunchURL::Id); + return cppCommand != nil ? [[MCContentLauncherClusterLaunchURLCommand alloc] initWithCppCommand:cppCommand] : nil; +} + +// ContentLauncher cluster attributes: + +- (id)acceptHeaderAttribute +{ + void * cppAttribute = self.cppCluster->GetAttribute(chip::app::Clusters::ContentLauncher::Attributes::AcceptHeader::Id); + return cppAttribute != nil ? [[MCContentLauncherClusterAcceptHeaderAttribute alloc] initWithCppAttribute:cppAttribute] : nil; +} + +- (id)supportedStreamingProtocolsAttribute +{ + void * cppAttribute = self.cppCluster->GetAttribute(chip::app::Clusters::ContentLauncher::Attributes::SupportedStreamingProtocols::Id); + return cppAttribute != nil ? [[MCContentLauncherClusterSupportedStreamingProtocolsAttribute alloc] initWithCppAttribute:cppAttribute] : nil; +} + +- (id)generatedCommandListAttribute +{ + void * cppAttribute = self.cppCluster->GetAttribute(chip::app::Clusters::ContentLauncher::Attributes::GeneratedCommandList::Id); + return cppAttribute != nil ? [[MCContentLauncherClusterGeneratedCommandListAttribute alloc] initWithCppAttribute:cppAttribute] : nil; +} + +- (id)acceptedCommandListAttribute +{ + void * cppAttribute = self.cppCluster->GetAttribute(chip::app::Clusters::ContentLauncher::Attributes::AcceptedCommandList::Id); + return cppAttribute != nil ? [[MCContentLauncherClusterAcceptedCommandListAttribute alloc] initWithCppAttribute:cppAttribute] : nil; +} + +- (id)eventListAttribute +{ + void * cppAttribute = self.cppCluster->GetAttribute(chip::app::Clusters::ContentLauncher::Attributes::EventList::Id); + return cppAttribute != nil ? [[MCContentLauncherClusterEventListAttribute alloc] initWithCppAttribute:cppAttribute] : nil; +} + +- (id)attributeListAttribute +{ + void * cppAttribute = self.cppCluster->GetAttribute(chip::app::Clusters::ContentLauncher::Attributes::AttributeList::Id); + return cppAttribute != nil ? [[MCContentLauncherClusterAttributeListAttribute alloc] initWithCppAttribute:cppAttribute] : nil; +} + +- (id)featureMapAttribute +{ + void * cppAttribute = self.cppCluster->GetAttribute(chip::app::Clusters::ContentLauncher::Attributes::FeatureMap::Id); + return cppAttribute != nil ? [[MCContentLauncherClusterFeatureMapAttribute alloc] initWithCppAttribute:cppAttribute] : nil; +} + +- (id)clusterRevisionAttribute +{ + void * cppAttribute = self.cppCluster->GetAttribute(chip::app::Clusters::ContentLauncher::Attributes::ClusterRevision::Id); + return cppAttribute != nil ? [[MCContentLauncherClusterClusterRevisionAttribute alloc] initWithCppAttribute:cppAttribute] : nil; +} +@end + +// ApplicationLauncher cluster: + +@implementation MCApplicationLauncherCluster + +// ApplicationLauncher cluster commands: + +// ApplicationLauncher cluster attributes: + +- (id)catalogListAttribute +{ + void * cppAttribute = self.cppCluster->GetAttribute(chip::app::Clusters::ApplicationLauncher::Attributes::CatalogList::Id); + return cppAttribute != nil ? [[MCApplicationLauncherClusterCatalogListAttribute alloc] initWithCppAttribute:cppAttribute] : nil; +} + +- (id)currentAppAttribute +{ + void * cppAttribute = self.cppCluster->GetAttribute(chip::app::Clusters::ApplicationLauncher::Attributes::CurrentApp::Id); + return cppAttribute != nil ? [[MCApplicationLauncherClusterCurrentAppAttribute alloc] initWithCppAttribute:cppAttribute] : nil; +} + +- (id)generatedCommandListAttribute +{ + void * cppAttribute = self.cppCluster->GetAttribute(chip::app::Clusters::ApplicationLauncher::Attributes::GeneratedCommandList::Id); + return cppAttribute != nil ? [[MCApplicationLauncherClusterGeneratedCommandListAttribute alloc] initWithCppAttribute:cppAttribute] : nil; +} + +- (id)acceptedCommandListAttribute +{ + void * cppAttribute = self.cppCluster->GetAttribute(chip::app::Clusters::ApplicationLauncher::Attributes::AcceptedCommandList::Id); + return cppAttribute != nil ? [[MCApplicationLauncherClusterAcceptedCommandListAttribute alloc] initWithCppAttribute:cppAttribute] : nil; +} + +- (id)eventListAttribute +{ + void * cppAttribute = self.cppCluster->GetAttribute(chip::app::Clusters::ApplicationLauncher::Attributes::EventList::Id); + return cppAttribute != nil ? [[MCApplicationLauncherClusterEventListAttribute alloc] initWithCppAttribute:cppAttribute] : nil; +} + +- (id)attributeListAttribute +{ + void * cppAttribute = self.cppCluster->GetAttribute(chip::app::Clusters::ApplicationLauncher::Attributes::AttributeList::Id); + return cppAttribute != nil ? [[MCApplicationLauncherClusterAttributeListAttribute alloc] initWithCppAttribute:cppAttribute] : nil; +} + +- (id)featureMapAttribute +{ + void * cppAttribute = self.cppCluster->GetAttribute(chip::app::Clusters::ApplicationLauncher::Attributes::FeatureMap::Id); + return cppAttribute != nil ? [[MCApplicationLauncherClusterFeatureMapAttribute alloc] initWithCppAttribute:cppAttribute] : nil; +} + +- (id)clusterRevisionAttribute +{ + void * cppAttribute = self.cppCluster->GetAttribute(chip::app::Clusters::ApplicationLauncher::Attributes::ClusterRevision::Id); + return cppAttribute != nil ? [[MCApplicationLauncherClusterClusterRevisionAttribute alloc] initWithCppAttribute:cppAttribute] : nil; +} +@end + +// ApplicationBasic cluster: + +@implementation MCApplicationBasicCluster + +// ApplicationBasic cluster commands: + +// ApplicationBasic cluster attributes: + +- (id)vendorNameAttribute +{ + void * cppAttribute = self.cppCluster->GetAttribute(chip::app::Clusters::ApplicationBasic::Attributes::VendorName::Id); + return cppAttribute != nil ? [[MCApplicationBasicClusterVendorNameAttribute alloc] initWithCppAttribute:cppAttribute] : nil; +} + +- (id)vendorIDAttribute +{ + void * cppAttribute = self.cppCluster->GetAttribute(chip::app::Clusters::ApplicationBasic::Attributes::VendorID::Id); + return cppAttribute != nil ? [[MCApplicationBasicClusterVendorIDAttribute alloc] initWithCppAttribute:cppAttribute] : nil; +} + +- (id)applicationNameAttribute +{ + void * cppAttribute = self.cppCluster->GetAttribute(chip::app::Clusters::ApplicationBasic::Attributes::ApplicationName::Id); + return cppAttribute != nil ? [[MCApplicationBasicClusterApplicationNameAttribute alloc] initWithCppAttribute:cppAttribute] : nil; +} + +- (id)productIDAttribute +{ + void * cppAttribute = self.cppCluster->GetAttribute(chip::app::Clusters::ApplicationBasic::Attributes::ProductID::Id); + return cppAttribute != nil ? [[MCApplicationBasicClusterProductIDAttribute alloc] initWithCppAttribute:cppAttribute] : nil; +} + +- (id)applicationAttribute +{ + void * cppAttribute = self.cppCluster->GetAttribute(chip::app::Clusters::ApplicationBasic::Attributes::Application::Id); + return cppAttribute != nil ? [[MCApplicationBasicClusterApplicationAttribute alloc] initWithCppAttribute:cppAttribute] : nil; +} + +- (id)statusAttribute +{ + void * cppAttribute = self.cppCluster->GetAttribute(chip::app::Clusters::ApplicationBasic::Attributes::Status::Id); + return cppAttribute != nil ? [[MCApplicationBasicClusterStatusAttribute alloc] initWithCppAttribute:cppAttribute] : nil; +} + +- (id)applicationVersionAttribute +{ + void * cppAttribute = self.cppCluster->GetAttribute(chip::app::Clusters::ApplicationBasic::Attributes::ApplicationVersion::Id); + return cppAttribute != nil ? [[MCApplicationBasicClusterApplicationVersionAttribute alloc] initWithCppAttribute:cppAttribute] : nil; +} + +- (id)allowedVendorListAttribute +{ + void * cppAttribute = self.cppCluster->GetAttribute(chip::app::Clusters::ApplicationBasic::Attributes::AllowedVendorList::Id); + return cppAttribute != nil ? [[MCApplicationBasicClusterAllowedVendorListAttribute alloc] initWithCppAttribute:cppAttribute] : nil; +} + +- (id)generatedCommandListAttribute +{ + void * cppAttribute = self.cppCluster->GetAttribute(chip::app::Clusters::ApplicationBasic::Attributes::GeneratedCommandList::Id); + return cppAttribute != nil ? [[MCApplicationBasicClusterGeneratedCommandListAttribute alloc] initWithCppAttribute:cppAttribute] : nil; +} + +- (id)acceptedCommandListAttribute +{ + void * cppAttribute = self.cppCluster->GetAttribute(chip::app::Clusters::ApplicationBasic::Attributes::AcceptedCommandList::Id); + return cppAttribute != nil ? [[MCApplicationBasicClusterAcceptedCommandListAttribute alloc] initWithCppAttribute:cppAttribute] : nil; +} + +- (id)eventListAttribute +{ + void * cppAttribute = self.cppCluster->GetAttribute(chip::app::Clusters::ApplicationBasic::Attributes::EventList::Id); + return cppAttribute != nil ? [[MCApplicationBasicClusterEventListAttribute alloc] initWithCppAttribute:cppAttribute] : nil; +} + +- (id)attributeListAttribute +{ + void * cppAttribute = self.cppCluster->GetAttribute(chip::app::Clusters::ApplicationBasic::Attributes::AttributeList::Id); + return cppAttribute != nil ? [[MCApplicationBasicClusterAttributeListAttribute alloc] initWithCppAttribute:cppAttribute] : nil; +} + +- (id)featureMapAttribute +{ + void * cppAttribute = self.cppCluster->GetAttribute(chip::app::Clusters::ApplicationBasic::Attributes::FeatureMap::Id); + return cppAttribute != nil ? [[MCApplicationBasicClusterFeatureMapAttribute alloc] initWithCppAttribute:cppAttribute] : nil; +} + +- (id)clusterRevisionAttribute +{ + void * cppAttribute = self.cppCluster->GetAttribute(chip::app::Clusters::ApplicationBasic::Attributes::ClusterRevision::Id); + return cppAttribute != nil ? [[MCApplicationBasicClusterClusterRevisionAttribute alloc] initWithCppAttribute:cppAttribute] : nil; +} +@end diff --git a/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/zap-generated/MCStructsObjc.h b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/zap-generated/MCStructsObjc.h new file mode 100644 index 00000000000000..fa039162149609 --- /dev/null +++ b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/zap-generated/MCStructsObjc.h @@ -0,0 +1,58 @@ +/** + * + * Copyright (c) 2020-2024 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +#ifndef MCStructsObjc_h +#define MCStructsObjc_h + +@interface MCMediaPlaybackClusterPlaybackPositionStruct : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull updatedAt; +@property (nonatomic, copy) NSNumber * _Nullable position; +@end + +@interface MCMediaPlaybackClusterTrackAttributesStruct : NSObject +@property (nonatomic, copy) NSString * _Nonnull languageCode; +@property (nonatomic, copy) NSString * _Nullable displayName; +@end + +@interface MCMediaPlaybackClusterTrackStruct : NSObject +@property (nonatomic, copy) NSString * _Nonnull id; +@property (nonatomic, copy) MCMediaPlaybackClusterTrackAttributesStruct * _Nullable trackAttributes; +@end + +@interface MCApplicationBasicClusterApplicationStruct : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull catalogVendorID; +@property (nonatomic, copy) NSString * _Nonnull applicationID; +@end + +@interface MCTargetNavigatorClusterTargetInfoStruct : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull identifier; +@property (nonatomic, copy) NSString * _Nonnull name; +@end + +@interface MCApplicationLauncherClusterApplicationStruct : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull catalogVendorID; +@property (nonatomic, copy) NSString * _Nonnull applicationID; +@end + +@interface MCApplicationLauncherClusterApplicationEPStruct : NSObject +@property (nonatomic, copy) MCApplicationLauncherClusterApplicationStruct * _Nonnull application; +@property (nonatomic, copy) NSNumber * _Nullable endpoint; +@end + +#endif /* MCStructsObjc_h */ diff --git a/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/zap-generated/MCStructsObjc.mm b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/zap-generated/MCStructsObjc.mm new file mode 100644 index 00000000000000..64ced385e18a05 --- /dev/null +++ b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/zap-generated/MCStructsObjc.mm @@ -0,0 +1,291 @@ +/** + * + * Copyright (c) 2020-2024 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import "MCStructsObjc.h" + +#import + +@implementation MCMediaPlaybackClusterPlaybackPositionStruct +- (instancetype)init +{ + if (self = [super init]) { + + _updatedAt = @(0); + + _position = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone +{ + auto other = [[MCMediaPlaybackClusterPlaybackPositionStruct alloc] init]; + + other.updatedAt = self.updatedAt; + other.position = self.position; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: updatedAt:%@; position:%@; >", NSStringFromClass([self class]), _updatedAt, _position]; + return descriptionString; +} + +@end + +@implementation MCMediaPlaybackClusterPlaybackPosition : MCMediaPlaybackClusterPlaybackPositionStruct +@dynamic updatedAt; +@dynamic position; +@end + +@implementation MCMediaPlaybackClusterTrackAttributesStruct +- (instancetype)init +{ + if (self = [super init]) { + + _languageCode = @""; + + _displayName = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone +{ + auto other = [[MCMediaPlaybackClusterTrackAttributesStruct alloc] init]; + + other.languageCode = self.languageCode; + other.displayName = self.displayName; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: languageCode:%@; displayName:%@; >", NSStringFromClass([self class]), _languageCode, _displayName]; + return descriptionString; +} + +@end + +@implementation MCMediaPlaybackClusterTrackStruct +- (instancetype)init +{ + if (self = [super init]) { + + _id = @""; + + _trackAttributes = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone +{ + auto other = [[MCMediaPlaybackClusterTrackStruct alloc] init]; + + other.id = self.id; + other.trackAttributes = self.trackAttributes; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: id:%@; trackAttributes:%@; >", NSStringFromClass([self class]), _id, _trackAttributes]; + return descriptionString; +} + +@end + +@implementation MCApplicationBasicClusterApplicationStruct +- (instancetype)init +{ + if (self = [super init]) { + + _catalogVendorID = @(0); + + _applicationID = @""; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone +{ + auto other = [[MCApplicationBasicClusterApplicationStruct alloc] init]; + + other.catalogVendorID = self.catalogVendorID; + other.applicationID = self.applicationID; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: catalogVendorID:%@; applicationID:%@; >", NSStringFromClass([self class]), _catalogVendorID, _applicationID]; + return descriptionString; +} + +- (void)setCatalogVendorId:(NSNumber * _Nonnull)catalogVendorId +{ + self.catalogVendorID = catalogVendorId; +} + +- (NSNumber * _Nonnull)catalogVendorId +{ + return self.catalogVendorID; +} + +- (void)setApplicationId:(NSString * _Nonnull)applicationId +{ + self.applicationID = applicationId; +} + +- (NSString * _Nonnull)applicationId +{ + return self.applicationID; +} + +@end + +@implementation MCApplicationBasicClusterApplicationBasicApplication : MCApplicationBasicClusterApplicationStruct +@end + +@implementation MCTargetNavigatorClusterTargetInfoStruct +- (instancetype)init +{ + if (self = [super init]) { + + _identifier = @(0); + + _name = @""; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone +{ + auto other = [[MCTargetNavigatorClusterTargetInfoStruct alloc] init]; + + other.identifier = self.identifier; + other.name = self.name; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: identifier:%@; name:%@; >", NSStringFromClass([self class]), _identifier, _name]; + return descriptionString; +} + +@end + +@implementation MCTargetNavigatorClusterTargetInfo : MCTargetNavigatorClusterTargetInfoStruct +@dynamic identifier; +@dynamic name; +@end + +@implementation MCApplicationLauncherClusterApplicationStruct +- (instancetype)init +{ + if (self = [super init]) { + + _catalogVendorID = @(0); + + _applicationID = @""; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone +{ + auto other = [[MCApplicationLauncherClusterApplicationStruct alloc] init]; + + other.catalogVendorID = self.catalogVendorID; + other.applicationID = self.applicationID; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: catalogVendorID:%@; applicationID:%@; >", NSStringFromClass([self class]), _catalogVendorID, _applicationID]; + return descriptionString; +} + +- (void)setCatalogVendorId:(NSNumber * _Nonnull)catalogVendorId +{ + self.catalogVendorID = catalogVendorId; +} + +- (NSNumber * _Nonnull)catalogVendorId +{ + return self.catalogVendorID; +} + +- (void)setApplicationId:(NSString * _Nonnull)applicationId +{ + self.applicationID = applicationId; +} + +- (NSString * _Nonnull)applicationId +{ + return self.applicationID; +} + +@end + +@implementation MCApplicationLauncherClusterApplication : MCApplicationLauncherClusterApplicationStruct +@end + +@implementation MCApplicationLauncherClusterApplicationEPStruct +- (instancetype)init +{ + if (self = [super init]) { + + _application = [MCApplicationLauncherClusterApplicationStruct new]; + + _endpoint = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone +{ + auto other = [[MCApplicationLauncherClusterApplicationEPStruct alloc] init]; + + other.application = self.application; + other.endpoint = self.endpoint; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: application:%@; endpoint:%@; >", NSStringFromClass([self class]), _application, _endpoint]; + return descriptionString; +} + +@end + +@implementation MCApplicationLauncherClusterApplicationEP : MCApplicationLauncherClusterApplicationEPStruct +@dynamic application; +@dynamic endpoint; +@end diff --git a/examples/tv-casting-app/tv-casting-common/core/Attribute.h b/examples/tv-casting-app/tv-casting-common/core/Attribute.h index 6ce2aa046680ad..2adc004cb782d6 100644 --- a/examples/tv-casting-app/tv-casting-common/core/Attribute.h +++ b/examples/tv-casting-app/tv-casting-common/core/Attribute.h @@ -26,18 +26,18 @@ namespace matter { namespace casting { namespace core { -template +template using ReadResponseSuccessCallbackFn = - std::function before, TypeInfoDecodableType after)>; + std::function before, typename TypeInfo::DecodableArgType after)>; using ReadResponseFailureCallbackFn = std::function; using WriteResponseSuccessCallbackFn = std::function; using WriteResponseFailureCallbackFn = std::function; -template +template struct ReadAttributeContext; -template +template struct WriteAttributeContext; -template +template struct SubscribeAttributeContext; template @@ -72,21 +72,21 @@ class Attribute * before (if the Attribute had been previously read) * @param failureCb Called when there is a failure in reading the Attribute */ - void Read(void * context, ReadResponseSuccessCallbackFn successCb, + void Read(void * context, ReadResponseSuccessCallbackFn successCb, ReadResponseFailureCallbackFn failureCb) { memory::Strong endpoint = this->GetEndpoint().lock(); if (endpoint) { - ReadAttributeContext * attributeContext = - new ReadAttributeContext(this, endpoint, context, successCb, failureCb); + ReadAttributeContext * attributeContext = + new ReadAttributeContext(this, endpoint, context, successCb, failureCb); endpoint->GetCastingPlayer()->FindOrEstablishSession( attributeContext, // FindOrEstablishSession success handler [](void * _context, chip::Messaging::ExchangeManager & exchangeMgr, const chip::SessionHandle & sessionHandle) { - ReadAttributeContext * _attributeContext = - static_cast *>(_context); + ReadAttributeContext * _attributeContext = + static_cast *>(_context); ChipLogProgress(AppServer, "::Read() Found or established session"); // Read attribute @@ -94,9 +94,9 @@ class Attribute CHIP_ERROR err = mediaClusterBase.template ReadAttribute( _attributeContext, // Read success handler - [](void * __context, typename TypeInfo::DecodableType response) { - ReadAttributeContext * __attributeContext = - static_cast *>(__context); + [](void * __context, typename TypeInfo::DecodableArgType response) { + ReadAttributeContext * __attributeContext = + static_cast *>(__context); ChipLogProgress(AppServer, "::Read() success"); Attribute * __attr = static_cast *>(__attributeContext->mAttribute); __attr->value = response; @@ -114,8 +114,8 @@ class Attribute }, // Read failure handler [](void * __context, CHIP_ERROR error) { - ReadAttributeContext * __attributeContext = - static_cast *>(__context); + ReadAttributeContext * __attributeContext = + static_cast *>(__context); ChipLogError(AppServer, "::Read() failure response on EndpointId: %d with error: " "%" CHIP_ERROR_FORMAT, @@ -137,8 +137,8 @@ class Attribute }, // FindOrEstablishSession failure handler [](void * _context, const chip::ScopedNodeId & peerId, CHIP_ERROR error) { - ReadAttributeContext * _attributeContext = - static_cast *>(_context); + ReadAttributeContext * _attributeContext = + static_cast *>(_context); ChipLogError(AppServer, "::Read() failure in retrieving session info for peerId.nodeId: " "0x" ChipLogFormatX64 ", peer.fabricIndex: %d with error: %" CHIP_ERROR_FORMAT, @@ -245,22 +245,22 @@ class Attribute * @param minIntervalFloorSeconds the requested minimum interval boundary floor in seconds for attribute udpates * @param maxIntervalCeilingSeconds the requested maximum interval boundary ceiling in seconds for attribute udpates */ - void Subscribe(void * context, ReadResponseSuccessCallbackFn successCb, + void Subscribe(void * context, ReadResponseSuccessCallbackFn successCb, ReadResponseFailureCallbackFn failureCb, uint16_t minIntervalFloorSeconds, uint16_t maxIntervalCeilingSeconds) { memory::Strong endpoint = this->GetEndpoint().lock(); if (endpoint) { - SubscribeAttributeContext * attributeContext = - new SubscribeAttributeContext(this, endpoint, context, successCb, failureCb, + SubscribeAttributeContext * attributeContext = + new SubscribeAttributeContext(this, endpoint, context, successCb, failureCb, minIntervalFloorSeconds, maxIntervalCeilingSeconds); endpoint->GetCastingPlayer()->FindOrEstablishSession( attributeContext, // FindOrEstablishSession success handler [](void * _context, chip::Messaging::ExchangeManager & exchangeMgr, const chip::SessionHandle & sessionHandle) { - SubscribeAttributeContext * _attributeContext = - static_cast *>(_context); + SubscribeAttributeContext * _attributeContext = + static_cast *>(_context); ChipLogProgress(AppServer, "::Subscribe() Found or established session"); // Subscribe to attribute @@ -268,12 +268,13 @@ class Attribute CHIP_ERROR err = mediaClusterBase.template SubscribeAttribute( _attributeContext, // Subscription success handler - [](void * __context, typename TypeInfo::DecodableType response) { - SubscribeAttributeContext * __attributeContext = - static_cast *>(__context); + [](void * __context, typename TypeInfo::DecodableArgType response) { + SubscribeAttributeContext * __attributeContext = + static_cast *>(__context); ChipLogProgress(AppServer, "::Subscribe() success"); Attribute * __attr = static_cast *>(__attributeContext->mAttribute); __attr->value = response; + // TODO: Save old value and then overwrite if (__attr->hasValue) { __attributeContext->mSuccessCb(__attributeContext->mClientContext, @@ -288,8 +289,8 @@ class Attribute }, // Subscription failure handler [](void * __context, CHIP_ERROR error) { - SubscribeAttributeContext * __attributeContext = - static_cast *>(__context); + SubscribeAttributeContext * __attributeContext = + static_cast *>(__context); ChipLogError(AppServer, "::Subscribe() failure response on EndpointId: %d with error: " "%" CHIP_ERROR_FORMAT, @@ -314,8 +315,8 @@ class Attribute }, // FindOrEstablishSession failure handler [](void * _context, const chip::ScopedNodeId & peerId, CHIP_ERROR error) { - SubscribeAttributeContext * _attributeContext = - static_cast *>(_context); + SubscribeAttributeContext * _attributeContext = + static_cast *>(_context); ChipLogError(AppServer, "::Subscribe() failure in retrieving session info for peerId.nodeId: " "0x" ChipLogFormatX64 ", peer.fabricIndex: %d with error: %" CHIP_ERROR_FORMAT, @@ -335,11 +336,11 @@ class Attribute /** * @brief Context object used by the Attribute class during the Read API's execution */ -template +template struct ReadAttributeContext { ReadAttributeContext(void * attribute, memory::Strong endpoint, void * clientContext, - ReadResponseSuccessCallbackFn successCb, ReadResponseFailureCallbackFn failureCb) : + ReadResponseSuccessCallbackFn successCb, ReadResponseFailureCallbackFn failureCb) : mEndpoint(endpoint), mClientContext(clientContext), mSuccessCb(successCb), mFailureCb(failureCb) { @@ -349,7 +350,7 @@ struct ReadAttributeContext void * mAttribute; memory::Strong mEndpoint; void * mClientContext; - ReadResponseSuccessCallbackFn mSuccessCb; + ReadResponseSuccessCallbackFn mSuccessCb; ReadResponseFailureCallbackFn mFailureCb; }; @@ -380,11 +381,11 @@ struct WriteAttributeContext /** * @brief Context object used by the Attribute class during the Subscribe API's execution */ -template +template struct SubscribeAttributeContext { SubscribeAttributeContext(void * attribute, memory::Strong endpoint, void * clientContext, - ReadResponseSuccessCallbackFn successCb, + ReadResponseSuccessCallbackFn successCb, ReadResponseFailureCallbackFn failureCb, uint16_t minIntervalFloorSeconds, uint16_t maxIntervalCeilingSeconds) : mEndpoint(endpoint), @@ -398,7 +399,7 @@ struct SubscribeAttributeContext void * mAttribute; memory::Strong mEndpoint; void * mClientContext; - ReadResponseSuccessCallbackFn mSuccessCb; + ReadResponseSuccessCallbackFn mSuccessCb; ReadResponseFailureCallbackFn mFailureCb; uint16_t mMinIntervalFloorSeconds; uint16_t mMaxIntervalCeilingSeconds; diff --git a/scripts/tools/zap_regen_all.py b/scripts/tools/zap_regen_all.py index 0e0b2b6dda93ec..53729ff4467b49 100755 --- a/scripts/tools/zap_regen_all.py +++ b/scripts/tools/zap_regen_all.py @@ -424,6 +424,7 @@ def getSpecificTemplatesTargets(): 'src/controller/python/templates/templates.json': None, 'src/darwin/Framework/CHIP/templates/templates.json': None, 'src/controller/java/templates/templates.json': None, + 'examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/templates/templates.json': None, } targets = []