-
Notifications
You must be signed in to change notification settings - Fork 413
Description
Question
Hello,
I have checked 1718 and although it is in the same direction as my question, it does not answer it, therefore I am opening this issue here.
Context:
I am using the gateway object to publish child devices that use my main lwm2m device as a gateway. my implementation is based on article.
In my implementation, I am using the same logic in branch so that I save the child and parent device relations in additional registration attributes.
I am also using send requests to handle incoming measurements from the gateway and its child devices. I made changes to the HandlePOST() function in SendResource.java class and TimeStampedLwM2MNode class to consider prefixes to deduce if the send request comes from the parent or child node.
Since the child devices do not have their own lwm2mIdentity and IP Address, I have changed the redis and InMemory registration stores to only save those if the rootpath of the registration does not have a prefix i.e. the gateway/parent. this avoids conflicts in registration and in ClientProfileProvider.
implementation details: compare branch.
Core question:
I want to eventually create a pull request for these changes, but my main question is: using additional registration attributes does not sit right with me, and so I would want to add attributes to the Registration.java class for the names of child devices and name of gateway/parent. would such a change be meaningful or should I make the change elsewhere?
TL;DR:
-
Extending the gateway object to support child devices.
-
Using prefixes in send requests and registrations to distinguish parent vs. child.
-
Considering a PR: Should gateway/child info live in Registration.java or somewhere else?
Thanks in advance for your feedback