-
Notifications
You must be signed in to change notification settings - Fork 409
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
Add Read-Composite operation #958
Conversation
0a87977
to
f5577ed
Compare
I finished to write a first "working" version. This was mainly to detect all the impact on current code base. Now I need to polish this (implement some missing details, clean the code, add more validation, add javadocs, some renames ...) The API looks like this : // read device model number
ReadCompositeResponse response = server.send(registration,
new ReadCompositeRequest(ContentFormat.SENML_CBOR, ContentFormat.SENML_CBOR, "/3/0/0", "/1"));
if (response.isSuccess()) {
List<LwM2mNode> content = response.getContent();
content.get(0); // response for "/3/0/0"
content.get(1); // response for "/1"
...
} |
f5577ed
to
6543894
Compare
@madhushreegc @eliasweingaertner I think this is in in a reviewable and testable state. My next step for another PR will be to look at the WriteComposite to check if the ReadComposite design matches correctly with it. |
6543894
to
ae6cb69
Compare
Unfortunately, I need to update the code by mainly switching all the This was mainly because to decode nodes from WriteComposite. In this case the list of This impacts the // read device model number
ReadCompositeResponse response = server.send(registration,
new ReadCompositeRequest(ContentFormat.SENML_CBOR, ContentFormat.SENML_CBOR, "/3/0/0", "/1"));
if (response.isSuccess()) {
LwM2mSingleResource resource = (LwM2mSingleResource) response.getContent("/3/0/0");
LwM2mObject object = (LwM2mObject) response.getContent("/1");
...
} |
ae6cb69
to
3a184ab
Compare
Still not entirely satisfied by the API an maybe we should go to something like #981. |
This aims to implement #957.
(This is work in progress, not in reviewable state or testable state)