Skip to content

Commit

Permalink
[IDL] include bitmaps in IDL (#14457)
Browse files Browse the repository at this point in the history
* Add support for outputing bitmap data in IDL

* Ran zap regen

* Restyle fixes
  • Loading branch information
andy31415 authored and pull[bot] committed Jan 29, 2024
1 parent d3f594c commit 3822473
Show file tree
Hide file tree
Showing 24 changed files with 1,600 additions and 13 deletions.
338 changes: 338 additions & 0 deletions examples/all-clusters-app/all-clusters-common/all-clusters-app.matter

Large diffs are not rendered by default.

20 changes: 20 additions & 0 deletions examples/bridge-app/bridge-common/bridge-app.matter
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,12 @@ server cluster LevelControl = 8 {
kDown = 1;
}

bitmap LevelControlFeature : BITMAP32 {
kOnOff = 0x1;
kLighting = 0x2;
kFrequency = 0x4;
}

readonly attribute int8u currentLevel = 0;
readonly attribute int16u remainingTime = 1;
readonly attribute int8u minLevel = 2;
Expand Down Expand Up @@ -413,6 +419,12 @@ server cluster NetworkCommissioning = 49 {
k60g = 4;
}

bitmap NetworkCommissioningFeature : BITMAP32 {
kWiFiNetworkInterface = 0x1;
kThreadNetworkInterface = 0x2;
kEthernetNetworkInterface = 0x4;
}

struct NetworkInfo {
OCTET_STRING networkID = 0;
BOOLEAN connected = 1;
Expand Down Expand Up @@ -523,6 +535,10 @@ server cluster OnOff = 6 {
kDyingLight = 1;
}

bitmap OnOffControl : BITMAP8 {
kAcceptOnlyWhenOn = 0x1;
}

readonly attribute boolean onOff = 0;
readonly global attribute int16u clusterRevision = 65533;

Expand Down Expand Up @@ -877,6 +893,10 @@ server cluster UnitLocalization = 45 {
kKelvin = 2;
}

bitmap UnitLocalizationFeature : BITMAP32 {
kTemperatureUnit = 0x1;
}

attribute TempUnit temperatureUnit = 0;
readonly global attribute bitmap32 featureMap = 65532;
readonly global attribute int16u clusterRevision = 65533;
Expand Down
155 changes: 155 additions & 0 deletions examples/door-lock-app/door-lock-common/door-lock-app.matter
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,148 @@ server cluster DoorLock = 257 {
kNotSupported = 255;
}

bitmap DlAlarmMask : BITMAP16 {
kLockingMechanismJammed = 0x1;
kLockResetToFactoryDefaults = 0x2;
kReserved = 0x4;
kRFModulePowerCycled = 0x8;
kWrongCodeEntryLimit = 0x10;
kFrontEscutcheonRemovedFromMain = 0x20;
kForcedDoorOpenUnderDoorLockedCondition = 0x40;
}

bitmap DlCredentialRulesSupport : BITMAP8 {
kSingle = 0x1;
kDual = 0x2;
kTri = 0x4;
}

bitmap DlDaysMaskMap : BITMAP8 {
kSunday = 0x1;
kMonday = 0x2;
kTuesday = 0x4;
kWednesday = 0x8;
kThursday = 0x10;
kFriday = 0x20;
kSaturday = 0x40;
}

bitmap DlDefaultConfigurationRegister : BITMAP16 {
kEnableLocalProgrammingEnabled = 0x1;
kKeypadInterfaceDefaultAccessEnabled = 0x2;
kRemoteInterfaceDefaultAccessIsEnabled = 0x4;
kSoundEnabled = 0x20;
kAutoRelockTimeSet = 0x40;
kLEDSettingsSet = 0x80;
}

bitmap DlKeypadOperationEventMask : BITMAP16 {
kUnknown = 0x1;
kLock = 0x2;
kUnlock = 0x4;
kLockInvalidPIN = 0x8;
kLockInvalidSchedule = 0x10;
kUnlockInvalidCode = 0x20;
kUnlockInvalidSchedule = 0x40;
kNonAccessUserOpEvent = 0x80;
}

bitmap DlKeypadProgrammingEventMask : BITMAP16 {
kUnknown = 0x1;
kProgrammingPINChanged = 0x2;
kPINAdded = 0x4;
kPINCleared = 0x8;
kPINChanged = 0x10;
}

bitmap DlLocalProgrammingFeatures : BITMAP8 {
kAddUsersCredentialsSchedulesLocally = 0x1;
kModifyUsersCredentialsSchedulesLocally = 0x2;
kClearUsersCredentialsSchedulesLocally = 0x4;
kAdjustLockSettingsLocally = 0x8;
}

bitmap DlManualOperationEventMask : BITMAP16 {
kUnknown = 0x1;
kThumbturnLock = 0x2;
kThumbturnUnlock = 0x4;
kOneTouchLock = 0x8;
kKeyLock = 0x10;
kKeyUnlock = 0x20;
kAutoLock = 0x40;
kScheduleLock = 0x80;
kScheduleUnlock = 0x100;
kManualLock = 0x200;
kManualUnlock = 0x400;
}

bitmap DlRFIDOperationEventMask : BITMAP16 {
kUnknown = 0x1;
kLock = 0x2;
kUnlock = 0x4;
kLockInvalidRFID = 0x8;
kLockInvalidSchedule = 0x10;
kUnlockInvalidRFID = 0x20;
kUnlockInvalidSchedule = 0x40;
}

bitmap DlRFIDProgrammingEventMask : BITMAP16 {
kUnknown = 0x1;
kRFIDCodeAdded = 0x20;
kRFIDCodeCleared = 0x40;
}

bitmap DlRemoteOperationEventMask : BITMAP16 {
kUnknown = 0x1;
kLock = 0x2;
kUnlock = 0x4;
kLockInvalidCode = 0x8;
kLockInvalidSchedule = 0x10;
kUnlockInvalidCode = 0x20;
kUnlockInvalidSchedule = 0x40;
}

bitmap DlRemoteProgrammingEventMask : BITMAP16 {
kUnknown = 0x1;
kProgrammingPINChanged = 0x2;
kPINAdded = 0x4;
kPINCleared = 0x8;
kPINChanged = 0x10;
kRFIDCodeAdded = 0x20;
kRFIDCodeCleared = 0x40;
}

bitmap DlSupportedOperatingModes : BITMAP16 {
kNormal = 0x1;
kVacation = 0x2;
kPrivacy = 0x4;
kNoRemoteLockUnlock = 0x8;
kPassage = 0x10;
}

bitmap DoorLockDayOfWeek : BITMAP8 {
kSunday = 0x1;
kMonday = 0x2;
kTuesday = 0x4;
kWednesday = 0x8;
kThursday = 0x10;
kFriday = 0x20;
kSaturday = 0x40;
}

bitmap DoorLockFeature : BITMAP32 {
kPINCredentials = 0x1;
kRFIDCredentials = 0x2;
kFingerCredentials = 0x4;
kLogging = 0x8;
kAccessSchedules = 0x10;
kDoorPositionSensor = 0x20;
kFaceCredentials = 0x40;
kCredentialsOTA = 0x80;
kUsersManagement = 0x100;
kNotifications = 0x200;
}

struct DlCredential {
DlCredentialType credentialType = 0;
INT16U credentialIndex = 1;
Expand Down Expand Up @@ -665,6 +807,12 @@ server cluster NetworkCommissioning = 49 {
k60g = 4;
}

bitmap NetworkCommissioningFeature : BITMAP32 {
kWiFiNetworkInterface = 0x1;
kThreadNetworkInterface = 0x2;
kEthernetNetworkInterface = 0x4;
}

struct NetworkInfo {
OCTET_STRING networkID = 0;
BOOLEAN connected = 1;
Expand Down Expand Up @@ -927,6 +1075,13 @@ server cluster PowerSource = 47 {
kUnderVoltage = 2;
}

bitmap PowerSourceFeature : BITMAP32 {
kWired = 0x1;
kBattery = 0x2;
kRechargeable = 0x4;
kReplaceable = 0x8;
}

readonly attribute enum8 status = 0;
readonly attribute int8u order = 1;
readonly attribute char_string<60> description = 2;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,21 @@ client cluster ColorControl = 768 {
kDown = 3;
}

bitmap ColorCapabilities : BITMAP16 {
kHueSaturationSupported = 0x1;
kEnhancedHueSupported = 0x2;
kColorLoopSupported = 0x4;
kXYAttributesSupported = 0x8;
kColorTemperatureSupported = 0x10;
}

bitmap ColorLoopUpdateFlags : BITMAP8 {
kUpdateAction = 0x1;
kUpdateDirection = 0x2;
kUpdateTime = 0x4;
kUpdateStartHue = 0x8;
}

readonly attribute int8u currentHue = 0;
readonly attribute int8u currentSaturation = 1;
readonly attribute int16u remainingTime = 2;
Expand Down Expand Up @@ -687,6 +702,12 @@ server cluster NetworkCommissioning = 49 {
k60g = 4;
}

bitmap NetworkCommissioningFeature : BITMAP32 {
kWiFiNetworkInterface = 0x1;
kThreadNetworkInterface = 0x2;
kEthernetNetworkInterface = 0x4;
}

struct NetworkInfo {
OCTET_STRING networkID = 0;
BOOLEAN connected = 1;
Expand Down Expand Up @@ -931,6 +952,10 @@ client cluster OnOff = 6 {
kDyingLight = 1;
}

bitmap OnOffControl : BITMAP8 {
kAcceptOnlyWhenOn = 0x1;
}

readonly attribute boolean onOff = 0;
readonly attribute boolean globalSceneControl = 16384;
attribute int16u onTime = 16385;
Expand Down Expand Up @@ -1051,6 +1076,10 @@ server cluster OperationalCredentials = 62 {
}

client cluster Scenes = 5 {
bitmap ScenesCopyMode : BITMAP8 {
kCopyAllScenes = 0x1;
}

struct SceneExtensionFieldSet {
CLUSTER_ID clusterId = 0;
INT8U length = 1;
Expand Down
35 changes: 35 additions & 0 deletions examples/lighting-app/lighting-common/lighting-app.matter
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,21 @@ server cluster ColorControl = 768 {
kDown = 3;
}

bitmap ColorCapabilities : BITMAP16 {
kHueSaturationSupported = 0x1;
kEnhancedHueSupported = 0x2;
kColorLoopSupported = 0x4;
kXYAttributesSupported = 0x8;
kColorTemperatureSupported = 0x10;
}

bitmap ColorLoopUpdateFlags : BITMAP8 {
kUpdateAction = 0x1;
kUpdateDirection = 0x2;
kUpdateTime = 0x4;
kUpdateStartHue = 0x8;
}

readonly attribute int8u currentHue = 0;
readonly attribute int8u currentSaturation = 1;
readonly attribute int16u remainingTime = 2;
Expand Down Expand Up @@ -653,6 +668,12 @@ server cluster LevelControl = 8 {
kDown = 1;
}

bitmap LevelControlFeature : BITMAP32 {
kOnOff = 0x1;
kLighting = 0x2;
kFrequency = 0x4;
}

readonly attribute int8u currentLevel = 0;
readonly attribute int16u remainingTime = 1;
readonly attribute int8u minLevel = 2;
Expand Down Expand Up @@ -754,6 +775,12 @@ server cluster NetworkCommissioning = 49 {
k60g = 4;
}

bitmap NetworkCommissioningFeature : BITMAP32 {
kWiFiNetworkInterface = 0x1;
kThreadNetworkInterface = 0x2;
kEthernetNetworkInterface = 0x4;
}

struct NetworkInfo {
OCTET_STRING networkID = 0;
BOOLEAN connected = 1;
Expand Down Expand Up @@ -1005,6 +1032,10 @@ client cluster OnOff = 6 {
kDyingLight = 1;
}

bitmap OnOffControl : BITMAP8 {
kAcceptOnlyWhenOn = 0x1;
}

readonly attribute boolean onOff = 0;
readonly attribute boolean globalSceneControl = 16384;
attribute int16u onTime = 16385;
Expand All @@ -1030,6 +1061,10 @@ server cluster OnOff = 6 {
kDyingLight = 1;
}

bitmap OnOffControl : BITMAP8 {
kAcceptOnlyWhenOn = 0x1;
}

readonly attribute boolean onOff = 0;
readonly attribute boolean globalSceneControl = 16384;
attribute int16u onTime = 16385;
Expand Down
17 changes: 17 additions & 0 deletions examples/lock-app/lock-common/lock-app.matter
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,12 @@ server cluster NetworkCommissioning = 49 {
k60g = 4;
}

bitmap NetworkCommissioningFeature : BITMAP32 {
kWiFiNetworkInterface = 0x1;
kThreadNetworkInterface = 0x2;
kEthernetNetworkInterface = 0x4;
}

struct NetworkInfo {
OCTET_STRING networkID = 0;
BOOLEAN connected = 1;
Expand Down Expand Up @@ -442,6 +448,10 @@ server cluster OnOff = 6 {
kDyingLight = 1;
}

bitmap OnOffControl : BITMAP8 {
kAcceptOnlyWhenOn = 0x1;
}

readonly attribute boolean onOff = 0;
readonly attribute boolean globalSceneControl = 16384;
attribute int16u onTime = 16385;
Expand Down Expand Up @@ -623,6 +633,13 @@ server cluster PowerSource = 47 {
kUnderVoltage = 2;
}

bitmap PowerSourceFeature : BITMAP32 {
kWired = 0x1;
kBattery = 0x2;
kRechargeable = 0x4;
kReplaceable = 0x8;
}

readonly attribute enum8 status = 0;
readonly attribute int8u order = 1;
readonly attribute char_string<60> description = 2;
Expand Down
Loading

0 comments on commit 3822473

Please sign in to comment.