| /* |
| * |
| * 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 |
| |
| #pragma once |
| |
| #include <app-common/zap-generated/cluster-enums.h> |
| |
| namespace chip { |
| namespace app { |
| namespace Clusters { |
| static auto __attribute__((unused)) EnsureKnownEnumValue(Identify::EffectIdentifierEnum val) |
| { |
| using EnumType = Identify::EffectIdentifierEnum; |
| switch (val) |
| { |
| case EnumType::kBlink: |
| case EnumType::kBreathe: |
| case EnumType::kOkay: |
| case EnumType::kChannelChange: |
| case EnumType::kFinishEffect: |
| case EnumType::kStopEffect: |
| return val; |
| default: |
| return static_cast<EnumType>(3); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(Identify::EffectVariantEnum val) |
| { |
| using EnumType = Identify::EffectVariantEnum; |
| switch (val) |
| { |
| case EnumType::kDefault: |
| return val; |
| default: |
| return static_cast<EnumType>(1); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(Identify::IdentifyTypeEnum val) |
| { |
| using EnumType = Identify::IdentifyTypeEnum; |
| switch (val) |
| { |
| case EnumType::kNone: |
| case EnumType::kLightOutput: |
| case EnumType::kVisibleIndicator: |
| case EnumType::kAudibleBeep: |
| case EnumType::kDisplay: |
| case EnumType::kActuator: |
| return val; |
| default: |
| return static_cast<EnumType>(6); |
| } |
| } |
| |
| static auto __attribute__((unused)) EnsureKnownEnumValue(OnOff::OnOffDelayedAllOffEffectVariant val) |
| { |
| using EnumType = OnOff::OnOffDelayedAllOffEffectVariant; |
| switch (val) |
| { |
| case EnumType::kFadeToOffIn0p8Seconds: |
| case EnumType::kNoFade: |
| case EnumType::k50PercentDimDownIn0p8SecondsThenFadeToOffIn12Seconds: |
| return val; |
| default: |
| return static_cast<EnumType>(3); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(OnOff::OnOffDyingLightEffectVariant val) |
| { |
| using EnumType = OnOff::OnOffDyingLightEffectVariant; |
| switch (val) |
| { |
| case EnumType::k20PercenterDimUpIn0p5SecondsThenFadeToOffIn1Second: |
| return val; |
| default: |
| return static_cast<EnumType>(1); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(OnOff::OnOffEffectIdentifier val) |
| { |
| using EnumType = OnOff::OnOffEffectIdentifier; |
| switch (val) |
| { |
| case EnumType::kDelayedAllOff: |
| case EnumType::kDyingLight: |
| return val; |
| default: |
| return static_cast<EnumType>(2); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(OnOff::OnOffStartUpOnOff val) |
| { |
| using EnumType = OnOff::OnOffStartUpOnOff; |
| switch (val) |
| { |
| case EnumType::kOff: |
| case EnumType::kOn: |
| case EnumType::kTogglePreviousOnOff: |
| return val; |
| default: |
| return static_cast<EnumType>(3); |
| } |
| } |
| |
| static auto __attribute__((unused)) EnsureKnownEnumValue(LevelControl::MoveMode val) |
| { |
| using EnumType = LevelControl::MoveMode; |
| switch (val) |
| { |
| // Need to convert consumers to using the new enum classes, so we |
| // don't just have casts all over. |
| #ifdef CHIP_USE_ENUM_CLASS_FOR_IM_ENUM |
| case EnumType::kUp: |
| case EnumType::kDown: |
| #else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM |
| case EMBER_ZCL_MOVE_MODE_UP: |
| case EMBER_ZCL_MOVE_MODE_DOWN: |
| #endif // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM |
| return val; |
| default: |
| return static_cast<EnumType>(2); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(LevelControl::StepMode val) |
| { |
| using EnumType = LevelControl::StepMode; |
| switch (val) |
| { |
| // Need to convert consumers to using the new enum classes, so we |
| // don't just have casts all over. |
| #ifdef CHIP_USE_ENUM_CLASS_FOR_IM_ENUM |
| case EnumType::kUp: |
| case EnumType::kDown: |
| #else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM |
| case EMBER_ZCL_STEP_MODE_UP: |
| case EMBER_ZCL_STEP_MODE_DOWN: |
| #endif // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM |
| return val; |
| default: |
| return static_cast<EnumType>(2); |
| } |
| } |
| |
| static auto __attribute__((unused)) EnsureKnownEnumValue(AccessControl::AccessControlEntryAuthModeEnum val) |
| { |
| using EnumType = AccessControl::AccessControlEntryAuthModeEnum; |
| switch (val) |
| { |
| case EnumType::kPase: |
| case EnumType::kCase: |
| case EnumType::kGroup: |
| return val; |
| default: |
| return static_cast<EnumType>(0); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(AccessControl::AccessControlEntryPrivilegeEnum val) |
| { |
| using EnumType = AccessControl::AccessControlEntryPrivilegeEnum; |
| switch (val) |
| { |
| case EnumType::kView: |
| case EnumType::kProxyView: |
| case EnumType::kOperate: |
| case EnumType::kManage: |
| case EnumType::kAdminister: |
| return val; |
| default: |
| return static_cast<EnumType>(0); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(AccessControl::ChangeTypeEnum val) |
| { |
| using EnumType = AccessControl::ChangeTypeEnum; |
| switch (val) |
| { |
| case EnumType::kChanged: |
| case EnumType::kAdded: |
| case EnumType::kRemoved: |
| return val; |
| default: |
| return static_cast<EnumType>(3); |
| } |
| } |
| |
| static auto __attribute__((unused)) EnsureKnownEnumValue(Actions::ActionErrorEnum val) |
| { |
| using EnumType = Actions::ActionErrorEnum; |
| switch (val) |
| { |
| case EnumType::kUnknown: |
| case EnumType::kInterrupted: |
| return val; |
| default: |
| return static_cast<EnumType>(2); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(Actions::ActionStateEnum val) |
| { |
| using EnumType = Actions::ActionStateEnum; |
| switch (val) |
| { |
| case EnumType::kInactive: |
| case EnumType::kActive: |
| case EnumType::kPaused: |
| case EnumType::kDisabled: |
| return val; |
| default: |
| return static_cast<EnumType>(4); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(Actions::ActionTypeEnum val) |
| { |
| using EnumType = Actions::ActionTypeEnum; |
| switch (val) |
| { |
| case EnumType::kOther: |
| case EnumType::kScene: |
| case EnumType::kSequence: |
| case EnumType::kAutomation: |
| case EnumType::kException: |
| case EnumType::kNotification: |
| case EnumType::kAlarm: |
| return val; |
| default: |
| return static_cast<EnumType>(7); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(Actions::EndpointListTypeEnum val) |
| { |
| using EnumType = Actions::EndpointListTypeEnum; |
| switch (val) |
| { |
| case EnumType::kOther: |
| case EnumType::kRoom: |
| case EnumType::kZone: |
| return val; |
| default: |
| return static_cast<EnumType>(3); |
| } |
| } |
| |
| static auto __attribute__((unused)) EnsureKnownEnumValue(BasicInformation::ColorEnum val) |
| { |
| using EnumType = BasicInformation::ColorEnum; |
| switch (val) |
| { |
| case EnumType::kBlack: |
| case EnumType::kNavy: |
| case EnumType::kGreen: |
| case EnumType::kTeal: |
| case EnumType::kMaroon: |
| case EnumType::kPurple: |
| case EnumType::kOlive: |
| case EnumType::kGray: |
| case EnumType::kBlue: |
| case EnumType::kLime: |
| case EnumType::kAqua: |
| case EnumType::kRed: |
| case EnumType::kFuchsia: |
| case EnumType::kYellow: |
| case EnumType::kWhite: |
| case EnumType::kNickel: |
| case EnumType::kChrome: |
| case EnumType::kBrass: |
| case EnumType::kCopper: |
| case EnumType::kSilver: |
| case EnumType::kGold: |
| return val; |
| default: |
| return static_cast<EnumType>(21); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(BasicInformation::ProductFinishEnum val) |
| { |
| using EnumType = BasicInformation::ProductFinishEnum; |
| switch (val) |
| { |
| case EnumType::kOther: |
| case EnumType::kMatte: |
| case EnumType::kSatin: |
| case EnumType::kPolished: |
| case EnumType::kRugged: |
| case EnumType::kFabric: |
| return val; |
| default: |
| return static_cast<EnumType>(6); |
| } |
| } |
| |
| static auto __attribute__((unused)) EnsureKnownEnumValue(OtaSoftwareUpdateProvider::OTAApplyUpdateAction val) |
| { |
| using EnumType = OtaSoftwareUpdateProvider::OTAApplyUpdateAction; |
| switch (val) |
| { |
| case EnumType::kProceed: |
| case EnumType::kAwaitNextAction: |
| case EnumType::kDiscontinue: |
| return val; |
| default: |
| return static_cast<EnumType>(3); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(OtaSoftwareUpdateProvider::OTADownloadProtocol val) |
| { |
| using EnumType = OtaSoftwareUpdateProvider::OTADownloadProtocol; |
| switch (val) |
| { |
| case EnumType::kBDXSynchronous: |
| case EnumType::kBDXAsynchronous: |
| case EnumType::kHttps: |
| case EnumType::kVendorSpecific: |
| return val; |
| default: |
| return static_cast<EnumType>(4); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(OtaSoftwareUpdateProvider::OTAQueryStatus val) |
| { |
| using EnumType = OtaSoftwareUpdateProvider::OTAQueryStatus; |
| switch (val) |
| { |
| case EnumType::kUpdateAvailable: |
| case EnumType::kBusy: |
| case EnumType::kNotAvailable: |
| case EnumType::kDownloadProtocolNotSupported: |
| return val; |
| default: |
| return static_cast<EnumType>(4); |
| } |
| } |
| |
| static auto __attribute__((unused)) EnsureKnownEnumValue(OtaSoftwareUpdateRequestor::OTAAnnouncementReason val) |
| { |
| using EnumType = OtaSoftwareUpdateRequestor::OTAAnnouncementReason; |
| switch (val) |
| { |
| case EnumType::kSimpleAnnouncement: |
| case EnumType::kUpdateAvailable: |
| case EnumType::kUrgentUpdateAvailable: |
| return val; |
| default: |
| return static_cast<EnumType>(3); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(OtaSoftwareUpdateRequestor::OTAChangeReasonEnum val) |
| { |
| using EnumType = OtaSoftwareUpdateRequestor::OTAChangeReasonEnum; |
| switch (val) |
| { |
| case EnumType::kUnknown: |
| case EnumType::kSuccess: |
| case EnumType::kFailure: |
| case EnumType::kTimeOut: |
| case EnumType::kDelayByProvider: |
| return val; |
| default: |
| return static_cast<EnumType>(5); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(OtaSoftwareUpdateRequestor::OTAUpdateStateEnum val) |
| { |
| using EnumType = OtaSoftwareUpdateRequestor::OTAUpdateStateEnum; |
| switch (val) |
| { |
| case EnumType::kUnknown: |
| case EnumType::kIdle: |
| case EnumType::kQuerying: |
| case EnumType::kDelayedOnQuery: |
| case EnumType::kDownloading: |
| case EnumType::kApplying: |
| case EnumType::kDelayedOnApply: |
| case EnumType::kRollingBack: |
| case EnumType::kDelayedOnUserConsent: |
| return val; |
| default: |
| return static_cast<EnumType>(9); |
| } |
| } |
| |
| static auto __attribute__((unused)) EnsureKnownEnumValue(TimeFormatLocalization::CalendarTypeEnum val) |
| { |
| using EnumType = TimeFormatLocalization::CalendarTypeEnum; |
| switch (val) |
| { |
| case EnumType::kBuddhist: |
| case EnumType::kChinese: |
| case EnumType::kCoptic: |
| case EnumType::kEthiopian: |
| case EnumType::kGregorian: |
| case EnumType::kHebrew: |
| case EnumType::kIndian: |
| case EnumType::kIslamic: |
| case EnumType::kJapanese: |
| case EnumType::kKorean: |
| case EnumType::kPersian: |
| case EnumType::kTaiwanese: |
| return val; |
| default: |
| return static_cast<EnumType>(12); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(TimeFormatLocalization::HourFormatEnum val) |
| { |
| using EnumType = TimeFormatLocalization::HourFormatEnum; |
| switch (val) |
| { |
| case EnumType::k12hr: |
| case EnumType::k24hr: |
| return val; |
| default: |
| return static_cast<EnumType>(2); |
| } |
| } |
| |
| static auto __attribute__((unused)) EnsureKnownEnumValue(UnitLocalization::TempUnitEnum val) |
| { |
| using EnumType = UnitLocalization::TempUnitEnum; |
| switch (val) |
| { |
| case EnumType::kFahrenheit: |
| case EnumType::kCelsius: |
| case EnumType::kKelvin: |
| return val; |
| default: |
| return static_cast<EnumType>(3); |
| } |
| } |
| |
| static auto __attribute__((unused)) EnsureKnownEnumValue(PowerSource::BatApprovedChemistryEnum val) |
| { |
| using EnumType = PowerSource::BatApprovedChemistryEnum; |
| switch (val) |
| { |
| case EnumType::kUnspecified: |
| case EnumType::kAlkaline: |
| case EnumType::kLithiumCarbonFluoride: |
| case EnumType::kLithiumChromiumOxide: |
| case EnumType::kLithiumCopperOxide: |
| case EnumType::kLithiumIronDisulfide: |
| case EnumType::kLithiumManganeseDioxide: |
| case EnumType::kLithiumThionylChloride: |
| case EnumType::kMagnesium: |
| case EnumType::kMercuryOxide: |
| case EnumType::kNickelOxyhydride: |
| case EnumType::kSilverOxide: |
| case EnumType::kZincAir: |
| case EnumType::kZincCarbon: |
| case EnumType::kZincChloride: |
| case EnumType::kZincManganeseDioxide: |
| case EnumType::kLeadAcid: |
| case EnumType::kLithiumCobaltOxide: |
| case EnumType::kLithiumIon: |
| case EnumType::kLithiumIonPolymer: |
| case EnumType::kLithiumIronPhosphate: |
| case EnumType::kLithiumSulfur: |
| case EnumType::kLithiumTitanate: |
| case EnumType::kNickelCadmium: |
| case EnumType::kNickelHydrogen: |
| case EnumType::kNickelIron: |
| case EnumType::kNickelMetalHydride: |
| case EnumType::kNickelZinc: |
| case EnumType::kSilverZinc: |
| case EnumType::kSodiumIon: |
| case EnumType::kSodiumSulfur: |
| case EnumType::kZincBromide: |
| case EnumType::kZincCerium: |
| return val; |
| default: |
| return static_cast<EnumType>(33); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(PowerSource::BatChargeFaultEnum val) |
| { |
| using EnumType = PowerSource::BatChargeFaultEnum; |
| switch (val) |
| { |
| case EnumType::kUnspecified: |
| case EnumType::kAmbientTooHot: |
| case EnumType::kAmbientTooCold: |
| case EnumType::kBatteryTooHot: |
| case EnumType::kBatteryTooCold: |
| case EnumType::kBatteryAbsent: |
| case EnumType::kBatteryOverVoltage: |
| case EnumType::kBatteryUnderVoltage: |
| case EnumType::kChargerOverVoltage: |
| case EnumType::kChargerUnderVoltage: |
| case EnumType::kSafetyTimeout: |
| return val; |
| default: |
| return static_cast<EnumType>(11); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(PowerSource::BatChargeLevelEnum val) |
| { |
| using EnumType = PowerSource::BatChargeLevelEnum; |
| switch (val) |
| { |
| case EnumType::kOk: |
| case EnumType::kWarning: |
| case EnumType::kCritical: |
| return val; |
| default: |
| return static_cast<EnumType>(3); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(PowerSource::BatChargeStateEnum val) |
| { |
| using EnumType = PowerSource::BatChargeStateEnum; |
| switch (val) |
| { |
| case EnumType::kUnknown: |
| case EnumType::kIsCharging: |
| case EnumType::kIsAtFullCharge: |
| case EnumType::kIsNotCharging: |
| return val; |
| default: |
| return static_cast<EnumType>(4); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(PowerSource::BatCommonDesignationEnum val) |
| { |
| using EnumType = PowerSource::BatCommonDesignationEnum; |
| switch (val) |
| { |
| case EnumType::kUnspecified: |
| case EnumType::kAaa: |
| case EnumType::kAa: |
| case EnumType::kC: |
| case EnumType::kD: |
| case EnumType::k4v5: |
| case EnumType::k6v0: |
| case EnumType::k9v0: |
| case EnumType::k12aa: |
| case EnumType::kAaaa: |
| case EnumType::kA: |
| case EnumType::kB: |
| case EnumType::kF: |
| case EnumType::kN: |
| case EnumType::kNo6: |
| case EnumType::kSubC: |
| case EnumType::kA23: |
| case EnumType::kA27: |
| case EnumType::kBa5800: |
| case EnumType::kDuplex: |
| case EnumType::k4sr44: |
| case EnumType::k523: |
| case EnumType::k531: |
| case EnumType::k15v0: |
| case EnumType::k22v5: |
| case EnumType::k30v0: |
| case EnumType::k45v0: |
| case EnumType::k67v5: |
| case EnumType::kJ: |
| case EnumType::kCr123a: |
| case EnumType::kCr2: |
| case EnumType::k2cr5: |
| case EnumType::kCrP2: |
| case EnumType::kCrV3: |
| case EnumType::kSr41: |
| case EnumType::kSr43: |
| case EnumType::kSr44: |
| case EnumType::kSr45: |
| case EnumType::kSr48: |
| case EnumType::kSr54: |
| case EnumType::kSr55: |
| case EnumType::kSr57: |
| case EnumType::kSr58: |
| case EnumType::kSr59: |
| case EnumType::kSr60: |
| case EnumType::kSr63: |
| case EnumType::kSr64: |
| case EnumType::kSr65: |
| case EnumType::kSr66: |
| case EnumType::kSr67: |
| case EnumType::kSr68: |
| case EnumType::kSr69: |
| case EnumType::kSr516: |
| case EnumType::kSr731: |
| case EnumType::kSr712: |
| case EnumType::kLr932: |
| case EnumType::kA5: |
| case EnumType::kA10: |
| case EnumType::kA13: |
| case EnumType::kA312: |
| case EnumType::kA675: |
| case EnumType::kAc41e: |
| case EnumType::k10180: |
| case EnumType::k10280: |
| case EnumType::k10440: |
| case EnumType::k14250: |
| case EnumType::k14430: |
| case EnumType::k14500: |
| case EnumType::k14650: |
| case EnumType::k15270: |
| case EnumType::k16340: |
| case EnumType::kRcr123a: |
| case EnumType::k17500: |
| case EnumType::k17670: |
| case EnumType::k18350: |
| case EnumType::k18500: |
| case EnumType::k18650: |
| case EnumType::k19670: |
| case EnumType::k25500: |
| case EnumType::k26650: |
| case EnumType::k32600: |
| return val; |
| default: |
| return static_cast<EnumType>(81); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(PowerSource::BatFaultEnum val) |
| { |
| using EnumType = PowerSource::BatFaultEnum; |
| switch (val) |
| { |
| case EnumType::kUnspecified: |
| case EnumType::kOverTemp: |
| case EnumType::kUnderTemp: |
| return val; |
| default: |
| return static_cast<EnumType>(3); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(PowerSource::BatReplaceabilityEnum val) |
| { |
| using EnumType = PowerSource::BatReplaceabilityEnum; |
| switch (val) |
| { |
| case EnumType::kUnspecified: |
| case EnumType::kNotReplaceable: |
| case EnumType::kUserReplaceable: |
| case EnumType::kFactoryReplaceable: |
| return val; |
| default: |
| return static_cast<EnumType>(4); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(PowerSource::PowerSourceStatusEnum val) |
| { |
| using EnumType = PowerSource::PowerSourceStatusEnum; |
| switch (val) |
| { |
| case EnumType::kUnspecified: |
| case EnumType::kActive: |
| case EnumType::kStandby: |
| case EnumType::kUnavailable: |
| return val; |
| default: |
| return static_cast<EnumType>(4); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(PowerSource::WiredCurrentTypeEnum val) |
| { |
| using EnumType = PowerSource::WiredCurrentTypeEnum; |
| switch (val) |
| { |
| case EnumType::kAc: |
| case EnumType::kDc: |
| return val; |
| default: |
| return static_cast<EnumType>(2); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(PowerSource::WiredFaultEnum val) |
| { |
| using EnumType = PowerSource::WiredFaultEnum; |
| switch (val) |
| { |
| case EnumType::kUnspecified: |
| case EnumType::kOverVoltage: |
| case EnumType::kUnderVoltage: |
| return val; |
| default: |
| return static_cast<EnumType>(3); |
| } |
| } |
| |
| static auto __attribute__((unused)) EnsureKnownEnumValue(GeneralCommissioning::CommissioningErrorEnum val) |
| { |
| using EnumType = GeneralCommissioning::CommissioningErrorEnum; |
| switch (val) |
| { |
| case EnumType::kOk: |
| case EnumType::kValueOutsideRange: |
| case EnumType::kInvalidAuthentication: |
| case EnumType::kNoFailSafe: |
| case EnumType::kBusyWithOtherAdmin: |
| return val; |
| default: |
| return static_cast<EnumType>(5); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(GeneralCommissioning::RegulatoryLocationTypeEnum val) |
| { |
| using EnumType = GeneralCommissioning::RegulatoryLocationTypeEnum; |
| switch (val) |
| { |
| case EnumType::kIndoor: |
| case EnumType::kOutdoor: |
| case EnumType::kIndoorOutdoor: |
| return val; |
| default: |
| return static_cast<EnumType>(3); |
| } |
| } |
| |
| static auto __attribute__((unused)) EnsureKnownEnumValue(NetworkCommissioning::NetworkCommissioningStatusEnum val) |
| { |
| using EnumType = NetworkCommissioning::NetworkCommissioningStatusEnum; |
| switch (val) |
| { |
| case EnumType::kSuccess: |
| case EnumType::kOutOfRange: |
| case EnumType::kBoundsExceeded: |
| case EnumType::kNetworkIDNotFound: |
| case EnumType::kDuplicateNetworkID: |
| case EnumType::kNetworkNotFound: |
| case EnumType::kRegulatoryError: |
| case EnumType::kAuthFailure: |
| case EnumType::kUnsupportedSecurity: |
| case EnumType::kOtherConnectionFailure: |
| case EnumType::kIPV6Failed: |
| case EnumType::kIPBindFailed: |
| case EnumType::kUnknownError: |
| return val; |
| default: |
| return static_cast<EnumType>(13); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(NetworkCommissioning::WiFiBandEnum val) |
| { |
| using EnumType = NetworkCommissioning::WiFiBandEnum; |
| switch (val) |
| { |
| case EnumType::k2g4: |
| case EnumType::k3g65: |
| case EnumType::k5g: |
| case EnumType::k6g: |
| case EnumType::k60g: |
| case EnumType::k1g: |
| return val; |
| default: |
| return static_cast<EnumType>(6); |
| } |
| } |
| |
| static auto __attribute__((unused)) EnsureKnownEnumValue(DiagnosticLogs::IntentEnum val) |
| { |
| using EnumType = DiagnosticLogs::IntentEnum; |
| switch (val) |
| { |
| case EnumType::kEndUserSupport: |
| case EnumType::kNetworkDiag: |
| case EnumType::kCrashLogs: |
| return val; |
| default: |
| return static_cast<EnumType>(3); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(DiagnosticLogs::StatusEnum val) |
| { |
| using EnumType = DiagnosticLogs::StatusEnum; |
| switch (val) |
| { |
| case EnumType::kSuccess: |
| case EnumType::kExhausted: |
| case EnumType::kNoLogs: |
| case EnumType::kBusy: |
| case EnumType::kDenied: |
| return val; |
| default: |
| return static_cast<EnumType>(5); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(DiagnosticLogs::TransferProtocolEnum val) |
| { |
| using EnumType = DiagnosticLogs::TransferProtocolEnum; |
| switch (val) |
| { |
| case EnumType::kResponsePayload: |
| case EnumType::kBdx: |
| return val; |
| default: |
| return static_cast<EnumType>(2); |
| } |
| } |
| |
| static auto __attribute__((unused)) EnsureKnownEnumValue(GeneralDiagnostics::BootReasonEnum val) |
| { |
| using EnumType = GeneralDiagnostics::BootReasonEnum; |
| switch (val) |
| { |
| case EnumType::kUnspecified: |
| case EnumType::kPowerOnReboot: |
| case EnumType::kBrownOutReset: |
| case EnumType::kSoftwareWatchdogReset: |
| case EnumType::kHardwareWatchdogReset: |
| case EnumType::kSoftwareUpdateCompleted: |
| case EnumType::kSoftwareReset: |
| return val; |
| default: |
| return static_cast<EnumType>(7); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(GeneralDiagnostics::HardwareFaultEnum val) |
| { |
| using EnumType = GeneralDiagnostics::HardwareFaultEnum; |
| switch (val) |
| { |
| case EnumType::kUnspecified: |
| case EnumType::kRadio: |
| case EnumType::kSensor: |
| case EnumType::kResettableOverTemp: |
| case EnumType::kNonResettableOverTemp: |
| case EnumType::kPowerSource: |
| case EnumType::kVisualDisplayFault: |
| case EnumType::kAudioOutputFault: |
| case EnumType::kUserInterfaceFault: |
| case EnumType::kNonVolatileMemoryError: |
| case EnumType::kTamperDetected: |
| return val; |
| default: |
| return static_cast<EnumType>(11); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(GeneralDiagnostics::InterfaceTypeEnum val) |
| { |
| using EnumType = GeneralDiagnostics::InterfaceTypeEnum; |
| switch (val) |
| { |
| // Need to convert consumers to using the new enum classes, so we |
| // don't just have casts all over. |
| #ifdef CHIP_USE_ENUM_CLASS_FOR_IM_ENUM |
| case EnumType::kUnspecified: |
| case EnumType::kWiFi: |
| case EnumType::kEthernet: |
| case EnumType::kCellular: |
| case EnumType::kThread: |
| #else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM |
| case EMBER_ZCL_INTERFACE_TYPE_ENUM_UNSPECIFIED: |
| case EMBER_ZCL_INTERFACE_TYPE_ENUM_WI_FI: |
| case EMBER_ZCL_INTERFACE_TYPE_ENUM_ETHERNET: |
| case EMBER_ZCL_INTERFACE_TYPE_ENUM_CELLULAR: |
| case EMBER_ZCL_INTERFACE_TYPE_ENUM_THREAD: |
| #endif // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM |
| return val; |
| default: |
| return static_cast<EnumType>(5); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(GeneralDiagnostics::NetworkFaultEnum val) |
| { |
| using EnumType = GeneralDiagnostics::NetworkFaultEnum; |
| switch (val) |
| { |
| case EnumType::kUnspecified: |
| case EnumType::kHardwareFailure: |
| case EnumType::kNetworkJammed: |
| case EnumType::kConnectionFailed: |
| return val; |
| default: |
| return static_cast<EnumType>(4); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(GeneralDiagnostics::RadioFaultEnum val) |
| { |
| using EnumType = GeneralDiagnostics::RadioFaultEnum; |
| switch (val) |
| { |
| // Need to convert consumers to using the new enum classes, so we |
| // don't just have casts all over. |
| #ifdef CHIP_USE_ENUM_CLASS_FOR_IM_ENUM |
| case EnumType::kUnspecified: |
| case EnumType::kWiFiFault: |
| case EnumType::kCellularFault: |
| case EnumType::kThreadFault: |
| case EnumType::kNFCFault: |
| case EnumType::kBLEFault: |
| case EnumType::kEthernetFault: |
| #else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM |
| case EMBER_ZCL_RADIO_FAULT_ENUM_UNSPECIFIED: |
| case EMBER_ZCL_RADIO_FAULT_ENUM_WI_FI_FAULT: |
| case EMBER_ZCL_RADIO_FAULT_ENUM_CELLULAR_FAULT: |
| case EMBER_ZCL_RADIO_FAULT_ENUM_THREAD_FAULT: |
| case EMBER_ZCL_RADIO_FAULT_ENUM_NFC_FAULT: |
| case EMBER_ZCL_RADIO_FAULT_ENUM_BLE_FAULT: |
| case EMBER_ZCL_RADIO_FAULT_ENUM_ETHERNET_FAULT: |
| #endif // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM |
| return val; |
| default: |
| return static_cast<EnumType>(7); |
| } |
| } |
| |
| static auto __attribute__((unused)) EnsureKnownEnumValue(ThreadNetworkDiagnostics::ConnectionStatusEnum val) |
| { |
| using EnumType = ThreadNetworkDiagnostics::ConnectionStatusEnum; |
| switch (val) |
| { |
| case EnumType::kConnected: |
| case EnumType::kNotConnected: |
| return val; |
| default: |
| return static_cast<EnumType>(2); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(ThreadNetworkDiagnostics::NetworkFaultEnum val) |
| { |
| using EnumType = ThreadNetworkDiagnostics::NetworkFaultEnum; |
| switch (val) |
| { |
| case EnumType::kUnspecified: |
| case EnumType::kLinkDown: |
| case EnumType::kHardwareFailure: |
| case EnumType::kNetworkJammed: |
| return val; |
| default: |
| return static_cast<EnumType>(4); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(ThreadNetworkDiagnostics::RoutingRoleEnum val) |
| { |
| using EnumType = ThreadNetworkDiagnostics::RoutingRoleEnum; |
| switch (val) |
| { |
| case EnumType::kUnspecified: |
| case EnumType::kUnassigned: |
| case EnumType::kSleepyEndDevice: |
| case EnumType::kEndDevice: |
| case EnumType::kReed: |
| case EnumType::kRouter: |
| case EnumType::kLeader: |
| return val; |
| default: |
| return static_cast<EnumType>(7); |
| } |
| } |
| |
| static auto __attribute__((unused)) EnsureKnownEnumValue(WiFiNetworkDiagnostics::AssociationFailureCauseEnum val) |
| { |
| using EnumType = WiFiNetworkDiagnostics::AssociationFailureCauseEnum; |
| switch (val) |
| { |
| case EnumType::kUnknown: |
| case EnumType::kAssociationFailed: |
| case EnumType::kAuthenticationFailed: |
| case EnumType::kSsidNotFound: |
| return val; |
| default: |
| return static_cast<EnumType>(4); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(WiFiNetworkDiagnostics::ConnectionStatusEnum val) |
| { |
| using EnumType = WiFiNetworkDiagnostics::ConnectionStatusEnum; |
| switch (val) |
| { |
| case EnumType::kConnected: |
| case EnumType::kNotConnected: |
| return val; |
| default: |
| return static_cast<EnumType>(2); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(WiFiNetworkDiagnostics::SecurityTypeEnum val) |
| { |
| using EnumType = WiFiNetworkDiagnostics::SecurityTypeEnum; |
| switch (val) |
| { |
| case EnumType::kUnspecified: |
| case EnumType::kNone: |
| case EnumType::kWep: |
| case EnumType::kWpa: |
| case EnumType::kWpa2: |
| case EnumType::kWpa3: |
| return val; |
| default: |
| return static_cast<EnumType>(6); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(WiFiNetworkDiagnostics::WiFiVersionEnum val) |
| { |
| using EnumType = WiFiNetworkDiagnostics::WiFiVersionEnum; |
| switch (val) |
| { |
| case EnumType::kA: |
| case EnumType::kB: |
| case EnumType::kG: |
| case EnumType::kN: |
| case EnumType::kAc: |
| case EnumType::kAx: |
| case EnumType::kAh: |
| return val; |
| default: |
| return static_cast<EnumType>(7); |
| } |
| } |
| |
| static auto __attribute__((unused)) EnsureKnownEnumValue(EthernetNetworkDiagnostics::PHYRateEnum val) |
| { |
| using EnumType = EthernetNetworkDiagnostics::PHYRateEnum; |
| switch (val) |
| { |
| // Need to convert consumers to using the new enum classes, so we |
| // don't just have casts all over. |
| #ifdef CHIP_USE_ENUM_CLASS_FOR_IM_ENUM |
| case EnumType::kRate10M: |
| case EnumType::kRate100M: |
| case EnumType::kRate1G: |
| case EnumType::kRate25g: |
| case EnumType::kRate5G: |
| case EnumType::kRate10G: |
| case EnumType::kRate40G: |
| case EnumType::kRate100G: |
| case EnumType::kRate200G: |
| case EnumType::kRate400G: |
| #else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM |
| case EMBER_ZCL_PHY_RATE_ENUM_RATE10_M: |
| case EMBER_ZCL_PHY_RATE_ENUM_RATE100_M: |
| case EMBER_ZCL_PHY_RATE_ENUM_RATE1_G: |
| case EMBER_ZCL_PHY_RATE_ENUM_RATE2_5_G: |
| case EMBER_ZCL_PHY_RATE_ENUM_RATE5_G: |
| case EMBER_ZCL_PHY_RATE_ENUM_RATE10_G: |
| case EMBER_ZCL_PHY_RATE_ENUM_RATE40_G: |
| case EMBER_ZCL_PHY_RATE_ENUM_RATE100_G: |
| case EMBER_ZCL_PHY_RATE_ENUM_RATE200_G: |
| case EMBER_ZCL_PHY_RATE_ENUM_RATE400_G: |
| #endif // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM |
| return val; |
| default: |
| return static_cast<EnumType>(10); |
| } |
| } |
| |
| static auto __attribute__((unused)) EnsureKnownEnumValue(TimeSynchronization::GranularityEnum val) |
| { |
| using EnumType = TimeSynchronization::GranularityEnum; |
| switch (val) |
| { |
| case EnumType::kNoTimeGranularity: |
| case EnumType::kMinutesGranularity: |
| case EnumType::kSecondsGranularity: |
| case EnumType::kMillisecondsGranularity: |
| case EnumType::kMicrosecondsGranularity: |
| return val; |
| default: |
| return static_cast<EnumType>(5); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(TimeSynchronization::StatusCode val) |
| { |
| using EnumType = TimeSynchronization::StatusCode; |
| switch (val) |
| { |
| case EnumType::kTimeNotAccepted: |
| return val; |
| default: |
| return static_cast<EnumType>(0); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(TimeSynchronization::TimeSourceEnum val) |
| { |
| using EnumType = TimeSynchronization::TimeSourceEnum; |
| switch (val) |
| { |
| case EnumType::kNone: |
| case EnumType::kUnknown: |
| case EnumType::kAdmin: |
| case EnumType::kNodeTimeCluster: |
| case EnumType::kNonMatterSNTP: |
| case EnumType::kNonMatterNTP: |
| case EnumType::kMatterSNTP: |
| case EnumType::kMatterNTP: |
| case EnumType::kMixedNTP: |
| case EnumType::kNonMatterSNTPNTS: |
| case EnumType::kNonMatterNTPNTS: |
| case EnumType::kMatterSNTPNTS: |
| case EnumType::kMatterNTPNTS: |
| case EnumType::kMixedNTPNTS: |
| case EnumType::kCloudSource: |
| case EnumType::kPtp: |
| case EnumType::kGnss: |
| return val; |
| default: |
| return static_cast<EnumType>(17); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(TimeSynchronization::TimeZoneDatabaseEnum val) |
| { |
| using EnumType = TimeSynchronization::TimeZoneDatabaseEnum; |
| switch (val) |
| { |
| case EnumType::kFull: |
| case EnumType::kPartial: |
| case EnumType::kNone: |
| return val; |
| default: |
| return static_cast<EnumType>(3); |
| } |
| } |
| |
| static auto __attribute__((unused)) EnsureKnownEnumValue(BridgedDeviceBasicInformation::ColorEnum val) |
| { |
| using EnumType = BridgedDeviceBasicInformation::ColorEnum; |
| switch (val) |
| { |
| case EnumType::kBlack: |
| case EnumType::kNavy: |
| case EnumType::kGreen: |
| case EnumType::kTeal: |
| case EnumType::kMaroon: |
| case EnumType::kPurple: |
| case EnumType::kOlive: |
| case EnumType::kGray: |
| case EnumType::kBlue: |
| case EnumType::kLime: |
| case EnumType::kAqua: |
| case EnumType::kRed: |
| case EnumType::kFuchsia: |
| case EnumType::kYellow: |
| case EnumType::kWhite: |
| case EnumType::kNickel: |
| case EnumType::kChrome: |
| case EnumType::kBrass: |
| case EnumType::kCopper: |
| case EnumType::kSilver: |
| case EnumType::kGold: |
| return val; |
| default: |
| return static_cast<EnumType>(21); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(BridgedDeviceBasicInformation::ProductFinishEnum val) |
| { |
| using EnumType = BridgedDeviceBasicInformation::ProductFinishEnum; |
| switch (val) |
| { |
| case EnumType::kOther: |
| case EnumType::kMatte: |
| case EnumType::kSatin: |
| case EnumType::kPolished: |
| case EnumType::kRugged: |
| case EnumType::kFabric: |
| return val; |
| default: |
| return static_cast<EnumType>(6); |
| } |
| } |
| |
| static auto __attribute__((unused)) EnsureKnownEnumValue(AdministratorCommissioning::CommissioningWindowStatusEnum val) |
| { |
| using EnumType = AdministratorCommissioning::CommissioningWindowStatusEnum; |
| switch (val) |
| { |
| case EnumType::kWindowNotOpen: |
| case EnumType::kEnhancedWindowOpen: |
| case EnumType::kBasicWindowOpen: |
| return val; |
| default: |
| return static_cast<EnumType>(3); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(AdministratorCommissioning::StatusCode val) |
| { |
| using EnumType = AdministratorCommissioning::StatusCode; |
| switch (val) |
| { |
| case EnumType::kBusy: |
| case EnumType::kPAKEParameterError: |
| case EnumType::kWindowNotOpen: |
| return val; |
| default: |
| return static_cast<EnumType>(0); |
| } |
| } |
| |
| static auto __attribute__((unused)) EnsureKnownEnumValue(OperationalCredentials::CertificateChainTypeEnum val) |
| { |
| using EnumType = OperationalCredentials::CertificateChainTypeEnum; |
| switch (val) |
| { |
| case EnumType::kDACCertificate: |
| case EnumType::kPAICertificate: |
| return val; |
| default: |
| return static_cast<EnumType>(0); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(OperationalCredentials::NodeOperationalCertStatusEnum val) |
| { |
| using EnumType = OperationalCredentials::NodeOperationalCertStatusEnum; |
| switch (val) |
| { |
| case EnumType::kOk: |
| case EnumType::kInvalidPublicKey: |
| case EnumType::kInvalidNodeOpId: |
| case EnumType::kInvalidNOC: |
| case EnumType::kMissingCsr: |
| case EnumType::kTableFull: |
| case EnumType::kInvalidAdminSubject: |
| case EnumType::kFabricConflict: |
| case EnumType::kLabelConflict: |
| case EnumType::kInvalidFabricIndex: |
| return val; |
| default: |
| return static_cast<EnumType>(7); |
| } |
| } |
| |
| static auto __attribute__((unused)) EnsureKnownEnumValue(GroupKeyManagement::GroupKeySecurityPolicyEnum val) |
| { |
| using EnumType = GroupKeyManagement::GroupKeySecurityPolicyEnum; |
| switch (val) |
| { |
| case EnumType::kTrustFirst: |
| case EnumType::kCacheAndSync: |
| return val; |
| default: |
| return static_cast<EnumType>(2); |
| } |
| } |
| |
| static auto __attribute__((unused)) EnsureKnownEnumValue(LaundryWasherMode::ModeTag val) |
| { |
| using EnumType = LaundryWasherMode::ModeTag; |
| switch (val) |
| { |
| case EnumType::kNormal: |
| case EnumType::kDelicate: |
| case EnumType::kHeavy: |
| case EnumType::kWhites: |
| return val; |
| default: |
| return static_cast<EnumType>(0); |
| } |
| } |
| |
| static auto __attribute__((unused)) EnsureKnownEnumValue(RefrigeratorAndTemperatureControlledCabinetMode::ModeTag val) |
| { |
| using EnumType = RefrigeratorAndTemperatureControlledCabinetMode::ModeTag; |
| switch (val) |
| { |
| case EnumType::kRapidCool: |
| case EnumType::kRapidFreeze: |
| return val; |
| default: |
| return static_cast<EnumType>(0); |
| } |
| } |
| |
| static auto __attribute__((unused)) EnsureKnownEnumValue(RvcRunMode::ModeTag val) |
| { |
| using EnumType = RvcRunMode::ModeTag; |
| switch (val) |
| { |
| case EnumType::kIdle: |
| case EnumType::kCleaning: |
| return val; |
| default: |
| return static_cast<EnumType>(0); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(RvcRunMode::StatusCode val) |
| { |
| using EnumType = RvcRunMode::StatusCode; |
| switch (val) |
| { |
| case EnumType::kStuck: |
| case EnumType::kDustBinMissing: |
| case EnumType::kDustBinFull: |
| case EnumType::kWaterTankEmpty: |
| case EnumType::kWaterTankMissing: |
| case EnumType::kWaterTankLidOpen: |
| case EnumType::kMopCleaningPadMissing: |
| case EnumType::kBatteryLow: |
| return val; |
| default: |
| return static_cast<EnumType>(0); |
| } |
| } |
| |
| static auto __attribute__((unused)) EnsureKnownEnumValue(RvcCleanMode::ModeTag val) |
| { |
| using EnumType = RvcCleanMode::ModeTag; |
| switch (val) |
| { |
| case EnumType::kDeepClean: |
| case EnumType::kVacuum: |
| case EnumType::kMop: |
| return val; |
| default: |
| return static_cast<EnumType>(0); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(RvcCleanMode::StatusCode val) |
| { |
| using EnumType = RvcCleanMode::StatusCode; |
| switch (val) |
| { |
| case EnumType::kCleaningInProgress: |
| return val; |
| default: |
| return static_cast<EnumType>(0); |
| } |
| } |
| |
| static auto __attribute__((unused)) EnsureKnownEnumValue(DishwasherMode::ModeTag val) |
| { |
| using EnumType = DishwasherMode::ModeTag; |
| switch (val) |
| { |
| case EnumType::kNormal: |
| case EnumType::kHeavy: |
| case EnumType::kLight: |
| return val; |
| default: |
| return static_cast<EnumType>(0); |
| } |
| } |
| |
| static auto __attribute__((unused)) EnsureKnownEnumValue(AirQuality::AirQualityEnum val) |
| { |
| using EnumType = AirQuality::AirQualityEnum; |
| switch (val) |
| { |
| case EnumType::kUnknown: |
| case EnumType::kGood: |
| case EnumType::kFair: |
| case EnumType::kModerate: |
| case EnumType::kPoor: |
| case EnumType::kVeryPoor: |
| case EnumType::kExtremelyPoor: |
| return val; |
| default: |
| return static_cast<EnumType>(7); |
| } |
| } |
| |
| static auto __attribute__((unused)) EnsureKnownEnumValue(SmokeCoAlarm::AlarmStateEnum val) |
| { |
| using EnumType = SmokeCoAlarm::AlarmStateEnum; |
| switch (val) |
| { |
| case EnumType::kNormal: |
| case EnumType::kWarning: |
| case EnumType::kCritical: |
| return val; |
| default: |
| return static_cast<EnumType>(3); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(SmokeCoAlarm::ContaminationStateEnum val) |
| { |
| using EnumType = SmokeCoAlarm::ContaminationStateEnum; |
| switch (val) |
| { |
| case EnumType::kNormal: |
| case EnumType::kLow: |
| case EnumType::kWarning: |
| case EnumType::kCritical: |
| return val; |
| default: |
| return static_cast<EnumType>(4); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(SmokeCoAlarm::EndOfServiceEnum val) |
| { |
| using EnumType = SmokeCoAlarm::EndOfServiceEnum; |
| switch (val) |
| { |
| case EnumType::kExpired: |
| case EnumType::kNormal: |
| return val; |
| default: |
| return static_cast<EnumType>(2); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(SmokeCoAlarm::ExpressedStateEnum val) |
| { |
| using EnumType = SmokeCoAlarm::ExpressedStateEnum; |
| switch (val) |
| { |
| case EnumType::kNormal: |
| case EnumType::kSmokeAlarm: |
| case EnumType::kCOAlarm: |
| case EnumType::kBatteryAlert: |
| case EnumType::kTesting: |
| case EnumType::kHardwareFault: |
| case EnumType::kEndOfService: |
| case EnumType::kInterconnectSmoke: |
| case EnumType::kInterconnectCO: |
| return val; |
| default: |
| return static_cast<EnumType>(9); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(SmokeCoAlarm::MuteStateEnum val) |
| { |
| using EnumType = SmokeCoAlarm::MuteStateEnum; |
| switch (val) |
| { |
| case EnumType::kNotMuted: |
| case EnumType::kMuted: |
| return val; |
| default: |
| return static_cast<EnumType>(2); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(SmokeCoAlarm::SensitivityEnum val) |
| { |
| using EnumType = SmokeCoAlarm::SensitivityEnum; |
| switch (val) |
| { |
| case EnumType::kHigh: |
| case EnumType::kStandard: |
| case EnumType::kLow: |
| return val; |
| default: |
| return static_cast<EnumType>(3); |
| } |
| } |
| |
| static auto __attribute__((unused)) EnsureKnownEnumValue(OperationalState::ErrorStateEnum val) |
| { |
| using EnumType = OperationalState::ErrorStateEnum; |
| switch (val) |
| { |
| case EnumType::kNoError: |
| case EnumType::kUnableToStartOrResume: |
| case EnumType::kUnableToCompleteOperation: |
| case EnumType::kCommandInvalidInState: |
| return val; |
| default: |
| return static_cast<EnumType>(4); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(OperationalState::OperationalStateEnum val) |
| { |
| using EnumType = OperationalState::OperationalStateEnum; |
| switch (val) |
| { |
| case EnumType::kStopped: |
| case EnumType::kRunning: |
| case EnumType::kPaused: |
| case EnumType::kError: |
| return val; |
| default: |
| return static_cast<EnumType>(4); |
| } |
| } |
| |
| static auto __attribute__((unused)) EnsureKnownEnumValue(RvcOperationalState::ErrorStateEnum val) |
| { |
| using EnumType = RvcOperationalState::ErrorStateEnum; |
| switch (val) |
| { |
| case EnumType::kFailedToFindChargingDock: |
| case EnumType::kStuck: |
| case EnumType::kDustBinMissing: |
| case EnumType::kDustBinFull: |
| case EnumType::kWaterTankEmpty: |
| case EnumType::kWaterTankMissing: |
| case EnumType::kWaterTankLidOpen: |
| case EnumType::kMopCleaningPadMissing: |
| return val; |
| default: |
| return static_cast<EnumType>(0); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(RvcOperationalState::OperationalStateEnum val) |
| { |
| using EnumType = RvcOperationalState::OperationalStateEnum; |
| switch (val) |
| { |
| case EnumType::kSeekingCharger: |
| case EnumType::kCharging: |
| case EnumType::kDocked: |
| return val; |
| default: |
| return static_cast<EnumType>(0); |
| } |
| } |
| |
| static auto __attribute__((unused)) EnsureKnownEnumValue(HepaFilterMonitoring::ChangeIndicationEnum val) |
| { |
| using EnumType = HepaFilterMonitoring::ChangeIndicationEnum; |
| switch (val) |
| { |
| case EnumType::kOk: |
| case EnumType::kWarning: |
| case EnumType::kCritical: |
| return val; |
| default: |
| return static_cast<EnumType>(3); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(HepaFilterMonitoring::DegradationDirectionEnum val) |
| { |
| using EnumType = HepaFilterMonitoring::DegradationDirectionEnum; |
| switch (val) |
| { |
| case EnumType::kUp: |
| case EnumType::kDown: |
| return val; |
| default: |
| return static_cast<EnumType>(2); |
| } |
| } |
| |
| static auto __attribute__((unused)) EnsureKnownEnumValue(ActivatedCarbonFilterMonitoring::ChangeIndicationEnum val) |
| { |
| using EnumType = ActivatedCarbonFilterMonitoring::ChangeIndicationEnum; |
| switch (val) |
| { |
| case EnumType::kOk: |
| case EnumType::kWarning: |
| case EnumType::kCritical: |
| return val; |
| default: |
| return static_cast<EnumType>(3); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(ActivatedCarbonFilterMonitoring::DegradationDirectionEnum val) |
| { |
| using EnumType = ActivatedCarbonFilterMonitoring::DegradationDirectionEnum; |
| switch (val) |
| { |
| case EnumType::kUp: |
| case EnumType::kDown: |
| return val; |
| default: |
| return static_cast<EnumType>(2); |
| } |
| } |
| |
| static auto __attribute__((unused)) EnsureKnownEnumValue(CeramicFilterMonitoring::ChangeIndicationEnum val) |
| { |
| using EnumType = CeramicFilterMonitoring::ChangeIndicationEnum; |
| switch (val) |
| { |
| case EnumType::kOk: |
| case EnumType::kWarning: |
| case EnumType::kCritical: |
| return val; |
| default: |
| return static_cast<EnumType>(3); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(CeramicFilterMonitoring::DegradationDirectionEnum val) |
| { |
| using EnumType = CeramicFilterMonitoring::DegradationDirectionEnum; |
| switch (val) |
| { |
| case EnumType::kUp: |
| case EnumType::kDown: |
| return val; |
| default: |
| return static_cast<EnumType>(2); |
| } |
| } |
| |
| static auto __attribute__((unused)) EnsureKnownEnumValue(ElectrostaticFilterMonitoring::ChangeIndicationEnum val) |
| { |
| using EnumType = ElectrostaticFilterMonitoring::ChangeIndicationEnum; |
| switch (val) |
| { |
| case EnumType::kOk: |
| case EnumType::kWarning: |
| case EnumType::kCritical: |
| return val; |
| default: |
| return static_cast<EnumType>(3); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(ElectrostaticFilterMonitoring::DegradationDirectionEnum val) |
| { |
| using EnumType = ElectrostaticFilterMonitoring::DegradationDirectionEnum; |
| switch (val) |
| { |
| case EnumType::kUp: |
| case EnumType::kDown: |
| return val; |
| default: |
| return static_cast<EnumType>(2); |
| } |
| } |
| |
| static auto __attribute__((unused)) EnsureKnownEnumValue(UvFilterMonitoring::ChangeIndicationEnum val) |
| { |
| using EnumType = UvFilterMonitoring::ChangeIndicationEnum; |
| switch (val) |
| { |
| case EnumType::kOk: |
| case EnumType::kWarning: |
| case EnumType::kCritical: |
| return val; |
| default: |
| return static_cast<EnumType>(3); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(UvFilterMonitoring::DegradationDirectionEnum val) |
| { |
| using EnumType = UvFilterMonitoring::DegradationDirectionEnum; |
| switch (val) |
| { |
| case EnumType::kUp: |
| case EnumType::kDown: |
| return val; |
| default: |
| return static_cast<EnumType>(2); |
| } |
| } |
| |
| static auto __attribute__((unused)) EnsureKnownEnumValue(IonizingFilterMonitoring::ChangeIndicationEnum val) |
| { |
| using EnumType = IonizingFilterMonitoring::ChangeIndicationEnum; |
| switch (val) |
| { |
| case EnumType::kOk: |
| case EnumType::kWarning: |
| case EnumType::kCritical: |
| return val; |
| default: |
| return static_cast<EnumType>(3); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(IonizingFilterMonitoring::DegradationDirectionEnum val) |
| { |
| using EnumType = IonizingFilterMonitoring::DegradationDirectionEnum; |
| switch (val) |
| { |
| case EnumType::kUp: |
| case EnumType::kDown: |
| return val; |
| default: |
| return static_cast<EnumType>(2); |
| } |
| } |
| |
| static auto __attribute__((unused)) EnsureKnownEnumValue(ZeoliteFilterMonitoring::ChangeIndicationEnum val) |
| { |
| using EnumType = ZeoliteFilterMonitoring::ChangeIndicationEnum; |
| switch (val) |
| { |
| case EnumType::kOk: |
| case EnumType::kWarning: |
| case EnumType::kCritical: |
| return val; |
| default: |
| return static_cast<EnumType>(3); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(ZeoliteFilterMonitoring::DegradationDirectionEnum val) |
| { |
| using EnumType = ZeoliteFilterMonitoring::DegradationDirectionEnum; |
| switch (val) |
| { |
| case EnumType::kUp: |
| case EnumType::kDown: |
| return val; |
| default: |
| return static_cast<EnumType>(2); |
| } |
| } |
| |
| static auto __attribute__((unused)) EnsureKnownEnumValue(OzoneFilterMonitoring::ChangeIndicationEnum val) |
| { |
| using EnumType = OzoneFilterMonitoring::ChangeIndicationEnum; |
| switch (val) |
| { |
| case EnumType::kOk: |
| case EnumType::kWarning: |
| case EnumType::kCritical: |
| return val; |
| default: |
| return static_cast<EnumType>(3); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(OzoneFilterMonitoring::DegradationDirectionEnum val) |
| { |
| using EnumType = OzoneFilterMonitoring::DegradationDirectionEnum; |
| switch (val) |
| { |
| case EnumType::kUp: |
| case EnumType::kDown: |
| return val; |
| default: |
| return static_cast<EnumType>(2); |
| } |
| } |
| |
| static auto __attribute__((unused)) EnsureKnownEnumValue(WaterTankMonitoring::ChangeIndicationEnum val) |
| { |
| using EnumType = WaterTankMonitoring::ChangeIndicationEnum; |
| switch (val) |
| { |
| case EnumType::kOk: |
| case EnumType::kWarning: |
| case EnumType::kCritical: |
| return val; |
| default: |
| return static_cast<EnumType>(3); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(WaterTankMonitoring::DegradationDirectionEnum val) |
| { |
| using EnumType = WaterTankMonitoring::DegradationDirectionEnum; |
| switch (val) |
| { |
| case EnumType::kUp: |
| case EnumType::kDown: |
| return val; |
| default: |
| return static_cast<EnumType>(2); |
| } |
| } |
| |
| static auto __attribute__((unused)) EnsureKnownEnumValue(FuelTankMonitoring::ChangeIndicationEnum val) |
| { |
| using EnumType = FuelTankMonitoring::ChangeIndicationEnum; |
| switch (val) |
| { |
| case EnumType::kOk: |
| case EnumType::kWarning: |
| case EnumType::kCritical: |
| return val; |
| default: |
| return static_cast<EnumType>(3); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(FuelTankMonitoring::DegradationDirectionEnum val) |
| { |
| using EnumType = FuelTankMonitoring::DegradationDirectionEnum; |
| switch (val) |
| { |
| case EnumType::kUp: |
| case EnumType::kDown: |
| return val; |
| default: |
| return static_cast<EnumType>(2); |
| } |
| } |
| |
| static auto __attribute__((unused)) EnsureKnownEnumValue(InkCartridgeMonitoring::ChangeIndicationEnum val) |
| { |
| using EnumType = InkCartridgeMonitoring::ChangeIndicationEnum; |
| switch (val) |
| { |
| case EnumType::kOk: |
| case EnumType::kWarning: |
| case EnumType::kCritical: |
| return val; |
| default: |
| return static_cast<EnumType>(3); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(InkCartridgeMonitoring::DegradationDirectionEnum val) |
| { |
| using EnumType = InkCartridgeMonitoring::DegradationDirectionEnum; |
| switch (val) |
| { |
| case EnumType::kUp: |
| case EnumType::kDown: |
| return val; |
| default: |
| return static_cast<EnumType>(2); |
| } |
| } |
| |
| static auto __attribute__((unused)) EnsureKnownEnumValue(TonerCartridgeMonitoring::ChangeIndicationEnum val) |
| { |
| using EnumType = TonerCartridgeMonitoring::ChangeIndicationEnum; |
| switch (val) |
| { |
| case EnumType::kOk: |
| case EnumType::kWarning: |
| case EnumType::kCritical: |
| return val; |
| default: |
| return static_cast<EnumType>(3); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(TonerCartridgeMonitoring::DegradationDirectionEnum val) |
| { |
| using EnumType = TonerCartridgeMonitoring::DegradationDirectionEnum; |
| switch (val) |
| { |
| case EnumType::kUp: |
| case EnumType::kDown: |
| return val; |
| default: |
| return static_cast<EnumType>(2); |
| } |
| } |
| |
| static auto __attribute__((unused)) EnsureKnownEnumValue(DoorLock::AlarmCodeEnum val) |
| { |
| using EnumType = DoorLock::AlarmCodeEnum; |
| switch (val) |
| { |
| case EnumType::kLockJammed: |
| case EnumType::kLockFactoryReset: |
| case EnumType::kLockRadioPowerCycled: |
| case EnumType::kWrongCodeEntryLimit: |
| case EnumType::kFrontEsceutcheonRemoved: |
| case EnumType::kDoorForcedOpen: |
| case EnumType::kDoorAjar: |
| case EnumType::kForcedUser: |
| return val; |
| default: |
| return static_cast<EnumType>(2); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(DoorLock::CredentialRuleEnum val) |
| { |
| using EnumType = DoorLock::CredentialRuleEnum; |
| switch (val) |
| { |
| case EnumType::kSingle: |
| case EnumType::kDual: |
| case EnumType::kTri: |
| return val; |
| default: |
| return static_cast<EnumType>(3); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(DoorLock::CredentialTypeEnum val) |
| { |
| using EnumType = DoorLock::CredentialTypeEnum; |
| switch (val) |
| { |
| case EnumType::kProgrammingPIN: |
| case EnumType::kPin: |
| case EnumType::kRfid: |
| case EnumType::kFingerprint: |
| case EnumType::kFingerVein: |
| case EnumType::kFace: |
| return val; |
| default: |
| return static_cast<EnumType>(6); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(DoorLock::DataOperationTypeEnum val) |
| { |
| using EnumType = DoorLock::DataOperationTypeEnum; |
| switch (val) |
| { |
| case EnumType::kAdd: |
| case EnumType::kClear: |
| case EnumType::kModify: |
| return val; |
| default: |
| return static_cast<EnumType>(3); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(DoorLock::DlLockState val) |
| { |
| using EnumType = DoorLock::DlLockState; |
| switch (val) |
| { |
| case EnumType::kNotFullyLocked: |
| case EnumType::kLocked: |
| case EnumType::kUnlocked: |
| case EnumType::kUnlatched: |
| return val; |
| default: |
| return static_cast<EnumType>(4); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(DoorLock::DlLockType val) |
| { |
| using EnumType = DoorLock::DlLockType; |
| switch (val) |
| { |
| case EnumType::kDeadBolt: |
| case EnumType::kMagnetic: |
| case EnumType::kOther: |
| case EnumType::kMortise: |
| case EnumType::kRim: |
| case EnumType::kLatchBolt: |
| case EnumType::kCylindricalLock: |
| case EnumType::kTubularLock: |
| case EnumType::kInterconnectedLock: |
| case EnumType::kDeadLatch: |
| case EnumType::kDoorFurniture: |
| case EnumType::kEurocylinder: |
| return val; |
| default: |
| return static_cast<EnumType>(12); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(DoorLock::DlStatus val) |
| { |
| using EnumType = DoorLock::DlStatus; |
| switch (val) |
| { |
| case EnumType::kSuccess: |
| case EnumType::kFailure: |
| case EnumType::kDuplicate: |
| case EnumType::kOccupied: |
| case EnumType::kInvalidField: |
| case EnumType::kResourceExhausted: |
| case EnumType::kNotFound: |
| return val; |
| default: |
| return static_cast<EnumType>(4); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(DoorLock::DoorLockOperationEventCode val) |
| { |
| using EnumType = DoorLock::DoorLockOperationEventCode; |
| switch (val) |
| { |
| case EnumType::kUnknownOrMfgSpecific: |
| case EnumType::kLock: |
| case EnumType::kUnlock: |
| case EnumType::kLockInvalidPinOrId: |
| case EnumType::kLockInvalidSchedule: |
| case EnumType::kUnlockInvalidPinOrId: |
| case EnumType::kUnlockInvalidSchedule: |
| case EnumType::kOneTouchLock: |
| case EnumType::kKeyLock: |
| case EnumType::kKeyUnlock: |
| case EnumType::kAutoLock: |
| case EnumType::kScheduleLock: |
| case EnumType::kScheduleUnlock: |
| case EnumType::kManualLock: |
| case EnumType::kManualUnlock: |
| return val; |
| default: |
| return static_cast<EnumType>(15); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(DoorLock::DoorLockProgrammingEventCode val) |
| { |
| using EnumType = DoorLock::DoorLockProgrammingEventCode; |
| switch (val) |
| { |
| case EnumType::kUnknownOrMfgSpecific: |
| case EnumType::kMasterCodeChanged: |
| case EnumType::kPinAdded: |
| case EnumType::kPinDeleted: |
| case EnumType::kPinChanged: |
| case EnumType::kIdAdded: |
| case EnumType::kIdDeleted: |
| return val; |
| default: |
| return static_cast<EnumType>(7); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(DoorLock::DoorLockSetPinOrIdStatus val) |
| { |
| using EnumType = DoorLock::DoorLockSetPinOrIdStatus; |
| switch (val) |
| { |
| case EnumType::kSuccess: |
| case EnumType::kGeneralFailure: |
| case EnumType::kMemoryFull: |
| case EnumType::kDuplicateCodeError: |
| return val; |
| default: |
| return static_cast<EnumType>(4); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(DoorLock::DoorLockUserStatus val) |
| { |
| using EnumType = DoorLock::DoorLockUserStatus; |
| switch (val) |
| { |
| case EnumType::kAvailable: |
| case EnumType::kOccupiedEnabled: |
| case EnumType::kOccupiedDisabled: |
| case EnumType::kNotSupported: |
| return val; |
| default: |
| return static_cast<EnumType>(2); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(DoorLock::DoorLockUserType val) |
| { |
| using EnumType = DoorLock::DoorLockUserType; |
| switch (val) |
| { |
| case EnumType::kUnrestricted: |
| case EnumType::kYearDayScheduleUser: |
| case EnumType::kWeekDayScheduleUser: |
| case EnumType::kMasterUser: |
| case EnumType::kNonAccessUser: |
| case EnumType::kNotSupported: |
| return val; |
| default: |
| return static_cast<EnumType>(5); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(DoorLock::DoorStateEnum val) |
| { |
| using EnumType = DoorLock::DoorStateEnum; |
| switch (val) |
| { |
| case EnumType::kDoorOpen: |
| case EnumType::kDoorClosed: |
| case EnumType::kDoorJammed: |
| case EnumType::kDoorForcedOpen: |
| case EnumType::kDoorUnspecifiedError: |
| case EnumType::kDoorAjar: |
| return val; |
| default: |
| return static_cast<EnumType>(6); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(DoorLock::LockDataTypeEnum val) |
| { |
| using EnumType = DoorLock::LockDataTypeEnum; |
| switch (val) |
| { |
| case EnumType::kUnspecified: |
| case EnumType::kProgrammingCode: |
| case EnumType::kUserIndex: |
| case EnumType::kWeekDaySchedule: |
| case EnumType::kYearDaySchedule: |
| case EnumType::kHolidaySchedule: |
| case EnumType::kPin: |
| case EnumType::kRfid: |
| case EnumType::kFingerprint: |
| case EnumType::kFingerVein: |
| case EnumType::kFace: |
| return val; |
| default: |
| return static_cast<EnumType>(11); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(DoorLock::LockOperationTypeEnum val) |
| { |
| using EnumType = DoorLock::LockOperationTypeEnum; |
| switch (val) |
| { |
| case EnumType::kLock: |
| case EnumType::kUnlock: |
| case EnumType::kNonAccessUserEvent: |
| case EnumType::kForcedUserEvent: |
| case EnumType::kUnlatch: |
| return val; |
| default: |
| return static_cast<EnumType>(5); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(DoorLock::OperatingModeEnum val) |
| { |
| using EnumType = DoorLock::OperatingModeEnum; |
| switch (val) |
| { |
| case EnumType::kNormal: |
| case EnumType::kVacation: |
| case EnumType::kPrivacy: |
| case EnumType::kNoRemoteLockUnlock: |
| case EnumType::kPassage: |
| return val; |
| default: |
| return static_cast<EnumType>(5); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(DoorLock::OperationErrorEnum val) |
| { |
| using EnumType = DoorLock::OperationErrorEnum; |
| switch (val) |
| { |
| case EnumType::kUnspecified: |
| case EnumType::kInvalidCredential: |
| case EnumType::kDisabledUserDenied: |
| case EnumType::kRestricted: |
| case EnumType::kInsufficientBattery: |
| return val; |
| default: |
| return static_cast<EnumType>(5); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(DoorLock::OperationSourceEnum val) |
| { |
| using EnumType = DoorLock::OperationSourceEnum; |
| switch (val) |
| { |
| case EnumType::kUnspecified: |
| case EnumType::kManual: |
| case EnumType::kProprietaryRemote: |
| case EnumType::kKeypad: |
| case EnumType::kAuto: |
| case EnumType::kButton: |
| case EnumType::kSchedule: |
| case EnumType::kRemote: |
| case EnumType::kRfid: |
| case EnumType::kBiometric: |
| return val; |
| default: |
| return static_cast<EnumType>(10); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(DoorLock::UserStatusEnum val) |
| { |
| using EnumType = DoorLock::UserStatusEnum; |
| switch (val) |
| { |
| case EnumType::kAvailable: |
| case EnumType::kOccupiedEnabled: |
| case EnumType::kOccupiedDisabled: |
| return val; |
| default: |
| return static_cast<EnumType>(2); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(DoorLock::UserTypeEnum val) |
| { |
| using EnumType = DoorLock::UserTypeEnum; |
| switch (val) |
| { |
| case EnumType::kUnrestrictedUser: |
| case EnumType::kYearDayScheduleUser: |
| case EnumType::kWeekDayScheduleUser: |
| case EnumType::kProgrammingUser: |
| case EnumType::kNonAccessUser: |
| case EnumType::kForcedUser: |
| case EnumType::kDisposableUser: |
| case EnumType::kExpiringUser: |
| case EnumType::kScheduleRestrictedUser: |
| case EnumType::kRemoteOnlyUser: |
| return val; |
| default: |
| return static_cast<EnumType>(10); |
| } |
| } |
| |
| static auto __attribute__((unused)) EnsureKnownEnumValue(WindowCovering::EndProductType val) |
| { |
| using EnumType = WindowCovering::EndProductType; |
| switch (val) |
| { |
| case EnumType::kRollerShade: |
| case EnumType::kRomanShade: |
| case EnumType::kBalloonShade: |
| case EnumType::kWovenWood: |
| case EnumType::kPleatedShade: |
| case EnumType::kCellularShade: |
| case EnumType::kLayeredShade: |
| case EnumType::kLayeredShade2D: |
| case EnumType::kSheerShade: |
| case EnumType::kTiltOnlyInteriorBlind: |
| case EnumType::kInteriorBlind: |
| case EnumType::kVerticalBlindStripCurtain: |
| case EnumType::kInteriorVenetianBlind: |
| case EnumType::kExteriorVenetianBlind: |
| case EnumType::kLateralLeftCurtain: |
| case EnumType::kLateralRightCurtain: |
| case EnumType::kCentralCurtain: |
| case EnumType::kRollerShutter: |
| case EnumType::kExteriorVerticalScreen: |
| case EnumType::kAwningTerracePatio: |
| case EnumType::kAwningVerticalScreen: |
| case EnumType::kTiltOnlyPergola: |
| case EnumType::kSwingingShutter: |
| case EnumType::kSlidingShutter: |
| case EnumType::kUnknown: |
| return val; |
| default: |
| return static_cast<EnumType>(24); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(WindowCovering::Type val) |
| { |
| using EnumType = WindowCovering::Type; |
| switch (val) |
| { |
| case EnumType::kRollerShade: |
| case EnumType::kRollerShade2Motor: |
| case EnumType::kRollerShadeExterior: |
| case EnumType::kRollerShadeExterior2Motor: |
| case EnumType::kDrapery: |
| case EnumType::kAwning: |
| case EnumType::kShutter: |
| case EnumType::kTiltBlindTiltOnly: |
| case EnumType::kTiltBlindLiftAndTilt: |
| case EnumType::kProjectorScreen: |
| case EnumType::kUnknown: |
| return val; |
| default: |
| return static_cast<EnumType>(10); |
| } |
| } |
| |
| static auto __attribute__((unused)) EnsureKnownEnumValue(PumpConfigurationAndControl::ControlModeEnum val) |
| { |
| using EnumType = PumpConfigurationAndControl::ControlModeEnum; |
| switch (val) |
| { |
| case EnumType::kConstantSpeed: |
| case EnumType::kConstantPressure: |
| case EnumType::kProportionalPressure: |
| case EnumType::kConstantFlow: |
| case EnumType::kConstantTemperature: |
| case EnumType::kAutomatic: |
| return val; |
| default: |
| return static_cast<EnumType>(4); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(PumpConfigurationAndControl::OperationModeEnum val) |
| { |
| using EnumType = PumpConfigurationAndControl::OperationModeEnum; |
| switch (val) |
| { |
| case EnumType::kNormal: |
| case EnumType::kMinimum: |
| case EnumType::kMaximum: |
| case EnumType::kLocal: |
| return val; |
| default: |
| return static_cast<EnumType>(4); |
| } |
| } |
| |
| static auto __attribute__((unused)) EnsureKnownEnumValue(Thermostat::SetpointAdjustMode val) |
| { |
| using EnumType = Thermostat::SetpointAdjustMode; |
| switch (val) |
| { |
| case EnumType::kHeat: |
| case EnumType::kCool: |
| case EnumType::kBoth: |
| return val; |
| default: |
| return static_cast<EnumType>(3); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(Thermostat::ThermostatControlSequence val) |
| { |
| using EnumType = Thermostat::ThermostatControlSequence; |
| switch (val) |
| { |
| case EnumType::kCoolingOnly: |
| case EnumType::kCoolingWithReheat: |
| case EnumType::kHeatingOnly: |
| case EnumType::kHeatingWithReheat: |
| case EnumType::kCoolingAndHeating: |
| case EnumType::kCoolingAndHeatingWithReheat: |
| return val; |
| default: |
| return static_cast<EnumType>(6); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(Thermostat::ThermostatRunningMode val) |
| { |
| using EnumType = Thermostat::ThermostatRunningMode; |
| switch (val) |
| { |
| case EnumType::kOff: |
| case EnumType::kCool: |
| case EnumType::kHeat: |
| return val; |
| default: |
| return static_cast<EnumType>(1); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(Thermostat::ThermostatSystemMode val) |
| { |
| using EnumType = Thermostat::ThermostatSystemMode; |
| switch (val) |
| { |
| case EnumType::kOff: |
| case EnumType::kAuto: |
| case EnumType::kCool: |
| case EnumType::kHeat: |
| case EnumType::kEmergencyHeat: |
| case EnumType::kPrecooling: |
| case EnumType::kFanOnly: |
| case EnumType::kDry: |
| case EnumType::kSleep: |
| return val; |
| default: |
| return static_cast<EnumType>(2); |
| } |
| } |
| |
| static auto __attribute__((unused)) EnsureKnownEnumValue(FanControl::AirflowDirectionEnum val) |
| { |
| using EnumType = FanControl::AirflowDirectionEnum; |
| switch (val) |
| { |
| case EnumType::kForward: |
| case EnumType::kReverse: |
| return val; |
| default: |
| return static_cast<EnumType>(2); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(FanControl::DirectionEnum val) |
| { |
| using EnumType = FanControl::DirectionEnum; |
| switch (val) |
| { |
| case EnumType::kIncrease: |
| case EnumType::kDecrease: |
| return val; |
| default: |
| return static_cast<EnumType>(2); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(FanControl::FanModeSequenceType val) |
| { |
| using EnumType = FanControl::FanModeSequenceType; |
| switch (val) |
| { |
| case EnumType::kOffLowMedHigh: |
| case EnumType::kOffLowHigh: |
| case EnumType::kOffLowMedHighAuto: |
| case EnumType::kOffLowHighAuto: |
| case EnumType::kOffOnAuto: |
| case EnumType::kOffOn: |
| return val; |
| default: |
| return static_cast<EnumType>(6); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(FanControl::FanModeType val) |
| { |
| using EnumType = FanControl::FanModeType; |
| switch (val) |
| { |
| case EnumType::kOff: |
| case EnumType::kLow: |
| case EnumType::kMedium: |
| case EnumType::kHigh: |
| case EnumType::kOn: |
| case EnumType::kAuto: |
| case EnumType::kSmart: |
| return val; |
| default: |
| return static_cast<EnumType>(7); |
| } |
| } |
| |
| static auto __attribute__((unused)) EnsureKnownEnumValue(ColorControl::ColorLoopAction val) |
| { |
| using EnumType = ColorControl::ColorLoopAction; |
| switch (val) |
| { |
| case EnumType::kDeactivate: |
| case EnumType::kActivateFromColorLoopStartEnhancedHue: |
| case EnumType::kActivateFromEnhancedCurrentHue: |
| return val; |
| default: |
| return static_cast<EnumType>(3); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(ColorControl::ColorLoopDirection val) |
| { |
| using EnumType = ColorControl::ColorLoopDirection; |
| switch (val) |
| { |
| case EnumType::kDecrementHue: |
| case EnumType::kIncrementHue: |
| return val; |
| default: |
| return static_cast<EnumType>(2); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(ColorControl::ColorMode val) |
| { |
| using EnumType = ColorControl::ColorMode; |
| switch (val) |
| { |
| // Need to convert consumers to using the new enum classes, so we |
| // don't just have casts all over. |
| #ifdef CHIP_USE_ENUM_CLASS_FOR_IM_ENUM |
| case EnumType::kCurrentHueAndCurrentSaturation: |
| case EnumType::kCurrentXAndCurrentY: |
| case EnumType::kColorTemperature: |
| #else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM |
| case EMBER_ZCL_COLOR_MODE_CURRENT_HUE_AND_CURRENT_SATURATION: |
| case EMBER_ZCL_COLOR_MODE_CURRENT_X_AND_CURRENT_Y: |
| case EMBER_ZCL_COLOR_MODE_COLOR_TEMPERATURE: |
| #endif // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM |
| return val; |
| default: |
| return static_cast<EnumType>(3); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(ColorControl::HueDirection val) |
| { |
| using EnumType = ColorControl::HueDirection; |
| switch (val) |
| { |
| case EnumType::kShortestDistance: |
| case EnumType::kLongestDistance: |
| case EnumType::kUp: |
| case EnumType::kDown: |
| return val; |
| default: |
| return static_cast<EnumType>(4); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(ColorControl::HueMoveMode val) |
| { |
| using EnumType = ColorControl::HueMoveMode; |
| switch (val) |
| { |
| case EnumType::kStop: |
| case EnumType::kUp: |
| case EnumType::kDown: |
| return val; |
| default: |
| return static_cast<EnumType>(2); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(ColorControl::HueStepMode val) |
| { |
| using EnumType = ColorControl::HueStepMode; |
| switch (val) |
| { |
| case EnumType::kUp: |
| case EnumType::kDown: |
| return val; |
| default: |
| return static_cast<EnumType>(0); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(ColorControl::SaturationMoveMode val) |
| { |
| using EnumType = ColorControl::SaturationMoveMode; |
| switch (val) |
| { |
| case EnumType::kStop: |
| case EnumType::kUp: |
| case EnumType::kDown: |
| return val; |
| default: |
| return static_cast<EnumType>(2); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(ColorControl::SaturationStepMode val) |
| { |
| using EnumType = ColorControl::SaturationStepMode; |
| switch (val) |
| { |
| case EnumType::kUp: |
| case EnumType::kDown: |
| return val; |
| default: |
| return static_cast<EnumType>(0); |
| } |
| } |
| |
| static auto __attribute__((unused)) EnsureKnownEnumValue(IlluminanceMeasurement::LightSensorTypeEnum val) |
| { |
| using EnumType = IlluminanceMeasurement::LightSensorTypeEnum; |
| switch (val) |
| { |
| case EnumType::kPhotodiode: |
| case EnumType::kCmos: |
| return val; |
| default: |
| return static_cast<EnumType>(2); |
| } |
| } |
| |
| static auto __attribute__((unused)) EnsureKnownEnumValue(OccupancySensing::OccupancySensorTypeEnum val) |
| { |
| using EnumType = OccupancySensing::OccupancySensorTypeEnum; |
| switch (val) |
| { |
| case EnumType::kPir: |
| case EnumType::kUltrasonic: |
| case EnumType::kPIRAndUltrasonic: |
| case EnumType::kPhysicalContact: |
| return val; |
| default: |
| return static_cast<EnumType>(4); |
| } |
| } |
| |
| static auto __attribute__((unused)) EnsureKnownEnumValue(CarbonMonoxideConcentrationMeasurement::LevelValueEnum val) |
| { |
| using EnumType = CarbonMonoxideConcentrationMeasurement::LevelValueEnum; |
| switch (val) |
| { |
| case EnumType::kUnknown: |
| case EnumType::kLow: |
| case EnumType::kMedium: |
| case EnumType::kHigh: |
| case EnumType::kCritical: |
| return val; |
| default: |
| return static_cast<EnumType>(5); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(CarbonMonoxideConcentrationMeasurement::MeasurementMediumEnum val) |
| { |
| using EnumType = CarbonMonoxideConcentrationMeasurement::MeasurementMediumEnum; |
| switch (val) |
| { |
| case EnumType::kGas: |
| case EnumType::kLiquid: |
| case EnumType::kSoil: |
| return val; |
| default: |
| return static_cast<EnumType>(3); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(CarbonMonoxideConcentrationMeasurement::MeasurementUnitEnum val) |
| { |
| using EnumType = CarbonMonoxideConcentrationMeasurement::MeasurementUnitEnum; |
| switch (val) |
| { |
| case EnumType::kPpm: |
| case EnumType::kPpb: |
| case EnumType::kPpt: |
| case EnumType::kMgm3: |
| case EnumType::kUgm3: |
| case EnumType::kNgm3: |
| case EnumType::kPm3: |
| case EnumType::kBqm3: |
| return val; |
| default: |
| return static_cast<EnumType>(8); |
| } |
| } |
| |
| static auto __attribute__((unused)) EnsureKnownEnumValue(CarbonDioxideConcentrationMeasurement::LevelValueEnum val) |
| { |
| using EnumType = CarbonDioxideConcentrationMeasurement::LevelValueEnum; |
| switch (val) |
| { |
| case EnumType::kUnknown: |
| case EnumType::kLow: |
| case EnumType::kMedium: |
| case EnumType::kHigh: |
| case EnumType::kCritical: |
| return val; |
| default: |
| return static_cast<EnumType>(5); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(CarbonDioxideConcentrationMeasurement::MeasurementMediumEnum val) |
| { |
| using EnumType = CarbonDioxideConcentrationMeasurement::MeasurementMediumEnum; |
| switch (val) |
| { |
| case EnumType::kGas: |
| case EnumType::kLiquid: |
| case EnumType::kSoil: |
| return val; |
| default: |
| return static_cast<EnumType>(3); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(CarbonDioxideConcentrationMeasurement::MeasurementUnitEnum val) |
| { |
| using EnumType = CarbonDioxideConcentrationMeasurement::MeasurementUnitEnum; |
| switch (val) |
| { |
| case EnumType::kPpm: |
| case EnumType::kPpb: |
| case EnumType::kPpt: |
| case EnumType::kMgm3: |
| case EnumType::kUgm3: |
| case EnumType::kNgm3: |
| case EnumType::kPm3: |
| case EnumType::kBqm3: |
| return val; |
| default: |
| return static_cast<EnumType>(8); |
| } |
| } |
| |
| static auto __attribute__((unused)) EnsureKnownEnumValue(EthyleneConcentrationMeasurement::LevelValueEnum val) |
| { |
| using EnumType = EthyleneConcentrationMeasurement::LevelValueEnum; |
| switch (val) |
| { |
| case EnumType::kUnknown: |
| case EnumType::kLow: |
| case EnumType::kMedium: |
| case EnumType::kHigh: |
| case EnumType::kCritical: |
| return val; |
| default: |
| return static_cast<EnumType>(5); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(EthyleneConcentrationMeasurement::MeasurementMediumEnum val) |
| { |
| using EnumType = EthyleneConcentrationMeasurement::MeasurementMediumEnum; |
| switch (val) |
| { |
| case EnumType::kGas: |
| case EnumType::kLiquid: |
| case EnumType::kSoil: |
| return val; |
| default: |
| return static_cast<EnumType>(3); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(EthyleneConcentrationMeasurement::MeasurementUnitEnum val) |
| { |
| using EnumType = EthyleneConcentrationMeasurement::MeasurementUnitEnum; |
| switch (val) |
| { |
| case EnumType::kPpm: |
| case EnumType::kPpb: |
| case EnumType::kPpt: |
| case EnumType::kMgm3: |
| case EnumType::kUgm3: |
| case EnumType::kNgm3: |
| case EnumType::kPm3: |
| case EnumType::kBqm3: |
| return val; |
| default: |
| return static_cast<EnumType>(8); |
| } |
| } |
| |
| static auto __attribute__((unused)) EnsureKnownEnumValue(EthyleneOxideConcentrationMeasurement::LevelValueEnum val) |
| { |
| using EnumType = EthyleneOxideConcentrationMeasurement::LevelValueEnum; |
| switch (val) |
| { |
| case EnumType::kUnknown: |
| case EnumType::kLow: |
| case EnumType::kMedium: |
| case EnumType::kHigh: |
| case EnumType::kCritical: |
| return val; |
| default: |
| return static_cast<EnumType>(5); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(EthyleneOxideConcentrationMeasurement::MeasurementMediumEnum val) |
| { |
| using EnumType = EthyleneOxideConcentrationMeasurement::MeasurementMediumEnum; |
| switch (val) |
| { |
| case EnumType::kGas: |
| case EnumType::kLiquid: |
| case EnumType::kSoil: |
| return val; |
| default: |
| return static_cast<EnumType>(3); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(EthyleneOxideConcentrationMeasurement::MeasurementUnitEnum val) |
| { |
| using EnumType = EthyleneOxideConcentrationMeasurement::MeasurementUnitEnum; |
| switch (val) |
| { |
| case EnumType::kPpm: |
| case EnumType::kPpb: |
| case EnumType::kPpt: |
| case EnumType::kMgm3: |
| case EnumType::kUgm3: |
| case EnumType::kNgm3: |
| case EnumType::kPm3: |
| case EnumType::kBqm3: |
| return val; |
| default: |
| return static_cast<EnumType>(8); |
| } |
| } |
| |
| static auto __attribute__((unused)) EnsureKnownEnumValue(HydrogenConcentrationMeasurement::LevelValueEnum val) |
| { |
| using EnumType = HydrogenConcentrationMeasurement::LevelValueEnum; |
| switch (val) |
| { |
| case EnumType::kUnknown: |
| case EnumType::kLow: |
| case EnumType::kMedium: |
| case EnumType::kHigh: |
| case EnumType::kCritical: |
| return val; |
| default: |
| return static_cast<EnumType>(5); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(HydrogenConcentrationMeasurement::MeasurementMediumEnum val) |
| { |
| using EnumType = HydrogenConcentrationMeasurement::MeasurementMediumEnum; |
| switch (val) |
| { |
| case EnumType::kGas: |
| case EnumType::kLiquid: |
| case EnumType::kSoil: |
| return val; |
| default: |
| return static_cast<EnumType>(3); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(HydrogenConcentrationMeasurement::MeasurementUnitEnum val) |
| { |
| using EnumType = HydrogenConcentrationMeasurement::MeasurementUnitEnum; |
| switch (val) |
| { |
| case EnumType::kPpm: |
| case EnumType::kPpb: |
| case EnumType::kPpt: |
| case EnumType::kMgm3: |
| case EnumType::kUgm3: |
| case EnumType::kNgm3: |
| case EnumType::kPm3: |
| case EnumType::kBqm3: |
| return val; |
| default: |
| return static_cast<EnumType>(8); |
| } |
| } |
| |
| static auto __attribute__((unused)) EnsureKnownEnumValue(HydrogenSulfideConcentrationMeasurement::LevelValueEnum val) |
| { |
| using EnumType = HydrogenSulfideConcentrationMeasurement::LevelValueEnum; |
| switch (val) |
| { |
| case EnumType::kUnknown: |
| case EnumType::kLow: |
| case EnumType::kMedium: |
| case EnumType::kHigh: |
| case EnumType::kCritical: |
| return val; |
| default: |
| return static_cast<EnumType>(5); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(HydrogenSulfideConcentrationMeasurement::MeasurementMediumEnum val) |
| { |
| using EnumType = HydrogenSulfideConcentrationMeasurement::MeasurementMediumEnum; |
| switch (val) |
| { |
| case EnumType::kGas: |
| case EnumType::kLiquid: |
| case EnumType::kSoil: |
| return val; |
| default: |
| return static_cast<EnumType>(3); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(HydrogenSulfideConcentrationMeasurement::MeasurementUnitEnum val) |
| { |
| using EnumType = HydrogenSulfideConcentrationMeasurement::MeasurementUnitEnum; |
| switch (val) |
| { |
| case EnumType::kPpm: |
| case EnumType::kPpb: |
| case EnumType::kPpt: |
| case EnumType::kMgm3: |
| case EnumType::kUgm3: |
| case EnumType::kNgm3: |
| case EnumType::kPm3: |
| case EnumType::kBqm3: |
| return val; |
| default: |
| return static_cast<EnumType>(8); |
| } |
| } |
| |
| static auto __attribute__((unused)) EnsureKnownEnumValue(NitricOxideConcentrationMeasurement::LevelValueEnum val) |
| { |
| using EnumType = NitricOxideConcentrationMeasurement::LevelValueEnum; |
| switch (val) |
| { |
| case EnumType::kUnknown: |
| case EnumType::kLow: |
| case EnumType::kMedium: |
| case EnumType::kHigh: |
| case EnumType::kCritical: |
| return val; |
| default: |
| return static_cast<EnumType>(5); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(NitricOxideConcentrationMeasurement::MeasurementMediumEnum val) |
| { |
| using EnumType = NitricOxideConcentrationMeasurement::MeasurementMediumEnum; |
| switch (val) |
| { |
| case EnumType::kGas: |
| case EnumType::kLiquid: |
| case EnumType::kSoil: |
| return val; |
| default: |
| return static_cast<EnumType>(3); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(NitricOxideConcentrationMeasurement::MeasurementUnitEnum val) |
| { |
| using EnumType = NitricOxideConcentrationMeasurement::MeasurementUnitEnum; |
| switch (val) |
| { |
| case EnumType::kPpm: |
| case EnumType::kPpb: |
| case EnumType::kPpt: |
| case EnumType::kMgm3: |
| case EnumType::kUgm3: |
| case EnumType::kNgm3: |
| case EnumType::kPm3: |
| case EnumType::kBqm3: |
| return val; |
| default: |
| return static_cast<EnumType>(8); |
| } |
| } |
| |
| static auto __attribute__((unused)) EnsureKnownEnumValue(NitrogenDioxideConcentrationMeasurement::LevelValueEnum val) |
| { |
| using EnumType = NitrogenDioxideConcentrationMeasurement::LevelValueEnum; |
| switch (val) |
| { |
| case EnumType::kUnknown: |
| case EnumType::kLow: |
| case EnumType::kMedium: |
| case EnumType::kHigh: |
| case EnumType::kCritical: |
| return val; |
| default: |
| return static_cast<EnumType>(5); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(NitrogenDioxideConcentrationMeasurement::MeasurementMediumEnum val) |
| { |
| using EnumType = NitrogenDioxideConcentrationMeasurement::MeasurementMediumEnum; |
| switch (val) |
| { |
| case EnumType::kGas: |
| case EnumType::kLiquid: |
| case EnumType::kSoil: |
| return val; |
| default: |
| return static_cast<EnumType>(3); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(NitrogenDioxideConcentrationMeasurement::MeasurementUnitEnum val) |
| { |
| using EnumType = NitrogenDioxideConcentrationMeasurement::MeasurementUnitEnum; |
| switch (val) |
| { |
| case EnumType::kPpm: |
| case EnumType::kPpb: |
| case EnumType::kPpt: |
| case EnumType::kMgm3: |
| case EnumType::kUgm3: |
| case EnumType::kNgm3: |
| case EnumType::kPm3: |
| case EnumType::kBqm3: |
| return val; |
| default: |
| return static_cast<EnumType>(8); |
| } |
| } |
| |
| static auto __attribute__((unused)) EnsureKnownEnumValue(OxygenConcentrationMeasurement::LevelValueEnum val) |
| { |
| using EnumType = OxygenConcentrationMeasurement::LevelValueEnum; |
| switch (val) |
| { |
| case EnumType::kUnknown: |
| case EnumType::kLow: |
| case EnumType::kMedium: |
| case EnumType::kHigh: |
| case EnumType::kCritical: |
| return val; |
| default: |
| return static_cast<EnumType>(5); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(OxygenConcentrationMeasurement::MeasurementMediumEnum val) |
| { |
| using EnumType = OxygenConcentrationMeasurement::MeasurementMediumEnum; |
| switch (val) |
| { |
| case EnumType::kGas: |
| case EnumType::kLiquid: |
| case EnumType::kSoil: |
| return val; |
| default: |
| return static_cast<EnumType>(3); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(OxygenConcentrationMeasurement::MeasurementUnitEnum val) |
| { |
| using EnumType = OxygenConcentrationMeasurement::MeasurementUnitEnum; |
| switch (val) |
| { |
| case EnumType::kPpm: |
| case EnumType::kPpb: |
| case EnumType::kPpt: |
| case EnumType::kMgm3: |
| case EnumType::kUgm3: |
| case EnumType::kNgm3: |
| case EnumType::kPm3: |
| case EnumType::kBqm3: |
| return val; |
| default: |
| return static_cast<EnumType>(8); |
| } |
| } |
| |
| static auto __attribute__((unused)) EnsureKnownEnumValue(OzoneConcentrationMeasurement::LevelValueEnum val) |
| { |
| using EnumType = OzoneConcentrationMeasurement::LevelValueEnum; |
| switch (val) |
| { |
| case EnumType::kUnknown: |
| case EnumType::kLow: |
| case EnumType::kMedium: |
| case EnumType::kHigh: |
| case EnumType::kCritical: |
| return val; |
| default: |
| return static_cast<EnumType>(5); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(OzoneConcentrationMeasurement::MeasurementMediumEnum val) |
| { |
| using EnumType = OzoneConcentrationMeasurement::MeasurementMediumEnum; |
| switch (val) |
| { |
| case EnumType::kGas: |
| case EnumType::kLiquid: |
| case EnumType::kSoil: |
| return val; |
| default: |
| return static_cast<EnumType>(3); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(OzoneConcentrationMeasurement::MeasurementUnitEnum val) |
| { |
| using EnumType = OzoneConcentrationMeasurement::MeasurementUnitEnum; |
| switch (val) |
| { |
| case EnumType::kPpm: |
| case EnumType::kPpb: |
| case EnumType::kPpt: |
| case EnumType::kMgm3: |
| case EnumType::kUgm3: |
| case EnumType::kNgm3: |
| case EnumType::kPm3: |
| case EnumType::kBqm3: |
| return val; |
| default: |
| return static_cast<EnumType>(8); |
| } |
| } |
| |
| static auto __attribute__((unused)) EnsureKnownEnumValue(SulfurDioxideConcentrationMeasurement::LevelValueEnum val) |
| { |
| using EnumType = SulfurDioxideConcentrationMeasurement::LevelValueEnum; |
| switch (val) |
| { |
| case EnumType::kUnknown: |
| case EnumType::kLow: |
| case EnumType::kMedium: |
| case EnumType::kHigh: |
| case EnumType::kCritical: |
| return val; |
| default: |
| return static_cast<EnumType>(5); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(SulfurDioxideConcentrationMeasurement::MeasurementMediumEnum val) |
| { |
| using EnumType = SulfurDioxideConcentrationMeasurement::MeasurementMediumEnum; |
| switch (val) |
| { |
| case EnumType::kGas: |
| case EnumType::kLiquid: |
| case EnumType::kSoil: |
| return val; |
| default: |
| return static_cast<EnumType>(3); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(SulfurDioxideConcentrationMeasurement::MeasurementUnitEnum val) |
| { |
| using EnumType = SulfurDioxideConcentrationMeasurement::MeasurementUnitEnum; |
| switch (val) |
| { |
| case EnumType::kPpm: |
| case EnumType::kPpb: |
| case EnumType::kPpt: |
| case EnumType::kMgm3: |
| case EnumType::kUgm3: |
| case EnumType::kNgm3: |
| case EnumType::kPm3: |
| case EnumType::kBqm3: |
| return val; |
| default: |
| return static_cast<EnumType>(8); |
| } |
| } |
| |
| static auto __attribute__((unused)) EnsureKnownEnumValue(DissolvedOxygenConcentrationMeasurement::LevelValueEnum val) |
| { |
| using EnumType = DissolvedOxygenConcentrationMeasurement::LevelValueEnum; |
| switch (val) |
| { |
| case EnumType::kUnknown: |
| case EnumType::kLow: |
| case EnumType::kMedium: |
| case EnumType::kHigh: |
| case EnumType::kCritical: |
| return val; |
| default: |
| return static_cast<EnumType>(5); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(DissolvedOxygenConcentrationMeasurement::MeasurementMediumEnum val) |
| { |
| using EnumType = DissolvedOxygenConcentrationMeasurement::MeasurementMediumEnum; |
| switch (val) |
| { |
| case EnumType::kGas: |
| case EnumType::kLiquid: |
| case EnumType::kSoil: |
| return val; |
| default: |
| return static_cast<EnumType>(3); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(DissolvedOxygenConcentrationMeasurement::MeasurementUnitEnum val) |
| { |
| using EnumType = DissolvedOxygenConcentrationMeasurement::MeasurementUnitEnum; |
| switch (val) |
| { |
| case EnumType::kPpm: |
| case EnumType::kPpb: |
| case EnumType::kPpt: |
| case EnumType::kMgm3: |
| case EnumType::kUgm3: |
| case EnumType::kNgm3: |
| case EnumType::kPm3: |
| case EnumType::kBqm3: |
| return val; |
| default: |
| return static_cast<EnumType>(8); |
| } |
| } |
| |
| static auto __attribute__((unused)) EnsureKnownEnumValue(BromateConcentrationMeasurement::LevelValueEnum val) |
| { |
| using EnumType = BromateConcentrationMeasurement::LevelValueEnum; |
| switch (val) |
| { |
| case EnumType::kUnknown: |
| case EnumType::kLow: |
| case EnumType::kMedium: |
| case EnumType::kHigh: |
| case EnumType::kCritical: |
| return val; |
| default: |
| return static_cast<EnumType>(5); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(BromateConcentrationMeasurement::MeasurementMediumEnum val) |
| { |
| using EnumType = BromateConcentrationMeasurement::MeasurementMediumEnum; |
| switch (val) |
| { |
| case EnumType::kGas: |
| case EnumType::kLiquid: |
| case EnumType::kSoil: |
| return val; |
| default: |
| return static_cast<EnumType>(3); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(BromateConcentrationMeasurement::MeasurementUnitEnum val) |
| { |
| using EnumType = BromateConcentrationMeasurement::MeasurementUnitEnum; |
| switch (val) |
| { |
| case EnumType::kPpm: |
| case EnumType::kPpb: |
| case EnumType::kPpt: |
| case EnumType::kMgm3: |
| case EnumType::kUgm3: |
| case EnumType::kNgm3: |
| case EnumType::kPm3: |
| case EnumType::kBqm3: |
| return val; |
| default: |
| return static_cast<EnumType>(8); |
| } |
| } |
| |
| static auto __attribute__((unused)) EnsureKnownEnumValue(ChloraminesConcentrationMeasurement::LevelValueEnum val) |
| { |
| using EnumType = ChloraminesConcentrationMeasurement::LevelValueEnum; |
| switch (val) |
| { |
| case EnumType::kUnknown: |
| case EnumType::kLow: |
| case EnumType::kMedium: |
| case EnumType::kHigh: |
| case EnumType::kCritical: |
| return val; |
| default: |
| return static_cast<EnumType>(5); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(ChloraminesConcentrationMeasurement::MeasurementMediumEnum val) |
| { |
| using EnumType = ChloraminesConcentrationMeasurement::MeasurementMediumEnum; |
| switch (val) |
| { |
| case EnumType::kGas: |
| case EnumType::kLiquid: |
| case EnumType::kSoil: |
| return val; |
| default: |
| return static_cast<EnumType>(3); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(ChloraminesConcentrationMeasurement::MeasurementUnitEnum val) |
| { |
| using EnumType = ChloraminesConcentrationMeasurement::MeasurementUnitEnum; |
| switch (val) |
| { |
| case EnumType::kPpm: |
| case EnumType::kPpb: |
| case EnumType::kPpt: |
| case EnumType::kMgm3: |
| case EnumType::kUgm3: |
| case EnumType::kNgm3: |
| case EnumType::kPm3: |
| case EnumType::kBqm3: |
| return val; |
| default: |
| return static_cast<EnumType>(8); |
| } |
| } |
| |
| static auto __attribute__((unused)) EnsureKnownEnumValue(ChlorineConcentrationMeasurement::LevelValueEnum val) |
| { |
| using EnumType = ChlorineConcentrationMeasurement::LevelValueEnum; |
| switch (val) |
| { |
| case EnumType::kUnknown: |
| case EnumType::kLow: |
| case EnumType::kMedium: |
| case EnumType::kHigh: |
| case EnumType::kCritical: |
| return val; |
| default: |
| return static_cast<EnumType>(5); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(ChlorineConcentrationMeasurement::MeasurementMediumEnum val) |
| { |
| using EnumType = ChlorineConcentrationMeasurement::MeasurementMediumEnum; |
| switch (val) |
| { |
| case EnumType::kGas: |
| case EnumType::kLiquid: |
| case EnumType::kSoil: |
| return val; |
| default: |
| return static_cast<EnumType>(3); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(ChlorineConcentrationMeasurement::MeasurementUnitEnum val) |
| { |
| using EnumType = ChlorineConcentrationMeasurement::MeasurementUnitEnum; |
| switch (val) |
| { |
| case EnumType::kPpm: |
| case EnumType::kPpb: |
| case EnumType::kPpt: |
| case EnumType::kMgm3: |
| case EnumType::kUgm3: |
| case EnumType::kNgm3: |
| case EnumType::kPm3: |
| case EnumType::kBqm3: |
| return val; |
| default: |
| return static_cast<EnumType>(8); |
| } |
| } |
| |
| static auto __attribute__((unused)) EnsureKnownEnumValue(FecalColiformEColiConcentrationMeasurement::LevelValueEnum val) |
| { |
| using EnumType = FecalColiformEColiConcentrationMeasurement::LevelValueEnum; |
| switch (val) |
| { |
| case EnumType::kUnknown: |
| case EnumType::kLow: |
| case EnumType::kMedium: |
| case EnumType::kHigh: |
| case EnumType::kCritical: |
| return val; |
| default: |
| return static_cast<EnumType>(5); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(FecalColiformEColiConcentrationMeasurement::MeasurementMediumEnum val) |
| { |
| using EnumType = FecalColiformEColiConcentrationMeasurement::MeasurementMediumEnum; |
| switch (val) |
| { |
| case EnumType::kGas: |
| case EnumType::kLiquid: |
| case EnumType::kSoil: |
| return val; |
| default: |
| return static_cast<EnumType>(3); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(FecalColiformEColiConcentrationMeasurement::MeasurementUnitEnum val) |
| { |
| using EnumType = FecalColiformEColiConcentrationMeasurement::MeasurementUnitEnum; |
| switch (val) |
| { |
| case EnumType::kPpm: |
| case EnumType::kPpb: |
| case EnumType::kPpt: |
| case EnumType::kMgm3: |
| case EnumType::kUgm3: |
| case EnumType::kNgm3: |
| case EnumType::kPm3: |
| case EnumType::kBqm3: |
| return val; |
| default: |
| return static_cast<EnumType>(8); |
| } |
| } |
| |
| static auto __attribute__((unused)) EnsureKnownEnumValue(FluorideConcentrationMeasurement::LevelValueEnum val) |
| { |
| using EnumType = FluorideConcentrationMeasurement::LevelValueEnum; |
| switch (val) |
| { |
| case EnumType::kUnknown: |
| case EnumType::kLow: |
| case EnumType::kMedium: |
| case EnumType::kHigh: |
| case EnumType::kCritical: |
| return val; |
| default: |
| return static_cast<EnumType>(5); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(FluorideConcentrationMeasurement::MeasurementMediumEnum val) |
| { |
| using EnumType = FluorideConcentrationMeasurement::MeasurementMediumEnum; |
| switch (val) |
| { |
| case EnumType::kGas: |
| case EnumType::kLiquid: |
| case EnumType::kSoil: |
| return val; |
| default: |
| return static_cast<EnumType>(3); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(FluorideConcentrationMeasurement::MeasurementUnitEnum val) |
| { |
| using EnumType = FluorideConcentrationMeasurement::MeasurementUnitEnum; |
| switch (val) |
| { |
| case EnumType::kPpm: |
| case EnumType::kPpb: |
| case EnumType::kPpt: |
| case EnumType::kMgm3: |
| case EnumType::kUgm3: |
| case EnumType::kNgm3: |
| case EnumType::kPm3: |
| case EnumType::kBqm3: |
| return val; |
| default: |
| return static_cast<EnumType>(8); |
| } |
| } |
| |
| static auto __attribute__((unused)) EnsureKnownEnumValue(HaloaceticAcidsConcentrationMeasurement::LevelValueEnum val) |
| { |
| using EnumType = HaloaceticAcidsConcentrationMeasurement::LevelValueEnum; |
| switch (val) |
| { |
| case EnumType::kUnknown: |
| case EnumType::kLow: |
| case EnumType::kMedium: |
| case EnumType::kHigh: |
| case EnumType::kCritical: |
| return val; |
| default: |
| return static_cast<EnumType>(5); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(HaloaceticAcidsConcentrationMeasurement::MeasurementMediumEnum val) |
| { |
| using EnumType = HaloaceticAcidsConcentrationMeasurement::MeasurementMediumEnum; |
| switch (val) |
| { |
| case EnumType::kGas: |
| case EnumType::kLiquid: |
| case EnumType::kSoil: |
| return val; |
| default: |
| return static_cast<EnumType>(3); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(HaloaceticAcidsConcentrationMeasurement::MeasurementUnitEnum val) |
| { |
| using EnumType = HaloaceticAcidsConcentrationMeasurement::MeasurementUnitEnum; |
| switch (val) |
| { |
| case EnumType::kPpm: |
| case EnumType::kPpb: |
| case EnumType::kPpt: |
| case EnumType::kMgm3: |
| case EnumType::kUgm3: |
| case EnumType::kNgm3: |
| case EnumType::kPm3: |
| case EnumType::kBqm3: |
| return val; |
| default: |
| return static_cast<EnumType>(8); |
| } |
| } |
| |
| static auto __attribute__((unused)) EnsureKnownEnumValue(TotalTrihalomethanesConcentrationMeasurement::LevelValueEnum val) |
| { |
| using EnumType = TotalTrihalomethanesConcentrationMeasurement::LevelValueEnum; |
| switch (val) |
| { |
| case EnumType::kUnknown: |
| case EnumType::kLow: |
| case EnumType::kMedium: |
| case EnumType::kHigh: |
| case EnumType::kCritical: |
| return val; |
| default: |
| return static_cast<EnumType>(5); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(TotalTrihalomethanesConcentrationMeasurement::MeasurementMediumEnum val) |
| { |
| using EnumType = TotalTrihalomethanesConcentrationMeasurement::MeasurementMediumEnum; |
| switch (val) |
| { |
| case EnumType::kGas: |
| case EnumType::kLiquid: |
| case EnumType::kSoil: |
| return val; |
| default: |
| return static_cast<EnumType>(3); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(TotalTrihalomethanesConcentrationMeasurement::MeasurementUnitEnum val) |
| { |
| using EnumType = TotalTrihalomethanesConcentrationMeasurement::MeasurementUnitEnum; |
| switch (val) |
| { |
| case EnumType::kPpm: |
| case EnumType::kPpb: |
| case EnumType::kPpt: |
| case EnumType::kMgm3: |
| case EnumType::kUgm3: |
| case EnumType::kNgm3: |
| case EnumType::kPm3: |
| case EnumType::kBqm3: |
| return val; |
| default: |
| return static_cast<EnumType>(8); |
| } |
| } |
| |
| static auto __attribute__((unused)) EnsureKnownEnumValue(TotalColiformBacteriaConcentrationMeasurement::LevelValueEnum val) |
| { |
| using EnumType = TotalColiformBacteriaConcentrationMeasurement::LevelValueEnum; |
| switch (val) |
| { |
| case EnumType::kUnknown: |
| case EnumType::kLow: |
| case EnumType::kMedium: |
| case EnumType::kHigh: |
| case EnumType::kCritical: |
| return val; |
| default: |
| return static_cast<EnumType>(5); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(TotalColiformBacteriaConcentrationMeasurement::MeasurementMediumEnum val) |
| { |
| using EnumType = TotalColiformBacteriaConcentrationMeasurement::MeasurementMediumEnum; |
| switch (val) |
| { |
| case EnumType::kGas: |
| case EnumType::kLiquid: |
| case EnumType::kSoil: |
| return val; |
| default: |
| return static_cast<EnumType>(3); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(TotalColiformBacteriaConcentrationMeasurement::MeasurementUnitEnum val) |
| { |
| using EnumType = TotalColiformBacteriaConcentrationMeasurement::MeasurementUnitEnum; |
| switch (val) |
| { |
| case EnumType::kPpm: |
| case EnumType::kPpb: |
| case EnumType::kPpt: |
| case EnumType::kMgm3: |
| case EnumType::kUgm3: |
| case EnumType::kNgm3: |
| case EnumType::kPm3: |
| case EnumType::kBqm3: |
| return val; |
| default: |
| return static_cast<EnumType>(8); |
| } |
| } |
| |
| static auto __attribute__((unused)) EnsureKnownEnumValue(TurbidityConcentrationMeasurement::LevelValueEnum val) |
| { |
| using EnumType = TurbidityConcentrationMeasurement::LevelValueEnum; |
| switch (val) |
| { |
| case EnumType::kUnknown: |
| case EnumType::kLow: |
| case EnumType::kMedium: |
| case EnumType::kHigh: |
| case EnumType::kCritical: |
| return val; |
| default: |
| return static_cast<EnumType>(5); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(TurbidityConcentrationMeasurement::MeasurementMediumEnum val) |
| { |
| using EnumType = TurbidityConcentrationMeasurement::MeasurementMediumEnum; |
| switch (val) |
| { |
| case EnumType::kGas: |
| case EnumType::kLiquid: |
| case EnumType::kSoil: |
| return val; |
| default: |
| return static_cast<EnumType>(3); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(TurbidityConcentrationMeasurement::MeasurementUnitEnum val) |
| { |
| using EnumType = TurbidityConcentrationMeasurement::MeasurementUnitEnum; |
| switch (val) |
| { |
| case EnumType::kPpm: |
| case EnumType::kPpb: |
| case EnumType::kPpt: |
| case EnumType::kMgm3: |
| case EnumType::kUgm3: |
| case EnumType::kNgm3: |
| case EnumType::kPm3: |
| case EnumType::kBqm3: |
| return val; |
| default: |
| return static_cast<EnumType>(8); |
| } |
| } |
| |
| static auto __attribute__((unused)) EnsureKnownEnumValue(CopperConcentrationMeasurement::LevelValueEnum val) |
| { |
| using EnumType = CopperConcentrationMeasurement::LevelValueEnum; |
| switch (val) |
| { |
| case EnumType::kUnknown: |
| case EnumType::kLow: |
| case EnumType::kMedium: |
| case EnumType::kHigh: |
| case EnumType::kCritical: |
| return val; |
| default: |
| return static_cast<EnumType>(5); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(CopperConcentrationMeasurement::MeasurementMediumEnum val) |
| { |
| using EnumType = CopperConcentrationMeasurement::MeasurementMediumEnum; |
| switch (val) |
| { |
| case EnumType::kGas: |
| case EnumType::kLiquid: |
| case EnumType::kSoil: |
| return val; |
| default: |
| return static_cast<EnumType>(3); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(CopperConcentrationMeasurement::MeasurementUnitEnum val) |
| { |
| using EnumType = CopperConcentrationMeasurement::MeasurementUnitEnum; |
| switch (val) |
| { |
| case EnumType::kPpm: |
| case EnumType::kPpb: |
| case EnumType::kPpt: |
| case EnumType::kMgm3: |
| case EnumType::kUgm3: |
| case EnumType::kNgm3: |
| case EnumType::kPm3: |
| case EnumType::kBqm3: |
| return val; |
| default: |
| return static_cast<EnumType>(8); |
| } |
| } |
| |
| static auto __attribute__((unused)) EnsureKnownEnumValue(LeadConcentrationMeasurement::LevelValueEnum val) |
| { |
| using EnumType = LeadConcentrationMeasurement::LevelValueEnum; |
| switch (val) |
| { |
| case EnumType::kUnknown: |
| case EnumType::kLow: |
| case EnumType::kMedium: |
| case EnumType::kHigh: |
| case EnumType::kCritical: |
| return val; |
| default: |
| return static_cast<EnumType>(5); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(LeadConcentrationMeasurement::MeasurementMediumEnum val) |
| { |
| using EnumType = LeadConcentrationMeasurement::MeasurementMediumEnum; |
| switch (val) |
| { |
| case EnumType::kGas: |
| case EnumType::kLiquid: |
| case EnumType::kSoil: |
| return val; |
| default: |
| return static_cast<EnumType>(3); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(LeadConcentrationMeasurement::MeasurementUnitEnum val) |
| { |
| using EnumType = LeadConcentrationMeasurement::MeasurementUnitEnum; |
| switch (val) |
| { |
| case EnumType::kPpm: |
| case EnumType::kPpb: |
| case EnumType::kPpt: |
| case EnumType::kMgm3: |
| case EnumType::kUgm3: |
| case EnumType::kNgm3: |
| case EnumType::kPm3: |
| case EnumType::kBqm3: |
| return val; |
| default: |
| return static_cast<EnumType>(8); |
| } |
| } |
| |
| static auto __attribute__((unused)) EnsureKnownEnumValue(ManganeseConcentrationMeasurement::LevelValueEnum val) |
| { |
| using EnumType = ManganeseConcentrationMeasurement::LevelValueEnum; |
| switch (val) |
| { |
| case EnumType::kUnknown: |
| case EnumType::kLow: |
| case EnumType::kMedium: |
| case EnumType::kHigh: |
| case EnumType::kCritical: |
| return val; |
| default: |
| return static_cast<EnumType>(5); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(ManganeseConcentrationMeasurement::MeasurementMediumEnum val) |
| { |
| using EnumType = ManganeseConcentrationMeasurement::MeasurementMediumEnum; |
| switch (val) |
| { |
| case EnumType::kGas: |
| case EnumType::kLiquid: |
| case EnumType::kSoil: |
| return val; |
| default: |
| return static_cast<EnumType>(3); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(ManganeseConcentrationMeasurement::MeasurementUnitEnum val) |
| { |
| using EnumType = ManganeseConcentrationMeasurement::MeasurementUnitEnum; |
| switch (val) |
| { |
| case EnumType::kPpm: |
| case EnumType::kPpb: |
| case EnumType::kPpt: |
| case EnumType::kMgm3: |
| case EnumType::kUgm3: |
| case EnumType::kNgm3: |
| case EnumType::kPm3: |
| case EnumType::kBqm3: |
| return val; |
| default: |
| return static_cast<EnumType>(8); |
| } |
| } |
| |
| static auto __attribute__((unused)) EnsureKnownEnumValue(SulfateConcentrationMeasurement::LevelValueEnum val) |
| { |
| using EnumType = SulfateConcentrationMeasurement::LevelValueEnum; |
| switch (val) |
| { |
| case EnumType::kUnknown: |
| case EnumType::kLow: |
| case EnumType::kMedium: |
| case EnumType::kHigh: |
| case EnumType::kCritical: |
| return val; |
| default: |
| return static_cast<EnumType>(5); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(SulfateConcentrationMeasurement::MeasurementMediumEnum val) |
| { |
| using EnumType = SulfateConcentrationMeasurement::MeasurementMediumEnum; |
| switch (val) |
| { |
| case EnumType::kGas: |
| case EnumType::kLiquid: |
| case EnumType::kSoil: |
| return val; |
| default: |
| return static_cast<EnumType>(3); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(SulfateConcentrationMeasurement::MeasurementUnitEnum val) |
| { |
| using EnumType = SulfateConcentrationMeasurement::MeasurementUnitEnum; |
| switch (val) |
| { |
| case EnumType::kPpm: |
| case EnumType::kPpb: |
| case EnumType::kPpt: |
| case EnumType::kMgm3: |
| case EnumType::kUgm3: |
| case EnumType::kNgm3: |
| case EnumType::kPm3: |
| case EnumType::kBqm3: |
| return val; |
| default: |
| return static_cast<EnumType>(8); |
| } |
| } |
| |
| static auto __attribute__((unused)) EnsureKnownEnumValue(BromodichloromethaneConcentrationMeasurement::LevelValueEnum val) |
| { |
| using EnumType = BromodichloromethaneConcentrationMeasurement::LevelValueEnum; |
| switch (val) |
| { |
| case EnumType::kUnknown: |
| case EnumType::kLow: |
| case EnumType::kMedium: |
| case EnumType::kHigh: |
| case EnumType::kCritical: |
| return val; |
| default: |
| return static_cast<EnumType>(5); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(BromodichloromethaneConcentrationMeasurement::MeasurementMediumEnum val) |
| { |
| using EnumType = BromodichloromethaneConcentrationMeasurement::MeasurementMediumEnum; |
| switch (val) |
| { |
| case EnumType::kGas: |
| case EnumType::kLiquid: |
| case EnumType::kSoil: |
| return val; |
| default: |
| return static_cast<EnumType>(3); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(BromodichloromethaneConcentrationMeasurement::MeasurementUnitEnum val) |
| { |
| using EnumType = BromodichloromethaneConcentrationMeasurement::MeasurementUnitEnum; |
| switch (val) |
| { |
| case EnumType::kPpm: |
| case EnumType::kPpb: |
| case EnumType::kPpt: |
| case EnumType::kMgm3: |
| case EnumType::kUgm3: |
| case EnumType::kNgm3: |
| case EnumType::kPm3: |
| case EnumType::kBqm3: |
| return val; |
| default: |
| return static_cast<EnumType>(8); |
| } |
| } |
| |
| static auto __attribute__((unused)) EnsureKnownEnumValue(BromoformConcentrationMeasurement::LevelValueEnum val) |
| { |
| using EnumType = BromoformConcentrationMeasurement::LevelValueEnum; |
| switch (val) |
| { |
| case EnumType::kUnknown: |
| case EnumType::kLow: |
| case EnumType::kMedium: |
| case EnumType::kHigh: |
| case EnumType::kCritical: |
| return val; |
| default: |
| return static_cast<EnumType>(5); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(BromoformConcentrationMeasurement::MeasurementMediumEnum val) |
| { |
| using EnumType = BromoformConcentrationMeasurement::MeasurementMediumEnum; |
| switch (val) |
| { |
| case EnumType::kGas: |
| case EnumType::kLiquid: |
| case EnumType::kSoil: |
| return val; |
| default: |
| return static_cast<EnumType>(3); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(BromoformConcentrationMeasurement::MeasurementUnitEnum val) |
| { |
| using EnumType = BromoformConcentrationMeasurement::MeasurementUnitEnum; |
| switch (val) |
| { |
| case EnumType::kPpm: |
| case EnumType::kPpb: |
| case EnumType::kPpt: |
| case EnumType::kMgm3: |
| case EnumType::kUgm3: |
| case EnumType::kNgm3: |
| case EnumType::kPm3: |
| case EnumType::kBqm3: |
| return val; |
| default: |
| return static_cast<EnumType>(8); |
| } |
| } |
| |
| static auto __attribute__((unused)) EnsureKnownEnumValue(ChlorodibromomethaneConcentrationMeasurement::LevelValueEnum val) |
| { |
| using EnumType = ChlorodibromomethaneConcentrationMeasurement::LevelValueEnum; |
| switch (val) |
| { |
| case EnumType::kUnknown: |
| case EnumType::kLow: |
| case EnumType::kMedium: |
| case EnumType::kHigh: |
| case EnumType::kCritical: |
| return val; |
| default: |
| return static_cast<EnumType>(5); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(ChlorodibromomethaneConcentrationMeasurement::MeasurementMediumEnum val) |
| { |
| using EnumType = ChlorodibromomethaneConcentrationMeasurement::MeasurementMediumEnum; |
| switch (val) |
| { |
| case EnumType::kGas: |
| case EnumType::kLiquid: |
| case EnumType::kSoil: |
| return val; |
| default: |
| return static_cast<EnumType>(3); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(ChlorodibromomethaneConcentrationMeasurement::MeasurementUnitEnum val) |
| { |
| using EnumType = ChlorodibromomethaneConcentrationMeasurement::MeasurementUnitEnum; |
| switch (val) |
| { |
| case EnumType::kPpm: |
| case EnumType::kPpb: |
| case EnumType::kPpt: |
| case EnumType::kMgm3: |
| case EnumType::kUgm3: |
| case EnumType::kNgm3: |
| case EnumType::kPm3: |
| case EnumType::kBqm3: |
| return val; |
| default: |
| return static_cast<EnumType>(8); |
| } |
| } |
| |
| static auto __attribute__((unused)) EnsureKnownEnumValue(ChloroformConcentrationMeasurement::LevelValueEnum val) |
| { |
| using EnumType = ChloroformConcentrationMeasurement::LevelValueEnum; |
| switch (val) |
| { |
| case EnumType::kUnknown: |
| case EnumType::kLow: |
| case EnumType::kMedium: |
| case EnumType::kHigh: |
| case EnumType::kCritical: |
| return val; |
| default: |
| return static_cast<EnumType>(5); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(ChloroformConcentrationMeasurement::MeasurementMediumEnum val) |
| { |
| using EnumType = ChloroformConcentrationMeasurement::MeasurementMediumEnum; |
| switch (val) |
| { |
| case EnumType::kGas: |
| case EnumType::kLiquid: |
| case EnumType::kSoil: |
| return val; |
| default: |
| return static_cast<EnumType>(3); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(ChloroformConcentrationMeasurement::MeasurementUnitEnum val) |
| { |
| using EnumType = ChloroformConcentrationMeasurement::MeasurementUnitEnum; |
| switch (val) |
| { |
| case EnumType::kPpm: |
| case EnumType::kPpb: |
| case EnumType::kPpt: |
| case EnumType::kMgm3: |
| case EnumType::kUgm3: |
| case EnumType::kNgm3: |
| case EnumType::kPm3: |
| case EnumType::kBqm3: |
| return val; |
| default: |
| return static_cast<EnumType>(8); |
| } |
| } |
| |
| static auto __attribute__((unused)) EnsureKnownEnumValue(SodiumConcentrationMeasurement::LevelValueEnum val) |
| { |
| using EnumType = SodiumConcentrationMeasurement::LevelValueEnum; |
| switch (val) |
| { |
| case EnumType::kUnknown: |
| case EnumType::kLow: |
| case EnumType::kMedium: |
| case EnumType::kHigh: |
| case EnumType::kCritical: |
| return val; |
| default: |
| return static_cast<EnumType>(5); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(SodiumConcentrationMeasurement::MeasurementMediumEnum val) |
| { |
| using EnumType = SodiumConcentrationMeasurement::MeasurementMediumEnum; |
| switch (val) |
| { |
| case EnumType::kGas: |
| case EnumType::kLiquid: |
| case EnumType::kSoil: |
| return val; |
| default: |
| return static_cast<EnumType>(3); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(SodiumConcentrationMeasurement::MeasurementUnitEnum val) |
| { |
| using EnumType = SodiumConcentrationMeasurement::MeasurementUnitEnum; |
| switch (val) |
| { |
| case EnumType::kPpm: |
| case EnumType::kPpb: |
| case EnumType::kPpt: |
| case EnumType::kMgm3: |
| case EnumType::kUgm3: |
| case EnumType::kNgm3: |
| case EnumType::kPm3: |
| case EnumType::kBqm3: |
| return val; |
| default: |
| return static_cast<EnumType>(8); |
| } |
| } |
| |
| static auto __attribute__((unused)) EnsureKnownEnumValue(Pm25ConcentrationMeasurement::LevelValueEnum val) |
| { |
| using EnumType = Pm25ConcentrationMeasurement::LevelValueEnum; |
| switch (val) |
| { |
| case EnumType::kUnknown: |
| case EnumType::kLow: |
| case EnumType::kMedium: |
| case EnumType::kHigh: |
| case EnumType::kCritical: |
| return val; |
| default: |
| return static_cast<EnumType>(5); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(Pm25ConcentrationMeasurement::MeasurementMediumEnum val) |
| { |
| using EnumType = Pm25ConcentrationMeasurement::MeasurementMediumEnum; |
| switch (val) |
| { |
| case EnumType::kGas: |
| case EnumType::kLiquid: |
| case EnumType::kSoil: |
| return val; |
| default: |
| return static_cast<EnumType>(3); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(Pm25ConcentrationMeasurement::MeasurementUnitEnum val) |
| { |
| using EnumType = Pm25ConcentrationMeasurement::MeasurementUnitEnum; |
| switch (val) |
| { |
| case EnumType::kPpm: |
| case EnumType::kPpb: |
| case EnumType::kPpt: |
| case EnumType::kMgm3: |
| case EnumType::kUgm3: |
| case EnumType::kNgm3: |
| case EnumType::kPm3: |
| case EnumType::kBqm3: |
| return val; |
| default: |
| return static_cast<EnumType>(8); |
| } |
| } |
| |
| static auto __attribute__((unused)) EnsureKnownEnumValue(FormaldehydeConcentrationMeasurement::LevelValueEnum val) |
| { |
| using EnumType = FormaldehydeConcentrationMeasurement::LevelValueEnum; |
| switch (val) |
| { |
| case EnumType::kUnknown: |
| case EnumType::kLow: |
| case EnumType::kMedium: |
| case EnumType::kHigh: |
| case EnumType::kCritical: |
| return val; |
| default: |
| return static_cast<EnumType>(5); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(FormaldehydeConcentrationMeasurement::MeasurementMediumEnum val) |
| { |
| using EnumType = FormaldehydeConcentrationMeasurement::MeasurementMediumEnum; |
| switch (val) |
| { |
| case EnumType::kGas: |
| case EnumType::kLiquid: |
| case EnumType::kSoil: |
| return val; |
| default: |
| return static_cast<EnumType>(3); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(FormaldehydeConcentrationMeasurement::MeasurementUnitEnum val) |
| { |
| using EnumType = FormaldehydeConcentrationMeasurement::MeasurementUnitEnum; |
| switch (val) |
| { |
| case EnumType::kPpm: |
| case EnumType::kPpb: |
| case EnumType::kPpt: |
| case EnumType::kMgm3: |
| case EnumType::kUgm3: |
| case EnumType::kNgm3: |
| case EnumType::kPm3: |
| case EnumType::kBqm3: |
| return val; |
| default: |
| return static_cast<EnumType>(8); |
| } |
| } |
| |
| static auto __attribute__((unused)) EnsureKnownEnumValue(Pm1ConcentrationMeasurement::LevelValueEnum val) |
| { |
| using EnumType = Pm1ConcentrationMeasurement::LevelValueEnum; |
| switch (val) |
| { |
| case EnumType::kUnknown: |
| case EnumType::kLow: |
| case EnumType::kMedium: |
| case EnumType::kHigh: |
| case EnumType::kCritical: |
| return val; |
| default: |
| return static_cast<EnumType>(5); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(Pm1ConcentrationMeasurement::MeasurementMediumEnum val) |
| { |
| using EnumType = Pm1ConcentrationMeasurement::MeasurementMediumEnum; |
| switch (val) |
| { |
| case EnumType::kGas: |
| case EnumType::kLiquid: |
| case EnumType::kSoil: |
| return val; |
| default: |
| return static_cast<EnumType>(3); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(Pm1ConcentrationMeasurement::MeasurementUnitEnum val) |
| { |
| using EnumType = Pm1ConcentrationMeasurement::MeasurementUnitEnum; |
| switch (val) |
| { |
| case EnumType::kPpm: |
| case EnumType::kPpb: |
| case EnumType::kPpt: |
| case EnumType::kMgm3: |
| case EnumType::kUgm3: |
| case EnumType::kNgm3: |
| case EnumType::kPm3: |
| case EnumType::kBqm3: |
| return val; |
| default: |
| return static_cast<EnumType>(8); |
| } |
| } |
| |
| static auto __attribute__((unused)) EnsureKnownEnumValue(Pm10ConcentrationMeasurement::LevelValueEnum val) |
| { |
| using EnumType = Pm10ConcentrationMeasurement::LevelValueEnum; |
| switch (val) |
| { |
| case EnumType::kUnknown: |
| case EnumType::kLow: |
| case EnumType::kMedium: |
| case EnumType::kHigh: |
| case EnumType::kCritical: |
| return val; |
| default: |
| return static_cast<EnumType>(5); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(Pm10ConcentrationMeasurement::MeasurementMediumEnum val) |
| { |
| using EnumType = Pm10ConcentrationMeasurement::MeasurementMediumEnum; |
| switch (val) |
| { |
| case EnumType::kGas: |
| case EnumType::kLiquid: |
| case EnumType::kSoil: |
| return val; |
| default: |
| return static_cast<EnumType>(3); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(Pm10ConcentrationMeasurement::MeasurementUnitEnum val) |
| { |
| using EnumType = Pm10ConcentrationMeasurement::MeasurementUnitEnum; |
| switch (val) |
| { |
| case EnumType::kPpm: |
| case EnumType::kPpb: |
| case EnumType::kPpt: |
| case EnumType::kMgm3: |
| case EnumType::kUgm3: |
| case EnumType::kNgm3: |
| case EnumType::kPm3: |
| case EnumType::kBqm3: |
| return val; |
| default: |
| return static_cast<EnumType>(8); |
| } |
| } |
| |
| static auto __attribute__((unused)) EnsureKnownEnumValue(TotalVolatileOrganicCompoundsConcentrationMeasurement::LevelValueEnum val) |
| { |
| using EnumType = TotalVolatileOrganicCompoundsConcentrationMeasurement::LevelValueEnum; |
| switch (val) |
| { |
| case EnumType::kUnknown: |
| case EnumType::kLow: |
| case EnumType::kMedium: |
| case EnumType::kHigh: |
| case EnumType::kCritical: |
| return val; |
| default: |
| return static_cast<EnumType>(5); |
| } |
| } |
| static auto __attribute__((unused)) |
| EnsureKnownEnumValue(TotalVolatileOrganicCompoundsConcentrationMeasurement::MeasurementMediumEnum val) |
| { |
| using EnumType = TotalVolatileOrganicCompoundsConcentrationMeasurement::MeasurementMediumEnum; |
| switch (val) |
| { |
| case EnumType::kGas: |
| case EnumType::kLiquid: |
| case EnumType::kSoil: |
| return val; |
| default: |
| return static_cast<EnumType>(3); |
| } |
| } |
| static auto __attribute__((unused)) |
| EnsureKnownEnumValue(TotalVolatileOrganicCompoundsConcentrationMeasurement::MeasurementUnitEnum val) |
| { |
| using EnumType = TotalVolatileOrganicCompoundsConcentrationMeasurement::MeasurementUnitEnum; |
| switch (val) |
| { |
| case EnumType::kPpm: |
| case EnumType::kPpb: |
| case EnumType::kPpt: |
| case EnumType::kMgm3: |
| case EnumType::kUgm3: |
| case EnumType::kNgm3: |
| case EnumType::kPm3: |
| case EnumType::kBqm3: |
| return val; |
| default: |
| return static_cast<EnumType>(8); |
| } |
| } |
| |
| static auto __attribute__((unused)) EnsureKnownEnumValue(RadonConcentrationMeasurement::LevelValueEnum val) |
| { |
| using EnumType = RadonConcentrationMeasurement::LevelValueEnum; |
| switch (val) |
| { |
| case EnumType::kUnknown: |
| case EnumType::kLow: |
| case EnumType::kMedium: |
| case EnumType::kHigh: |
| case EnumType::kCritical: |
| return val; |
| default: |
| return static_cast<EnumType>(5); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(RadonConcentrationMeasurement::MeasurementMediumEnum val) |
| { |
| using EnumType = RadonConcentrationMeasurement::MeasurementMediumEnum; |
| switch (val) |
| { |
| case EnumType::kGas: |
| case EnumType::kLiquid: |
| case EnumType::kSoil: |
| return val; |
| default: |
| return static_cast<EnumType>(3); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(RadonConcentrationMeasurement::MeasurementUnitEnum val) |
| { |
| using EnumType = RadonConcentrationMeasurement::MeasurementUnitEnum; |
| switch (val) |
| { |
| case EnumType::kPpm: |
| case EnumType::kPpb: |
| case EnumType::kPpt: |
| case EnumType::kMgm3: |
| case EnumType::kUgm3: |
| case EnumType::kNgm3: |
| case EnumType::kPm3: |
| case EnumType::kBqm3: |
| return val; |
| default: |
| return static_cast<EnumType>(8); |
| } |
| } |
| |
| static auto __attribute__((unused)) EnsureKnownEnumValue(Channel::ChannelStatusEnum val) |
| { |
| using EnumType = Channel::ChannelStatusEnum; |
| switch (val) |
| { |
| case EnumType::kSuccess: |
| case EnumType::kMultipleMatches: |
| case EnumType::kNoMatches: |
| return val; |
| default: |
| return static_cast<EnumType>(3); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(Channel::LineupInfoTypeEnum val) |
| { |
| using EnumType = Channel::LineupInfoTypeEnum; |
| switch (val) |
| { |
| case EnumType::kMso: |
| return val; |
| default: |
| return static_cast<EnumType>(1); |
| } |
| } |
| |
| static auto __attribute__((unused)) EnsureKnownEnumValue(TargetNavigator::TargetNavigatorStatusEnum val) |
| { |
| using EnumType = TargetNavigator::TargetNavigatorStatusEnum; |
| switch (val) |
| { |
| case EnumType::kSuccess: |
| case EnumType::kTargetNotFound: |
| case EnumType::kNotAllowed: |
| return val; |
| default: |
| return static_cast<EnumType>(3); |
| } |
| } |
| |
| static auto __attribute__((unused)) EnsureKnownEnumValue(MediaPlayback::MediaPlaybackStatusEnum val) |
| { |
| using EnumType = MediaPlayback::MediaPlaybackStatusEnum; |
| switch (val) |
| { |
| case EnumType::kSuccess: |
| case EnumType::kInvalidStateForCommand: |
| case EnumType::kNotAllowed: |
| case EnumType::kNotActive: |
| case EnumType::kSpeedOutOfRange: |
| case EnumType::kSeekOutOfRange: |
| return val; |
| default: |
| return static_cast<EnumType>(6); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(MediaPlayback::PlaybackStateEnum val) |
| { |
| using EnumType = MediaPlayback::PlaybackStateEnum; |
| switch (val) |
| { |
| case EnumType::kPlaying: |
| case EnumType::kPaused: |
| case EnumType::kNotPlaying: |
| case EnumType::kBuffering: |
| return val; |
| default: |
| return static_cast<EnumType>(4); |
| } |
| } |
| |
| static auto __attribute__((unused)) EnsureKnownEnumValue(MediaInput::InputTypeEnum val) |
| { |
| using EnumType = MediaInput::InputTypeEnum; |
| switch (val) |
| { |
| case EnumType::kInternal: |
| case EnumType::kAux: |
| case EnumType::kCoax: |
| case EnumType::kComposite: |
| case EnumType::kHdmi: |
| case EnumType::kInput: |
| case EnumType::kLine: |
| case EnumType::kOptical: |
| case EnumType::kVideo: |
| case EnumType::kScart: |
| case EnumType::kUsb: |
| case EnumType::kOther: |
| return val; |
| default: |
| return static_cast<EnumType>(12); |
| } |
| } |
| |
| static auto __attribute__((unused)) EnsureKnownEnumValue(KeypadInput::CecKeyCode val) |
| { |
| using EnumType = KeypadInput::CecKeyCode; |
| switch (val) |
| { |
| case EnumType::kSelect: |
| case EnumType::kUp: |
| case EnumType::kDown: |
| case EnumType::kLeft: |
| case EnumType::kRight: |
| case EnumType::kRightUp: |
| case EnumType::kRightDown: |
| case EnumType::kLeftUp: |
| case EnumType::kLeftDown: |
| case EnumType::kRootMenu: |
| case EnumType::kSetupMenu: |
| case EnumType::kContentsMenu: |
| case EnumType::kFavoriteMenu: |
| case EnumType::kExit: |
| case EnumType::kMediaTopMenu: |
| case EnumType::kMediaContextSensitiveMenu: |
| case EnumType::kNumberEntryMode: |
| case EnumType::kNumber11: |
| case EnumType::kNumber12: |
| case EnumType::kNumber0OrNumber10: |
| case EnumType::kNumbers1: |
| case EnumType::kNumbers2: |
| case EnumType::kNumbers3: |
| case EnumType::kNumbers4: |
| case EnumType::kNumbers5: |
| case EnumType::kNumbers6: |
| case EnumType::kNumbers7: |
| case EnumType::kNumbers8: |
| case EnumType::kNumbers9: |
| case EnumType::kDot: |
| case EnumType::kEnter: |
| case EnumType::kClear: |
| case EnumType::kNextFavorite: |
| case EnumType::kChannelUp: |
| case EnumType::kChannelDown: |
| case EnumType::kPreviousChannel: |
| case EnumType::kSoundSelect: |
| case EnumType::kInputSelect: |
| case EnumType::kDisplayInformation: |
| case EnumType::kHelp: |
| case EnumType::kPageUp: |
| case EnumType::kPageDown: |
| case EnumType::kPower: |
| case EnumType::kVolumeUp: |
| case EnumType::kVolumeDown: |
| case EnumType::kMute: |
| case EnumType::kPlay: |
| case EnumType::kStop: |
| case EnumType::kPause: |
| case EnumType::kRecord: |
| case EnumType::kRewind: |
| case EnumType::kFastForward: |
| case EnumType::kEject: |
| case EnumType::kForward: |
| case EnumType::kBackward: |
| case EnumType::kStopRecord: |
| case EnumType::kPauseRecord: |
| case EnumType::kReserved: |
| case EnumType::kAngle: |
| case EnumType::kSubPicture: |
| case EnumType::kVideoOnDemand: |
| case EnumType::kElectronicProgramGuide: |
| case EnumType::kTimerProgramming: |
| case EnumType::kInitialConfiguration: |
| case EnumType::kSelectBroadcastType: |
| case EnumType::kSelectSoundPresentation: |
| case EnumType::kPlayFunction: |
| case EnumType::kPausePlayFunction: |
| case EnumType::kRecordFunction: |
| case EnumType::kPauseRecordFunction: |
| case EnumType::kStopFunction: |
| case EnumType::kMuteFunction: |
| case EnumType::kRestoreVolumeFunction: |
| case EnumType::kTuneFunction: |
| case EnumType::kSelectMediaFunction: |
| case EnumType::kSelectAvInputFunction: |
| case EnumType::kSelectAudioInputFunction: |
| case EnumType::kPowerToggleFunction: |
| case EnumType::kPowerOffFunction: |
| case EnumType::kPowerOnFunction: |
| case EnumType::kF1Blue: |
| case EnumType::kF2Red: |
| case EnumType::kF3Green: |
| case EnumType::kF4Yellow: |
| case EnumType::kF5: |
| case EnumType::kData: |
| return val; |
| default: |
| return static_cast<EnumType>(14); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(KeypadInput::KeypadInputStatusEnum val) |
| { |
| using EnumType = KeypadInput::KeypadInputStatusEnum; |
| switch (val) |
| { |
| case EnumType::kSuccess: |
| case EnumType::kUnsupportedKey: |
| case EnumType::kInvalidKeyInCurrentState: |
| return val; |
| default: |
| return static_cast<EnumType>(3); |
| } |
| } |
| |
| static auto __attribute__((unused)) EnsureKnownEnumValue(ContentLauncher::ContentLaunchStatusEnum val) |
| { |
| using EnumType = ContentLauncher::ContentLaunchStatusEnum; |
| switch (val) |
| { |
| case EnumType::kSuccess: |
| case EnumType::kUrlNotAvailable: |
| case EnumType::kAuthFailed: |
| return val; |
| default: |
| return static_cast<EnumType>(3); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(ContentLauncher::MetricTypeEnum val) |
| { |
| using EnumType = ContentLauncher::MetricTypeEnum; |
| switch (val) |
| { |
| case EnumType::kPixels: |
| case EnumType::kPercentage: |
| return val; |
| default: |
| return static_cast<EnumType>(2); |
| } |
| } |
| static auto __attribute__((unused)) EnsureKnownEnumValue(ContentLauncher::ParameterEnum val) |
| { |
| using EnumType = ContentLauncher::ParameterEnum; |
| switch (val) |
| { |
| case EnumType::kActor: |
| case EnumType::kChannel: |
| case EnumType::kCharacter: |
| case EnumType::kDirector: |
| case EnumType::kEvent: |
| case EnumType::kFranchise: |
| case EnumType::kGenre: |
| case EnumType::kLeague: |
| case EnumType::kPopularity: |
| case EnumType::kProvider: |
| case EnumType::kSport: |
| case EnumType::kSportsTeam: |
| case EnumType::kType: |
| case EnumType::kVideo: |
| return val; |
| default: |
| return static_cast<EnumType>(14); |
| } |
| } |
| |
| static auto __attribute__((unused)) EnsureKnownEnumValue(AudioOutput::OutputTypeEnum val) |
| { |
| using EnumType = AudioOutput::OutputTypeEnum; |
| switch (val) |
| { |
| case EnumType::kHdmi: |
| case EnumType::kBt: |
| case EnumType::kOptical: |
| case EnumType::kHeadphone: |
| case EnumType::kInternal: |
| case EnumType::kOther: |
| return val; |
| default: |
| return static_cast<EnumType>(6); |
| } |
| } |
| |
| static auto __attribute__((unused)) EnsureKnownEnumValue(ApplicationLauncher::ApplicationLauncherStatusEnum val) |
| { |
| using EnumType = ApplicationLauncher::ApplicationLauncherStatusEnum; |
| switch (val) |
| { |
| case EnumType::kSuccess: |
| case EnumType::kAppNotAvailable: |
| case EnumType::kSystemBusy: |
| return val; |
| default: |
| return static_cast<EnumType>(3); |
| } |
| } |
| |
| static auto __attribute__((unused)) EnsureKnownEnumValue(ApplicationBasic::ApplicationStatusEnum val) |
| { |
| using EnumType = ApplicationBasic::ApplicationStatusEnum; |
| switch (val) |
| { |
| case EnumType::kStopped: |
| case EnumType::kActiveVisibleFocus: |
| case EnumType::kActiveHidden: |
| case EnumType::kActiveVisibleNotFocus: |
| return val; |
| default: |
| return static_cast<EnumType>(4); |
| } |
| } |
| |
| static auto __attribute__((unused)) EnsureKnownEnumValue(UnitTesting::SimpleEnum val) |
| { |
| using EnumType = UnitTesting::SimpleEnum; |
| switch (val) |
| { |
| case EnumType::kUnspecified: |
| case EnumType::kValueA: |
| case EnumType::kValueB: |
| case EnumType::kValueC: |
| return val; |
| default: |
| return static_cast<EnumType>(4); |
| } |
| } |
| |
| static auto __attribute__((unused)) EnsureKnownEnumValue(FaultInjection::FaultType val) |
| { |
| using EnumType = FaultInjection::FaultType; |
| switch (val) |
| { |
| case EnumType::kUnspecified: |
| case EnumType::kSystemFault: |
| case EnumType::kInetFault: |
| case EnumType::kChipFault: |
| case EnumType::kCertFault: |
| return val; |
| default: |
| return static_cast<EnumType>(5); |
| } |
| } |
| |
| } // namespace Clusters |
| } // namespace app |
| } // namespace chip |