Skip to content

Commit

Permalink
[Scenes] Cleanup zap for name support (#29712)
Browse files Browse the repository at this point in the history
* Added missing checks on feature map for name support attribute in init

* Changed type of NameSupportAttribute to new type

* Fix darwin availability annotations.

* Regenerated zap files

---------

Co-authored-by: Boris Zbarsky <[email protected]>
  • Loading branch information
2 people authored and pull[bot] committed Jan 18, 2024
1 parent f08d347 commit 2979293
Show file tree
Hide file tree
Showing 25 changed files with 165 additions and 78 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -118,15 +118,19 @@ server cluster Groups = 4 {

/** Attributes and commands for scene configuration and manipulation. */
provisional server cluster Scenes = 5 {
bitmap CopyModeBitmap : bitmap8 {
kCopyAllScenes = 0x1;
}

bitmap Feature : bitmap32 {
kSceneNames = 0x1;
kExplicit = 0x2;
kTableSize = 0x4;
kFabricScenes = 0x8;
}

bitmap ScenesCopyMode : bitmap8 {
kCopyAllScenes = 0x1;
bitmap NameSupportBitmap : bitmap8 {
kSceneNames = 0x80;
}

struct AttributeValuePair {
Expand All @@ -143,7 +147,7 @@ provisional server cluster Scenes = 5 {
readonly attribute int8u currentScene = 1;
readonly attribute group_id currentGroup = 2;
readonly attribute boolean sceneValid = 3;
readonly attribute bitmap8 nameSupport = 4;
readonly attribute NameSupportBitmap nameSupport = 4;
readonly attribute nullable node_id lastConfiguredBy = 5;
readonly attribute int16u sceneTableSize = 6;
readonly attribute int8u remainingCapacity = 7;
Expand Down Expand Up @@ -205,7 +209,7 @@ provisional server cluster Scenes = 5 {
}

request struct CopySceneRequest {
ScenesCopyMode mode = 0;
CopyModeBitmap mode = 0;
group_id groupIdentifierFrom = 1;
int8u sceneIdentifierFrom = 2;
group_id groupIdentifierTo = 3;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,15 +118,19 @@ server cluster Groups = 4 {

/** Attributes and commands for scene configuration and manipulation. */
provisional server cluster Scenes = 5 {
bitmap CopyModeBitmap : bitmap8 {
kCopyAllScenes = 0x1;
}

bitmap Feature : bitmap32 {
kSceneNames = 0x1;
kExplicit = 0x2;
kTableSize = 0x4;
kFabricScenes = 0x8;
}

bitmap ScenesCopyMode : bitmap8 {
kCopyAllScenes = 0x1;
bitmap NameSupportBitmap : bitmap8 {
kSceneNames = 0x80;
}

struct AttributeValuePair {
Expand All @@ -143,7 +147,7 @@ provisional server cluster Scenes = 5 {
readonly attribute int8u currentScene = 1;
readonly attribute group_id currentGroup = 2;
readonly attribute boolean sceneValid = 3;
readonly attribute bitmap8 nameSupport = 4;
readonly attribute NameSupportBitmap nameSupport = 4;
readonly attribute nullable node_id lastConfiguredBy = 5;
readonly attribute int16u sceneTableSize = 6;
readonly attribute int8u remainingCapacity = 7;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,15 +166,19 @@ server cluster Groups = 4 {

/** Attributes and commands for scene configuration and manipulation. */
provisional client cluster Scenes = 5 {
bitmap CopyModeBitmap : bitmap8 {
kCopyAllScenes = 0x1;
}

bitmap Feature : bitmap32 {
kSceneNames = 0x1;
kExplicit = 0x2;
kTableSize = 0x4;
kFabricScenes = 0x8;
}

bitmap ScenesCopyMode : bitmap8 {
kCopyAllScenes = 0x1;
bitmap NameSupportBitmap : bitmap8 {
kSceneNames = 0x80;
}

struct AttributeValuePair {
Expand All @@ -191,7 +195,7 @@ provisional client cluster Scenes = 5 {
readonly attribute int8u currentScene = 1;
readonly attribute group_id currentGroup = 2;
readonly attribute boolean sceneValid = 3;
readonly attribute bitmap8 nameSupport = 4;
readonly attribute NameSupportBitmap nameSupport = 4;
readonly attribute optional nullable node_id lastConfiguredBy = 5;
readonly attribute int16u sceneTableSize = 6;
readonly attribute int8u remainingCapacity = 7;
Expand Down Expand Up @@ -307,7 +311,7 @@ provisional client cluster Scenes = 5 {
}

request struct CopySceneRequest {
ScenesCopyMode mode = 0;
CopyModeBitmap mode = 0;
group_id groupIdentifierFrom = 1;
int8u sceneIdentifierFrom = 2;
group_id groupIdentifierTo = 3;
Expand Down
12 changes: 8 additions & 4 deletions examples/lighting-app/lighting-common/lighting-app.matter
Original file line number Diff line number Diff line change
Expand Up @@ -118,15 +118,19 @@ server cluster Groups = 4 {

/** Attributes and commands for scene configuration and manipulation. */
provisional server cluster Scenes = 5 {
bitmap CopyModeBitmap : bitmap8 {
kCopyAllScenes = 0x1;
}

bitmap Feature : bitmap32 {
kSceneNames = 0x1;
kExplicit = 0x2;
kTableSize = 0x4;
kFabricScenes = 0x8;
}

bitmap ScenesCopyMode : bitmap8 {
kCopyAllScenes = 0x1;
bitmap NameSupportBitmap : bitmap8 {
kSceneNames = 0x80;
}

struct AttributeValuePair {
Expand All @@ -143,7 +147,7 @@ provisional server cluster Scenes = 5 {
readonly attribute int8u currentScene = 1;
readonly attribute group_id currentGroup = 2;
readonly attribute boolean sceneValid = 3;
readonly attribute bitmap8 nameSupport = 4;
readonly attribute NameSupportBitmap nameSupport = 4;
readonly attribute nullable node_id lastConfiguredBy = 5;
readonly attribute int16u sceneTableSize = 6;
readonly attribute int8u remainingCapacity = 7;
Expand Down Expand Up @@ -205,7 +209,7 @@ provisional server cluster Scenes = 5 {
}

request struct CopySceneRequest {
ScenesCopyMode mode = 0;
CopyModeBitmap mode = 0;
group_id groupIdentifierFrom = 1;
int8u sceneIdentifierFrom = 2;
group_id groupIdentifierTo = 3;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,15 +118,19 @@ server cluster Groups = 4 {

/** Attributes and commands for scene configuration and manipulation. */
provisional server cluster Scenes = 5 {
bitmap CopyModeBitmap : bitmap8 {
kCopyAllScenes = 0x1;
}

bitmap Feature : bitmap32 {
kSceneNames = 0x1;
kExplicit = 0x2;
kTableSize = 0x4;
kFabricScenes = 0x8;
}

bitmap ScenesCopyMode : bitmap8 {
kCopyAllScenes = 0x1;
bitmap NameSupportBitmap : bitmap8 {
kSceneNames = 0x80;
}

struct AttributeValuePair {
Expand All @@ -143,7 +147,7 @@ provisional server cluster Scenes = 5 {
readonly attribute int8u currentScene = 1;
readonly attribute group_id currentGroup = 2;
readonly attribute boolean sceneValid = 3;
readonly attribute bitmap8 nameSupport = 4;
readonly attribute NameSupportBitmap nameSupport = 4;
readonly attribute nullable node_id lastConfiguredBy = 5;
readonly attribute int16u sceneTableSize = 6;
readonly attribute int8u remainingCapacity = 7;
Expand Down Expand Up @@ -205,7 +209,7 @@ provisional server cluster Scenes = 5 {
}

request struct CopySceneRequest {
ScenesCopyMode mode = 0;
CopyModeBitmap mode = 0;
group_id groupIdentifierFrom = 1;
int8u sceneIdentifierFrom = 2;
group_id groupIdentifierTo = 3;
Expand Down
12 changes: 8 additions & 4 deletions examples/lighting-app/silabs/data_model/lighting-wifi-app.matter
Original file line number Diff line number Diff line change
Expand Up @@ -118,15 +118,19 @@ server cluster Groups = 4 {

/** Attributes and commands for scene configuration and manipulation. */
provisional server cluster Scenes = 5 {
bitmap CopyModeBitmap : bitmap8 {
kCopyAllScenes = 0x1;
}

bitmap Feature : bitmap32 {
kSceneNames = 0x1;
kExplicit = 0x2;
kTableSize = 0x4;
kFabricScenes = 0x8;
}

bitmap ScenesCopyMode : bitmap8 {
kCopyAllScenes = 0x1;
bitmap NameSupportBitmap : bitmap8 {
kSceneNames = 0x80;
}

struct AttributeValuePair {
Expand All @@ -143,7 +147,7 @@ provisional server cluster Scenes = 5 {
readonly attribute int8u currentScene = 1;
readonly attribute group_id currentGroup = 2;
readonly attribute boolean sceneValid = 3;
readonly attribute bitmap8 nameSupport = 4;
readonly attribute NameSupportBitmap nameSupport = 4;
readonly attribute nullable node_id lastConfiguredBy = 5;
readonly attribute int16u sceneTableSize = 6;
readonly attribute int8u remainingCapacity = 7;
Expand Down Expand Up @@ -205,7 +209,7 @@ provisional server cluster Scenes = 5 {
}

request struct CopySceneRequest {
ScenesCopyMode mode = 0;
CopyModeBitmap mode = 0;
group_id groupIdentifierFrom = 1;
int8u sceneIdentifierFrom = 2;
group_id groupIdentifierTo = 3;
Expand Down
10 changes: 7 additions & 3 deletions examples/placeholder/linux/apps/app1/config.matter
Original file line number Diff line number Diff line change
Expand Up @@ -166,15 +166,19 @@ server cluster Groups = 4 {

/** Attributes and commands for scene configuration and manipulation. */
provisional server cluster Scenes = 5 {
bitmap CopyModeBitmap : bitmap8 {
kCopyAllScenes = 0x1;
}

bitmap Feature : bitmap32 {
kSceneNames = 0x1;
kExplicit = 0x2;
kTableSize = 0x4;
kFabricScenes = 0x8;
}

bitmap ScenesCopyMode : bitmap8 {
kCopyAllScenes = 0x1;
bitmap NameSupportBitmap : bitmap8 {
kSceneNames = 0x80;
}

struct AttributeValuePair {
Expand All @@ -191,7 +195,7 @@ provisional server cluster Scenes = 5 {
readonly attribute int8u currentScene = 1;
readonly attribute group_id currentGroup = 2;
readonly attribute boolean sceneValid = 3;
readonly attribute bitmap8 nameSupport = 4;
readonly attribute NameSupportBitmap nameSupport = 4;
readonly attribute int16u sceneTableSize = 6;
readonly attribute int8u remainingCapacity = 7;
readonly attribute command_id generatedCommandList[] = 65528;
Expand Down
10 changes: 7 additions & 3 deletions examples/placeholder/linux/apps/app2/config.matter
Original file line number Diff line number Diff line change
Expand Up @@ -166,15 +166,19 @@ server cluster Groups = 4 {

/** Attributes and commands for scene configuration and manipulation. */
provisional server cluster Scenes = 5 {
bitmap CopyModeBitmap : bitmap8 {
kCopyAllScenes = 0x1;
}

bitmap Feature : bitmap32 {
kSceneNames = 0x1;
kExplicit = 0x2;
kTableSize = 0x4;
kFabricScenes = 0x8;
}

bitmap ScenesCopyMode : bitmap8 {
kCopyAllScenes = 0x1;
bitmap NameSupportBitmap : bitmap8 {
kSceneNames = 0x80;
}

struct AttributeValuePair {
Expand All @@ -191,7 +195,7 @@ provisional server cluster Scenes = 5 {
readonly attribute int8u currentScene = 1;
readonly attribute group_id currentGroup = 2;
readonly attribute boolean sceneValid = 3;
readonly attribute bitmap8 nameSupport = 4;
readonly attribute NameSupportBitmap nameSupport = 4;
readonly attribute int16u sceneTableSize = 6;
readonly attribute int8u remainingCapacity = 7;
readonly attribute command_id generatedCommandList[] = 65528;
Expand Down
10 changes: 7 additions & 3 deletions examples/thermostat/nxp/zap/thermostat_matter_thread.matter
Original file line number Diff line number Diff line change
Expand Up @@ -160,15 +160,19 @@ server cluster Groups = 4 {

/** Attributes and commands for scene configuration and manipulation. */
provisional server cluster Scenes = 5 {
bitmap CopyModeBitmap : bitmap8 {
kCopyAllScenes = 0x1;
}

bitmap Feature : bitmap32 {
kSceneNames = 0x1;
kExplicit = 0x2;
kTableSize = 0x4;
kFabricScenes = 0x8;
}

bitmap ScenesCopyMode : bitmap8 {
kCopyAllScenes = 0x1;
bitmap NameSupportBitmap : bitmap8 {
kSceneNames = 0x80;
}

struct AttributeValuePair {
Expand All @@ -185,7 +189,7 @@ provisional server cluster Scenes = 5 {
readonly attribute int8u currentScene = 1;
readonly attribute group_id currentGroup = 2;
readonly attribute boolean sceneValid = 3;
readonly attribute bitmap8 nameSupport = 4;
readonly attribute NameSupportBitmap nameSupport = 4;
readonly attribute int16u sceneTableSize = 6;
readonly attribute int8u remainingCapacity = 7;
readonly attribute command_id generatedCommandList[] = 65528;
Expand Down
10 changes: 7 additions & 3 deletions examples/thermostat/nxp/zap/thermostat_matter_wifi.matter
Original file line number Diff line number Diff line change
Expand Up @@ -160,15 +160,19 @@ server cluster Groups = 4 {

/** Attributes and commands for scene configuration and manipulation. */
provisional server cluster Scenes = 5 {
bitmap CopyModeBitmap : bitmap8 {
kCopyAllScenes = 0x1;
}

bitmap Feature : bitmap32 {
kSceneNames = 0x1;
kExplicit = 0x2;
kTableSize = 0x4;
kFabricScenes = 0x8;
}

bitmap ScenesCopyMode : bitmap8 {
kCopyAllScenes = 0x1;
bitmap NameSupportBitmap : bitmap8 {
kSceneNames = 0x80;
}

struct AttributeValuePair {
Expand All @@ -185,7 +189,7 @@ provisional server cluster Scenes = 5 {
readonly attribute int8u currentScene = 1;
readonly attribute group_id currentGroup = 2;
readonly attribute boolean sceneValid = 3;
readonly attribute bitmap8 nameSupport = 4;
readonly attribute NameSupportBitmap nameSupport = 4;
readonly attribute int16u sceneTableSize = 6;
readonly attribute int8u remainingCapacity = 7;
readonly attribute command_id generatedCommandList[] = 65528;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,15 +118,19 @@ server cluster Groups = 4 {

/** Attributes and commands for scene configuration and manipulation. */
provisional server cluster Scenes = 5 {
bitmap CopyModeBitmap : bitmap8 {
kCopyAllScenes = 0x1;
}

bitmap Feature : bitmap32 {
kSceneNames = 0x1;
kExplicit = 0x2;
kTableSize = 0x4;
kFabricScenes = 0x8;
}

bitmap ScenesCopyMode : bitmap8 {
kCopyAllScenes = 0x1;
bitmap NameSupportBitmap : bitmap8 {
kSceneNames = 0x80;
}

struct AttributeValuePair {
Expand All @@ -143,7 +147,7 @@ provisional server cluster Scenes = 5 {
readonly attribute int8u currentScene = 1;
readonly attribute group_id currentGroup = 2;
readonly attribute boolean sceneValid = 3;
readonly attribute bitmap8 nameSupport = 4;
readonly attribute NameSupportBitmap nameSupport = 4;
readonly attribute int16u sceneTableSize = 6;
readonly attribute int8u remainingCapacity = 7;
readonly attribute command_id generatedCommandList[] = 65528;
Expand Down
Loading

0 comments on commit 2979293

Please sign in to comment.