-
Notifications
You must be signed in to change notification settings - Fork 376
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
Enable SENML_JSON support in lightclient #520
Conversation
The server should support all formats. I think the JSON formats were added to the other client to support command line enhancements. This makes me wonder what format the lightclient was using before this change. I lost everything on my hard disk recently and haven't gotten set back up for building Wakaama to check. If it supported no formats, we should probably add something to liblwm2m.h to give a reasonable default for people writing their own client. |
I checked. The lightclient only supported plain text and probably opaque. Nothing that could represent any structured data. |
TLV was supported until
Although the lightclient has no CLI we still need to support a valid format for the payload, right? (any finer points about "structured data" that needs to be highlighted?) The logic for TLV support or not is handled differently (header file logic) from SENML/JSON (cmake file logic). I used the pattern from the regular client to adapt the lightclient. Any thoughts on this? |
examples/lightclient/CMakeLists.txt
Outdated
if(LWM2M_VERSION VERSION_GREATER "1.0") | ||
add_definitions(-DLWM2M_SUPPORT_SENML_JSON) | ||
else() | ||
add_definitions(-DLWM2M_SUPPORT_JSON) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TLV will be supported by default for LWM2M 1.0. For a lightweight client I don't think we need to add JSON also.
For LWM2M 1.1 there is no clear default once SENML CBOR support is added. I'm good with having it in the cmake file. This solves it for lightclient and I created #523 for the general case. |
@sbernard31 @sbertin-telular Is this good to merge now? (or shall I remove LWM2M_SUPPORT_JSON for the 1.0 case since the lightclient doesn't have a CLI) |
(I let you decide about this, I merge it as soon as the PR is approved 🙂) |
I'd like to see it removed. It is supposed to be a lightweight example. Adding unnecessary features is counter to that. |
(@qleisan, if you adapt the PR, could you rebase+push force) |
Lightclient example now works out-of-the-box with wakaama server example. Signed-off-by: Leif Sandstrom <[email protected]>
Agree! New version pushed |
Lightclient example now works out-of-the-box with wakaama server example.
Signed-off-by: Leif Sandstrom [email protected]
Wakaama client / server examples should work together after a "vanilla build" to provide a good user experience.