[riot-notifications] [RIOT-OS/RIOT] sys: Add Link Format module (#11189)

Leandro Lanzieri notifications at github.com
Thu Mar 14 18:11:50 CET 2019


### Contribution description
This PR adds a simple [CoRE Link Format](https://tools.ietf.org/html/rfc6690) module to encode and decode strings, together with a set of unit test cases.

It can be used for describing the registered CoAP resources (#11171) or registering them on a resource directory. It can be also useful for parsing the responses when looking up on a resource directory (#10222).

In this PR also the resource listing of gcoap is modified to use some of the basic functionalities of the module. 

### Testing procedure
- Go to `tests/unittests` and run `make tests-link_format test`. For a detailed output add `CFLAGS=-DTESTS_LINK_FORMAT_PRINT`.
- Run any application that uses gcoap and list the resources by sending a GET request to `/.well-known/core`.

### Issues/PRs references
See also #11171
Could be of use in #10222

You can view, comment on, or merge this pull request online at:

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

-- Commit Summary --

  * sys: Add Link format module
  * tests: Add Link format unit tests
  * sys/net/gcoap: Use link format for resource list

-- File Changes --

    M Makefile.dep (1)
    M sys/Makefile.include (4)
    A sys/include/link_format.h (206)
    A sys/link_format/Makefile (3)
    A sys/link_format/include/link_format_internal.h (145)
    A sys/link_format/link_format.c (367)
    M sys/net/application_layer/gcoap/gcoap.c (21)
    A tests/unittests/tests-link_format/Makefile (1)
    A tests/unittests/tests-link_format/Makefile.include (1)
    A tests/unittests/tests-link_format/tests-link_format.c (229)
    A tests/unittests/tests-link_format/tests-link_format.h (43)

-- Patch Links --

https://github.com/RIOT-OS/RIOT/pull/11189.patch
https://github.com/RIOT-OS/RIOT/pull/11189.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/11189
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190314/0f3e9212/attachment.html>


More information about the notifications mailing list