-
Notifications
You must be signed in to change notification settings - Fork 82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow global attributes to have forced storage option #543
Comments
There is currently a mechanism that forced storage option to be external for certain attributes, via this block inside the zcl.json file:
If you put a global attribute into this block, however, this doesn't work per cluster. There isn't also any place in the database to put this data per-cluster for a global attribute. We should add this to GLOBAL_ATTRIBUTE_DEFAULT (possibly renaming the table to GLOBAL_ATTRIBUTE_PER_CLUSTER_POLICY). |
So what I plan to do, and @bzbarsky-apple , please review: 1.) Rename GLOBAL_ATTRIBUTE_DEFAULT to GLOBAL_ATTRIBUTE_CLUSTER_POLICY. Possibly: why is this called "attributeAccessInterface"? Why not just call it "forcedExternalStorageOption" ? |
@tecimovic That plan sounds good, I think, if I understand how these things fit together.
On the Matter side: because that's why we're forcing these things to be external-storage, and because that's what the storage-policy enup in ZAP got named. But I don't have any particular attachment to the naming here. |
sorry @bzbarsky-apple copying my comment here #1110 so @tecimovic sees it see: #1110 @bzbarsky-apple I think I figured it out. The global attributes are labeled as "attribute"within general.xml and they should actually be labeled as "globalAttribute". Maybe there is a better solution but at the moment the code treats global attributes like non global attributes and it doesn't work because the cluster is undefined. The only way to match a referenced cluster is to run a "forcedExternalCheck()" or something like that on each cluster which cross references the globalAttribute list generated by the XML tag and our list of clusters/attributes pairs that are supposed to be external storage. |
completed #1142 will make new issues for follow up work |
We have code in
src-electron/zcl/zcl-loader-silabs.js
that sets storage policy like so:but that code does not run for global attributes, as far as I can tell. Then later when we try to use the storage policy in
src-electron/db/query-impexp.js
inimportAttributeForEndpointType
I am not sure that code runs for global attributes either.So in practice the storage policy bits don't work for global attributes.
The text was updated successfully, but these errors were encountered: