Skip to content

Commit

Permalink
Fixing feature map for resource monitoring cluster (#29074)
Browse files Browse the repository at this point in the history
* Fixing feature map for resource monitoring cluster

The replacement product list feature bitmask was set to 0x3 when it
should have been set to 0x4. Fixing it here.

Verified by looking reading the feature map in the all clusters app and
the resource monitoring app:

```
> hepafiltermonitoring read feature-map 1 1
...
[1693934613437] [9078:18462448] [DMG]   AttributeReportIBs =
[1693934613437] [9078:18462448] [DMG]   [
[1693934613437] [9078:18462448] [DMG]           AttributeReportIB =
[1693934613437] [9078:18462448] [DMG]           {
[1693934613437] [9078:18462448] [DMG]                   AttributeDataIB =
[1693934613437] [9078:18462448] [DMG]                   {
[1693934613437] [9078:18462448] [DMG]                           DataVersion = 0x443616af,
[1693934613437] [9078:18462448] [DMG]                           AttributePathIB =
[1693934613437] [9078:18462448] [DMG]                           {
[1693934613437] [9078:18462448] [DMG]                                   Endpoint = 0x1,
[1693934613437] [9078:18462448] [DMG]                                   Cluster = 0x72,
[1693934613437] [9078:18462448] [DMG]                                   Attribute = 0x0000_FFFC,
[1693934613437] [9078:18462448] [DMG]                           }
[1693934613437] [9078:18462448] [DMG]
[1693934613437] [9078:18462448] [DMG]                           Data = 7,
[1693934613437] [9078:18462448] [DMG]                   },
[1693934613437] [9078:18462448] [DMG]
[1693934613437] [9078:18462448] [DMG]           },
[1693934613437] [9078:18462448] [DMG]
[1693934613437] [9078:18462448] [DMG]   ],
```

This fixes #28197 and #28198

* Updating and adding feature flag tests
  • Loading branch information
cliffamzn authored and pull[bot] committed Feb 28, 2024
1 parent b7c2e06 commit 1311400
Show file tree
Hide file tree
Showing 16 changed files with 116 additions and 42 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3162,7 +3162,7 @@ server cluster HepaFilterMonitoring = 113 {
bitmap Feature : BITMAP32 {
kCondition = 0x1;
kWarning = 0x2;
kReplacementProductList = 0x3;
kReplacementProductList = 0x4;
}

struct ReplacementProductStruct {
Expand Down Expand Up @@ -3210,7 +3210,7 @@ server cluster ActivatedCarbonFilterMonitoring = 114 {
bitmap Feature : BITMAP32 {
kCondition = 0x1;
kWarning = 0x2;
kReplacementProductList = 0x3;
kReplacementProductList = 0x4;
}

struct ReplacementProductStruct {
Expand Down Expand Up @@ -6914,7 +6914,7 @@ endpoint 1 {
callback attribute generatedCommandList;
callback attribute acceptedCommandList;
callback attribute attributeList;
ram attribute featureMap default = 3;
ram attribute featureMap default = 7;
ram attribute clusterRevision default = 1;
}

Expand All @@ -6928,7 +6928,7 @@ endpoint 1 {
callback attribute generatedCommandList;
callback attribute acceptedCommandList;
callback attribute attributeList;
ram attribute featureMap default = 3;
ram attribute featureMap default = 7;
ram attribute clusterRevision default = 1;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18456,7 +18456,7 @@
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "3",
"defaultValue": "7",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
Expand Down Expand Up @@ -18710,7 +18710,7 @@
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "3",
"defaultValue": "7",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
Expand Down Expand Up @@ -35392,5 +35392,6 @@
"endpointId": 65534,
"networkId": 0
}
]
],
"log": []
}
Original file line number Diff line number Diff line change
Expand Up @@ -967,7 +967,7 @@ server cluster HepaFilterMonitoring = 113 {
bitmap Feature : BITMAP32 {
kCondition = 0x1;
kWarning = 0x2;
kReplacementProductList = 0x3;
kReplacementProductList = 0x4;
}

struct ReplacementProductStruct {
Expand Down Expand Up @@ -1011,7 +1011,7 @@ server cluster ActivatedCarbonFilterMonitoring = 114 {
bitmap Feature : BITMAP32 {
kCondition = 0x1;
kWarning = 0x2;
kReplacementProductList = 0x3;
kReplacementProductList = 0x4;
}

struct ReplacementProductStruct {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1538,7 +1538,7 @@ server cluster HepaFilterMonitoring = 113 {
bitmap Feature : BITMAP32 {
kCondition = 0x1;
kWarning = 0x2;
kReplacementProductList = 0x3;
kReplacementProductList = 0x4;
}

struct ReplacementProductStruct {
Expand Down Expand Up @@ -1586,7 +1586,7 @@ server cluster ActivatedCarbonFilterMonitoring = 114 {
bitmap Feature : BITMAP32 {
kCondition = 0x1;
kWarning = 0x2;
kReplacementProductList = 0x3;
kReplacementProductList = 0x4;
}

struct ReplacementProductStruct {
Expand Down Expand Up @@ -2010,7 +2010,7 @@ endpoint 1 {
callback attribute generatedCommandList;
callback attribute acceptedCommandList;
callback attribute attributeList;
ram attribute featureMap default = 0;
ram attribute featureMap default = 7;
ram attribute clusterRevision default = 1;
}

Expand All @@ -2024,7 +2024,7 @@ endpoint 1 {
callback attribute generatedCommandList;
callback attribute acceptedCommandList;
callback attribute attributeList;
ram attribute featureMap default = 0;
ram attribute featureMap default = 7;
ram attribute clusterRevision default = 1;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,19 @@
}
],
"package": [
{
"pathRelativity": "relativeToZap",
"path": "../../../src/app/zap-templates/app-templates.json",
"type": "gen-templates-json",
"version": "chip-v1"
},
{
"pathRelativity": "relativeToZap",
"path": "../../../src/app/zap-templates/zcl/zcl.json",
"type": "zcl-properties",
"category": "matter",
"version": 1,
"description": "Matter SDK ZCL data"
},
{
"pathRelativity": "relativeToZap",
"path": "../../../src/app/zap-templates/app-templates.json",
"type": "gen-templates-json",
"version": "chip-v1"
}
],
"endpointTypes": [
Expand Down Expand Up @@ -6373,7 +6373,7 @@
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0",
"defaultValue": "7",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
Expand Down Expand Up @@ -6627,7 +6627,7 @@
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0",
"defaultValue": "7",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
Expand Down Expand Up @@ -6993,5 +6993,6 @@
"endpointId": 1,
"networkId": 0
}
]
],
"log": []
}
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ enum class Feature : uint32_t
{
kCondition = 0x1,
kWarning = 0x2,
kReplacementProductList = 0x3
kReplacementProductList = 0x4
};

// Enum for ProductIdentifierTypeEnum
Expand Down
8 changes: 8 additions & 0 deletions src/app/tests/suites/TestActivatedCarbonFilterMonitoring.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,14 @@ tests:
- name: "nodeId"
value: nodeId

- label: "Validate the feature map"
command: "readAttribute"
attribute: "FeatureMap"
response:
constraints:
type: bitmap32
hasMasksSet: [0x7]

- label: "Read Replacement Product List"
command: "readAttribute"
attribute: "ReplacementProductList"
Expand Down
8 changes: 8 additions & 0 deletions src/app/tests/suites/TestHepaFilterMonitoring.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,14 @@ tests:
- name: "nodeId"
value: nodeId

- label: "Validate the feature map"
command: "readAttribute"
attribute: "FeatureMap"
response:
constraints:
type: bitmap32
hasMasksSet: [0x7]

- label: "Read Replacement Product List"
command: "readAttribute"
attribute: "ReplacementProductList"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ tests:
response:
constraints:
type: bitmap32
hasMasksSet: [0x3]
hasMasksSet: [0x4]

- label: "Step 4a: Read the global attribute: AttributeList"
PICS: PICS_EVENT_LIST_ENABLED
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ tests:
response:
constraints:
type: bitmap32
hasMasksSet: [0x3]
hasMasksSet: [0x4]

- label: "Step 4: Read the global attribute: AttributeList"
PICS: PICS_EVENT_LIST_ENABLED
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ limitations under the License.
<cluster code="0x0072" />
<field name="Condition" mask="0x01" />
<field name="Warning" mask="0x02" />
<field name="ReplacementProductList" mask="0x03" />
<field name="ReplacementProductList" mask="0x04" />
</bitmap>

<!-- Cluster Data Types -->
Expand Down
4 changes: 2 additions & 2 deletions src/controller/data_model/controller-clusters.matter
Original file line number Diff line number Diff line change
Expand Up @@ -3497,7 +3497,7 @@ client cluster HepaFilterMonitoring = 113 {
bitmap Feature : BITMAP32 {
kCondition = 0x1;
kWarning = 0x2;
kReplacementProductList = 0x3;
kReplacementProductList = 0x4;
}

struct ReplacementProductStruct {
Expand Down Expand Up @@ -3546,7 +3546,7 @@ client cluster ActivatedCarbonFilterMonitoring = 114 {
bitmap Feature : BITMAP32 {
kCondition = 0x1;
kWarning = 0x2;
kReplacementProductList = 0x3;
kReplacementProductList = 0x4;
}

struct ReplacementProductStruct {
Expand Down
4 changes: 2 additions & 2 deletions src/controller/python/chip/clusters/Objects.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 1311400

Please sign in to comment.