Skip to content
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

Only restore attribute state from the node database for non-manufacturer-specific attributes #1001

Conversation

hsudbrock
Copy link
Contributor

This resolves #989 and #236.

With this change, when restoring a cluster from a ZclClusterDao obtained from the node database, for non-manufacturer-specific attributes only the dynamic attribute state will be restored (i.e., last value, last reporting time, and whether the attribute was marked as implemented).

The benefit is that changes in the attribute definition in the Zcl***Cluster classes generated by the autocoder will be applied to attributes, even when the information stored in the node database is from before those changes were made. (E.g., when adding new attributes as described in #236, or when fixing datatypes as described in #989.)

@codecov
Copy link

codecov bot commented Mar 13, 2020

Codecov Report

Merging #1001 into master will increase coverage by 0.00%.
The diff coverage is 81.81%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master    #1001   +/-   ##
=========================================
  Coverage     30.32%   30.33%           
- Complexity     4032     4035    +3     
=========================================
  Files          1424     1424           
  Lines         55238    55242    +4     
  Branches       2445     2446    +1     
=========================================
+ Hits          16750    16755    +5     
+ Misses        37759    37757    -2     
- Partials        729      730    +1     
Impacted Files Coverage Δ Complexity Δ
.../java/com/zsmartsystems/zigbee/zcl/ZclCluster.java 61.98% <71.42%> (ø) 101.00 <0.00> (+1.00)
...ava/com/zsmartsystems/zigbee/zcl/ZclAttribute.java 93.96% <100.00%> (+1.10%) 34.00 <1.00> (+2.00)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0d6508f...3aac66c. Read the comment docs.

@cdjackson
Copy link
Member

Thanks Henning.

@cdjackson cdjackson merged commit 44c2c35 into zsmartsystems:master Mar 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Storage of ZCL attribute datatypes by the network data store
2 participants