This repository has been archived by the owner on Mar 27, 2024. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is an initial refactor to move some of the management that is currently in the dongle code, into the main API.
As discussed elsewhere, I think there's too much code still in the dongle interface. This initially moves the command listener handler from the dongle into the API. This changes the dongle interface slightly so that there's now just a sendCommand() method (same as before), but on the receive side there's a callback into the API. This means the dongle code now only needs to process packets. I've not optimised the code in the 2531 implementation - just moved the handler.
My thought is that the ZigBeeNetworkManager class handles 'all' of the network management, so I plan to move some of what is in the API class into here. The ZigBeeApi can then remain as a simple API, or more complex implementations can use the network manager directly.
This is in no way optimised and I'm providing this PR for visibility and any thoughts you might have :)
Signed-off-by: Chris Jackson [email protected]
Edit: Migrated to https://github.com/zsmartsystems/com.zsmartsystems.zigbee