[riot-notifications] [RIOT-OS/RIOT] net/nanocoap: add generic handling for string-based options (#8920)

Kaspar Schleiser notifications at github.com
Fri Apr 20 10:09:13 CEST 2018


> So how about this for an updated API.

Thinking about this:

```
coap_opt_get_string(pkt, optnum, uint8_t *target, max_len, separator)
coap_opt_put_string(buf, lastonum, optnum, char *source, separator)
```

... the get functions get a packet, the put functions a buffer.
@kb2ma intends to add higher level "put" type functions that work on a pkt, into gcoap. IMO, those can actually reside in nanocoap.

I propose using ```coap_opt_put_<type>_raw()``` for the put functions that write directly into a buffer, then introduce higher-level functions without _raw as described in #8831.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/8920#issuecomment-383018707
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20180420/6342936f/attachment-0001.html>


More information about the notifications mailing list