# ExSenml

Toolset to Normalize SenML and other conversion promises  

  SenML is an open ietf standard that defines a format for representing simple sensor
   measurements and device parameters in Sensor Measurement Lists (SenML)
  You can find the spec:
  Becoming more and more used within the IoT Domain, as common used standard for Constrained Application Protocol (CoAP)
  LwM2M 1.0 ( and LwM2M 1.0 uses the actual RFC.

  Also adding support for 

  ## Features

    * (Basic) Normalized format for SenML Records (chapter 4.6 Resolve Records), A SenML Record is referred to as "resolved" if it does not contain
      any base value.
    * (TODO) Support Conversion between diferent representations defined in JavaScript Object Notation (JSON), 
      Concise Binary Object Representation (CBOR), eXtensible Markup Language (XML), and Efficient XML Interchange (EXI), 
      which share the common SenML data model. 

  ## Example 

    iex(1)> senml_payload_rsv_rec_1 = [%{u: "lon", v: 24.30621},%{u: "lat", v: 60.07965}]
    [%{u: "lon", v: 24.30621}, %{u: "lat", v: 60.07965}]
    iex(2)> ExSenml.validate_and_resolve(senml_payload_rsv_rec_1,"1234")
      %{n: "1234", t: 1559984152, u: "lat", v: 60.07965},
      %{n: "1234", t: 1559984152, u: "lon", v: 24.30621}

  ## TODO 

  - [x] Basic record normalization
  - [ ] Validate "n" fields caracters
  - [ ] Convert Beetween formats
  - [ ] Improve Documentation [](
  - [ ] Make the world adopt SenML

## Installation

If [available in Hex](, the package can be installed
by adding `ex_senml` to your list of dependencies in `mix.exs`:

def deps do
    {:ex_senml, "~> 0.0.0"}

Documentation can be generated with [ExDoc](
and published on [HexDocs]( Once published, the docs can
be found at [](