Subject: [core] SenML reference implementation

From: Lennart Dührsen <[email-masked]>
Date: Sun, 19 Jun 2016 20:38:52 +0200

Dear all,

by looking through the mailing list archive I know there are already
some implementations of SenML, yet none of those seem to be public.

I created one for the RIOT operating system [1], and thought you might
be interested. The code can be found at [2], check the folders
sys/include and sys/senml, as well as examples/senml_json. It supports
only JSON for now, but support for CBOR will follow soon. If you want to
follow the discussion around the pull request, check out [3].

SenML has been proven to be very useful to me, and I'm very happy about
this initiative. There is, however, one thing in the current draft
that's bugging me:

The first record of a pack can contain both base information and name,
value, etc. attributes, *or* just the base information. While I
understand the desire for flexibility, I am wondering if this is
necessary. The checks whether regular data will follow the base
information can be cumbersome to implement, so with regard to the
self-proclaimed goal of keeping implementations as small as possible I
suggest to use only one of those options. What do you think?

Kind regards,
Lennart Dührsen

[1] https://riot-os.org/
[2] https://github.com/backenklee/RIOT/tree/senml-experimental
[3] https://github.com/RIOT-OS/RIOT/pull/5544

---

From: Carsten Bormann <[email-masked]>
Date: Sun, 19 Jun 2016 21:06:18 +0200

Hi Lennart,

nice to hear about your implementation efforts (and I can't wait for
your experience with putting CBOR in).

Lennart Dührsen wrote:
> value, etc. attributes, *or* just the base information.

Actually, we fixed that in Buenos Aires:

https://tools.ietf.org/wg/core/minutes?item=minutes-95-core.html

  * Data Formats: WG to adopt SenML (to be confirmed on the mailing
            list).  After a bit of Brownian motion, the WG is now happy
with the
            way the data is formatted in -06 (base record with data, zero or
            more records with more data).  [...]

I can't find an unambiguous statement of this in

https://tools.ietf.org/html/draft-ietf-core-senml-00

but the idea is that the array in a "SenML pack" is a sequence of
measurement records, each with an actual measurement (so records just
with base information are out).  The authors are preparing the update
-01 as we speak, so we should have an opportunity to make this
unambiguous (and fix the examples in 6.1.2 as well).

I would point you to the repository at

https://github.com/core-wg

but that is transitioning at this very moment from its old home

https://github.com/fluffy/senml-spec

to the WG github.

Grüße, Carsten

---

From: Lennart Dührsen <[email-masked]>
Date: Mon, 20 Jun 2016 18:06:27 +0200

Hi Carsten,

>             more records with more data).  [...]

thanks for pointing me to that (and the other links)! I'm happy we agree
on this.

I'll let you know about my experience with CBOR.

Best,
Lennart