diff --git a/examples/chip-tool/templates/ComplexArgumentParser-src.zapt b/examples/chip-tool/templates/ComplexArgumentParser-src.zapt index f9b0f4bef764c5..a5e757b227f581 100644 --- a/examples/chip-tool/templates/ComplexArgumentParser-src.zapt +++ b/examples/chip-tool/templates/ComplexArgumentParser-src.zapt @@ -5,6 +5,8 @@ {{#zcl_structs}} {{#if has_more_than_one_cluster}} {{> struct_parser_impl namespace="detail"}} +{{else if has_no_clusters}} +{{> struct_parser_impl namespace="Globals"}} {{/if}} {{/zcl_structs}} diff --git a/examples/chip-tool/templates/ComplexArgumentParser.zapt b/examples/chip-tool/templates/ComplexArgumentParser.zapt index 7364b243188333..58cc5046dd5178 100644 --- a/examples/chip-tool/templates/ComplexArgumentParser.zapt +++ b/examples/chip-tool/templates/ComplexArgumentParser.zapt @@ -8,6 +8,8 @@ {{#zcl_structs}} {{#if has_more_than_one_cluster}} {{> struct_parser_decl namespace="detail"}} +{{else if has_no_clusters}} +{{> struct_parser_decl namespace="Globals"}} {{/if}} {{/zcl_structs}} diff --git a/examples/chip-tool/templates/logging/DataModelLogger-src.zapt b/examples/chip-tool/templates/logging/DataModelLogger-src.zapt index 167021f49577d2..0f41ff2e16b96a 100644 --- a/examples/chip-tool/templates/logging/DataModelLogger-src.zapt +++ b/examples/chip-tool/templates/logging/DataModelLogger-src.zapt @@ -7,6 +7,8 @@ using namespace chip::app::Clusters; {{#zcl_structs}} {{#if has_more_than_one_cluster}} {{> struct_logger_impl namespace="detail"}} +{{else if has_no_clusters}} +{{> struct_logger_impl namespace="Globals"}} {{/if}} {{/zcl_structs}} diff --git a/examples/chip-tool/templates/logging/DataModelLogger.zapt b/examples/chip-tool/templates/logging/DataModelLogger.zapt index befe9d4210ce07..97818566b43af5 100644 --- a/examples/chip-tool/templates/logging/DataModelLogger.zapt +++ b/examples/chip-tool/templates/logging/DataModelLogger.zapt @@ -6,6 +6,8 @@ {{#zcl_structs}} {{#if has_more_than_one_cluster}} {{> struct_logger_decl namespace="detail"}} +{{else if has_no_clusters}} +{{> struct_logger_decl namespace="Globals"}} {{/if}} {{/zcl_structs}} diff --git a/src/app/common/templates/templates.json b/src/app/common/templates/templates.json index 9c1ef210532b95..148ab5419f5b84 100644 --- a/src/app/common/templates/templates.json +++ b/src/app/common/templates/templates.json @@ -25,6 +25,10 @@ "name": "cluster_enums_enum", "path": "../../zap-templates/partials/cluster-enums-enum.zapt" }, + { + "name": "cluster_enums_ensure_known_value", + "path": "../../zap-templates/partials/cluster-enums-ensure-known-value.zapt" + }, { "name": "cluster_objects_field_init", "path": "../../zap-templates/partials/cluster-objects-field-init.zapt" diff --git a/src/app/zap-templates/partials/cluster-enums-ensure-known-value.zapt b/src/app/zap-templates/partials/cluster-enums-ensure-known-value.zapt new file mode 100644 index 00000000000000..939c33c037246a --- /dev/null +++ b/src/app/zap-templates/partials/cluster-enums-ensure-known-value.zapt @@ -0,0 +1,14 @@ +{{#unless (isInConfigList (concat ns "::" label) "EnumsNotUsedAsTypeInXML")}} +static auto __attribute__((unused)) EnsureKnownEnumValue({{ns}}::{{asType label}} val) +{ + using EnumType = {{ns}}::{{asType label}}; + switch (val) { + {{#zcl_enum_items}} + case EnumType::k{{asUpperCamelCase label}}: + {{/zcl_enum_items}} + return val; + default: + return EnumType::kUnknownEnumValue; + } +} +{{/unless}} diff --git a/src/app/zap-templates/templates/app/cluster-enums-check.zapt b/src/app/zap-templates/templates/app/cluster-enums-check.zapt index c5acb97314f4ff..b0d8ce150c4dbd 100644 --- a/src/app/zap-templates/templates/app/cluster-enums-check.zapt +++ b/src/app/zap-templates/templates/app/cluster-enums-check.zapt @@ -9,40 +9,17 @@ namespace app { namespace Clusters { {{#zcl_enums}} {{#if has_more_than_one_cluster}} -{{#unless (isInConfigList (concat "::" label) "EnumsNotUsedAsTypeInXML")}} -static auto __attribute__((unused)) EnsureKnownEnumValue(detail::{{asType label}} val) -{ - using EnumType = detail::{{asType label}}; - switch (val) { - {{#zcl_enum_items}} - case EnumType::k{{asUpperCamelCase label}}: - {{/zcl_enum_items}} - return val; - default: - return EnumType::kUnknownEnumValue; - } -} -{{/unless}} +{{> cluster_enums_ensure_known_value ns="detail"}} +{{else if has_no_clusters}} +{{> cluster_enums_ensure_known_value ns="Globals"}} + {{/if}} {{/zcl_enums}} {{#zcl_clusters}} {{#zcl_enums}} {{#unless has_more_than_one_cluster}} -{{#unless (isInConfigList (concat (asUpperCamelCase ../name) "::" label) "EnumsNotUsedAsTypeInXML")}} -static auto __attribute__((unused)) EnsureKnownEnumValue({{asUpperCamelCase ../name}}::{{asType label}} val) -{ - using EnumType = {{asUpperCamelCase ../name}}::{{asType label}}; - switch (val) { - {{#zcl_enum_items}} - case EnumType::k{{asUpperCamelCase label}}: - {{/zcl_enum_items}} - return val; - default: - return EnumType::kUnknownEnumValue; - } -} -{{/unless}} +{{> cluster_enums_ensure_known_value ns=(asUpperCamelCase ../name)}} {{/unless}} {{/zcl_enums}} diff --git a/src/app/zap-templates/templates/app/cluster-enums.zapt b/src/app/zap-templates/templates/app/cluster-enums.zapt index 17ce795200795f..3a1457895c8107 100644 --- a/src/app/zap-templates/templates/app/cluster-enums.zapt +++ b/src/app/zap-templates/templates/app/cluster-enums.zapt @@ -37,6 +37,37 @@ k{{asUpperCamelCase label}} = {{asHex mask}}, } // namespace detail +namespace Globals { +// Global enums. +{{#zcl_enums}} + +{{#if has_no_clusters}} + +{{> cluster_enums_enum ns=""}} + +{{/if}} +{{/zcl_enums}} + +// Global bitmaps. +{{#zcl_bitmaps}} + +{{#if has_no_clusters}} +{{! Work around https://github.com/project-chip/zap/issues/1370 and manually filter out built-in bitmap types. }} +{{#if_is_atomic label}} +{{else}} + +// Bitmap for {{label}} +enum class {{asType label}} : {{asUnderlyingZclType name}} { +{{#zcl_bitmap_items}} +k{{asUpperCamelCase label}} = {{asHex mask}}, +{{/zcl_bitmap_items}} +}; + +{{/if_is_atomic}} +{{/if}} +{{/zcl_bitmaps}} + +} // namespace Globals {{#zcl_clusters}} namespace {{asUpperCamelCase name}} { diff --git a/src/app/zap-templates/templates/app/cluster-objects-src.zapt b/src/app/zap-templates/templates/app/cluster-objects-src.zapt index 50bd812be31521..1322756b85213e 100644 --- a/src/app/zap-templates/templates/app/cluster-objects-src.zapt +++ b/src/app/zap-templates/templates/app/cluster-objects-src.zapt @@ -64,6 +64,18 @@ namespace Structs { } // namespace Structs } // namespace detail +namespace Globals { +// Global structs +namespace Structs { +{{#zcl_structs}} +{{#if has_no_clusters}} +{{> cluster_objects_struct header=false}} + +{{/if}} +{{/zcl_structs}} +} // namespace Structs +} // namespace Globals + {{#zcl_clusters}} namespace {{asUpperCamelCase name}} { {{#zcl_structs}} diff --git a/src/app/zap-templates/templates/app/cluster-objects.zapt b/src/app/zap-templates/templates/app/cluster-objects.zapt index 1453523b1b7986..e9f42b17c5ff66 100644 --- a/src/app/zap-templates/templates/app/cluster-objects.zapt +++ b/src/app/zap-templates/templates/app/cluster-objects.zapt @@ -35,6 +35,18 @@ namespace Structs { } // namespace detail namespace Globals { + +// Global structs. +namespace Structs { + +{{#zcl_structs}} +{{#if has_no_clusters}} +{{> cluster_objects_struct header=true}} + +{{/if}} +{{/zcl_structs}} +} // namespace Structs + namespace Attributes { {{#zcl_attributes_server}} {{#unless clusterRef}} diff --git a/src/controller/python/chip/clusters/Attribute.py b/src/controller/python/chip/clusters/Attribute.py index a8850f6b056186..06e893aa963be4 100644 --- a/src/controller/python/chip/clusters/Attribute.py +++ b/src/controller/python/chip/clusters/Attribute.py @@ -288,7 +288,7 @@ def _BuildClusterIndex(): ''' Build internal cluster index for locating the corresponding cluster object by path in the future. ''' for clusterName, obj in inspect.getmembers(sys.modules['chip.clusters.Objects']): - if ('chip.clusters.Objects' in str(obj)) and inspect.isclass(obj): + if ('chip.clusters.Objects' in str(obj)) and inspect.isclass(obj) and issubclass(obj, Cluster): _ClusterIndex[obj.id] = obj diff --git a/src/controller/python/chip/clusters/Objects.py b/src/controller/python/chip/clusters/Objects.py index a0423d7d901545..3b8637af5860af 100644 --- a/src/controller/python/chip/clusters/Objects.py +++ b/src/controller/python/chip/clusters/Objects.py @@ -36,6 +36,40 @@ ClusterObjectDescriptor, ClusterObjectFieldDescriptor) from .Types import Nullable, NullValue +class Globals: + class Enums: + class TestGlobalEnum(MatterIntEnum): + kSomeValue = 0x00 + kSomeOtherValue = 0x01 + kFinalValue = 0x02 + # All received enum values that are not listed above will be mapped + # to kUnknownEnumValue. This is a helper enum value that should only + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. + kUnknownEnumValue = 3, + + class Bitmaps: + class TestGlobalBitmap(IntFlag): + kFirstBit = 0x1 + kSecondBit = 0x2 + + class Structs: + @dataclass + class TestGlobalStruct(ClusterObject): + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="name", Tag=0, Type=str), + ClusterObjectFieldDescriptor(Label="myBitmap", Tag=1, Type=typing.Union[Nullable, uint]), + ClusterObjectFieldDescriptor(Label="myEnum", Tag=2, Type=typing.Union[None, Nullable, Globals.Enums.TestGlobalEnum]), + ]) + + name: 'str' = "" + myBitmap: 'typing.Union[Nullable, uint]' = NullValue + myEnum: 'typing.Union[None, Nullable, Globals.Enums.TestGlobalEnum]' = None + + @dataclass class Identify(Cluster): @@ -74,16 +108,16 @@ class EffectIdentifierEnum(MatterIntEnum): kStopEffect = 0xFF # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 3, class EffectVariantEnum(MatterIntEnum): kDefault = 0x00 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 1, class IdentifyTypeEnum(MatterIntEnum): @@ -95,8 +129,8 @@ class IdentifyTypeEnum(MatterIntEnum): kActuator = 0x05 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 6, class Commands: @@ -622,16 +656,16 @@ class DelayedAllOffEffectVariantEnum(MatterIntEnum): kDelayedOffSlowFade = 0x02 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 3, class DyingLightEffectVariantEnum(MatterIntEnum): kDyingLightFadeOff = 0x00 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 1, class EffectIdentifierEnum(MatterIntEnum): @@ -639,8 +673,8 @@ class EffectIdentifierEnum(MatterIntEnum): kDyingLight = 0x01 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 2, class StartUpOnOffEnum(MatterIntEnum): @@ -649,8 +683,8 @@ class StartUpOnOffEnum(MatterIntEnum): kToggle = 0x02 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 3, class Bitmaps: @@ -1145,8 +1179,8 @@ class MoveModeEnum(MatterIntEnum): kDown = 0x01 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 2, class StepModeEnum(MatterIntEnum): @@ -1154,8 +1188,8 @@ class StepModeEnum(MatterIntEnum): kDown = 0x01 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 2, class Bitmaps: @@ -2532,8 +2566,8 @@ class AccessControlEntryAuthModeEnum(MatterIntEnum): kGroup = 0x03 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 0, class AccessControlEntryPrivilegeEnum(MatterIntEnum): @@ -2544,8 +2578,8 @@ class AccessControlEntryPrivilegeEnum(MatterIntEnum): kAdminister = 0x05 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 0, class AccessRestrictionTypeEnum(MatterIntEnum): @@ -2565,8 +2599,8 @@ class ChangeTypeEnum(MatterIntEnum): kRemoved = 0x02 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 3, class Bitmaps: @@ -3043,8 +3077,8 @@ class ActionErrorEnum(MatterIntEnum): kInterrupted = 0x01 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 2, class ActionStateEnum(MatterIntEnum): @@ -3054,8 +3088,8 @@ class ActionStateEnum(MatterIntEnum): kDisabled = 0x03 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 4, class ActionTypeEnum(MatterIntEnum): @@ -3068,8 +3102,8 @@ class ActionTypeEnum(MatterIntEnum): kAlarm = 0x06 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 7, class EndpointListTypeEnum(MatterIntEnum): @@ -3078,8 +3112,8 @@ class EndpointListTypeEnum(MatterIntEnum): kZone = 0x02 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 3, class Bitmaps: @@ -3652,8 +3686,8 @@ class ColorEnum(MatterIntEnum): kGold = 0x14 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 21, class ProductFinishEnum(MatterIntEnum): @@ -3665,8 +3699,8 @@ class ProductFinishEnum(MatterIntEnum): kFabric = 0x05 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 6, class Structs: @@ -4280,8 +4314,8 @@ class ApplyUpdateActionEnum(MatterIntEnum): kDiscontinue = 0x02 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 3, class DownloadProtocolEnum(MatterIntEnum): @@ -4291,8 +4325,8 @@ class DownloadProtocolEnum(MatterIntEnum): kVendorSpecific = 0x03 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 4, class StatusEnum(MatterIntEnum): @@ -4302,8 +4336,8 @@ class StatusEnum(MatterIntEnum): kDownloadProtocolNotSupported = 0x03 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 4, class Commands: @@ -4557,8 +4591,8 @@ class AnnouncementReasonEnum(MatterIntEnum): kUrgentUpdateAvailable = 0x02 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 3, class ChangeReasonEnum(MatterIntEnum): @@ -4569,8 +4603,8 @@ class ChangeReasonEnum(MatterIntEnum): kDelayByProvider = 0x04 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 5, class UpdateStateEnum(MatterIntEnum): @@ -4585,8 +4619,8 @@ class UpdateStateEnum(MatterIntEnum): kDelayedOnUserConsent = 0x08 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 9, class Structs: @@ -5067,8 +5101,8 @@ class CalendarTypeEnum(MatterIntEnum): kUseActiveLocale = 0xFF # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 12, class HourFormatEnum(MatterIntEnum): @@ -5077,8 +5111,8 @@ class HourFormatEnum(MatterIntEnum): kUseActiveLocale = 0xFF # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 2, class Bitmaps: @@ -5263,8 +5297,8 @@ class TempUnitEnum(MatterIntEnum): kKelvin = 0x02 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 3, class Bitmaps: @@ -5648,8 +5682,8 @@ class BatApprovedChemistryEnum(MatterIntEnum): kZincCerium = 0x20 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 33, class BatChargeFaultEnum(MatterIntEnum): @@ -5666,8 +5700,8 @@ class BatChargeFaultEnum(MatterIntEnum): kSafetyTimeout = 0x0A # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 11, class BatChargeLevelEnum(MatterIntEnum): @@ -5676,8 +5710,8 @@ class BatChargeLevelEnum(MatterIntEnum): kCritical = 0x02 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 3, class BatChargeStateEnum(MatterIntEnum): @@ -5687,8 +5721,8 @@ class BatChargeStateEnum(MatterIntEnum): kIsNotCharging = 0x03 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 4, class BatCommonDesignationEnum(MatterIntEnum): @@ -5775,8 +5809,8 @@ class BatCommonDesignationEnum(MatterIntEnum): k32600 = 0x50 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 81, class BatFaultEnum(MatterIntEnum): @@ -5785,8 +5819,8 @@ class BatFaultEnum(MatterIntEnum): kUnderTemp = 0x02 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 3, class BatReplaceabilityEnum(MatterIntEnum): @@ -5796,8 +5830,8 @@ class BatReplaceabilityEnum(MatterIntEnum): kFactoryReplaceable = 0x03 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 4, class PowerSourceStatusEnum(MatterIntEnum): @@ -5807,8 +5841,8 @@ class PowerSourceStatusEnum(MatterIntEnum): kUnavailable = 0x03 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 4, class WiredCurrentTypeEnum(MatterIntEnum): @@ -5816,8 +5850,8 @@ class WiredCurrentTypeEnum(MatterIntEnum): kDc = 0x01 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 2, class WiredFaultEnum(MatterIntEnum): @@ -5826,8 +5860,8 @@ class WiredFaultEnum(MatterIntEnum): kUnderVoltage = 0x02 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 3, class Bitmaps: @@ -6593,8 +6627,8 @@ class CommissioningErrorEnum(MatterIntEnum): kBusyWithOtherAdmin = 0x04 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 5, class RegulatoryLocationTypeEnum(MatterIntEnum): @@ -6603,8 +6637,8 @@ class RegulatoryLocationTypeEnum(MatterIntEnum): kIndoorOutdoor = 0x02 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 3, class Structs: @@ -6967,8 +7001,8 @@ class NetworkCommissioningStatusEnum(MatterIntEnum): kUnknownError = 0x0C # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 13, class WiFiBandEnum(MatterIntEnum): @@ -6980,8 +7014,8 @@ class WiFiBandEnum(MatterIntEnum): k1g = 0x05 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 6, class Bitmaps: @@ -7595,8 +7629,8 @@ class IntentEnum(MatterIntEnum): kCrashLogs = 0x02 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 3, class StatusEnum(MatterIntEnum): @@ -7607,8 +7641,8 @@ class StatusEnum(MatterIntEnum): kDenied = 0x04 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 5, class TransferProtocolEnum(MatterIntEnum): @@ -7616,8 +7650,8 @@ class TransferProtocolEnum(MatterIntEnum): kBdx = 0x01 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 2, class Commands: @@ -7813,8 +7847,8 @@ class BootReasonEnum(MatterIntEnum): kSoftwareReset = 0x06 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 7, class HardwareFaultEnum(MatterIntEnum): @@ -7831,8 +7865,8 @@ class HardwareFaultEnum(MatterIntEnum): kTamperDetected = 0x0A # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 11, class InterfaceTypeEnum(MatterIntEnum): @@ -7843,8 +7877,8 @@ class InterfaceTypeEnum(MatterIntEnum): kThread = 0x04 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 5, class NetworkFaultEnum(MatterIntEnum): @@ -7854,8 +7888,8 @@ class NetworkFaultEnum(MatterIntEnum): kConnectionFailed = 0x03 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 4, class RadioFaultEnum(MatterIntEnum): @@ -7868,8 +7902,8 @@ class RadioFaultEnum(MatterIntEnum): kEthernetFault = 0x06 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 7, class Bitmaps: @@ -8723,8 +8757,8 @@ class ConnectionStatusEnum(MatterIntEnum): kNotConnected = 0x01 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 2, class NetworkFaultEnum(MatterIntEnum): @@ -8734,8 +8768,8 @@ class NetworkFaultEnum(MatterIntEnum): kNetworkJammed = 0x03 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 4, class RoutingRoleEnum(MatterIntEnum): @@ -8748,8 +8782,8 @@ class RoutingRoleEnum(MatterIntEnum): kLeader = 0x06 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 7, class Bitmaps: @@ -10090,8 +10124,8 @@ class AssociationFailureCauseEnum(MatterIntEnum): kSsidNotFound = 0x03 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 4, class ConnectionStatusEnum(MatterIntEnum): @@ -10099,8 +10133,8 @@ class ConnectionStatusEnum(MatterIntEnum): kNotConnected = 0x01 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 2, class SecurityTypeEnum(MatterIntEnum): @@ -10112,8 +10146,8 @@ class SecurityTypeEnum(MatterIntEnum): kWpa3 = 0x05 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 6, class WiFiVersionEnum(MatterIntEnum): @@ -10126,8 +10160,8 @@ class WiFiVersionEnum(MatterIntEnum): kAh = 0x06 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 7, class Bitmaps: @@ -10570,8 +10604,8 @@ class PHYRateEnum(MatterIntEnum): kRate400G = 0x09 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 10, class Bitmaps: @@ -10893,16 +10927,16 @@ class GranularityEnum(MatterIntEnum): kMicrosecondsGranularity = 0x04 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 5, class StatusCode(MatterIntEnum): kTimeNotAccepted = 0x02 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 0, class TimeSourceEnum(MatterIntEnum): @@ -10925,8 +10959,8 @@ class TimeSourceEnum(MatterIntEnum): kGnss = 0x10 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 17, class TimeZoneDatabaseEnum(MatterIntEnum): @@ -10935,8 +10969,8 @@ class TimeZoneDatabaseEnum(MatterIntEnum): kNone = 0x02 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 3, class Bitmaps: @@ -11581,8 +11615,8 @@ class ColorEnum(MatterIntEnum): kGold = 0x14 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 21, class ProductFinishEnum(MatterIntEnum): @@ -11594,8 +11628,8 @@ class ProductFinishEnum(MatterIntEnum): kFabric = 0x05 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 6, class Bitmaps: @@ -12432,8 +12466,8 @@ class CommissioningWindowStatusEnum(MatterIntEnum): kBasicWindowOpen = 0x02 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 3, class StatusCode(MatterIntEnum): @@ -12442,8 +12476,8 @@ class StatusCode(MatterIntEnum): kWindowNotOpen = 0x04 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 0, class Bitmaps: @@ -12703,8 +12737,8 @@ class CertificateChainTypeEnum(MatterIntEnum): kPAICertificate = 0x02 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 0, class NodeOperationalCertStatusEnum(MatterIntEnum): @@ -12720,8 +12754,8 @@ class NodeOperationalCertStatusEnum(MatterIntEnum): kInvalidFabricIndex = 0x0B # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 7, class Structs: @@ -13205,8 +13239,8 @@ class GroupKeySecurityPolicyEnum(MatterIntEnum): kCacheAndSync = 0x01 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 2, class Bitmaps: @@ -14404,8 +14438,8 @@ class ClientTypeEnum(MatterIntEnum): kEphemeral = 0x01 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 2, class OperatingModeEnum(MatterIntEnum): @@ -14413,8 +14447,8 @@ class OperatingModeEnum(MatterIntEnum): kLit = 0x01 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 2, class Bitmaps: @@ -14847,8 +14881,8 @@ class TimerStatusEnum(MatterIntEnum): kReady = 0x03 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 4, class Bitmaps: @@ -15106,8 +15140,8 @@ class ErrorStateEnum(MatterIntEnum): kCommandInvalidInState = 0x03 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 4, class OperationalStateEnum(MatterIntEnum): @@ -15117,8 +15151,8 @@ class OperationalStateEnum(MatterIntEnum): kError = 0x03 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 4, class Structs: @@ -15500,8 +15534,8 @@ class ModeTag(MatterIntEnum): kProofing = 0x4008 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 0, class Bitmaps: @@ -15769,8 +15803,8 @@ class DrynessLevelEnum(MatterIntEnum): kMax = 0x03 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 4, class Attributes: @@ -16765,8 +16799,8 @@ class NumberOfRinsesEnum(MatterIntEnum): kMax = 0x03 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 4, class Bitmaps: @@ -18198,8 +18232,8 @@ class AirQualityEnum(MatterIntEnum): kExtremelyPoor = 0x06 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 7, class Bitmaps: @@ -18379,8 +18413,8 @@ class AlarmStateEnum(MatterIntEnum): kCritical = 0x02 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 3, class ContaminationStateEnum(MatterIntEnum): @@ -18390,8 +18424,8 @@ class ContaminationStateEnum(MatterIntEnum): kCritical = 0x03 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 4, class EndOfServiceEnum(MatterIntEnum): @@ -18399,8 +18433,8 @@ class EndOfServiceEnum(MatterIntEnum): kExpired = 0x01 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 2, class ExpressedStateEnum(MatterIntEnum): @@ -18415,8 +18449,8 @@ class ExpressedStateEnum(MatterIntEnum): kInterconnectCO = 0x08 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 9, class MuteStateEnum(MatterIntEnum): @@ -18424,8 +18458,8 @@ class MuteStateEnum(MatterIntEnum): kMuted = 0x01 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 2, class SensitivityEnum(MatterIntEnum): @@ -18434,8 +18468,8 @@ class SensitivityEnum(MatterIntEnum): kLow = 0x02 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 3, class Bitmaps: @@ -19252,8 +19286,8 @@ class ModeTag(MatterIntEnum): kDefrost = 0x4001 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 0, class Bitmaps: @@ -19792,8 +19826,8 @@ class ErrorStateEnum(MatterIntEnum): kCommandInvalidInState = 0x03 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 4, class OperationalStateEnum(MatterIntEnum): @@ -19803,8 +19837,8 @@ class OperationalStateEnum(MatterIntEnum): kError = 0x03 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 4, class Structs: @@ -21112,8 +21146,8 @@ class ChangeIndicationEnum(MatterIntEnum): kCritical = 0x02 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 3, class DegradationDirectionEnum(MatterIntEnum): @@ -21121,8 +21155,8 @@ class DegradationDirectionEnum(MatterIntEnum): kDown = 0x01 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 2, class ProductIdentifierTypeEnum(MatterIntEnum): @@ -21133,8 +21167,8 @@ class ProductIdentifierTypeEnum(MatterIntEnum): kOem = 0x04 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 5, class Bitmaps: @@ -21407,8 +21441,8 @@ class ChangeIndicationEnum(MatterIntEnum): kCritical = 0x02 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 3, class DegradationDirectionEnum(MatterIntEnum): @@ -21416,8 +21450,8 @@ class DegradationDirectionEnum(MatterIntEnum): kDown = 0x01 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 2, class ProductIdentifierTypeEnum(MatterIntEnum): @@ -21428,8 +21462,8 @@ class ProductIdentifierTypeEnum(MatterIntEnum): kOem = 0x04 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 5, class Bitmaps: @@ -22063,8 +22097,8 @@ class StatusCodeEnum(MatterIntEnum): kFailureDueToFault = 0x02 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 0, class ValveStateEnum(MatterIntEnum): @@ -22073,8 +22107,8 @@ class ValveStateEnum(MatterIntEnum): kTransitioning = 0x02 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 3, class Bitmaps: @@ -22517,8 +22551,8 @@ class MeasurementTypeEnum(MatterIntEnum): kElectricalEnergy = 0x0E # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 15, class PowerModeEnum(MatterIntEnum): @@ -22527,8 +22561,8 @@ class PowerModeEnum(MatterIntEnum): kAc = 0x02 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 3, class Bitmaps: @@ -23104,8 +23138,8 @@ class MeasurementTypeEnum(MatterIntEnum): kElectricalEnergy = 0x0E # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 15, class Bitmaps: @@ -23474,8 +23508,8 @@ class BoostStateEnum(MatterIntEnum): kActive = 0x01 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 2, class Bitmaps: @@ -23784,8 +23818,8 @@ class CriticalityLevelEnum(MatterIntEnum): kServiceDisconnect = 0x09 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 10, class HeatingSourceEnum(MatterIntEnum): @@ -23794,8 +23828,8 @@ class HeatingSourceEnum(MatterIntEnum): kNonElectric = 0x02 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 3, class LoadControlEventChangeSourceEnum(MatterIntEnum): @@ -23803,8 +23837,8 @@ class LoadControlEventChangeSourceEnum(MatterIntEnum): kUserAction = 0x01 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 2, class LoadControlEventStatusEnum(MatterIntEnum): @@ -23823,8 +23857,8 @@ class LoadControlEventStatusEnum(MatterIntEnum): kFailed = 0x0C # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 13, class Bitmaps: @@ -24375,8 +24409,8 @@ class FutureMessagePreferenceEnum(MatterIntEnum): kBanned = 0x04 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 5, class MessagePriorityEnum(MatterIntEnum): @@ -24386,8 +24420,8 @@ class MessagePriorityEnum(MatterIntEnum): kCritical = 0x03 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 4, class Bitmaps: @@ -24725,8 +24759,8 @@ class AdjustmentCauseEnum(MatterIntEnum): kGridOptimization = 0x01 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 2, class CauseEnum(MatterIntEnum): @@ -24737,8 +24771,8 @@ class CauseEnum(MatterIntEnum): kCancelled = 0x04 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 5, class CostTypeEnum(MatterIntEnum): @@ -24748,8 +24782,8 @@ class CostTypeEnum(MatterIntEnum): kTemperature = 0x03 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 4, class ESAStateEnum(MatterIntEnum): @@ -24760,8 +24794,8 @@ class ESAStateEnum(MatterIntEnum): kPaused = 0x04 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 5, class ESATypeEnum(MatterIntEnum): @@ -24782,8 +24816,8 @@ class ESATypeEnum(MatterIntEnum): kOther = 0xFF # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 14, class ForecastUpdateReasonEnum(MatterIntEnum): @@ -24792,8 +24826,8 @@ class ForecastUpdateReasonEnum(MatterIntEnum): kGridOptimization = 0x02 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 3, class OptOutStateEnum(MatterIntEnum): @@ -24803,8 +24837,8 @@ class OptOutStateEnum(MatterIntEnum): kOptOut = 0x03 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 4, class PowerAdjustReasonEnum(MatterIntEnum): @@ -24813,8 +24847,8 @@ class PowerAdjustReasonEnum(MatterIntEnum): kGridOptimizationAdjustment = 0x02 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 3, class Bitmaps: @@ -25492,8 +25526,8 @@ class EnergyTransferStoppedReasonEnum(MatterIntEnum): kOther = 0x02 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 3, class FaultStateEnum(MatterIntEnum): @@ -25516,8 +25550,8 @@ class FaultStateEnum(MatterIntEnum): kOther = 0xFF # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 16, class StateEnum(MatterIntEnum): @@ -25530,8 +25564,8 @@ class StateEnum(MatterIntEnum): kFault = 0x06 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 7, class SupplyStateEnum(MatterIntEnum): @@ -25543,8 +25577,8 @@ class SupplyStateEnum(MatterIntEnum): kEnabled = 0x05 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 6, class Bitmaps: @@ -26394,8 +26428,8 @@ class EnergyPriorityEnum(MatterIntEnum): kWaterConsumption = 0x03 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 4, class Bitmaps: @@ -27701,8 +27735,8 @@ class AlarmCodeEnum(MatterIntEnum): kForcedUser = 0x08 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 2, class CredentialRuleEnum(MatterIntEnum): @@ -27711,8 +27745,8 @@ class CredentialRuleEnum(MatterIntEnum): kTri = 0x02 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 3, class CredentialTypeEnum(MatterIntEnum): @@ -27727,8 +27761,8 @@ class CredentialTypeEnum(MatterIntEnum): kAliroNonEvictableEndpointKey = 0x08 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 9, class DataOperationTypeEnum(MatterIntEnum): @@ -27737,8 +27771,8 @@ class DataOperationTypeEnum(MatterIntEnum): kModify = 0x02 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 3, class DlLockState(MatterIntEnum): @@ -27748,8 +27782,8 @@ class DlLockState(MatterIntEnum): kUnlatched = 0x03 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 4, class DlLockType(MatterIntEnum): @@ -27767,8 +27801,8 @@ class DlLockType(MatterIntEnum): kEurocylinder = 0x0B # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 12, class DlStatus(MatterIntEnum): @@ -27781,8 +27815,8 @@ class DlStatus(MatterIntEnum): kNotFound = 0x8B # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 4, class DoorLockOperationEventCode(MatterIntEnum): @@ -27803,8 +27837,8 @@ class DoorLockOperationEventCode(MatterIntEnum): kManualUnlock = 0x0E # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 15, class DoorLockProgrammingEventCode(MatterIntEnum): @@ -27817,8 +27851,8 @@ class DoorLockProgrammingEventCode(MatterIntEnum): kIdDeleted = 0x06 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 7, class DoorLockSetPinOrIdStatus(MatterIntEnum): @@ -27828,8 +27862,8 @@ class DoorLockSetPinOrIdStatus(MatterIntEnum): kDuplicateCodeError = 0x03 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 4, class DoorLockUserStatus(MatterIntEnum): @@ -27839,8 +27873,8 @@ class DoorLockUserStatus(MatterIntEnum): kNotSupported = 0xFF # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 2, class DoorLockUserType(MatterIntEnum): @@ -27852,8 +27886,8 @@ class DoorLockUserType(MatterIntEnum): kNotSupported = 0xFF # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 5, class DoorStateEnum(MatterIntEnum): @@ -27865,8 +27899,8 @@ class DoorStateEnum(MatterIntEnum): kDoorAjar = 0x05 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 6, class LockDataTypeEnum(MatterIntEnum): @@ -27886,8 +27920,8 @@ class LockDataTypeEnum(MatterIntEnum): kAliroNonEvictableEndpointKey = 0x0D # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 14, class LockOperationTypeEnum(MatterIntEnum): @@ -27898,8 +27932,8 @@ class LockOperationTypeEnum(MatterIntEnum): kUnlatch = 0x04 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 5, class OperatingModeEnum(MatterIntEnum): @@ -27910,8 +27944,8 @@ class OperatingModeEnum(MatterIntEnum): kPassage = 0x04 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 5, class OperationErrorEnum(MatterIntEnum): @@ -27922,8 +27956,8 @@ class OperationErrorEnum(MatterIntEnum): kInsufficientBattery = 0x04 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 5, class OperationSourceEnum(MatterIntEnum): @@ -27940,8 +27974,8 @@ class OperationSourceEnum(MatterIntEnum): kAliro = 0x0A # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 11, class UserStatusEnum(MatterIntEnum): @@ -27950,8 +27984,8 @@ class UserStatusEnum(MatterIntEnum): kOccupiedDisabled = 0x03 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 2, class UserTypeEnum(MatterIntEnum): @@ -27967,8 +28001,8 @@ class UserTypeEnum(MatterIntEnum): kRemoteOnlyUser = 0x09 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 10, class Bitmaps: @@ -29750,8 +29784,8 @@ class EndProductType(MatterIntEnum): kUnknown = 0xFF # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 24, class Type(MatterIntEnum): @@ -29768,8 +29802,8 @@ class Type(MatterIntEnum): kUnknown = 0xFF # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 10, class Bitmaps: @@ -30843,8 +30877,8 @@ class AreaTypeTag(MatterIntEnum): kWorkshop = 0x5E # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 95, class FloorSurfaceTag(MatterIntEnum): @@ -30874,8 +30908,8 @@ class FloorSurfaceTag(MatterIntEnum): kVinyl = 0x17 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 24, class LandmarkTag(MatterIntEnum): @@ -30932,8 +30966,8 @@ class LandmarkTag(MatterIntEnum): kWineCooler = 0x32 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 51, class OperationalStatusEnum(MatterIntEnum): @@ -30943,8 +30977,8 @@ class OperationalStatusEnum(MatterIntEnum): kCompleted = 0x03 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 4, class PositionTag(MatterIntEnum): @@ -30964,8 +30998,8 @@ class PositionTag(MatterIntEnum): kBehind = 0x0D # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 14, class SelectLocationsStatus(MatterIntEnum): @@ -30976,8 +31010,8 @@ class SelectLocationsStatus(MatterIntEnum): kInvalidSet = 0x04 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 5, class SkipCurrentLocationStatus(MatterIntEnum): @@ -30986,8 +31020,8 @@ class SkipCurrentLocationStatus(MatterIntEnum): kInvalidInMode = 0x02 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 3, class Bitmaps: @@ -31412,8 +31446,8 @@ class ControlModeEnum(MatterIntEnum): kAutomatic = 0x07 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 4, class OperationModeEnum(MatterIntEnum): @@ -31423,8 +31457,8 @@ class OperationModeEnum(MatterIntEnum): kLocal = 0x03 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 4, class Bitmaps: @@ -32339,8 +32373,8 @@ class ACCapacityFormatEnum(MatterIntEnum): kBTUh = 0x00 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 1, class ACCompressorTypeEnum(MatterIntEnum): @@ -32350,8 +32384,8 @@ class ACCompressorTypeEnum(MatterIntEnum): kT3 = 0x03 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 4, class ACLouverPositionEnum(MatterIntEnum): @@ -32362,8 +32396,8 @@ class ACLouverPositionEnum(MatterIntEnum): kThreeQuarters = 0x05 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 0, class ACRefrigerantTypeEnum(MatterIntEnum): @@ -32373,8 +32407,8 @@ class ACRefrigerantTypeEnum(MatterIntEnum): kR407c = 0x03 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 4, class ACTypeEnum(MatterIntEnum): @@ -32385,8 +32419,8 @@ class ACTypeEnum(MatterIntEnum): kHeatPumpInverter = 0x04 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 5, class ControlSequenceOfOperationEnum(MatterIntEnum): @@ -32398,8 +32432,8 @@ class ControlSequenceOfOperationEnum(MatterIntEnum): kCoolingAndHeatingWithReheat = 0x05 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 6, class PresetScenarioEnum(MatterIntEnum): @@ -32412,8 +32446,8 @@ class PresetScenarioEnum(MatterIntEnum): kUserDefined = 0x06 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 7, class SetpointChangeSourceEnum(MatterIntEnum): @@ -32422,8 +32456,8 @@ class SetpointChangeSourceEnum(MatterIntEnum): kExternal = 0x02 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 3, class SetpointRaiseLowerModeEnum(MatterIntEnum): @@ -32432,8 +32466,8 @@ class SetpointRaiseLowerModeEnum(MatterIntEnum): kBoth = 0x02 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 3, class StartOfWeekEnum(MatterIntEnum): @@ -32446,8 +32480,8 @@ class StartOfWeekEnum(MatterIntEnum): kSaturday = 0x06 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 7, class SystemModeEnum(MatterIntEnum): @@ -32462,8 +32496,8 @@ class SystemModeEnum(MatterIntEnum): kSleep = 0x09 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 2, class TemperatureSetpointHoldEnum(MatterIntEnum): @@ -32471,8 +32505,8 @@ class TemperatureSetpointHoldEnum(MatterIntEnum): kSetpointHoldOn = 0x01 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 2, class ThermostatRunningModeEnum(MatterIntEnum): @@ -32481,8 +32515,8 @@ class ThermostatRunningModeEnum(MatterIntEnum): kHeat = 0x04 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 1, class Bitmaps: @@ -33994,8 +34028,8 @@ class AirflowDirectionEnum(MatterIntEnum): kReverse = 0x01 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 2, class FanModeEnum(MatterIntEnum): @@ -34008,8 +34042,8 @@ class FanModeEnum(MatterIntEnum): kSmart = 0x06 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 7, class FanModeSequenceEnum(MatterIntEnum): @@ -34021,8 +34055,8 @@ class FanModeSequenceEnum(MatterIntEnum): kOffHigh = 0x05 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 6, class StepDirectionEnum(MatterIntEnum): @@ -34030,8 +34064,8 @@ class StepDirectionEnum(MatterIntEnum): kDecrease = 0x01 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 2, class Bitmaps: @@ -34402,8 +34436,8 @@ class KeypadLockoutEnum(MatterIntEnum): kLockout5 = 0x05 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 6, class ScheduleProgrammingVisibilityEnum(MatterIntEnum): @@ -34411,8 +34445,8 @@ class ScheduleProgrammingVisibilityEnum(MatterIntEnum): kScheduleProgrammingDenied = 0x01 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 2, class TemperatureDisplayModeEnum(MatterIntEnum): @@ -34420,8 +34454,8 @@ class TemperatureDisplayModeEnum(MatterIntEnum): kFahrenheit = 0x01 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 2, class Attributes: @@ -34704,8 +34738,8 @@ class ColorLoopAction(MatterIntEnum): kActivateFromEnhancedCurrentHue = 0x02 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 3, class ColorLoopDirection(MatterIntEnum): @@ -34713,8 +34747,8 @@ class ColorLoopDirection(MatterIntEnum): kIncrementHue = 0x01 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 2, class ColorMode(MatterIntEnum): @@ -34723,8 +34757,8 @@ class ColorMode(MatterIntEnum): kColorTemperature = 0x02 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 3, class HueDirection(MatterIntEnum): @@ -34734,8 +34768,8 @@ class HueDirection(MatterIntEnum): kDown = 0x03 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 4, class HueMoveMode(MatterIntEnum): @@ -34744,8 +34778,8 @@ class HueMoveMode(MatterIntEnum): kDown = 0x03 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 2, class HueStepMode(MatterIntEnum): @@ -34753,8 +34787,8 @@ class HueStepMode(MatterIntEnum): kDown = 0x03 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 0, class SaturationMoveMode(MatterIntEnum): @@ -34763,8 +34797,8 @@ class SaturationMoveMode(MatterIntEnum): kDown = 0x03 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 2, class SaturationStepMode(MatterIntEnum): @@ -34772,8 +34806,8 @@ class SaturationStepMode(MatterIntEnum): kDown = 0x03 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 0, class Bitmaps: @@ -36596,8 +36630,8 @@ class LightSensorTypeEnum(MatterIntEnum): kCmos = 0x01 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 2, class Attributes: @@ -37703,8 +37737,8 @@ class OccupancySensorTypeEnum(MatterIntEnum): kPhysicalContact = 0x03 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 4, class Bitmaps: @@ -38118,8 +38152,8 @@ class LevelValueEnum(MatterIntEnum): kCritical = 0x04 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 5, class MeasurementMediumEnum(MatterIntEnum): @@ -38128,8 +38162,8 @@ class MeasurementMediumEnum(MatterIntEnum): kSoil = 0x02 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 3, class MeasurementUnitEnum(MatterIntEnum): @@ -38143,8 +38177,8 @@ class MeasurementUnitEnum(MatterIntEnum): kBqm3 = 0x07 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 8, class Bitmaps: @@ -38484,8 +38518,8 @@ class LevelValueEnum(MatterIntEnum): kCritical = 0x04 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 5, class MeasurementMediumEnum(MatterIntEnum): @@ -38494,8 +38528,8 @@ class MeasurementMediumEnum(MatterIntEnum): kSoil = 0x02 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 3, class MeasurementUnitEnum(MatterIntEnum): @@ -38509,8 +38543,8 @@ class MeasurementUnitEnum(MatterIntEnum): kBqm3 = 0x07 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 8, class Bitmaps: @@ -38850,8 +38884,8 @@ class LevelValueEnum(MatterIntEnum): kCritical = 0x04 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 5, class MeasurementMediumEnum(MatterIntEnum): @@ -38860,8 +38894,8 @@ class MeasurementMediumEnum(MatterIntEnum): kSoil = 0x02 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 3, class MeasurementUnitEnum(MatterIntEnum): @@ -38875,8 +38909,8 @@ class MeasurementUnitEnum(MatterIntEnum): kBqm3 = 0x07 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 8, class Bitmaps: @@ -39216,8 +39250,8 @@ class LevelValueEnum(MatterIntEnum): kCritical = 0x04 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 5, class MeasurementMediumEnum(MatterIntEnum): @@ -39226,8 +39260,8 @@ class MeasurementMediumEnum(MatterIntEnum): kSoil = 0x02 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 3, class MeasurementUnitEnum(MatterIntEnum): @@ -39241,8 +39275,8 @@ class MeasurementUnitEnum(MatterIntEnum): kBqm3 = 0x07 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 8, class Bitmaps: @@ -39582,8 +39616,8 @@ class LevelValueEnum(MatterIntEnum): kCritical = 0x04 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 5, class MeasurementMediumEnum(MatterIntEnum): @@ -39592,8 +39626,8 @@ class MeasurementMediumEnum(MatterIntEnum): kSoil = 0x02 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 3, class MeasurementUnitEnum(MatterIntEnum): @@ -39607,8 +39641,8 @@ class MeasurementUnitEnum(MatterIntEnum): kBqm3 = 0x07 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 8, class Bitmaps: @@ -39948,8 +39982,8 @@ class LevelValueEnum(MatterIntEnum): kCritical = 0x04 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 5, class MeasurementMediumEnum(MatterIntEnum): @@ -39958,8 +39992,8 @@ class MeasurementMediumEnum(MatterIntEnum): kSoil = 0x02 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 3, class MeasurementUnitEnum(MatterIntEnum): @@ -39973,8 +40007,8 @@ class MeasurementUnitEnum(MatterIntEnum): kBqm3 = 0x07 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 8, class Bitmaps: @@ -40314,8 +40348,8 @@ class LevelValueEnum(MatterIntEnum): kCritical = 0x04 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 5, class MeasurementMediumEnum(MatterIntEnum): @@ -40324,8 +40358,8 @@ class MeasurementMediumEnum(MatterIntEnum): kSoil = 0x02 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 3, class MeasurementUnitEnum(MatterIntEnum): @@ -40339,8 +40373,8 @@ class MeasurementUnitEnum(MatterIntEnum): kBqm3 = 0x07 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 8, class Bitmaps: @@ -40680,8 +40714,8 @@ class LevelValueEnum(MatterIntEnum): kCritical = 0x04 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 5, class MeasurementMediumEnum(MatterIntEnum): @@ -40690,8 +40724,8 @@ class MeasurementMediumEnum(MatterIntEnum): kSoil = 0x02 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 3, class MeasurementUnitEnum(MatterIntEnum): @@ -40705,8 +40739,8 @@ class MeasurementUnitEnum(MatterIntEnum): kBqm3 = 0x07 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 8, class Bitmaps: @@ -41046,8 +41080,8 @@ class LevelValueEnum(MatterIntEnum): kCritical = 0x04 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 5, class MeasurementMediumEnum(MatterIntEnum): @@ -41056,8 +41090,8 @@ class MeasurementMediumEnum(MatterIntEnum): kSoil = 0x02 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 3, class MeasurementUnitEnum(MatterIntEnum): @@ -41071,8 +41105,8 @@ class MeasurementUnitEnum(MatterIntEnum): kBqm3 = 0x07 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 8, class Bitmaps: @@ -41412,8 +41446,8 @@ class LevelValueEnum(MatterIntEnum): kCritical = 0x04 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 5, class MeasurementMediumEnum(MatterIntEnum): @@ -41422,8 +41456,8 @@ class MeasurementMediumEnum(MatterIntEnum): kSoil = 0x02 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 3, class MeasurementUnitEnum(MatterIntEnum): @@ -41437,8 +41471,8 @@ class MeasurementUnitEnum(MatterIntEnum): kBqm3 = 0x07 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 8, class Bitmaps: @@ -42649,16 +42683,16 @@ class ChannelTypeEnum(MatterIntEnum): kOtt = 0x03 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 4, class LineupInfoTypeEnum(MatterIntEnum): kMso = 0x00 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 1, class StatusEnum(MatterIntEnum): @@ -42667,8 +42701,8 @@ class StatusEnum(MatterIntEnum): kNoMatches = 0x02 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 3, class Bitmaps: @@ -43190,8 +43224,8 @@ class StatusEnum(MatterIntEnum): kNotAllowed = 0x02 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 3, class Structs: @@ -43466,8 +43500,8 @@ class CharacteristicEnum(MatterIntEnum): kKaraoke = 0x11 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 18, class PlaybackStateEnum(MatterIntEnum): @@ -43477,8 +43511,8 @@ class PlaybackStateEnum(MatterIntEnum): kBuffering = 0x03 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 4, class StatusEnum(MatterIntEnum): @@ -43490,8 +43524,8 @@ class StatusEnum(MatterIntEnum): kSeekOutOfRange = 0x05 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 6, class Bitmaps: @@ -44119,8 +44153,8 @@ class InputTypeEnum(MatterIntEnum): kOther = 0x0B # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 12, class Bitmaps: @@ -44584,8 +44618,8 @@ class CECKeyCodeEnum(MatterIntEnum): kData = 0x76 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 14, class StatusEnum(MatterIntEnum): @@ -44594,8 +44628,8 @@ class StatusEnum(MatterIntEnum): kInvalidKeyInCurrentState = 0x02 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 3, class Bitmaps: @@ -44784,8 +44818,8 @@ class CharacteristicEnum(MatterIntEnum): kKaraoke = 0x11 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 18, class MetricTypeEnum(MatterIntEnum): @@ -44793,8 +44827,8 @@ class MetricTypeEnum(MatterIntEnum): kPercentage = 0x01 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 2, class ParameterEnum(MatterIntEnum): @@ -44817,8 +44851,8 @@ class ParameterEnum(MatterIntEnum): kAny = 0x10 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 17, class StatusEnum(MatterIntEnum): @@ -44829,8 +44863,8 @@ class StatusEnum(MatterIntEnum): kAudioTrackNotAvailable = 0x04 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 5, class Bitmaps: @@ -45196,8 +45230,8 @@ class OutputTypeEnum(MatterIntEnum): kOther = 0x05 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 6, class Bitmaps: @@ -45419,8 +45453,8 @@ class StatusEnum(MatterIntEnum): kSystemBusy = 0x02 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 3, class Bitmaps: @@ -45700,8 +45734,8 @@ class ApplicationStatusEnum(MatterIntEnum): kActiveVisibleNotFocus = 0x03 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 4, class Structs: @@ -46665,8 +46699,8 @@ class StatusEnum(MatterIntEnum): kUnexpectedData = 0x01 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 2, class Commands: @@ -46934,8 +46968,8 @@ class AreaTypeTag(MatterIntEnum): kWorkshop = 0x5E # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 95, class Structs: @@ -50097,8 +50131,8 @@ class SimpleEnum(MatterIntEnum): kValueC = 0x03 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 4, class Bitmaps: @@ -52575,8 +52609,8 @@ class FaultType(MatterIntEnum): kCertFault = 0x04 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. kUnknownEnumValue = 5, class Commands: diff --git a/src/controller/python/templates/partials/bitmap_def.zapt b/src/controller/python/templates/partials/bitmap_def.zapt new file mode 100644 index 00000000000000..00f34968519dc8 --- /dev/null +++ b/src/controller/python/templates/partials/bitmap_def.zapt @@ -0,0 +1,4 @@ + class {{asType label}}(IntFlag): +{{#zcl_bitmap_items}} + k{{asUpperCamelCase label}} = {{asHex mask}} +{{/zcl_bitmap_items}} diff --git a/src/controller/python/templates/partials/enum_def.zapt b/src/controller/python/templates/partials/enum_def.zapt new file mode 100644 index 00000000000000..d8063739e159ef --- /dev/null +++ b/src/controller/python/templates/partials/enum_def.zapt @@ -0,0 +1,18 @@ +{{! Takes cluster (possibly "Globals") as argument, already upper-camel-cased. }} + class {{asType label}}(MatterIntEnum): +{{#zcl_enum_items}} + k{{asUpperCamelCase label}} = {{asHex value 2}} +{{/zcl_enum_items}} +{{#unless (isInConfigList (concat cluster "::" label) "EnumsNotUsedAsTypeInXML")}} + # All received enum values that are not listed above will be mapped + # to kUnknownEnumValue. This is a helper enum value that should only + # be used by code to process how it handles receiving an unknown + # enum value. This specific value should never be transmitted. + kUnknownEnumValue = {{first_unused_enum_value mode="first_unused"}}, +{{else}} + # kUnknownEnumValue intentionally not defined. This enum never goes + # through DataModel::Decode, likely because it is a part of a derived + # cluster. As a result having kUnknownEnumValue in this enum is error + # prone, and was removed. See + # src/app/common/templates/config-data.yaml. +{{/unless}} diff --git a/src/controller/python/templates/partials/struct_def.zapt b/src/controller/python/templates/partials/struct_def.zapt new file mode 100644 index 00000000000000..86e643be7d8863 --- /dev/null +++ b/src/controller/python/templates/partials/struct_def.zapt @@ -0,0 +1,15 @@ +{{! Takes cluster (possibly "Globals") as argument, already upper-camel-cased. }} + @dataclass + class {{asUpperCamelCase name}}(ClusterObject): + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + {{#zcl_struct_items}} + ClusterObjectFieldDescriptor(Label="{{ asLowerCamelCase label }}", Tag={{ fieldIdentifier }}, Type={{zapTypeToPythonClusterObjectType type ns=../cluster}}), + {{/zcl_struct_items}} + ]) + + {{#zcl_struct_items}} + {{ asLowerCamelCase label }}: '{{zapTypeToPythonClusterObjectType type ns=../cluster}}' = {{getPythonFieldDefault type ns=../cluster}} + {{/zcl_struct_items}} diff --git a/src/controller/python/templates/python-cluster-Objects-py.zapt b/src/controller/python/templates/python-cluster-Objects-py.zapt index b5f8ed80ca03d9..0aa05721e69a16 100644 --- a/src/controller/python/templates/python-cluster-Objects-py.zapt +++ b/src/controller/python/templates/python-cluster-Objects-py.zapt @@ -19,6 +19,33 @@ from .ClusterObjects import (Cluster, ClusterAttributeDescriptor, ClusterCommand ClusterObjectDescriptor, ClusterObjectFieldDescriptor) from .Types import Nullable, NullValue +class Globals: + class Enums: +{{#zcl_enums}} +{{#if has_no_clusters}} +{{> enum_def cluster="Globals"}} + +{{/if}} +{{/zcl_enums}} + class Bitmaps: +{{#zcl_bitmaps}} +{{#if has_no_clusters}} +{{! Work around https://github.com/project-chip/zap/issues/1370 and manually filter out built-in bitmap types. }} +{{#if_is_atomic label}} +{{else}} +{{> bitmap_def }} + +{{/if_is_atomic}} +{{/if}} +{{/zcl_bitmaps}} + class Structs: +{{#zcl_structs}} +{{#if has_no_clusters}} +{{> struct_def cluster="Globals"}} + +{{/if}} +{{/zcl_structs}} + {{#zcl_clusters}} @dataclass @@ -50,23 +77,7 @@ class {{asUpperCamelCase name}}(Cluster): {{#first}} class Enums: {{/first}} - class {{asType label}}(MatterIntEnum): -{{#zcl_enum_items}} - k{{asUpperCamelCase label}} = {{asHex value 2}} -{{/zcl_enum_items}} -{{#unless (isInConfigList (concat (asUpperCamelCase ../name) "::" label) "EnumsNotUsedAsTypeInXML")}} - # All received enum values that are not listed above will be mapped - # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. - kUnknownEnumValue = {{first_unused_enum_value mode="first_unused"}}, -{{else}} - # kUnknownEnumValue intentionally not defined. This enum never goes - # through DataModel::Decode, likely because it is a part of a derived - # cluster. As a result having kUnknownEnumValue in this enum is error - # prone, and was removed. See - # src/app/common/templates/config-data.yaml. -{{/unless}} +{{> enum_def cluster=(asUpperCamelCase ../name)}} {{#last}} {{/last}} @@ -75,30 +86,14 @@ class {{asUpperCamelCase name}}(Cluster): {{#first}} class Bitmaps: {{/first}} - class {{asType label}}(IntFlag): -{{#zcl_bitmap_items}} - k{{asUpperCamelCase label}} = {{asHex mask}} -{{/zcl_bitmap_items}} +{{> bitmap_def }} {{/zcl_bitmaps}} {{#zcl_structs}} {{#first}} class Structs: {{/first}} - @dataclass - class {{asUpperCamelCase name}}(ClusterObject): - @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - {{#zcl_struct_items}} - ClusterObjectFieldDescriptor(Label="{{ asLowerCamelCase label }}", Tag={{ fieldIdentifier }}, Type={{zapTypeToPythonClusterObjectType type ns=(asUpperCamelCase parent.parent.name)}}), - {{/zcl_struct_items}} - ]) - - {{#zcl_struct_items}} - {{ asLowerCamelCase label }}: '{{zapTypeToPythonClusterObjectType type ns=(asUpperCamelCase parent.parent.name)}}' = {{getPythonFieldDefault type ns=(asUpperCamelCase parent.parent.name)}} - {{/zcl_struct_items}} +{{> struct_def cluster=(asUpperCamelCase parent.name) }} {{/zcl_structs}} {{#zcl_commands}} diff --git a/src/controller/python/templates/templates.json b/src/controller/python/templates/templates.json index bffd9dfa2de7cc..ebe67b0f384b22 100644 --- a/src/controller/python/templates/templates.json +++ b/src/controller/python/templates/templates.json @@ -22,8 +22,16 @@ "path": "../../../../src/app/zap-templates/partials/clusters_header.zapt" }, { - "name": "cluster_header", - "path": "../../../../src/app/zap-templates/partials/cluster_header.zapt" + "name": "enum_def", + "path": "partials/enum_def.zapt" + }, + { + "name": "bitmap_def", + "path": "partials/bitmap_def.zapt" + }, + { + "name": "struct_def", + "path": "partials/struct_def.zapt" } ], "templates": [ diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-enums-check.h b/zzz_generated/app-common/app-common/zap-generated/cluster-enums-check.h index 716b6895fdd765..984b1fdf7481c0 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-enums-check.h +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-enums-check.h @@ -268,6 +268,19 @@ static auto __attribute__((unused)) EnsureKnownEnumValue(detail::ProductIdentifi return EnumType::kUnknownEnumValue; } } +static auto __attribute__((unused)) EnsureKnownEnumValue(Globals::TestGlobalEnum val) +{ + using EnumType = Globals::TestGlobalEnum; + switch (val) + { + case EnumType::kSomeValue: + case EnumType::kSomeOtherValue: + case EnumType::kFinalValue: + return val; + default: + return EnumType::kUnknownEnumValue; + } +} static auto __attribute__((unused)) EnsureKnownEnumValue(Identify::EffectIdentifierEnum val) { diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-enums.h b/zzz_generated/app-common/app-common/zap-generated/cluster-enums.h index 1e01c43d3ed05a..b63f21bd4faadc 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-enums.h +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-enums.h @@ -276,6 +276,33 @@ enum class ProductIdentifierTypeEnum : uint8_t } // namespace detail +namespace Globals { +// Global enums. + +// Enum for TestGlobalEnum +enum class TestGlobalEnum : uint8_t +{ + kSomeValue = 0x00, + kSomeOtherValue = 0x01, + kFinalValue = 0x02, + // All received enum values that are not listed above will be mapped + // to kUnknownEnumValue. This is a helper enum value that should only + // be used by code to process how it handles receiving and unknown + // enum value. This specific should never be transmitted. + kUnknownEnumValue = 3, +}; + +// Global bitmaps. + +// Bitmap for TestGlobalBitmap +enum class TestGlobalBitmap : uint32_t +{ + kFirstBit = 0x1, + kSecondBit = 0x2, +}; + +} // namespace Globals + namespace Identify { // Enum for EffectIdentifierEnum diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp index 1ab7bf4e0602a8..38785c8ac04f76 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp @@ -552,6 +552,59 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } // namespace Structs } // namespace detail +namespace Globals { +// Global structs +namespace Structs { + +namespace TestGlobalStruct { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kName), name); + encoder.Encode(to_underlying(Fields::kMyBitmap), myBitmap); + encoder.Encode(to_underlying(Fields::kMyEnum), myEnum); + return encoder.Finalize(); +} + +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) +{ + detail::StructDecodeIterator __iterator(reader); + while (true) + { + auto __element = __iterator.Next(); + if (std::holds_alternative(__element)) + { + return std::get(__element); + } + + CHIP_ERROR err = CHIP_NO_ERROR; + const uint8_t __context_tag = std::get(__element); + + if (__context_tag == to_underlying(Fields::kName)) + { + err = DataModel::Decode(reader, name); + } + else if (__context_tag == to_underlying(Fields::kMyBitmap)) + { + err = DataModel::Decode(reader, myBitmap); + } + else if (__context_tag == to_underlying(Fields::kMyEnum)) + { + err = DataModel::Decode(reader, myEnum); + } + else + { + } + + ReturnErrorOnFailure(err); + } +} + +} // namespace TestGlobalStruct + +} // namespace Structs +} // namespace Globals + namespace Identify { namespace Commands { diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h index 0d5ad0d1432013..19f3f052e4a90d 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h @@ -319,6 +319,38 @@ using DecodableType = Type; } // namespace detail namespace Globals { + +// Global structs. +namespace Structs { + +namespace TestGlobalStruct { +enum class Fields : uint8_t +{ + kName = 0, + kMyBitmap = 1, + kMyEnum = 2, +}; + +struct Type +{ +public: + chip::CharSpan name; + DataModel::Nullable> myBitmap; + Optional> myEnum; + + CHIP_ERROR Decode(TLV::TLVReader & reader); + + static constexpr bool kIsFabricScoped = false; + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; +}; + +using DecodableType = Type; + +} // namespace TestGlobalStruct + +} // namespace Structs + namespace Attributes { namespace GeneratedCommandList { struct TypeInfo diff --git a/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp b/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp index e23bc025974600..3b958cf45af7ff 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp +++ b/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp @@ -423,6 +423,44 @@ void ComplexArgumentParser::Finalize(chip::app::Clusters::detail::Structs::Opera ComplexArgumentParser::Finalize(request.operationalStateLabel); } +CHIP_ERROR ComplexArgumentParser::Setup(const char * label, chip::app::Clusters::Globals::Structs::TestGlobalStruct::Type & request, + Json::Value & value) +{ + VerifyOrReturnError(value.isObject(), CHIP_ERROR_INVALID_ARGUMENT); + + // Copy to track which members we already processed. + Json::Value valueCopy(value); + + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("TestGlobalStruct.name", "name", value.isMember("name"))); + ReturnErrorOnFailure( + ComplexArgumentParser::EnsureMemberExist("TestGlobalStruct.myBitmap", "myBitmap", value.isMember("myBitmap"))); + + char labelWithMember[kMaxLabelLength]; + snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "name"); + ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.name, value["name"])); + valueCopy.removeMember("name"); + + snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "myBitmap"); + ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.myBitmap, value["myBitmap"])); + valueCopy.removeMember("myBitmap"); + + if (value.isMember("myEnum")) + { + snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "myEnum"); + ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.myEnum, value["myEnum"])); + } + valueCopy.removeMember("myEnum"); + + return ComplexArgumentParser::EnsureNoMembersRemaining(label, valueCopy); +} + +void ComplexArgumentParser::Finalize(chip::app::Clusters::Globals::Structs::TestGlobalStruct::Type & request) +{ + ComplexArgumentParser::Finalize(request.name); + ComplexArgumentParser::Finalize(request.myBitmap); + ComplexArgumentParser::Finalize(request.myEnum); +} + CHIP_ERROR ComplexArgumentParser::Setup(const char * label, chip::app::Clusters::Descriptor::Structs::SemanticTagStruct::Type & request, Json::Value & value) diff --git a/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.h b/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.h index 7e668e99aacc78..47683b1ab87888 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.h @@ -71,6 +71,11 @@ static CHIP_ERROR Setup(const char * label, chip::app::Clusters::detail::Structs static void Finalize(chip::app::Clusters::detail::Structs::OperationalStateStruct::Type & request); +static CHIP_ERROR Setup(const char * label, chip::app::Clusters::Globals::Structs::TestGlobalStruct::Type & request, + Json::Value & value); + +static void Finalize(chip::app::Clusters::Globals::Structs::TestGlobalStruct::Type & request); + static CHIP_ERROR Setup(const char * label, chip::app::Clusters::Descriptor::Structs::SemanticTagStruct::Type & request, Json::Value & value); diff --git a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp index 60b51f9c5fb95a..82c5e831f92fcf 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp +++ b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp @@ -368,6 +368,39 @@ CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, return CHIP_NO_ERROR; } +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const chip::app::Clusters::Globals::Structs::TestGlobalStruct::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + { + CHIP_ERROR err = LogValue("Name", indent + 1, value.name); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Name'"); + return err; + } + } + { + CHIP_ERROR err = LogValue("MyBitmap", indent + 1, value.myBitmap); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'MyBitmap'"); + return err; + } + } + { + CHIP_ERROR err = LogValue("MyEnum", indent + 1, value.myEnum); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'MyEnum'"); + return err; + } + } + DataModelLogger::LogString(indent, "}"); + + return CHIP_NO_ERROR; +} + CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, const chip::app::Clusters::Descriptor::Structs::SemanticTagStruct::DecodableType & value) { diff --git a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.h b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.h index 68fa66f4cbc7dc..c1b1f9eb35349a 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.h @@ -50,6 +50,9 @@ static CHIP_ERROR LogValue(const char * label, size_t indent, static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::detail::Structs::OperationalStateStruct::DecodableType & value); +static CHIP_ERROR LogValue(const char * label, size_t indent, + const chip::app::Clusters::Globals::Structs::TestGlobalStruct::DecodableType & value); + static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::Descriptor::Structs::SemanticTagStruct::DecodableType & value);