Mr-Markus / ZigbeeNet

A .NET Standard library for working with ZigBee
Eclipse Public License 1.0
131 stars 47 forks source link

Fix overlapping attributes due to a bug in code generator for ZCL Clusters #112

Closed spudwebb closed 4 years ago

Mr-Markus commented 4 years ago

Thx. It would be interessting for me how you found that?

spudwebb commented 4 years ago

If you tried to create a ZclMeteringCluster, the InitializeServerAttributes() method raised an exception because the same key was added twice to the attributeMap dictionary. I guess we should have unit tests for situations like this.

Mr-Markus commented 4 years ago

I haven't used ZclMeteringCluster before. What is it used for or which devices are you using?

We already have one unit test for cluster: ZclOnOffClusterTest

Maybe it can generate unit tests by CodeGenerator, too. I would create an issue for that