Mr-Markus / ZigbeeNet

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

NetworkSerialization #34

Closed Mr-Markus closed 5 years ago

Mr-Markus commented 5 years ago

There have to be a solution for NetworkStateSerialization, which means that if network is shutdown or startup all known devices should still be there

Mr-Markus commented 5 years ago

There is now a property named NetworkStateSerializerin ZigBeeNetworkManagerwhich can be set by the caller to let him implement his own logic or database for the ZigBeeNodes

If a node is added, updated or removed the Serialize or Deserialize Method of the implemented class is called.

I implemented an example in the PlayGround project, and the after network startup my known devices are in the NetworkManager.Nodes List

So it is now possible to restart the network and restore all known devices to send them messages again without a DeviceAnnce Message received