Skip to content

Latest commit

 

History

History
45 lines (29 loc) · 1.5 KB

README.md

File metadata and controls

45 lines (29 loc) · 1.5 KB

senml

Travis-CI GoDoc GoReportCard Coverage Status

go get github.com/objenious/senml

Status: stable

This package implements the SenML format (Sensor Measurement Lists, formerly known as Sensor Markup Language), as defined in RFC8428.

This package is used in production on the Objenious LoRaWAN platform, and is maintained.

Warning: a breaking change was introduced in version 1.0.0, with the Record.Version being renamed to Record.BaseVersion.

Encoding/decoding

Encoding to/from JSON and XML is managed by the standard library.

s := senml.Pack{{Name:"foo", Value: senml.Float(32)}}
err := json.NewEncoder(w).Encode(s)
s := senml.Pack{}
err := json.NewDecoder(req.Body).Decode(&s)

TODO

  • CBOR Representation
  • EXI Representation
  • Fragment Identification

Contribution guidelines

Contributions are welcome, as long as :

  • unit tests & comments are included,
  • no external package is added to the top-level package (but allowed in sub-packages).

Licence

MIT - See LICENSE