-
Notifications
You must be signed in to change notification settings - Fork 182
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
Implement Address #149
Comments
* Added helper class for mesh addresses * Use int instead of byte[] for Address * Refactoring all addresses to use a 16-bit int instead of byte[]. This will allow to use the address as a key in as it might be useful when dealing with a list of nodes. Some of the api has been marked deprecated to be removed in the upcoming versions. * Fixes serialization/deserialization issues relating to data migration. * Remove unused classes * Fixes some bugs related to serialization and deserialization.
Great to see progress here! Two comments:
|
Thanks
|
Anyhow: Data migration & deprecation is always tricky ;) |
Is your feature request related to a problem? Please describe.
All Addresses are represented as byte[] arrays. They are converted to int, whenever a comparision is needed. This can get a little anoying, especially when using the address as a key in a map, as byte[] can't be used as a key.
Describe the solution you'd like
A new type for addresses that implements equals() and hashCode() correctly.
Having a type not only makes handling of addresses easier, one can also add beneficial helper methods (e.g. isGroupAddress, isBroadcastAddress (0xFFFF), toString(--> AB CD), Parcelable, Database table for used group addresses)
The text was updated successfully, but these errors were encountered: