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

Hauke Petersen notifications at github.com
Wed Apr 11 15:11:59 CEST 2018


### Contribution description
Many string-based options (e.g. `COAP_OPT_URI`, `COAP_OPT_LOCATION_PATH`) share a similar structure: they consist of string 'snippets', that are split using some kind of separation character, typically `/`. This PR adds a more generic function for setting and reading these kind of options to `nanocoap`.

Please let me know what you think of this approach - once consensus is reached I will spend the time to add the missing doxygen...

### Issues/PRs references
Follow-up on #8772
You can view, comment on, or merge this pull request online at:

  https://github.com/RIOT-OS/RIOT/pull/8920

-- Commit Summary --

  * net/nanocoap: add generic string option handling
  * unittests/nanocoap: add set and get LOCACTION_PATH

-- File Changes --

    M sys/include/net/nanocoap.h (69)
    M sys/net/application_layer/nanocoap/nanocoap.c (44)
    M tests/unittests/tests-nanocoap/tests-nanocoap.c (12)

-- Patch Links --

https://github.com/RIOT-OS/RIOT/pull/8920.patch
https://github.com/RIOT-OS/RIOT/pull/8920.diff

-- 
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20180411/7cf5800b/attachment-0001.html>


More information about the notifications mailing list