[go: up one dir, main page]

Skip to content
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 request support #957

Closed
sbernard31 opened this issue Jan 5, 2021 · 7 comments
Closed

add Read-Composite request support #957

sbernard31 opened this issue Jan 5, 2021 · 7 comments
Labels
client Impact LWM2M client new feature New feature from LWM2M specification server Impact LWM2M server

Comments

@sbernard31
Copy link
Contributor
sbernard31 commented Jan 5, 2021

I'm currently thinking about Read-Composite API.

See :

I guess the request should looks like this :

new ReadCompositeRequest(requestContentFormat,responseContentFormat, String path ...);
// or maybe but currently LwM2mPath is pretty much not exposed API
new ReadCompositeRequest(requestContentFormat,responseContentFormat, LwM2mPath path ...);

For the response, this is less easy, I currently have no idea how it should looks like, especially the payload (content) part.

public class ReadCompositeResponse {

    ResponseCode getCode();
    ???? getContent();
}

I suppose we could imagine :

  • Collection<LwM2mNode> getContent() pretty straightforward but not sure this is so easy to use API :/
  • Map<String,LwM2mNode> where we match a response for each request path but this could be an issue for "/" use case where there is not 1 LwM2mNode but several.
  • NavigableMap<LwM2mPath,Lwm2mNode> which should allow a better way to navigate in received data but API will not be so straightforward too
  • or maybe we need a new dedicated structure based on NaviableMap which could allow to extract data for a given path ?
@sbernard31 sbernard31 added new feature New feature from LWM2M specification client Impact LWM2M client server Impact LWM2M server labels Jan 5, 2021
@sbernard31
Copy link
Contributor Author

(@yemkay, @madhushreegc you may be interested by this)

@sbernard31
Copy link
Contributor Author

I'm currently exploring the Map<String,LwM2mNode> way because it seems to be the less impacting way.
(for "/" case I will maybe need a LwM2mRootNode)

@madhushreegc
Copy link

Map<String,LwM2mNode> , key is LWM2M path?

@sbernard31
Copy link
Contributor Author

Yes that's the idea.

@eliasweingaertner
Copy link

I definitely like it. I also think that Map<String,LwM2mNode> with the key being the path is a simple and straightforward solution. It plays in nicely with all kinds of things like JSON Serialization, Logging, etc.

@sbernard31
Copy link
Contributor Author

There are some news in #958 (comment).
In this version I finally use a List<LwM2mNode> getContent() 😅 ... but this is just because that was the more straightforward way for my first try. If Map is really more wanted I can implement the Map way.

@sbernard31
Copy link
Contributor Author

The API currently looks like this : #958 (comment)
I'm still not sure this the the right way, I have this (#981) in mind but not the priority for now.

The missing part is Read-Composite on "/" : #989.

I think we can close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
client Impact LWM2M client new feature New feature from LWM2M specification server Impact LWM2M server
Projects
None yet
Development

No branches or pull requests

3 participants