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

[RFC] CoAP API updates for options #9048

Closed
kb2ma opened this issue Apr 29, 2018 · 4 comments
Closed

[RFC] CoAP API updates for options #9048

kb2ma opened this issue Apr 29, 2018 · 4 comments
Labels
Area: CoAP Area: Constrained Application Protocol implementations

Comments

@kb2ma
Copy link
Member

kb2ma commented Apr 29, 2018

Description

Discussion for nanocoap/gcoap API updates to support use of options as defined in #8772. See CoAP API Options Update wiki page for the proposal.

Also see #8920, which triggered the proposal.

@kb2ma
Copy link
Member Author

kb2ma commented May 1, 2018

I just modified the page to require use of coap_opt_finish(), including addition of a parameter to specify that a payload is expected. This addition allows writing the payload marker at this point. Previously, the idea was to maintain the payload marker at all times to avoid use of coap_opt_finish() if no options. I think that approach is too error prone and susceptible to off-by-one.

@kb2ma
Copy link
Member Author

kb2ma commented May 2, 2018

Building up to a WIP PR in my nanocoap/build_request_pkt branch.

@kb2ma
Copy link
Member Author

kb2ma commented May 15, 2018

I just modified the page to remove the 'flags' attribute from coap_pkt_t. Instead, the user requests to sort options via a bitwise parameter in coap_opt_finish(). The addition of the sort function is controlled by a compile time macro.

@kb2ma kb2ma added the Area: CoAP Area: Constrained Application Protocol implementations label May 27, 2018
@kb2ma
Copy link
Member Author

kb2ma commented Oct 18, 2018

This RFC has served its purpose. #9085 implements the API for nanocoap, and #9156, which partially adapts gcoap for the API, is almost complete. CoAP API Options Update wiki page still is valid and useful.

@kb2ma kb2ma closed this as completed Oct 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: CoAP Area: Constrained Application Protocol implementations
Projects
None yet
Development

No branches or pull requests

1 participant