diff --git a/src/controller/python/chip/clusters/Objects.py b/src/controller/python/chip/clusters/Objects.py index c944ffd51833e2..6dd0c9ab982678 100644 --- a/src/controller/python/chip/clusters/Objects.py +++ b/src/controller/python/chip/clusters/Objects.py @@ -27,6 +27,7 @@ import typing from dataclasses import dataclass, field from enum import IntEnum +from enum import IntFlag from chip import ChipUtility from chip.tlv import float32, uint @@ -83,6 +84,7 @@ class IdentifyIdentifyType(IntEnum): + class Commands: @dataclass class Identify(ClusterCommand): @@ -258,6 +260,11 @@ def descriptor(cls) -> ClusterObjectDescriptor: clusterRevision: 'uint' = None + class Bitmaps: + class GroupClusterFeature(IntFlag): + kGroupNames = 0x1 + + class Commands: @dataclass @@ -566,6 +573,11 @@ def descriptor(cls) -> ClusterObjectDescriptor: clusterRevision: 'uint' = None + class Bitmaps: + class ScenesCopyMode(IntFlag): + kCopyAllScenes = 0x1 + + class Structs: @dataclass class AttributeValuePair(ClusterObject): @@ -1214,6 +1226,17 @@ class OnOffStartUpOnOff(IntEnum): kTogglePreviousOnOff = 0x02 + class Bitmaps: + class OnOffControl(IntFlag): + kAcceptOnlyWhenOn = 0x1 + + class OnOffFeature(IntFlag): + kLighting = 0x1 + + class SceneFeatures(IntFlag): + kSceneNames = 0x1 + + class Commands: @dataclass @@ -1502,6 +1525,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: + class Attributes: @dataclass class SwitchType(ClusterAttributeDescriptor): @@ -1676,6 +1700,17 @@ class StepMode(IntEnum): kDown = 0x01 + class Bitmaps: + class LevelControlFeature(IntFlag): + kOnOff = 0x1 + kLighting = 0x2 + kFrequency = 0x4 + + class LevelControlOptions(IntFlag): + kExecuteIfOff = 0x1 + kCoupleColorTempToLevel = 0x2 + + class Commands: @dataclass @@ -2216,6 +2251,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: + class Attributes: @dataclass class ActiveText(ClusterAttributeDescriptor): @@ -2467,6 +2503,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: + class Attributes: @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @@ -2580,6 +2617,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: clusterRevision: 'uint' = None + class Structs: @dataclass class DeviceTypeStruct(ClusterObject): @@ -2768,6 +2806,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: clusterRevision: 'uint' = None + class Structs: @dataclass class TargetStruct(ClusterObject): @@ -2940,6 +2979,7 @@ class ChangeTypeEnum(IntEnum): kRemoved = 0x02 + class Structs: @dataclass class Target(ClusterObject): @@ -3262,6 +3302,22 @@ class EndpointListTypeEnum(IntEnum): kZone = 0x02 + class Bitmaps: + class CommandBits(IntFlag): + kInstantAction = 0x1 + kInstantActionWithTransition = 0x2 + kStartAction = 0x4 + kStartActionWithDuration = 0x8 + kStopAction = 0x10 + kPauseAction = 0x20 + kPauseActionWithDuration = 0x40 + kResumeAction = 0x80 + kEnableAction = 0x100 + kEnableActionWithDuration = 0x200 + kDisableAction = 0x400 + kDisableActionWithDuration = 0x800 + + class Structs: @dataclass class ActionStruct(ClusterObject): @@ -3773,6 +3829,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: clusterRevision: 'uint' = None + class Structs: @dataclass class CapabilityMinimaStruct(ClusterObject): @@ -4324,6 +4381,7 @@ class OTAQueryStatus(IntEnum): + class Commands: @dataclass class QueryImage(ClusterCommand): @@ -4577,6 +4635,7 @@ class OTAUpdateStateEnum(IntEnum): kDelayedOnUserConsent = 0x08 + class Structs: @dataclass class ProviderLocation(ClusterObject): @@ -4868,6 +4927,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: + class Attributes: @dataclass class ActiveLocale(ClusterAttributeDescriptor): @@ -5032,6 +5092,7 @@ class HourFormat(IntEnum): + class Attributes: @dataclass class HourFormat(ClusterAttributeDescriptor): @@ -5193,6 +5254,11 @@ class TempUnit(IntEnum): kKelvin = 0x02 + class Bitmaps: + class UnitLocalizationFeature(IntFlag): + kTemperatureUnit = 0x1 + + class Attributes: @@ -5320,6 +5386,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: + class Attributes: @dataclass class Sources(ClusterAttributeDescriptor): @@ -5554,6 +5621,14 @@ class WiredFault(IntEnum): kUnderVoltage = 0x02 + class Bitmaps: + class PowerSourceFeature(IntFlag): + kWired = 0x1 + kBattery = 0x2 + kRechargeable = 0x4 + kReplaceable = 0x8 + + class Structs: @dataclass class BatChargeFaultChangeType(ClusterObject): @@ -6285,6 +6360,7 @@ class RegulatoryLocationType(IntEnum): kIndoorOutdoor = 0x02 + class Structs: @dataclass class BasicCommissioningInfo(ClusterObject): @@ -6633,6 +6709,20 @@ class WiFiBand(IntEnum): k60g = 0x04 + class Bitmaps: + class NetworkCommissioningFeature(IntFlag): + kWiFiNetworkInterface = 0x1 + kThreadNetworkInterface = 0x2 + kEthernetNetworkInterface = 0x4 + + class WiFiSecurity(IntFlag): + kUnencrypted = 0x1 + kWep = 0x2 + kWpaPersonal = 0x4 + kWpa2Personal = 0x8 + kWpa3Personal = 0x10 + + class Structs: @dataclass class NetworkInfo(ClusterObject): @@ -7122,6 +7212,7 @@ class LogsTransferProtocol(IntEnum): + class Commands: @dataclass class RetrieveLogsRequest(ClusterCommand): @@ -7334,6 +7425,7 @@ class RadioFaultEnum(IntEnum): kEthernetFault = 0x06 + class Structs: @dataclass class NetworkInterface(ClusterObject): @@ -7722,6 +7814,11 @@ def descriptor(cls) -> ClusterObjectDescriptor: clusterRevision: 'uint' = None + class Bitmaps: + class SoftwareDiagnosticsFeature(IntFlag): + kWaterMarks = 0x1 + + class Structs: @dataclass class ThreadMetricsStruct(ClusterObject): @@ -8099,6 +8196,14 @@ class RoutingRole(IntEnum): kLeader = 0x06 + class Bitmaps: + class ThreadNetworkDiagnosticsFeature(IntFlag): + kPacketCounts = 0x1 + kErrorCounts = 0x2 + kMLECounts = 0x4 + kMACCounts = 0x8 + + class Structs: @dataclass class NeighborTable(ClusterObject): @@ -9438,6 +9543,7 @@ class WiFiVersionType(IntEnum): + class Commands: @dataclass class ResetCounts(ClusterCommand): @@ -9859,6 +9965,7 @@ class PHYRateEnum(IntEnum): + class Commands: @dataclass class ResetCounts(ClusterCommand): @@ -10171,6 +10278,7 @@ class TimeSourceEnum(IntEnum): kGnss = 0x10 + class Structs: @dataclass class DstOffsetType(ClusterObject): @@ -10523,6 +10631,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: + class Attributes: @dataclass class VendorName(ClusterAttributeDescriptor): @@ -10947,6 +11056,15 @@ def descriptor(cls) -> ClusterObjectDescriptor: clusterRevision: 'uint' = None + class Bitmaps: + class SwitchFeature(IntFlag): + kLatchingSwitch = 0x1 + kMomentarySwitch = 0x2 + kMomentarySwitchRelease = 0x4 + kMomentarySwitchLongPress = 0x8 + kMomentarySwitchMultiPress = 0x10 + + class Attributes: @@ -11258,6 +11376,7 @@ class StatusCode(IntEnum): + class Commands: @dataclass class OpenCommissioningWindow(ClusterCommand): @@ -11508,6 +11627,7 @@ class NodeOperationalCertStatusEnum(IntEnum): kInvalidFabricIndex = 0x0B + class Structs: @dataclass class FabricDescriptorStruct(ClusterObject): @@ -11975,6 +12095,7 @@ class GroupKeySecurityPolicy(IntEnum): kCacheAndSync = 0x01 + class Structs: @dataclass class GroupInfoMapStruct(ClusterObject): @@ -12304,6 +12425,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: clusterRevision: 'uint' = None + class Structs: @dataclass class LabelStruct(ClusterObject): @@ -12444,6 +12566,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: clusterRevision: 'uint' = None + class Structs: @dataclass class LabelStruct(ClusterObject): @@ -12584,6 +12707,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: + class Attributes: @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @@ -12691,6 +12815,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: + class Attributes: @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @@ -12798,6 +12923,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: + class Attributes: @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @@ -12907,6 +13033,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: + class Attributes: @dataclass class StateValue(ClusterAttributeDescriptor): @@ -13060,6 +13187,11 @@ def descriptor(cls) -> ClusterObjectDescriptor: clusterRevision: 'uint' = None + class Bitmaps: + class ModeSelectFeature(IntFlag): + kDeponoff = 0x1 + + class Structs: @dataclass class SemanticTagStruct(ClusterObject): @@ -13552,6 +13684,133 @@ class UserTypeEnum(IntEnum): kRemoteOnlyUser = 0x09 + class Bitmaps: + class DaysMaskMap(IntFlag): + kSunday = 0x1 + kMonday = 0x2 + kTuesday = 0x4 + kWednesday = 0x8 + kThursday = 0x10 + kFriday = 0x20 + kSaturday = 0x40 + + class DlCredentialRuleMask(IntFlag): + kSingle = 0x1 + kDual = 0x2 + kTri = 0x4 + + class DlCredentialRulesSupport(IntFlag): + kSingle = 0x1 + kDual = 0x2 + kTri = 0x4 + + class DlDefaultConfigurationRegister(IntFlag): + kEnableLocalProgrammingEnabled = 0x1 + kKeypadInterfaceDefaultAccessEnabled = 0x2 + kRemoteInterfaceDefaultAccessIsEnabled = 0x4 + kSoundEnabled = 0x20 + kAutoRelockTimeSet = 0x40 + kLEDSettingsSet = 0x80 + + class DlKeypadOperationEventMask(IntFlag): + kUnknown = 0x1 + kLock = 0x2 + kUnlock = 0x4 + kLockInvalidPIN = 0x8 + kLockInvalidSchedule = 0x10 + kUnlockInvalidCode = 0x20 + kUnlockInvalidSchedule = 0x40 + kNonAccessUserOpEvent = 0x80 + + class DlKeypadProgrammingEventMask(IntFlag): + kUnknown = 0x1 + kProgrammingPINChanged = 0x2 + kPINAdded = 0x4 + kPINCleared = 0x8 + kPINChanged = 0x10 + + class DlLocalProgrammingFeatures(IntFlag): + kAddUsersCredentialsSchedulesLocally = 0x1 + kModifyUsersCredentialsSchedulesLocally = 0x2 + kClearUsersCredentialsSchedulesLocally = 0x4 + kAdjustLockSettingsLocally = 0x8 + + class DlManualOperationEventMask(IntFlag): + kUnknown = 0x1 + kThumbturnLock = 0x2 + kThumbturnUnlock = 0x4 + kOneTouchLock = 0x8 + kKeyLock = 0x10 + kKeyUnlock = 0x20 + kAutoLock = 0x40 + kScheduleLock = 0x80 + kScheduleUnlock = 0x100 + kManualLock = 0x200 + kManualUnlock = 0x400 + + class DlRFIDOperationEventMask(IntFlag): + kUnknown = 0x1 + kLock = 0x2 + kUnlock = 0x4 + kLockInvalidRFID = 0x8 + kLockInvalidSchedule = 0x10 + kUnlockInvalidRFID = 0x20 + kUnlockInvalidSchedule = 0x40 + + class DlRFIDProgrammingEventMask(IntFlag): + kUnknown = 0x1 + kRFIDCodeAdded = 0x20 + kRFIDCodeCleared = 0x40 + + class DlRemoteOperationEventMask(IntFlag): + kUnknown = 0x1 + kLock = 0x2 + kUnlock = 0x4 + kLockInvalidCode = 0x8 + kLockInvalidSchedule = 0x10 + kUnlockInvalidCode = 0x20 + kUnlockInvalidSchedule = 0x40 + + class DlRemoteProgrammingEventMask(IntFlag): + kUnknown = 0x1 + kProgrammingPINChanged = 0x2 + kPINAdded = 0x4 + kPINCleared = 0x8 + kPINChanged = 0x10 + kRFIDCodeAdded = 0x20 + kRFIDCodeCleared = 0x40 + + class DlSupportedOperatingModes(IntFlag): + kNormal = 0x1 + kVacation = 0x2 + kPrivacy = 0x4 + kNoRemoteLockUnlock = 0x8 + kPassage = 0x10 + + class DoorLockDayOfWeek(IntFlag): + kSunday = 0x1 + kMonday = 0x2 + kTuesday = 0x4 + kWednesday = 0x8 + kThursday = 0x10 + kFriday = 0x20 + kSaturday = 0x40 + + class DoorLockFeature(IntFlag): + kPinCredential = 0x1 + kRfidCredential = 0x2 + kFingerCredentials = 0x4 + kLogging = 0x8 + kWeekDayAccessSchedules = 0x10 + kDoorPositionSensor = 0x20 + kFaceCredentials = 0x40 + kCredentialsOverTheAirAccess = 0x80 + kUser = 0x100 + kNotification = 0x200 + kYearDayAccessSchedules = 0x400 + kHolidaySchedules = 0x800 + + class Structs: @dataclass class CredentialStruct(ClusterObject): @@ -14994,6 +15253,49 @@ class Type(IntEnum): kUnknown = 0xFF + class Bitmaps: + class ConfigStatus(IntFlag): + kOperational = 0x1 + kOnlineReserved = 0x2 + kLiftMovementReversed = 0x4 + kLiftPositionAware = 0x8 + kTiltPositionAware = 0x10 + kLiftEncoderControlled = 0x20 + kTiltEncoderControlled = 0x40 + + class Feature(IntFlag): + kLift = 0x1 + kTilt = 0x2 + kPositionAwareLift = 0x4 + kAbsolutePosition = 0x8 + kPositionAwareTilt = 0x10 + + class Mode(IntFlag): + kMotorDirectionReversed = 0x1 + kCalibrationMode = 0x2 + kMaintenanceMode = 0x4 + kLedFeedback = 0x8 + + class OperationalStatus(IntFlag): + kGlobal = 0x3 + kLift = 0xC + kTilt = 0x30 + + class SafetyStatus(IntFlag): + kRemoteLockout = 0x1 + kTamperDetection = 0x2 + kFailedCommunication = 0x4 + kPositionFailure = 0x8 + kThermalProtection = 0x10 + kObstacleDetected = 0x20 + kPower = 0x40 + kStopInput = 0x80 + kMotorJammed = 0x100 + kHardwareFailure = 0x200 + kManualOperation = 0x400 + kProtection = 0x800 + + class Commands: @dataclass @@ -15581,6 +15883,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: + class Commands: @dataclass class BarrierControlGoToPercent(ClusterCommand): @@ -15939,6 +16242,28 @@ class PumpOperationMode(IntEnum): kLocal = 0x03 + class Bitmaps: + class PumpFeature(IntFlag): + kConstantPressure = 0x1 + kCompensatedPressure = 0x2 + kConstantFlow = 0x4 + kConstantSpeed = 0x8 + kConstantTemperature = 0x10 + kAutomatic = 0x20 + kLocal = 0x40 + + class PumpStatus(IntFlag): + kDeviceFault = 0x1 + kSupplyfault = 0x2 + kSpeedLow = 0x4 + kSpeedHigh = 0x8 + kLocalOverride = 0x10 + kRunning = 0x20 + kRemotePressure = 0x40 + kRemoteFlow = 0x80 + kRemoteTemperature = 0x100 + + class Attributes: @@ -16830,6 +17155,30 @@ class ThermostatSystemMode(IntEnum): kFanOnly = 0x07 + class Bitmaps: + class DayOfWeek(IntFlag): + kSunday = 0x1 + kMonday = 0x2 + kTuesday = 0x4 + kWednesday = 0x8 + kThursday = 0x10 + kFriday = 0x20 + kSaturday = 0x40 + kAwayOrVacation = 0x80 + + class ModeForSequence(IntFlag): + kHeatSetpointFieldPresent = 0x1 + kCoolSetpointFieldPresent = 0x2 + + class ThermostatFeature(IntFlag): + kHeating = 0x1 + kCooling = 0x2 + kOccupancy = 0x4 + kSchedule = 0x8 + kSetback = 0x10 + kAutomode = 0x20 + + class Structs: @dataclass class ThermostatScheduleTransition(ClusterObject): @@ -17873,6 +18222,27 @@ class FanModeType(IntEnum): kSmart = 0x06 + class Bitmaps: + class FanControlFeature(IntFlag): + kMultiSpeed = 0x1 + kAuto = 0x2 + kRocking = 0x4 + kWind = 0x8 + + class RockSupportMask(IntFlag): + kRockLeftRight = 0x1 + kRockUpDown = 0x2 + kRockRound = 0x4 + + class WindSettingMask(IntFlag): + kSleepWind = 0x1 + kNaturalWind = 0x2 + + class WindSupportMask(IntFlag): + kSleepWind = 0x1 + kNaturalWind = 0x2 + + class Attributes: @@ -18164,6 +18534,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: + class Attributes: @dataclass class TemperatureDisplayMode(ClusterAttributeDescriptor): @@ -18460,6 +18831,28 @@ class SaturationStepMode(IntEnum): kDown = 0x03 + class Bitmaps: + class ColorCapabilities(IntFlag): + kHueSaturationSupported = 0x1 + kEnhancedHueSupported = 0x2 + kColorLoopSupported = 0x4 + kXYAttributesSupported = 0x8 + kColorTemperatureSupported = 0x10 + + class ColorControlFeature(IntFlag): + kHueAndSaturation = 0x1 + kEnhancedHue = 0x2 + kColorLoop = 0x4 + kXy = 0x8 + kColorTemperature = 0x10 + + class ColorLoopUpdateFlags(IntFlag): + kUpdateAction = 0x1 + kUpdateDirection = 0x2 + kUpdateTime = 0x4 + kUpdateStartHue = 0x8 + + class Commands: @dataclass @@ -19878,6 +20271,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: + class Attributes: @dataclass class PhysicalMinLevel(ClusterAttributeDescriptor): @@ -20224,6 +20618,7 @@ class LightSensorType(IntEnum): + class Attributes: @dataclass class MeasuredValue(ClusterAttributeDescriptor): @@ -20419,6 +20814,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: + class Attributes: @dataclass class MeasuredValue(ClusterAttributeDescriptor): @@ -20606,6 +21002,11 @@ def descriptor(cls) -> ClusterObjectDescriptor: clusterRevision: 'uint' = None + class Bitmaps: + class PressureFeature(IntFlag): + kExtended = 0x1 + + class Attributes: @@ -20867,6 +21268,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: + class Attributes: @dataclass class MeasuredValue(ClusterAttributeDescriptor): @@ -21046,6 +21448,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: + class Attributes: @dataclass class MeasuredValue(ClusterAttributeDescriptor): @@ -21241,6 +21644,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: + class Attributes: @dataclass class Occupancy(ClusterAttributeDescriptor): @@ -21542,6 +21946,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: + class Attributes: @dataclass class MACAddress(ClusterAttributeDescriptor): @@ -21678,6 +22083,12 @@ class LineupInfoTypeEnum(IntEnum): kMso = 0x00 + class Bitmaps: + class ChannelFeature(IntFlag): + kChannelList = 0x1 + kLineupInfo = 0x2 + + class Structs: @dataclass class ChannelInfo(ClusterObject): @@ -21950,6 +22361,7 @@ class TargetNavigatorStatusEnum(IntEnum): kNotAllowed = 0x02 + class Structs: @dataclass class TargetInfo(ClusterObject): @@ -22170,6 +22582,12 @@ class PlaybackStateEnum(IntEnum): kBuffering = 0x03 + class Bitmaps: + class MediaPlaybackFeature(IntFlag): + kAdvancedSeek = 0x1 + kVariableSpeed = 0x2 + + class Structs: @dataclass class PlaybackPosition(ClusterObject): @@ -22602,6 +23020,11 @@ class InputTypeEnum(IntEnum): kOther = 0x0B + class Bitmaps: + class MediaInputFeature(IntFlag): + kNameUpdates = 0x1 + + class Structs: @dataclass class InputInfo(ClusterObject): @@ -22824,6 +23247,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: + class Commands: @dataclass class Sleep(ClusterCommand): @@ -23039,6 +23463,13 @@ class KeypadInputStatusEnum(IntEnum): kInvalidKeyInCurrentState = 0x02 + class Bitmaps: + class KeypadInputFeature(IntFlag): + kNavigationKeyCodes = 0x1 + kLocationKeys = 0x2 + kNumberKeys = 0x4 + + class Commands: @dataclass @@ -23208,6 +23639,16 @@ class ParameterEnum(IntEnum): kType = 0x0C + class Bitmaps: + class ContentLauncherFeature(IntFlag): + kContentSearch = 0x1 + kURLPlayback = 0x2 + + class SupportedStreamingProtocol(IntFlag): + kDash = 0x1 + kHls = 0x2 + + class Structs: @dataclass class Dimension(ClusterObject): @@ -23511,6 +23952,11 @@ class OutputTypeEnum(IntEnum): kOther = 0x05 + class Bitmaps: + class AudioOutputFeature(IntFlag): + kNameUpdates = 0x1 + + class Structs: @dataclass class OutputInfo(ClusterObject): @@ -23712,6 +24158,11 @@ class ApplicationLauncherStatusEnum(IntEnum): kSystemBusy = 0x02 + class Bitmaps: + class ApplicationLauncherFeature(IntFlag): + kApplicationPlatform = 0x1 + + class Structs: @dataclass class Application(ClusterObject): @@ -23971,6 +24422,7 @@ class ApplicationStatusEnum(IntEnum): kActiveVisibleNotFocus = 0x03 + class Structs: @dataclass class ApplicationBasicApplication(ClusterObject): @@ -24222,6 +24674,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: + class Commands: @dataclass class GetSetupPIN(ClusterCommand): @@ -24662,6 +25115,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: + class Commands: @dataclass class GetProfileInfoResponseCommand(ClusterCommand): @@ -26907,6 +27361,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: clusterRevision: 'uint' = None + class Structs: @dataclass class MonitoringRegistration(ClusterObject): @@ -27317,6 +27772,37 @@ class SimpleEnum(IntEnum): kValueC = 0x03 + class Bitmaps: + class Bitmap16MaskMap(IntFlag): + kMaskVal1 = 0x1 + kMaskVal2 = 0x2 + kMaskVal3 = 0x4 + kMaskVal4 = 0x4000 + + class Bitmap32MaskMap(IntFlag): + kMaskVal1 = 0x1 + kMaskVal2 = 0x2 + kMaskVal3 = 0x4 + kMaskVal4 = 0x40000000 + + class Bitmap64MaskMap(IntFlag): + kMaskVal1 = 0x1 + kMaskVal2 = 0x2 + kMaskVal3 = 0x4 + kMaskVal4 = 0x4000000000000000 + + class Bitmap8MaskMap(IntFlag): + kMaskVal1 = 0x1 + kMaskVal2 = 0x2 + kMaskVal3 = 0x4 + kMaskVal4 = 0x40 + + class SimpleBitmap(IntFlag): + kValueA = 0x1 + kValueB = 0x2 + kValueC = 0x4 + + class Structs: @dataclass class SimpleStruct(ClusterObject): @@ -29596,6 +30082,7 @@ class FaultType(IntEnum): + class Commands: @dataclass class FailAtFault(ClusterCommand): diff --git a/src/controller/python/templates/python-cluster-Objects-py.zapt b/src/controller/python/templates/python-cluster-Objects-py.zapt index 5c37f392ca011c..ee197a3e302b78 100644 --- a/src/controller/python/templates/python-cluster-Objects-py.zapt +++ b/src/controller/python/templates/python-cluster-Objects-py.zapt @@ -10,6 +10,7 @@ import typing from dataclasses import dataclass, field from enum import IntEnum +from enum import IntFlag from chip import ChipUtility from chip.tlv import float32, uint @@ -56,6 +57,17 @@ class {{asUpperCamelCase name}}(Cluster): {{/zcl_enums}} +{{#zcl_bitmaps}} +{{#first}} + class Bitmaps: +{{/first}} + class {{asType label}}(IntFlag): +{{#zcl_bitmap_items}} + k{{asUpperCamelCase label}} = {{asHex mask}} +{{/zcl_bitmap_items}} + +{{/zcl_bitmaps}} + {{#zcl_structs}} {{#first}} class Structs: