From 1a7d048d75fdab47e39d828fcb2ea57fb63dccba Mon Sep 17 00:00:00 2001 From: joonhaengHeo <85541460+joonhaengHeo@users.noreply.github.com> Date: Thu, 1 Aug 2024 03:35:42 +0900 Subject: [PATCH] [Darwin] Implement MTREventNameForID function (#34653) * Implement MTREventNameForID in darwin * Restyled by whitespace --------- Co-authored-by: Restyled.io --- src/darwin/Framework/CHIP/MTRClusterNames.h | 9 + .../CHIP/templates/MTRClusterNames-src.zapt | 56 + .../CHIP/zap-generated/MTRClusterNames.mm | 1854 +++++++++++++++++ 3 files changed, 1919 insertions(+) diff --git a/src/darwin/Framework/CHIP/MTRClusterNames.h b/src/darwin/Framework/CHIP/MTRClusterNames.h index 379757b5bd4a06..c13edf44e574b2 100644 --- a/src/darwin/Framework/CHIP/MTRClusterNames.h +++ b/src/darwin/Framework/CHIP/MTRClusterNames.h @@ -41,3 +41,12 @@ MTR_EXTERN MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) NSSt * will be returned. */ MTR_EXTERN MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) NSString * MTRAttributeNameForID(MTRClusterIDType clusterID, MTRAttributeIDType attributeID); + +/** + * Resolve Matter event IDs into a descriptive string. + * + * For unknown IDs, a string '' (if the cluster ID is not known) + * or '' (if the cluster ID is known but the event ID is not known) + * will be returned. + */ +MTR_EXTERN MTR_NEWLY_AVAILABLE NSString * MTREventNameForID(MTRClusterIDType clusterID, MTREventIDType eventID); diff --git a/src/darwin/Framework/CHIP/templates/MTRClusterNames-src.zapt b/src/darwin/Framework/CHIP/templates/MTRClusterNames-src.zapt index b495d79b1b4c72..1c18b6a2489b2a 100644 --- a/src/darwin/Framework/CHIP/templates/MTRClusterNames-src.zapt +++ b/src/darwin/Framework/CHIP/templates/MTRClusterNames-src.zapt @@ -75,6 +75,62 @@ NSString * MTRAttributeNameForID(MTRClusterIDType clusterID, MTRAttributeIDType result = [NSString stringWithFormat:@"", attributeID]; break; } + break; +{{/if}} + +{{/zcl_clusters}} + default: + result = [NSString stringWithFormat:@"", clusterID]; + break; + } + + return result; +} + + +#pragma mark - Event IDs + +NSString * MTREventNameForID(MTRClusterIDType clusterID, MTREventIDType eventID) +{ + NSString * result = nil; + + switch (clusterID) { + +{{#zcl_clusters}} +{{#if (isSupported (asUpperCamelCase label preserveAcronyms=true) isForIds=true)}} +{{~#*inline "cluster"}}{{asUpperCamelCase label preserveAcronyms=true}}{{/inline~}} + case MTRClusterIDType{{>cluster}}ID: + + switch (eventID) { + +{{/if}} + +{{#*inline "eventIDs"}} +{{#zcl_events}} +{{~#*inline "cluster"}}{{asUpperCamelCase ../clusterName preserveAcronyms=true}}{{/inline~}} +{{~#*inline "event"}}{{asUpperCamelCase name preserveAcronyms=true}}{{/inline~}} +{{#first}} +{{#if (isSupported (asUpperCamelCase ../clusterName preserveAcronyms=true) isForIds=true)}} +// Cluster {{> cluster}} events +{{/if}} +{{/first}} +{{#if (isSupported (asUpperCamelCase ../clusterName preserveAcronyms=true) event=(asUpperCamelCase name preserveAcronyms=true) isForIds=true)}} + case MTREventIDTypeCluster{{>cluster}}Event{{>event}}ID: + result = @"{{>event}}"; + break; + +{{/if}} +{{/zcl_events}} +{{/inline}} + +{{> eventIDs clusterName=label}} + +{{#if (isSupported (asUpperCamelCase label preserveAcronyms=true) isForIds=true)}} + default: + result = [NSString stringWithFormat:@"", eventID]; + break; + } + break; {{/if}} {{/zcl_clusters}} diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusterNames.mm b/src/darwin/Framework/CHIP/zap-generated/MTRClusterNames.mm index 406d253ba5fb00..a46ab76ca9cc17 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusterNames.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusterNames.mm @@ -451,6 +451,7 @@ result = [NSString stringWithFormat:@"", attributeID]; break; } + break; case MTRClusterIDTypeGroupsID: @@ -489,6 +490,7 @@ result = [NSString stringWithFormat:@"", attributeID]; break; } + break; case MTRClusterIDTypeOnOffID: @@ -543,6 +545,7 @@ result = [NSString stringWithFormat:@"", attributeID]; break; } + break; case MTRClusterIDTypeOnOffSwitchConfigurationID: @@ -585,6 +588,7 @@ result = [NSString stringWithFormat:@"", attributeID]; break; } + break; case MTRClusterIDTypeLevelControlID: @@ -675,6 +679,7 @@ result = [NSString stringWithFormat:@"", attributeID]; break; } + break; case MTRClusterIDTypeBinaryInputBasicID: @@ -745,6 +750,7 @@ result = [NSString stringWithFormat:@"", attributeID]; break; } + break; case MTRClusterIDTypePulseWidthModulationID: @@ -779,6 +785,7 @@ result = [NSString stringWithFormat:@"", attributeID]; break; } + break; case MTRClusterIDTypeDescriptorID: @@ -833,6 +840,7 @@ result = [NSString stringWithFormat:@"", attributeID]; break; } + break; case MTRClusterIDTypeBindingID: @@ -871,6 +879,7 @@ result = [NSString stringWithFormat:@"", attributeID]; break; } + break; case MTRClusterIDTypeAccessControlID: @@ -933,6 +942,7 @@ result = [NSString stringWithFormat:@"", attributeID]; break; } + break; case MTRClusterIDTypeActionsID: @@ -979,6 +989,7 @@ result = [NSString stringWithFormat:@"", attributeID]; break; } + break; case MTRClusterIDTypeBasicInformationID: @@ -1105,6 +1116,7 @@ result = [NSString stringWithFormat:@"", attributeID]; break; } + break; case MTRClusterIDTypeOTASoftwareUpdateProviderID: @@ -1139,6 +1151,7 @@ result = [NSString stringWithFormat:@"", attributeID]; break; } + break; case MTRClusterIDTypeOTASoftwareUpdateRequestorID: @@ -1189,6 +1202,7 @@ result = [NSString stringWithFormat:@"", attributeID]; break; } + break; case MTRClusterIDTypeLocalizationConfigurationID: @@ -1231,6 +1245,7 @@ result = [NSString stringWithFormat:@"", attributeID]; break; } + break; case MTRClusterIDTypeTimeFormatLocalizationID: @@ -1277,6 +1292,7 @@ result = [NSString stringWithFormat:@"", attributeID]; break; } + break; case MTRClusterIDTypeUnitLocalizationID: @@ -1315,6 +1331,7 @@ result = [NSString stringWithFormat:@"", attributeID]; break; } + break; case MTRClusterIDTypePowerSourceConfigurationID: @@ -1353,6 +1370,7 @@ result = [NSString stringWithFormat:@"", attributeID]; break; } + break; case MTRClusterIDTypePowerSourceID: @@ -1515,6 +1533,7 @@ result = [NSString stringWithFormat:@"", attributeID]; break; } + break; case MTRClusterIDTypeGeneralCommissioningID: @@ -1585,6 +1604,7 @@ result = [NSString stringWithFormat:@"", attributeID]; break; } + break; case MTRClusterIDTypeNetworkCommissioningID: @@ -1663,6 +1683,7 @@ result = [NSString stringWithFormat:@"", attributeID]; break; } + break; case MTRClusterIDTypeDiagnosticLogsID: @@ -1697,6 +1718,7 @@ result = [NSString stringWithFormat:@"", attributeID]; break; } + break; case MTRClusterIDTypeGeneralDiagnosticsID: @@ -1767,6 +1789,7 @@ result = [NSString stringWithFormat:@"", attributeID]; break; } + break; case MTRClusterIDTypeSoftwareDiagnosticsID: @@ -1817,6 +1840,7 @@ result = [NSString stringWithFormat:@"", attributeID]; break; } + break; case MTRClusterIDTypeThreadNetworkDiagnosticsID: @@ -2103,6 +2127,7 @@ result = [NSString stringWithFormat:@"", attributeID]; break; } + break; case MTRClusterIDTypeWiFiNetworkDiagnosticsID: @@ -2189,6 +2214,7 @@ result = [NSString stringWithFormat:@"", attributeID]; break; } + break; case MTRClusterIDTypeEthernetNetworkDiagnosticsID: @@ -2259,6 +2285,7 @@ result = [NSString stringWithFormat:@"", attributeID]; break; } + break; case MTRClusterIDTypeTimeSynchronizationID: @@ -2345,6 +2372,7 @@ result = [NSString stringWithFormat:@"", attributeID]; break; } + break; case MTRClusterIDTypeBridgedDeviceBasicInformationID: @@ -2443,6 +2471,7 @@ result = [NSString stringWithFormat:@"", attributeID]; break; } + break; case MTRClusterIDTypeSwitchID: @@ -2489,6 +2518,7 @@ result = [NSString stringWithFormat:@"", attributeID]; break; } + break; case MTRClusterIDTypeAdministratorCommissioningID: @@ -2535,6 +2565,7 @@ result = [NSString stringWithFormat:@"", attributeID]; break; } + break; case MTRClusterIDTypeOperationalCredentialsID: @@ -2593,6 +2624,7 @@ result = [NSString stringWithFormat:@"", attributeID]; break; } + break; case MTRClusterIDTypeGroupKeyManagementID: @@ -2643,6 +2675,7 @@ result = [NSString stringWithFormat:@"", attributeID]; break; } + break; case MTRClusterIDTypeFixedLabelID: @@ -2681,6 +2714,7 @@ result = [NSString stringWithFormat:@"", attributeID]; break; } + break; case MTRClusterIDTypeUserLabelID: @@ -2719,6 +2753,7 @@ result = [NSString stringWithFormat:@"", attributeID]; break; } + break; case MTRClusterIDTypeBooleanStateID: @@ -2757,6 +2792,7 @@ result = [NSString stringWithFormat:@"", attributeID]; break; } + break; case MTRClusterIDTypeICDManagementID: @@ -2831,6 +2867,7 @@ result = [NSString stringWithFormat:@"", attributeID]; break; } + break; case MTRClusterIDTypeTimerID: @@ -2877,6 +2914,7 @@ result = [NSString stringWithFormat:@"", attributeID]; break; } + break; case MTRClusterIDTypeOvenCavityOperationalStateID: @@ -2935,6 +2973,7 @@ result = [NSString stringWithFormat:@"", attributeID]; break; } + break; case MTRClusterIDTypeOvenModeID: @@ -2985,6 +3024,7 @@ result = [NSString stringWithFormat:@"", attributeID]; break; } + break; case MTRClusterIDTypeLaundryDryerControlsID: @@ -3027,6 +3067,7 @@ result = [NSString stringWithFormat:@"", attributeID]; break; } + break; case MTRClusterIDTypeModeSelectID: @@ -3085,6 +3126,7 @@ result = [NSString stringWithFormat:@"", attributeID]; break; } + break; case MTRClusterIDTypeLaundryWasherModeID: @@ -3135,6 +3177,7 @@ result = [NSString stringWithFormat:@"", attributeID]; break; } + break; case MTRClusterIDTypeRefrigeratorAndTemperatureControlledCabinetModeID: @@ -3185,6 +3228,7 @@ result = [NSString stringWithFormat:@"", attributeID]; break; } + break; case MTRClusterIDTypeLaundryWasherControlsID: @@ -3235,6 +3279,7 @@ result = [NSString stringWithFormat:@"", attributeID]; break; } + break; case MTRClusterIDTypeRVCRunModeID: @@ -3277,6 +3322,7 @@ result = [NSString stringWithFormat:@"", attributeID]; break; } + break; case MTRClusterIDTypeRVCCleanModeID: @@ -3319,6 +3365,7 @@ result = [NSString stringWithFormat:@"", attributeID]; break; } + break; case MTRClusterIDTypeTemperatureControlID: @@ -3377,6 +3424,7 @@ result = [NSString stringWithFormat:@"", attributeID]; break; } + break; case MTRClusterIDTypeRefrigeratorAlarmID: @@ -3423,6 +3471,7 @@ result = [NSString stringWithFormat:@"", attributeID]; break; } + break; case MTRClusterIDTypeDishwasherModeID: @@ -3473,6 +3522,7 @@ result = [NSString stringWithFormat:@"", attributeID]; break; } + break; case MTRClusterIDTypeAirQualityID: @@ -3511,6 +3561,7 @@ result = [NSString stringWithFormat:@"", attributeID]; break; } + break; case MTRClusterIDTypeSmokeCOAlarmID: @@ -3597,6 +3648,7 @@ result = [NSString stringWithFormat:@"", attributeID]; break; } + break; case MTRClusterIDTypeDishwasherAlarmID: @@ -3647,6 +3699,7 @@ result = [NSString stringWithFormat:@"", attributeID]; break; } + break; case MTRClusterIDTypeMicrowaveOvenModeID: @@ -3689,6 +3742,7 @@ result = [NSString stringWithFormat:@"", attributeID]; break; } + break; case MTRClusterIDTypeMicrowaveOvenControlID: @@ -3759,6 +3813,7 @@ result = [NSString stringWithFormat:@"", attributeID]; break; } + break; case MTRClusterIDTypeOperationalStateID: @@ -3817,6 +3872,7 @@ result = [NSString stringWithFormat:@"", attributeID]; break; } + break; case MTRClusterIDTypeRVCOperationalStateID: @@ -3875,6 +3931,7 @@ result = [NSString stringWithFormat:@"", attributeID]; break; } + break; case MTRClusterIDTypeScenesManagementID: @@ -3921,6 +3978,7 @@ result = [NSString stringWithFormat:@"", attributeID]; break; } + break; case MTRClusterIDTypeHEPAFilterMonitoringID: @@ -3979,6 +4037,7 @@ result = [NSString stringWithFormat:@"", attributeID]; break; } + break; case MTRClusterIDTypeActivatedCarbonFilterMonitoringID: @@ -4037,6 +4096,7 @@ result = [NSString stringWithFormat:@"", attributeID]; break; } + break; case MTRClusterIDTypeBooleanStateConfigurationID: @@ -4103,6 +4163,7 @@ result = [NSString stringWithFormat:@"", attributeID]; break; } + break; case MTRClusterIDTypeValveConfigurationAndControlID: @@ -4181,6 +4242,7 @@ result = [NSString stringWithFormat:@"", attributeID]; break; } + break; case MTRClusterIDTypeElectricalPowerMeasurementID: @@ -4291,6 +4353,7 @@ result = [NSString stringWithFormat:@"", attributeID]; break; } + break; case MTRClusterIDTypeElectricalEnergyMeasurementID: @@ -4349,6 +4412,7 @@ result = [NSString stringWithFormat:@"", attributeID]; break; } + break; case MTRClusterIDTypeWaterHeaterManagementID: @@ -4407,6 +4471,7 @@ result = [NSString stringWithFormat:@"", attributeID]; break; } + break; case MTRClusterIDTypeDemandResponseLoadControlID: @@ -4473,6 +4538,7 @@ result = [NSString stringWithFormat:@"", attributeID]; break; } + break; case MTRClusterIDTypeMessagesID: @@ -4515,6 +4581,7 @@ result = [NSString stringWithFormat:@"", attributeID]; break; } + break; case MTRClusterIDTypeDeviceEnergyManagementID: @@ -4581,6 +4648,7 @@ result = [NSString stringWithFormat:@"", attributeID]; break; } + break; case MTRClusterIDTypeEnergyEVSEID: @@ -4707,6 +4775,7 @@ result = [NSString stringWithFormat:@"", attributeID]; break; } + break; case MTRClusterIDTypeEnergyPreferenceID: @@ -4761,6 +4830,7 @@ result = [NSString stringWithFormat:@"", attributeID]; break; } + break; case MTRClusterIDTypePowerTopologyID: @@ -4803,6 +4873,7 @@ result = [NSString stringWithFormat:@"", attributeID]; break; } + break; case MTRClusterIDTypeEnergyEVSEModeID: @@ -4853,6 +4924,7 @@ result = [NSString stringWithFormat:@"", attributeID]; break; } + break; case MTRClusterIDTypeWaterHeaterModeID: @@ -4903,6 +4975,7 @@ result = [NSString stringWithFormat:@"", attributeID]; break; } + break; case MTRClusterIDTypeDeviceEnergyManagementModeID: @@ -4953,6 +5026,7 @@ result = [NSString stringWithFormat:@"", attributeID]; break; } + break; case MTRClusterIDTypeDoorLockID: @@ -5167,6 +5241,7 @@ result = [NSString stringWithFormat:@"", attributeID]; break; } + break; case MTRClusterIDTypeWindowCoveringID: @@ -5289,6 +5364,7 @@ result = [NSString stringWithFormat:@"", attributeID]; break; } + break; case MTRClusterIDTypeBarrierControlID: @@ -5363,6 +5439,7 @@ result = [NSString stringWithFormat:@"", attributeID]; break; } + break; case MTRClusterIDTypeServiceAreaID: @@ -5421,6 +5498,7 @@ result = [NSString stringWithFormat:@"", attributeID]; break; } + break; case MTRClusterIDTypePumpConfigurationAndControlID: @@ -5547,6 +5625,7 @@ result = [NSString stringWithFormat:@"", attributeID]; break; } + break; case MTRClusterIDTypeThermostatID: @@ -5825,6 +5904,7 @@ result = [NSString stringWithFormat:@"", attributeID]; break; } + break; case MTRClusterIDTypeFanControlID: @@ -5907,6 +5987,7 @@ result = [NSString stringWithFormat:@"", attributeID]; break; } + break; case MTRClusterIDTypeThermostatUserInterfaceConfigurationID: @@ -5953,6 +6034,7 @@ result = [NSString stringWithFormat:@"", attributeID]; break; } + break; case MTRClusterIDTypeColorControlID: @@ -6195,6 +6277,7 @@ result = [NSString stringWithFormat:@"", attributeID]; break; } + break; case MTRClusterIDTypeBallastConfigurationID: @@ -6285,6 +6368,7 @@ result = [NSString stringWithFormat:@"", attributeID]; break; } + break; case MTRClusterIDTypeIlluminanceMeasurementID: @@ -6339,6 +6423,7 @@ result = [NSString stringWithFormat:@"", attributeID]; break; } + break; case MTRClusterIDTypeTemperatureMeasurementID: @@ -6389,6 +6474,7 @@ result = [NSString stringWithFormat:@"", attributeID]; break; } + break; case MTRClusterIDTypePressureMeasurementID: @@ -6459,6 +6545,7 @@ result = [NSString stringWithFormat:@"", attributeID]; break; } + break; case MTRClusterIDTypeFlowMeasurementID: @@ -6509,6 +6596,7 @@ result = [NSString stringWithFormat:@"", attributeID]; break; } + break; case MTRClusterIDTypeRelativeHumidityMeasurementID: @@ -6559,6 +6647,7 @@ result = [NSString stringWithFormat:@"", attributeID]; break; } + break; case MTRClusterIDTypeOccupancySensingID: @@ -6649,6 +6738,7 @@ result = [NSString stringWithFormat:@"", attributeID]; break; } + break; case MTRClusterIDTypeCarbonMonoxideConcentrationMeasurementID: @@ -6727,6 +6817,7 @@ result = [NSString stringWithFormat:@"", attributeID]; break; } + break; case MTRClusterIDTypeCarbonDioxideConcentrationMeasurementID: @@ -6805,6 +6896,7 @@ result = [NSString stringWithFormat:@"", attributeID]; break; } + break; case MTRClusterIDTypeNitrogenDioxideConcentrationMeasurementID: @@ -6883,6 +6975,7 @@ result = [NSString stringWithFormat:@"", attributeID]; break; } + break; case MTRClusterIDTypeOzoneConcentrationMeasurementID: @@ -6961,6 +7054,7 @@ result = [NSString stringWithFormat:@"", attributeID]; break; } + break; case MTRClusterIDTypePM25ConcentrationMeasurementID: @@ -7039,6 +7133,7 @@ result = [NSString stringWithFormat:@"", attributeID]; break; } + break; case MTRClusterIDTypeFormaldehydeConcentrationMeasurementID: @@ -7117,6 +7212,7 @@ result = [NSString stringWithFormat:@"", attributeID]; break; } + break; case MTRClusterIDTypePM1ConcentrationMeasurementID: @@ -7195,6 +7291,7 @@ result = [NSString stringWithFormat:@"", attributeID]; break; } + break; case MTRClusterIDTypePM10ConcentrationMeasurementID: @@ -7273,6 +7370,7 @@ result = [NSString stringWithFormat:@"", attributeID]; break; } + break; case MTRClusterIDTypeTotalVolatileOrganicCompoundsConcentrationMeasurementID: @@ -7351,6 +7449,7 @@ result = [NSString stringWithFormat:@"", attributeID]; break; } + break; case MTRClusterIDTypeRadonConcentrationMeasurementID: @@ -7429,6 +7528,7 @@ result = [NSString stringWithFormat:@"", attributeID]; break; } + break; case MTRClusterIDTypeWiFiNetworkManagementID: @@ -7471,6 +7571,7 @@ result = [NSString stringWithFormat:@"", attributeID]; break; } + break; case MTRClusterIDTypeThreadBorderRouterManagementID: @@ -7525,6 +7626,7 @@ result = [NSString stringWithFormat:@"", attributeID]; break; } + break; case MTRClusterIDTypeThreadNetworkDirectoryID: @@ -7571,6 +7673,7 @@ result = [NSString stringWithFormat:@"", attributeID]; break; } + break; case MTRClusterIDTypeWakeOnLANID: @@ -7613,6 +7716,7 @@ result = [NSString stringWithFormat:@"", attributeID]; break; } + break; case MTRClusterIDTypeChannelID: @@ -7659,6 +7763,7 @@ result = [NSString stringWithFormat:@"", attributeID]; break; } + break; case MTRClusterIDTypeTargetNavigatorID: @@ -7701,6 +7806,7 @@ result = [NSString stringWithFormat:@"", attributeID]; break; } + break; case MTRClusterIDTypeMediaPlaybackID: @@ -7779,6 +7885,7 @@ result = [NSString stringWithFormat:@"", attributeID]; break; } + break; case MTRClusterIDTypeMediaInputID: @@ -7821,6 +7928,7 @@ result = [NSString stringWithFormat:@"", attributeID]; break; } + break; case MTRClusterIDTypeLowPowerID: @@ -7855,6 +7963,7 @@ result = [NSString stringWithFormat:@"", attributeID]; break; } + break; case MTRClusterIDTypeKeypadInputID: @@ -7889,6 +7998,7 @@ result = [NSString stringWithFormat:@"", attributeID]; break; } + break; case MTRClusterIDTypeContentLauncherID: @@ -7931,6 +8041,7 @@ result = [NSString stringWithFormat:@"", attributeID]; break; } + break; case MTRClusterIDTypeAudioOutputID: @@ -7973,6 +8084,7 @@ result = [NSString stringWithFormat:@"", attributeID]; break; } + break; case MTRClusterIDTypeApplicationLauncherID: @@ -8015,6 +8127,7 @@ result = [NSString stringWithFormat:@"", attributeID]; break; } + break; case MTRClusterIDTypeApplicationBasicID: @@ -8081,6 +8194,7 @@ result = [NSString stringWithFormat:@"", attributeID]; break; } + break; case MTRClusterIDTypeAccountLoginID: @@ -8115,6 +8229,7 @@ result = [NSString stringWithFormat:@"", attributeID]; break; } + break; case MTRClusterIDTypeContentControlID: @@ -8181,6 +8296,7 @@ result = [NSString stringWithFormat:@"", attributeID]; break; } + break; case MTRClusterIDTypeContentAppObserverID: @@ -8215,6 +8331,7 @@ result = [NSString stringWithFormat:@"", attributeID]; break; } + break; case MTRClusterIDTypeEcosystemInformationID: @@ -8261,6 +8378,7 @@ result = [NSString stringWithFormat:@"", attributeID]; break; } + break; case MTRClusterIDTypeCommissionerControlID: @@ -8299,6 +8417,7 @@ result = [NSString stringWithFormat:@"", attributeID]; break; } + break; case MTRClusterIDTypeElectricalMeasurementID: @@ -8845,6 +8964,7 @@ result = [NSString stringWithFormat:@"", attributeID]; break; } + break; case MTRClusterIDTypeUnitTestingID: @@ -9211,6 +9331,7 @@ result = [NSString stringWithFormat:@"", attributeID]; break; } + break; case MTRClusterIDTypeSampleMEIID: @@ -9249,6 +9370,1739 @@ result = [NSString stringWithFormat:@"", attributeID]; break; } + break; + + default: + result = [NSString stringWithFormat:@"", clusterID]; + break; + } + + return result; +} + +#pragma mark - Event IDs + +NSString * MTREventNameForID(MTRClusterIDType clusterID, MTREventIDType eventID) +{ + NSString * result = nil; + + switch (clusterID) { + + case MTRClusterIDTypeIdentifyID: + + switch (eventID) { + + default: + result = [NSString stringWithFormat:@"", eventID]; + break; + } + break; + + case MTRClusterIDTypeGroupsID: + + switch (eventID) { + + default: + result = [NSString stringWithFormat:@"", eventID]; + break; + } + break; + + case MTRClusterIDTypeOnOffID: + + switch (eventID) { + + default: + result = [NSString stringWithFormat:@"", eventID]; + break; + } + break; + + case MTRClusterIDTypeOnOffSwitchConfigurationID: + + switch (eventID) { + + default: + result = [NSString stringWithFormat:@"", eventID]; + break; + } + break; + + case MTRClusterIDTypeLevelControlID: + + switch (eventID) { + + default: + result = [NSString stringWithFormat:@"", eventID]; + break; + } + break; + + case MTRClusterIDTypeBinaryInputBasicID: + + switch (eventID) { + + default: + result = [NSString stringWithFormat:@"", eventID]; + break; + } + break; + + case MTRClusterIDTypePulseWidthModulationID: + + switch (eventID) { + + default: + result = [NSString stringWithFormat:@"", eventID]; + break; + } + break; + + case MTRClusterIDTypeDescriptorID: + + switch (eventID) { + + default: + result = [NSString stringWithFormat:@"", eventID]; + break; + } + break; + + case MTRClusterIDTypeBindingID: + + switch (eventID) { + + default: + result = [NSString stringWithFormat:@"", eventID]; + break; + } + break; + + case MTRClusterIDTypeAccessControlID: + + switch (eventID) { + + // Cluster AccessControl events + case MTREventIDTypeClusterAccessControlEventAccessControlEntryChangedID: + result = @"AccessControlEntryChanged"; + break; + + case MTREventIDTypeClusterAccessControlEventAccessControlExtensionChangedID: + result = @"AccessControlExtensionChanged"; + break; + + case MTREventIDTypeClusterAccessControlEventAccessRestrictionEntryChangedID: + result = @"AccessRestrictionEntryChanged"; + break; + + case MTREventIDTypeClusterAccessControlEventFabricRestrictionReviewUpdateID: + result = @"FabricRestrictionReviewUpdate"; + break; + + default: + result = [NSString stringWithFormat:@"", eventID]; + break; + } + break; + + case MTRClusterIDTypeActionsID: + + switch (eventID) { + + // Cluster Actions events + case MTREventIDTypeClusterActionsEventStateChangedID: + result = @"StateChanged"; + break; + + case MTREventIDTypeClusterActionsEventActionFailedID: + result = @"ActionFailed"; + break; + + default: + result = [NSString stringWithFormat:@"", eventID]; + break; + } + break; + + case MTRClusterIDTypeBasicInformationID: + + switch (eventID) { + + // Cluster BasicInformation events + case MTREventIDTypeClusterBasicInformationEventStartUpID: + result = @"StartUp"; + break; + + case MTREventIDTypeClusterBasicInformationEventShutDownID: + result = @"ShutDown"; + break; + + case MTREventIDTypeClusterBasicInformationEventLeaveID: + result = @"Leave"; + break; + + case MTREventIDTypeClusterBasicInformationEventReachableChangedID: + result = @"ReachableChanged"; + break; + + default: + result = [NSString stringWithFormat:@"", eventID]; + break; + } + break; + + case MTRClusterIDTypeOTASoftwareUpdateProviderID: + + switch (eventID) { + + default: + result = [NSString stringWithFormat:@"", eventID]; + break; + } + break; + + case MTRClusterIDTypeOTASoftwareUpdateRequestorID: + + switch (eventID) { + + // Cluster OTASoftwareUpdateRequestor events + case MTREventIDTypeClusterOTASoftwareUpdateRequestorEventStateTransitionID: + result = @"StateTransition"; + break; + + case MTREventIDTypeClusterOTASoftwareUpdateRequestorEventVersionAppliedID: + result = @"VersionApplied"; + break; + + case MTREventIDTypeClusterOTASoftwareUpdateRequestorEventDownloadErrorID: + result = @"DownloadError"; + break; + + default: + result = [NSString stringWithFormat:@"", eventID]; + break; + } + break; + + case MTRClusterIDTypeLocalizationConfigurationID: + + switch (eventID) { + + default: + result = [NSString stringWithFormat:@"", eventID]; + break; + } + break; + + case MTRClusterIDTypeTimeFormatLocalizationID: + + switch (eventID) { + + default: + result = [NSString stringWithFormat:@"", eventID]; + break; + } + break; + + case MTRClusterIDTypeUnitLocalizationID: + + switch (eventID) { + + default: + result = [NSString stringWithFormat:@"", eventID]; + break; + } + break; + + case MTRClusterIDTypePowerSourceConfigurationID: + + switch (eventID) { + + default: + result = [NSString stringWithFormat:@"", eventID]; + break; + } + break; + + case MTRClusterIDTypePowerSourceID: + + switch (eventID) { + + // Cluster PowerSource events + case MTREventIDTypeClusterPowerSourceEventWiredFaultChangeID: + result = @"WiredFaultChange"; + break; + + case MTREventIDTypeClusterPowerSourceEventBatFaultChangeID: + result = @"BatFaultChange"; + break; + + case MTREventIDTypeClusterPowerSourceEventBatChargeFaultChangeID: + result = @"BatChargeFaultChange"; + break; + + default: + result = [NSString stringWithFormat:@"", eventID]; + break; + } + break; + + case MTRClusterIDTypeGeneralCommissioningID: + + switch (eventID) { + + default: + result = [NSString stringWithFormat:@"", eventID]; + break; + } + break; + + case MTRClusterIDTypeNetworkCommissioningID: + + switch (eventID) { + + default: + result = [NSString stringWithFormat:@"", eventID]; + break; + } + break; + + case MTRClusterIDTypeDiagnosticLogsID: + + switch (eventID) { + + default: + result = [NSString stringWithFormat:@"", eventID]; + break; + } + break; + + case MTRClusterIDTypeGeneralDiagnosticsID: + + switch (eventID) { + + // Cluster GeneralDiagnostics events + case MTREventIDTypeClusterGeneralDiagnosticsEventHardwareFaultChangeID: + result = @"HardwareFaultChange"; + break; + + case MTREventIDTypeClusterGeneralDiagnosticsEventRadioFaultChangeID: + result = @"RadioFaultChange"; + break; + + case MTREventIDTypeClusterGeneralDiagnosticsEventNetworkFaultChangeID: + result = @"NetworkFaultChange"; + break; + + case MTREventIDTypeClusterGeneralDiagnosticsEventBootReasonID: + result = @"BootReason"; + break; + + default: + result = [NSString stringWithFormat:@"", eventID]; + break; + } + break; + + case MTRClusterIDTypeSoftwareDiagnosticsID: + + switch (eventID) { + + // Cluster SoftwareDiagnostics events + case MTREventIDTypeClusterSoftwareDiagnosticsEventSoftwareFaultID: + result = @"SoftwareFault"; + break; + + default: + result = [NSString stringWithFormat:@"", eventID]; + break; + } + break; + + case MTRClusterIDTypeThreadNetworkDiagnosticsID: + + switch (eventID) { + + // Cluster ThreadNetworkDiagnostics events + case MTREventIDTypeClusterThreadNetworkDiagnosticsEventConnectionStatusID: + result = @"ConnectionStatus"; + break; + + case MTREventIDTypeClusterThreadNetworkDiagnosticsEventNetworkFaultChangeID: + result = @"NetworkFaultChange"; + break; + + default: + result = [NSString stringWithFormat:@"", eventID]; + break; + } + break; + + case MTRClusterIDTypeWiFiNetworkDiagnosticsID: + + switch (eventID) { + + // Cluster WiFiNetworkDiagnostics events + case MTREventIDTypeClusterWiFiNetworkDiagnosticsEventDisconnectionID: + result = @"Disconnection"; + break; + + case MTREventIDTypeClusterWiFiNetworkDiagnosticsEventAssociationFailureID: + result = @"AssociationFailure"; + break; + + case MTREventIDTypeClusterWiFiNetworkDiagnosticsEventConnectionStatusID: + result = @"ConnectionStatus"; + break; + + default: + result = [NSString stringWithFormat:@"", eventID]; + break; + } + break; + + case MTRClusterIDTypeEthernetNetworkDiagnosticsID: + + switch (eventID) { + + default: + result = [NSString stringWithFormat:@"", eventID]; + break; + } + break; + + case MTRClusterIDTypeTimeSynchronizationID: + + switch (eventID) { + + // Cluster TimeSynchronization events + case MTREventIDTypeClusterTimeSynchronizationEventDSTTableEmptyID: + result = @"DSTTableEmpty"; + break; + + case MTREventIDTypeClusterTimeSynchronizationEventDSTStatusID: + result = @"DSTStatus"; + break; + + case MTREventIDTypeClusterTimeSynchronizationEventTimeZoneStatusID: + result = @"TimeZoneStatus"; + break; + + case MTREventIDTypeClusterTimeSynchronizationEventTimeFailureID: + result = @"TimeFailure"; + break; + + case MTREventIDTypeClusterTimeSynchronizationEventMissingTrustedTimeSourceID: + result = @"MissingTrustedTimeSource"; + break; + + default: + result = [NSString stringWithFormat:@"", eventID]; + break; + } + break; + + case MTRClusterIDTypeBridgedDeviceBasicInformationID: + + switch (eventID) { + + // Cluster BridgedDeviceBasicInformation events + case MTREventIDTypeClusterBridgedDeviceBasicInformationEventStartUpID: + result = @"StartUp"; + break; + + case MTREventIDTypeClusterBridgedDeviceBasicInformationEventShutDownID: + result = @"ShutDown"; + break; + + case MTREventIDTypeClusterBridgedDeviceBasicInformationEventLeaveID: + result = @"Leave"; + break; + + case MTREventIDTypeClusterBridgedDeviceBasicInformationEventReachableChangedID: + result = @"ReachableChanged"; + break; + + case MTREventIDTypeClusterBridgedDeviceBasicInformationEventActiveChangedID: + result = @"ActiveChanged"; + break; + + default: + result = [NSString stringWithFormat:@"", eventID]; + break; + } + break; + + case MTRClusterIDTypeSwitchID: + + switch (eventID) { + + // Cluster Switch events + case MTREventIDTypeClusterSwitchEventSwitchLatchedID: + result = @"SwitchLatched"; + break; + + case MTREventIDTypeClusterSwitchEventInitialPressID: + result = @"InitialPress"; + break; + + case MTREventIDTypeClusterSwitchEventLongPressID: + result = @"LongPress"; + break; + + case MTREventIDTypeClusterSwitchEventShortReleaseID: + result = @"ShortRelease"; + break; + + case MTREventIDTypeClusterSwitchEventLongReleaseID: + result = @"LongRelease"; + break; + + case MTREventIDTypeClusterSwitchEventMultiPressOngoingID: + result = @"MultiPressOngoing"; + break; + + case MTREventIDTypeClusterSwitchEventMultiPressCompleteID: + result = @"MultiPressComplete"; + break; + + default: + result = [NSString stringWithFormat:@"", eventID]; + break; + } + break; + + case MTRClusterIDTypeAdministratorCommissioningID: + + switch (eventID) { + + default: + result = [NSString stringWithFormat:@"", eventID]; + break; + } + break; + + case MTRClusterIDTypeOperationalCredentialsID: + + switch (eventID) { + + default: + result = [NSString stringWithFormat:@"", eventID]; + break; + } + break; + + case MTRClusterIDTypeGroupKeyManagementID: + + switch (eventID) { + + default: + result = [NSString stringWithFormat:@"", eventID]; + break; + } + break; + + case MTRClusterIDTypeFixedLabelID: + + switch (eventID) { + + default: + result = [NSString stringWithFormat:@"", eventID]; + break; + } + break; + + case MTRClusterIDTypeUserLabelID: + + switch (eventID) { + + default: + result = [NSString stringWithFormat:@"", eventID]; + break; + } + break; + + case MTRClusterIDTypeBooleanStateID: + + switch (eventID) { + + // Cluster BooleanState events + case MTREventIDTypeClusterBooleanStateEventStateChangeID: + result = @"StateChange"; + break; + + default: + result = [NSString stringWithFormat:@"", eventID]; + break; + } + break; + + case MTRClusterIDTypeICDManagementID: + + switch (eventID) { + + default: + result = [NSString stringWithFormat:@"", eventID]; + break; + } + break; + + case MTRClusterIDTypeTimerID: + + switch (eventID) { + + default: + result = [NSString stringWithFormat:@"", eventID]; + break; + } + break; + + case MTRClusterIDTypeOvenCavityOperationalStateID: + + switch (eventID) { + + // Cluster OvenCavityOperationalState events + case MTREventIDTypeClusterOvenCavityOperationalStateEventOperationalErrorID: + result = @"OperationalError"; + break; + + case MTREventIDTypeClusterOvenCavityOperationalStateEventOperationCompletionID: + result = @"OperationCompletion"; + break; + + default: + result = [NSString stringWithFormat:@"", eventID]; + break; + } + break; + + case MTRClusterIDTypeOvenModeID: + + switch (eventID) { + + default: + result = [NSString stringWithFormat:@"", eventID]; + break; + } + break; + + case MTRClusterIDTypeLaundryDryerControlsID: + + switch (eventID) { + + default: + result = [NSString stringWithFormat:@"", eventID]; + break; + } + break; + + case MTRClusterIDTypeModeSelectID: + + switch (eventID) { + + default: + result = [NSString stringWithFormat:@"", eventID]; + break; + } + break; + + case MTRClusterIDTypeLaundryWasherModeID: + + switch (eventID) { + + default: + result = [NSString stringWithFormat:@"", eventID]; + break; + } + break; + + case MTRClusterIDTypeRefrigeratorAndTemperatureControlledCabinetModeID: + + switch (eventID) { + + default: + result = [NSString stringWithFormat:@"", eventID]; + break; + } + break; + + case MTRClusterIDTypeLaundryWasherControlsID: + + switch (eventID) { + + default: + result = [NSString stringWithFormat:@"", eventID]; + break; + } + break; + + case MTRClusterIDTypeRVCRunModeID: + + switch (eventID) { + + default: + result = [NSString stringWithFormat:@"", eventID]; + break; + } + break; + + case MTRClusterIDTypeRVCCleanModeID: + + switch (eventID) { + + default: + result = [NSString stringWithFormat:@"", eventID]; + break; + } + break; + + case MTRClusterIDTypeTemperatureControlID: + + switch (eventID) { + + default: + result = [NSString stringWithFormat:@"", eventID]; + break; + } + break; + + case MTRClusterIDTypeRefrigeratorAlarmID: + + switch (eventID) { + + // Cluster RefrigeratorAlarm events + case MTREventIDTypeClusterRefrigeratorAlarmEventNotifyID: + result = @"Notify"; + break; + + default: + result = [NSString stringWithFormat:@"", eventID]; + break; + } + break; + + case MTRClusterIDTypeDishwasherModeID: + + switch (eventID) { + + default: + result = [NSString stringWithFormat:@"", eventID]; + break; + } + break; + + case MTRClusterIDTypeAirQualityID: + + switch (eventID) { + + default: + result = [NSString stringWithFormat:@"", eventID]; + break; + } + break; + + case MTRClusterIDTypeSmokeCOAlarmID: + + switch (eventID) { + + // Cluster SmokeCOAlarm events + case MTREventIDTypeClusterSmokeCOAlarmEventSmokeAlarmID: + result = @"SmokeAlarm"; + break; + + case MTREventIDTypeClusterSmokeCOAlarmEventCOAlarmID: + result = @"COAlarm"; + break; + + case MTREventIDTypeClusterSmokeCOAlarmEventLowBatteryID: + result = @"LowBattery"; + break; + + case MTREventIDTypeClusterSmokeCOAlarmEventHardwareFaultID: + result = @"HardwareFault"; + break; + + case MTREventIDTypeClusterSmokeCOAlarmEventEndOfServiceID: + result = @"EndOfService"; + break; + + case MTREventIDTypeClusterSmokeCOAlarmEventSelfTestCompleteID: + result = @"SelfTestComplete"; + break; + + case MTREventIDTypeClusterSmokeCOAlarmEventAlarmMutedID: + result = @"AlarmMuted"; + break; + + case MTREventIDTypeClusterSmokeCOAlarmEventMuteEndedID: + result = @"MuteEnded"; + break; + + case MTREventIDTypeClusterSmokeCOAlarmEventInterconnectSmokeAlarmID: + result = @"InterconnectSmokeAlarm"; + break; + + case MTREventIDTypeClusterSmokeCOAlarmEventInterconnectCOAlarmID: + result = @"InterconnectCOAlarm"; + break; + + case MTREventIDTypeClusterSmokeCOAlarmEventAllClearID: + result = @"AllClear"; + break; + + default: + result = [NSString stringWithFormat:@"", eventID]; + break; + } + break; + + case MTRClusterIDTypeDishwasherAlarmID: + + switch (eventID) { + + // Cluster DishwasherAlarm events + case MTREventIDTypeClusterDishwasherAlarmEventNotifyID: + result = @"Notify"; + break; + + default: + result = [NSString stringWithFormat:@"", eventID]; + break; + } + break; + + case MTRClusterIDTypeMicrowaveOvenModeID: + + switch (eventID) { + + default: + result = [NSString stringWithFormat:@"", eventID]; + break; + } + break; + + case MTRClusterIDTypeMicrowaveOvenControlID: + + switch (eventID) { + + default: + result = [NSString stringWithFormat:@"", eventID]; + break; + } + break; + + case MTRClusterIDTypeOperationalStateID: + + switch (eventID) { + + // Cluster OperationalState events + case MTREventIDTypeClusterOperationalStateEventOperationalErrorID: + result = @"OperationalError"; + break; + + case MTREventIDTypeClusterOperationalStateEventOperationCompletionID: + result = @"OperationCompletion"; + break; + + default: + result = [NSString stringWithFormat:@"", eventID]; + break; + } + break; + + case MTRClusterIDTypeRVCOperationalStateID: + + switch (eventID) { + + // Cluster RVCOperationalState events + case MTREventIDTypeClusterRVCOperationalStateEventOperationalErrorID: + result = @"OperationalError"; + break; + + case MTREventIDTypeClusterRVCOperationalStateEventOperationCompletionID: + result = @"OperationCompletion"; + break; + + default: + result = [NSString stringWithFormat:@"", eventID]; + break; + } + break; + + case MTRClusterIDTypeScenesManagementID: + + switch (eventID) { + + default: + result = [NSString stringWithFormat:@"", eventID]; + break; + } + break; + + case MTRClusterIDTypeHEPAFilterMonitoringID: + + switch (eventID) { + + default: + result = [NSString stringWithFormat:@"", eventID]; + break; + } + break; + + case MTRClusterIDTypeActivatedCarbonFilterMonitoringID: + + switch (eventID) { + + default: + result = [NSString stringWithFormat:@"", eventID]; + break; + } + break; + + case MTRClusterIDTypeBooleanStateConfigurationID: + + switch (eventID) { + + // Cluster BooleanStateConfiguration events + case MTREventIDTypeClusterBooleanStateConfigurationEventAlarmsStateChangedID: + result = @"AlarmsStateChanged"; + break; + + case MTREventIDTypeClusterBooleanStateConfigurationEventSensorFaultID: + result = @"SensorFault"; + break; + + default: + result = [NSString stringWithFormat:@"", eventID]; + break; + } + break; + + case MTRClusterIDTypeValveConfigurationAndControlID: + + switch (eventID) { + + // Cluster ValveConfigurationAndControl events + case MTREventIDTypeClusterValveConfigurationAndControlEventValveStateChangedID: + result = @"ValveStateChanged"; + break; + + case MTREventIDTypeClusterValveConfigurationAndControlEventValveFaultID: + result = @"ValveFault"; + break; + + default: + result = [NSString stringWithFormat:@"", eventID]; + break; + } + break; + + case MTRClusterIDTypeElectricalPowerMeasurementID: + + switch (eventID) { + + // Cluster ElectricalPowerMeasurement events + case MTREventIDTypeClusterElectricalPowerMeasurementEventMeasurementPeriodRangesID: + result = @"MeasurementPeriodRanges"; + break; + + default: + result = [NSString stringWithFormat:@"", eventID]; + break; + } + break; + + case MTRClusterIDTypeElectricalEnergyMeasurementID: + + switch (eventID) { + + // Cluster ElectricalEnergyMeasurement events + case MTREventIDTypeClusterElectricalEnergyMeasurementEventCumulativeEnergyMeasuredID: + result = @"CumulativeEnergyMeasured"; + break; + + case MTREventIDTypeClusterElectricalEnergyMeasurementEventPeriodicEnergyMeasuredID: + result = @"PeriodicEnergyMeasured"; + break; + + default: + result = [NSString stringWithFormat:@"", eventID]; + break; + } + break; + + case MTRClusterIDTypeWaterHeaterManagementID: + + switch (eventID) { + + default: + result = [NSString stringWithFormat:@"", eventID]; + break; + } + break; + + case MTRClusterIDTypeDemandResponseLoadControlID: + + switch (eventID) { + + // Cluster DemandResponseLoadControl events + case MTREventIDTypeClusterDemandResponseLoadControlEventLoadControlEventStatusChangeID: + result = @"LoadControlEventStatusChange"; + break; + + default: + result = [NSString stringWithFormat:@"", eventID]; + break; + } + break; + + case MTRClusterIDTypeMessagesID: + + switch (eventID) { + + // Cluster Messages events + case MTREventIDTypeClusterMessagesEventMessageQueuedID: + result = @"MessageQueued"; + break; + + case MTREventIDTypeClusterMessagesEventMessagePresentedID: + result = @"MessagePresented"; + break; + + case MTREventIDTypeClusterMessagesEventMessageCompleteID: + result = @"MessageComplete"; + break; + + default: + result = [NSString stringWithFormat:@"", eventID]; + break; + } + break; + + case MTRClusterIDTypeDeviceEnergyManagementID: + + switch (eventID) { + + // Cluster DeviceEnergyManagement events + case MTREventIDTypeClusterDeviceEnergyManagementEventPowerAdjustStartID: + result = @"PowerAdjustStart"; + break; + + case MTREventIDTypeClusterDeviceEnergyManagementEventPowerAdjustEndID: + result = @"PowerAdjustEnd"; + break; + + case MTREventIDTypeClusterDeviceEnergyManagementEventPausedID: + result = @"Paused"; + break; + + case MTREventIDTypeClusterDeviceEnergyManagementEventResumedID: + result = @"Resumed"; + break; + + default: + result = [NSString stringWithFormat:@"", eventID]; + break; + } + break; + + case MTRClusterIDTypeEnergyEVSEID: + + switch (eventID) { + + // Cluster EnergyEVSE events + case MTREventIDTypeClusterEnergyEVSEEventEVConnectedID: + result = @"EVConnected"; + break; + + case MTREventIDTypeClusterEnergyEVSEEventEVNotDetectedID: + result = @"EVNotDetected"; + break; + + case MTREventIDTypeClusterEnergyEVSEEventEnergyTransferStartedID: + result = @"EnergyTransferStarted"; + break; + + case MTREventIDTypeClusterEnergyEVSEEventEnergyTransferStoppedID: + result = @"EnergyTransferStopped"; + break; + + case MTREventIDTypeClusterEnergyEVSEEventFaultID: + result = @"Fault"; + break; + + case MTREventIDTypeClusterEnergyEVSEEventRFIDID: + result = @"RFID"; + break; + + default: + result = [NSString stringWithFormat:@"", eventID]; + break; + } + break; + + case MTRClusterIDTypeEnergyPreferenceID: + + switch (eventID) { + + default: + result = [NSString stringWithFormat:@"", eventID]; + break; + } + break; + + case MTRClusterIDTypePowerTopologyID: + + switch (eventID) { + + default: + result = [NSString stringWithFormat:@"", eventID]; + break; + } + break; + + case MTRClusterIDTypeEnergyEVSEModeID: + + switch (eventID) { + + default: + result = [NSString stringWithFormat:@"", eventID]; + break; + } + break; + + case MTRClusterIDTypeWaterHeaterModeID: + + switch (eventID) { + + default: + result = [NSString stringWithFormat:@"", eventID]; + break; + } + break; + + case MTRClusterIDTypeDeviceEnergyManagementModeID: + + switch (eventID) { + + default: + result = [NSString stringWithFormat:@"", eventID]; + break; + } + break; + + case MTRClusterIDTypeDoorLockID: + + switch (eventID) { + + // Cluster DoorLock events + case MTREventIDTypeClusterDoorLockEventDoorLockAlarmID: + result = @"DoorLockAlarm"; + break; + + case MTREventIDTypeClusterDoorLockEventDoorStateChangeID: + result = @"DoorStateChange"; + break; + + case MTREventIDTypeClusterDoorLockEventLockOperationID: + result = @"LockOperation"; + break; + + case MTREventIDTypeClusterDoorLockEventLockOperationErrorID: + result = @"LockOperationError"; + break; + + case MTREventIDTypeClusterDoorLockEventLockUserChangeID: + result = @"LockUserChange"; + break; + + default: + result = [NSString stringWithFormat:@"", eventID]; + break; + } + break; + + case MTRClusterIDTypeWindowCoveringID: + + switch (eventID) { + + default: + result = [NSString stringWithFormat:@"", eventID]; + break; + } + break; + + case MTRClusterIDTypeBarrierControlID: + + switch (eventID) { + + default: + result = [NSString stringWithFormat:@"", eventID]; + break; + } + break; + + case MTRClusterIDTypeServiceAreaID: + + switch (eventID) { + + default: + result = [NSString stringWithFormat:@"", eventID]; + break; + } + break; + + case MTRClusterIDTypePumpConfigurationAndControlID: + + switch (eventID) { + + // Cluster PumpConfigurationAndControl events + case MTREventIDTypeClusterPumpConfigurationAndControlEventSupplyVoltageLowID: + result = @"SupplyVoltageLow"; + break; + + case MTREventIDTypeClusterPumpConfigurationAndControlEventSupplyVoltageHighID: + result = @"SupplyVoltageHigh"; + break; + + case MTREventIDTypeClusterPumpConfigurationAndControlEventPowerMissingPhaseID: + result = @"PowerMissingPhase"; + break; + + case MTREventIDTypeClusterPumpConfigurationAndControlEventSystemPressureLowID: + result = @"SystemPressureLow"; + break; + + case MTREventIDTypeClusterPumpConfigurationAndControlEventSystemPressureHighID: + result = @"SystemPressureHigh"; + break; + + case MTREventIDTypeClusterPumpConfigurationAndControlEventDryRunningID: + result = @"DryRunning"; + break; + + case MTREventIDTypeClusterPumpConfigurationAndControlEventMotorTemperatureHighID: + result = @"MotorTemperatureHigh"; + break; + + case MTREventIDTypeClusterPumpConfigurationAndControlEventPumpMotorFatalFailureID: + result = @"PumpMotorFatalFailure"; + break; + + case MTREventIDTypeClusterPumpConfigurationAndControlEventElectronicTemperatureHighID: + result = @"ElectronicTemperatureHigh"; + break; + + case MTREventIDTypeClusterPumpConfigurationAndControlEventPumpBlockedID: + result = @"PumpBlocked"; + break; + + case MTREventIDTypeClusterPumpConfigurationAndControlEventSensorFailureID: + result = @"SensorFailure"; + break; + + case MTREventIDTypeClusterPumpConfigurationAndControlEventElectronicNonFatalFailureID: + result = @"ElectronicNonFatalFailure"; + break; + + case MTREventIDTypeClusterPumpConfigurationAndControlEventElectronicFatalFailureID: + result = @"ElectronicFatalFailure"; + break; + + case MTREventIDTypeClusterPumpConfigurationAndControlEventGeneralFaultID: + result = @"GeneralFault"; + break; + + case MTREventIDTypeClusterPumpConfigurationAndControlEventLeakageID: + result = @"Leakage"; + break; + + case MTREventIDTypeClusterPumpConfigurationAndControlEventAirDetectionID: + result = @"AirDetection"; + break; + + case MTREventIDTypeClusterPumpConfigurationAndControlEventTurbineOperationID: + result = @"TurbineOperation"; + break; + + default: + result = [NSString stringWithFormat:@"", eventID]; + break; + } + break; + + case MTRClusterIDTypeThermostatID: + + switch (eventID) { + + default: + result = [NSString stringWithFormat:@"", eventID]; + break; + } + break; + + case MTRClusterIDTypeFanControlID: + + switch (eventID) { + + default: + result = [NSString stringWithFormat:@"", eventID]; + break; + } + break; + + case MTRClusterIDTypeThermostatUserInterfaceConfigurationID: + + switch (eventID) { + + default: + result = [NSString stringWithFormat:@"", eventID]; + break; + } + break; + + case MTRClusterIDTypeColorControlID: + + switch (eventID) { + + default: + result = [NSString stringWithFormat:@"", eventID]; + break; + } + break; + + case MTRClusterIDTypeBallastConfigurationID: + + switch (eventID) { + + default: + result = [NSString stringWithFormat:@"", eventID]; + break; + } + break; + + case MTRClusterIDTypeIlluminanceMeasurementID: + + switch (eventID) { + + default: + result = [NSString stringWithFormat:@"", eventID]; + break; + } + break; + + case MTRClusterIDTypeTemperatureMeasurementID: + + switch (eventID) { + + default: + result = [NSString stringWithFormat:@"", eventID]; + break; + } + break; + + case MTRClusterIDTypePressureMeasurementID: + + switch (eventID) { + + default: + result = [NSString stringWithFormat:@"", eventID]; + break; + } + break; + + case MTRClusterIDTypeFlowMeasurementID: + + switch (eventID) { + + default: + result = [NSString stringWithFormat:@"", eventID]; + break; + } + break; + + case MTRClusterIDTypeRelativeHumidityMeasurementID: + + switch (eventID) { + + default: + result = [NSString stringWithFormat:@"", eventID]; + break; + } + break; + + case MTRClusterIDTypeOccupancySensingID: + + switch (eventID) { + + default: + result = [NSString stringWithFormat:@"", eventID]; + break; + } + break; + + case MTRClusterIDTypeCarbonMonoxideConcentrationMeasurementID: + + switch (eventID) { + + default: + result = [NSString stringWithFormat:@"", eventID]; + break; + } + break; + + case MTRClusterIDTypeCarbonDioxideConcentrationMeasurementID: + + switch (eventID) { + + default: + result = [NSString stringWithFormat:@"", eventID]; + break; + } + break; + + case MTRClusterIDTypeNitrogenDioxideConcentrationMeasurementID: + + switch (eventID) { + + default: + result = [NSString stringWithFormat:@"", eventID]; + break; + } + break; + + case MTRClusterIDTypeOzoneConcentrationMeasurementID: + + switch (eventID) { + + default: + result = [NSString stringWithFormat:@"", eventID]; + break; + } + break; + + case MTRClusterIDTypePM25ConcentrationMeasurementID: + + switch (eventID) { + + default: + result = [NSString stringWithFormat:@"", eventID]; + break; + } + break; + + case MTRClusterIDTypeFormaldehydeConcentrationMeasurementID: + + switch (eventID) { + + default: + result = [NSString stringWithFormat:@"", eventID]; + break; + } + break; + + case MTRClusterIDTypePM1ConcentrationMeasurementID: + + switch (eventID) { + + default: + result = [NSString stringWithFormat:@"", eventID]; + break; + } + break; + + case MTRClusterIDTypePM10ConcentrationMeasurementID: + + switch (eventID) { + + default: + result = [NSString stringWithFormat:@"", eventID]; + break; + } + break; + + case MTRClusterIDTypeTotalVolatileOrganicCompoundsConcentrationMeasurementID: + + switch (eventID) { + + default: + result = [NSString stringWithFormat:@"", eventID]; + break; + } + break; + + case MTRClusterIDTypeRadonConcentrationMeasurementID: + + switch (eventID) { + + default: + result = [NSString stringWithFormat:@"", eventID]; + break; + } + break; + + case MTRClusterIDTypeWiFiNetworkManagementID: + + switch (eventID) { + + default: + result = [NSString stringWithFormat:@"", eventID]; + break; + } + break; + + case MTRClusterIDTypeThreadBorderRouterManagementID: + + switch (eventID) { + + default: + result = [NSString stringWithFormat:@"", eventID]; + break; + } + break; + + case MTRClusterIDTypeThreadNetworkDirectoryID: + + switch (eventID) { + + default: + result = [NSString stringWithFormat:@"", eventID]; + break; + } + break; + + case MTRClusterIDTypeWakeOnLANID: + + switch (eventID) { + + default: + result = [NSString stringWithFormat:@"", eventID]; + break; + } + break; + + case MTRClusterIDTypeChannelID: + + switch (eventID) { + + default: + result = [NSString stringWithFormat:@"", eventID]; + break; + } + break; + + case MTRClusterIDTypeTargetNavigatorID: + + switch (eventID) { + + // Cluster TargetNavigator events + case MTREventIDTypeClusterTargetNavigatorEventTargetUpdatedID: + result = @"TargetUpdated"; + break; + + default: + result = [NSString stringWithFormat:@"", eventID]; + break; + } + break; + + case MTRClusterIDTypeMediaPlaybackID: + + switch (eventID) { + + // Cluster MediaPlayback events + case MTREventIDTypeClusterMediaPlaybackEventStateChangedID: + result = @"StateChanged"; + break; + + default: + result = [NSString stringWithFormat:@"", eventID]; + break; + } + break; + + case MTRClusterIDTypeMediaInputID: + + switch (eventID) { + + default: + result = [NSString stringWithFormat:@"", eventID]; + break; + } + break; + + case MTRClusterIDTypeLowPowerID: + + switch (eventID) { + + default: + result = [NSString stringWithFormat:@"", eventID]; + break; + } + break; + + case MTRClusterIDTypeKeypadInputID: + + switch (eventID) { + + default: + result = [NSString stringWithFormat:@"", eventID]; + break; + } + break; + + case MTRClusterIDTypeContentLauncherID: + + switch (eventID) { + + default: + result = [NSString stringWithFormat:@"", eventID]; + break; + } + break; + + case MTRClusterIDTypeAudioOutputID: + + switch (eventID) { + + default: + result = [NSString stringWithFormat:@"", eventID]; + break; + } + break; + + case MTRClusterIDTypeApplicationLauncherID: + + switch (eventID) { + + default: + result = [NSString stringWithFormat:@"", eventID]; + break; + } + break; + + case MTRClusterIDTypeApplicationBasicID: + + switch (eventID) { + + default: + result = [NSString stringWithFormat:@"", eventID]; + break; + } + break; + + case MTRClusterIDTypeAccountLoginID: + + switch (eventID) { + + // Cluster AccountLogin events + case MTREventIDTypeClusterAccountLoginEventLoggedOutID: + result = @"LoggedOut"; + break; + + default: + result = [NSString stringWithFormat:@"", eventID]; + break; + } + break; + + case MTRClusterIDTypeContentControlID: + + switch (eventID) { + + // Cluster ContentControl events + case MTREventIDTypeClusterContentControlEventRemainingScreenTimeExpiredID: + result = @"RemainingScreenTimeExpired"; + break; + + default: + result = [NSString stringWithFormat:@"", eventID]; + break; + } + break; + + case MTRClusterIDTypeContentAppObserverID: + + switch (eventID) { + + default: + result = [NSString stringWithFormat:@"", eventID]; + break; + } + break; + + case MTRClusterIDTypeEcosystemInformationID: + + switch (eventID) { + + default: + result = [NSString stringWithFormat:@"", eventID]; + break; + } + break; + + case MTRClusterIDTypeCommissionerControlID: + + switch (eventID) { + + // Cluster CommissionerControl events + case MTREventIDTypeClusterCommissionerControlEventCommissioningRequestResultID: + result = @"CommissioningRequestResult"; + break; + + default: + result = [NSString stringWithFormat:@"", eventID]; + break; + } + break; + + case MTRClusterIDTypeElectricalMeasurementID: + + switch (eventID) { + + default: + result = [NSString stringWithFormat:@"", eventID]; + break; + } + break; + + case MTRClusterIDTypeUnitTestingID: + + switch (eventID) { + + // Cluster UnitTesting events + case MTREventIDTypeClusterUnitTestingEventTestEventID: + result = @"TestEvent"; + break; + + case MTREventIDTypeClusterUnitTestingEventTestFabricScopedEventID: + result = @"TestFabricScopedEvent"; + break; + + case MTREventIDTypeClusterUnitTestingEventTestDifferentVendorMeiEventID: + result = @"TestDifferentVendorMeiEvent"; + break; + + default: + result = [NSString stringWithFormat:@"", eventID]; + break; + } + break; + + case MTRClusterIDTypeSampleMEIID: + + switch (eventID) { + + // Cluster SampleMEI events + case MTREventIDTypeClusterSampleMEIEventPingCountEventID: + result = @"PingCountEvent"; + break; + + default: + result = [NSString stringWithFormat:@"", eventID]; + break; + } + break; default: result = [NSString stringWithFormat:@"", clusterID];