draft-ietf-core-senml-03.txt   draft-ietf-core-senml-04.txt 
Network Working Group C. Jennings Network Working Group C. Jennings
Internet-Draft Cisco Internet-Draft Cisco
Intended status: Standards Track Z. Shelby Intended status: Standards Track Z. Shelby
Expires: April 10, 2017 ARM Expires: May 4, 2017 ARM
J. Arkko J. Arkko
A. Keranen A. Keranen
Ericsson Ericsson
C. Bormann C. Bormann
Universitaet Bremen TZI Universitaet Bremen TZI
October 7, 2016 October 31, 2016
Media Types for Sensor Markup Language (SenML) Media Types for Sensor Measurement Lists (SenML)
draft-ietf-core-senml-03 draft-ietf-core-senml-04
Abstract Abstract
This specification defines media types for representing simple sensor This specification defines media types for representing simple sensor
measurements and device parameters in the Sensor Markup Language measurements and device parameters in the Sensor Measurement Lists
(SenML). Representations are defined in JavaScript Object Notation (SenML). Representations are defined in JavaScript Object Notation
(JSON), Concise Binary Object Representation (CBOR), eXtensible (JSON), Concise Binary Object Representation (CBOR), eXtensible
Markup Language (XML), and Efficient XML Interchange (EXI), which Markup Language (XML), and Efficient XML Interchange (EXI), which
share the common SenML data model. A simple sensor, such as a share the common SenML data model. A simple sensor, such as a
temperature sensor, could use this media type in protocols such as temperature sensor, could use this media type in protocols such as
HTTP or CoAP to transport the measurements of the sensor or to be HTTP or CoAP to transport the measurements of the sensor or to be
configured. configured.
Status of This Memo Status of This Memo
skipping to change at page 1, line 44 skipping to change at page 1, line 44
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet- working documents as Internet-Drafts. The list of current Internet-
Drafts is at http://datatracker.ietf.org/drafts/current/. Drafts is at http://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress." material or to cite them other than as "work in progress."
This Internet-Draft will expire on April 10, 2017. This Internet-Draft will expire on May 4, 2017.
Copyright Notice Copyright Notice
Copyright (c) 2016 IETF Trust and the persons identified as the Copyright (c) 2016 IETF Trust and the persons identified as the
document authors. All rights reserved. document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents Provisions Relating to IETF Documents
(http://trustee.ietf.org/license-info) in effect on the date of (http://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents publication of this document. Please review these documents
skipping to change at page 2, line 26 skipping to change at page 2, line 26
include Simplified BSD License text as described in Section 4.e of include Simplified BSD License text as described in Section 4.e of
the Trust Legal Provisions and are provided without warranty as the Trust Legal Provisions and are provided without warranty as
described in the Simplified BSD License. described in the Simplified BSD License.
Table of Contents Table of Contents
1. Overview . . . . . . . . . . . . . . . . . . . . . . . . . . 3 1. Overview . . . . . . . . . . . . . . . . . . . . . . . . . . 3
2. Requirements and Design Goals . . . . . . . . . . . . . . . . 4 2. Requirements and Design Goals . . . . . . . . . . . . . . . . 4
3. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 5 3. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 5
4. SenML Structure and Semantics . . . . . . . . . . . . . . . . 5 4. SenML Structure and Semantics . . . . . . . . . . . . . . . . 5
4.1. Base attributes . . . . . . . . . . . . . . . . . . . . . 5 4.1. Base attributes . . . . . . . . . . . . . . . . . . . . . 6
4.2. Regular attributes . . . . . . . . . . . . . . . . . . . 6 4.2. Regular attributes . . . . . . . . . . . . . . . . . . . 6
4.3. Considerations . . . . . . . . . . . . . . . . . . . . . 7 4.3. Considerations . . . . . . . . . . . . . . . . . . . . . 7
4.4. Resolved Records . . . . . . . . . . . . . . . . . . . . 8 4.4. Resolved Records . . . . . . . . . . . . . . . . . . . . 8
4.5. Associating Meta-data . . . . . . . . . . . . . . . . . . 8 4.5. Associating Meta-data . . . . . . . . . . . . . . . . . . 8
5. JSON Representation (application/senml+json) . . . . . . . . 9 5. JSON Representation (application/senml+json) . . . . . . . . 9
5.1. Examples . . . . . . . . . . . . . . . . . . . . . . . . 10 5.1. Examples . . . . . . . . . . . . . . . . . . . . . . . . 10
5.1.1. Single Datapoint . . . . . . . . . . . . . . . . . . 10 5.1.1. Single Datapoint . . . . . . . . . . . . . . . . . . 10
5.1.2. Multiple Datapoints . . . . . . . . . . . . . . . . . 10 5.1.2. Multiple Datapoints . . . . . . . . . . . . . . . . . 10
5.1.3. Multiple Measurements . . . . . . . . . . . . . . . . 11 5.1.3. Multiple Measurements . . . . . . . . . . . . . . . . 11
5.1.4. Resolved Data . . . . . . . . . . . . . . . . . . . . 12 5.1.4. Resolved Data . . . . . . . . . . . . . . . . . . . . 12
5.1.5. Multiple Data Types . . . . . . . . . . . . . . . . . 12 5.1.5. Multiple Data Types . . . . . . . . . . . . . . . . . 13
5.1.6. Collection of Resources . . . . . . . . . . . . . . . 13 5.1.6. Collection of Resources . . . . . . . . . . . . . . . 13
6. CBOR Representation (application/senml+cbor) . . . . . . . . 13 5.1.7. Setting an Actuator . . . . . . . . . . . . . . . . . 14
7. XML Representation (application/senml+xml) . . . . . . . . . 15 6. CBOR Representation (application/senml+cbor) . . . . . . . . 15
8. EXI Representation (application/senml+exi) . . . . . . . . . 17 7. XML Representation (application/senml+xml) . . . . . . . . . 17
9. Usage Considerations . . . . . . . . . . . . . . . . . . . . 20 8. EXI Representation (application/senml+exi) . . . . . . . . . 19
10. CDDL . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 9. Usage Considerations . . . . . . . . . . . . . . . . . . . . 22
11. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 22 10. CDDL . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
11.1. Units Registry . . . . . . . . . . . . . . . . . . . . . 23 11. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 24
11.2. SenML Label Registry . . . . . . . . . . . . . . . . . . 26 11.1. Units Registry . . . . . . . . . . . . . . . . . . . . . 25
11.3. Media Type Registration . . . . . . . . . . . . . . . . 27 11.2. SenML Label Registry . . . . . . . . . . . . . . . . . . 28
11.3.1. senml+json Media Type Registration . . . . . . . . . 27 11.3. Media Type Registration . . . . . . . . . . . . . . . . 29
11.3.2. senml+cbor Media Type Registration . . . . . . . . . 29 11.3.1. senml+json Media Type Registration . . . . . . . . . 29
11.3.3. senml+xml Media Type Registration . . . . . . . . . 29 11.3.2. senml+cbor Media Type Registration . . . . . . . . . 31
11.3.4. senml+exi Media Type Registration . . . . . . . . . 30 11.3.3. senml+xml Media Type Registration . . . . . . . . . 32
11.4. XML Namespace Registration . . . . . . . . . . . . . . . 31 11.3.4. senml+exi Media Type Registration . . . . . . . . . 33
11.5. CoAP Content-Format Registration . . . . . . . . . . . . 31
12. Security Considerations . . . . . . . . . . . . . . . . . . . 32 11.4. XML Namespace Registration . . . . . . . . . . . . . . . 34
13. Privacy Considerations . . . . . . . . . . . . . . . . . . . 32 11.5. CoAP Content-Format Registration . . . . . . . . . . . . 34
14. Acknowledgement . . . . . . . . . . . . . . . . . . . . . . . 32 12. Security Considerations . . . . . . . . . . . . . . . . . . . 35
15. References . . . . . . . . . . . . . . . . . . . . . . . . . 32 13. Privacy Considerations . . . . . . . . . . . . . . . . . . . 35
15.1. Normative References . . . . . . . . . . . . . . . . . . 32 14. Acknowledgement . . . . . . . . . . . . . . . . . . . . . . . 35
15.2. Informative References . . . . . . . . . . . . . . . . . 34 15. References . . . . . . . . . . . . . . . . . . . . . . . . . 35
Appendix A. Links Extension . . . . . . . . . . . . . . . . . . 35 15.1. Normative References . . . . . . . . . . . . . . . . . . 35
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 35 15.2. Informative References . . . . . . . . . . . . . . . . . 37
Appendix A. Links Extension . . . . . . . . . . . . . . . . . . 38
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 38
1. Overview 1. Overview
Connecting sensors to the Internet is not new, and there have been Connecting sensors to the Internet is not new, and there have been
many protocols designed to facilitate it. This specification defines many protocols designed to facilitate it. This specification defines
new media types for carrying simple sensor information in a protocol new media types for carrying simple sensor information in a protocol
such as HTTP or CoAP. This format was designed so that processors such as HTTP or CoAP. This format was designed so that processors
with very limited capabilities could easily encode a sensor with very limited capabilities could easily encode a sensor
measurement into the media type, while at the same time a server measurement into the media type, while at the same time a server
parsing the data could relatively efficiently collect a large number parsing the data could relatively efficiently collect a large number
skipping to change at page 3, line 45 skipping to change at page 3, line 47
discovered by other methods such as using the CoRE Link Format discovered by other methods such as using the CoRE Link Format
[RFC6690]. [RFC6690].
SenML is defined by a data model for measurements and simple meta- SenML is defined by a data model for measurements and simple meta-
data about measurements and devices. The data is structured as a data about measurements and devices. The data is structured as a
single array that contains a series of SenML Records which can each single array that contains a series of SenML Records which can each
contain attributes such as an unique identifier for the sensor, the contain attributes such as an unique identifier for the sensor, the
time the measurement was made, the unit the measurement is in, and time the measurement was made, the unit the measurement is in, and
the current value of the sensor. Serializations for this data model the current value of the sensor. Serializations for this data model
are defined for JSON [RFC7159], CBOR [RFC7049], XML, and Efficient are defined for JSON [RFC7159], CBOR [RFC7049], XML, and Efficient
XML Interchange (EXI) [W3C.REC-exi-20110310]. XML Interchange (EXI) [W3C.REC-exi-20140211].
For example, the following shows a measurement from a temperature For example, the following shows a measurement from a temperature
gauge encoded in the JSON syntax. gauge encoded in the JSON syntax.
[ [
{"n":"urn:dev:ow:10e2073a01080063","u":"Cel","v":23.1} {"n":"urn:dev:ow:10e2073a01080063","u":"Cel","v":23.1}
] ]
In the example above, the array has a single SenML Record with a In the example above, the array has a single SenML Record with a
measurement for a sensor named "urn:dev:ow:10e2073a01080063" with a measurement for a sensor named "urn:dev:ow:10e2073a01080063" with a
skipping to change at page 4, line 37 skipping to change at page 4, line 37
where the sensor itself sends just a single data item at a time. The where the sensor itself sends just a single data item at a time. The
multiple measurements could be from multiple related sensors or from multiple measurements could be from multiple related sensors or from
the same sensor but at different times. the same sensor but at different times.
The basic design is an array with a series of measurements. The The basic design is an array with a series of measurements. The
following example shows two measurements made at different times. following example shows two measurements made at different times.
The value of a measurement is in the "v" tag, the time of a The value of a measurement is in the "v" tag, the time of a
measurement is in the "t" tag, the "n" tag has a unique sensor name, measurement is in the "t" tag, the "n" tag has a unique sensor name,
and the unit of the measurement is carried in the "u" tag. and the unit of the measurement is carried in the "u" tag.
[ [
{"n":"urn:dev:ow:10e2073a01080063","u":"Cel","t":1.276020076e+09,"v":23.5}, {"n":"urn:dev:ow:10e2073a01080063","u":"Cel","t":1.276020076e+09,
{"n":"urn:dev:ow:10e2073a01080063","u":"Cel","t":1.276020091e+09,"v":23.6} "v":23.5},
] {"n":"urn:dev:ow:10e2073a01080063","u":"Cel","t":1.276020091e+09,
"v":23.6}
]
To keep the messages small, it does not make sense to repeat the "n" To keep the messages small, it does not make sense to repeat the "n"
tag in each SenML Record so there is a concept of a Base Name which tag in each SenML Record so there is a concept of a Base Name which
is simply a string that is prepended to the Name field of all is simply a string that is prepended to the Name field of all
elements in that record and any records that follow it. So a more elements in that record and any records that follow it. So a more
compact form of the example above is the following. compact form of the example above is the following.
[ [
{"bn":"urn:dev:ow:10e2073a01080063","u":"Cel","t":1.276020076e+09,"v":23.5}, {"bn":"urn:dev:ow:10e2073a01080063","u":"Cel","t":1.276020076e+09,
{"u":"Cel","t":1.276020091e+09,"v":23.6} "v":23.5},
] {"u":"Cel","t":1.276020091e+09,
"v":23.6}
]
In the above example the Base Name is in the "bn" tag and the "n" In the above example the Base Name is in the "bn" tag and the "n"
tags in each Record are the empty string so they are omitted. tags in each Record are the empty string so they are omitted.
Some devices have accurate time while others do not so SenML supports Some devices have accurate time while others do not so SenML supports
absolute and relative times. Time is represented in floating point absolute and relative times. Time is represented in floating point
as seconds and values greater than zero represent an absolute time as seconds and values greater than zero represent an absolute time
relative to the Unix epoch while values of 0 or less represent a relative to the Unix epoch while values of 0 or less represent a
relative time in the past from the current time. A simple sensor relative time in the past from the current time. A simple sensor
with no absolute wall clock time might take a measurement every with no absolute wall clock time might take a measurement every
second and batch up 60 of them then send it to a server. It would second and batch up 60 of them then send it to a server. It would
skipping to change at page 10, line 22 skipping to change at page 10, line 25
[ [
{"n":"urn:dev:ow:10e2073a01080063","u":"Cel","v":23.1} {"n":"urn:dev:ow:10e2073a01080063","u":"Cel","v":23.1}
] ]
5.1.2. Multiple Datapoints 5.1.2. Multiple Datapoints
The following example shows voltage and current now, i.e., at an The following example shows voltage and current now, i.e., at an
unspecified time. unspecified time.
[ [
{"bn":"urn:dev:ow:10e2073a01080063","n":"voltage","u":"V","v":120.1}, {"bn":"urn:dev:ow:10e2073a01080063;","n":"voltage","u":"V","v":120.1},
{"n":"current","u":"A","v":1.2} {"n":"current","u":"A","v":1.2}
] ]
The next example is similar to the above one, but shows current at The next example is similar to the above one, but shows current at
Tue Jun 8 18:01:16.001 UTC 2010 and at each second for the previous 5 Tue Jun 8 18:01:16.001 UTC 2010 and at each second for the previous 5
seconds. seconds.
[ [
{"bn":"urn:dev:ow:10e2073a01080063/","bt":1.276020076001e+09,"bu":"A","bver":5, {"bn":"urn:dev:ow:10e2073a0108006;","bt":1.276020076001e+09,
"n":"voltage","u":"V","v":120.1}, "bu":"A","bver":5,
{"n":"current","t":-5,"v":1.2}, "n":"voltage","u":"V","v":120.1},
{"n":"current","t":-4,"v":1.3}, {"n":"current","t":-5,"v":1.2},
{"n":"current","t":-3,"v":1.4}, {"n":"current","t":-4,"v":1.3},
{"n":"current","t":-2,"v":1.5}, {"n":"current","t":-3,"v":1.4},
{"n":"current","t":-1,"v":1.6}, {"n":"current","t":-2,"v":1.5},
{"n":"current","v":1.7} {"n":"current","t":-1,"v":1.6},
] {"n":"current","v":1.7}
]
Note that in some usage scenarios of SenML the implementations MAY Note that in some usage scenarios of SenML the implementations MAY
store or transmit SenML in a stream-like fashion, where data is store or transmit SenML in a stream-like fashion, where data is
collected over time and continuously added to the object. This mode collected over time and continuously added to the object. This mode
of operation is optional, but systems or protocols using SenML in of operation is optional, but systems or protocols using SenML in
this fashion MUST specify that they are doing this. SenML defines a this fashion MUST specify that they are doing this. SenML defines a
separate media type to indicate Sensor Streaming Markup Language separate media type to indicate Sensor Streaming Measurement Lists
(SensML) for this usage (see Section 11.3.1). In this situation the (SensML) for this usage (see Section 11.3.1). In this situation the
SensML stream can be sent and received in a partial fashion, i.e., a SensML stream can be sent and received in a partial fashion, i.e., a
measurement entry can be read as soon as the SenML Record is received measurement entry can be read as soon as the SenML Record is received
and not have to wait for the full SensML Stream to be complete. and not have to wait for the full SensML Stream to be complete.
For instance, the following stream of measurements may be sent via a For instance, the following stream of measurements may be sent via a
long lived HTTP POST from the producer of a SensML to the consumer of long lived HTTP POST from the producer of a SensML to the consumer of
that, and each measurement object may be reported at the time it was that, and each measurement object may be reported at the time it was
measured: measured:
[ [
{"bn":"urn:dev:ow:10e2073a01080063","bt":1.320067464e+09,"bu":"%RH","v":21.2}, {"bn":"urn:dev:ow:10e2073a01080063","bt":1.320067464e+09,
{"t":10,"v":21.3}, "bu":"%RH","v":21.2},
{"t":20,"v":21.4}, {"t":10,"v":21.3},
{"t":30,"v":21.4}, {"t":20,"v":21.4},
{"t":40,"v":21.5}, {"t":30,"v":21.4},
{"t":50,"v":21.5}, {"t":40,"v":21.5},
{"t":60,"v":21.5}, {"t":50,"v":21.5},
{"t":70,"v":21.6}, {"t":60,"v":21.5},
{"t":80,"v":21.7}, {"t":70,"v":21.6},
{"t":90,"v":21.5}, {"t":80,"v":21.7},
... ...
5.1.3. Multiple Measurements 5.1.3. Multiple Measurements
The following example shows humidity measurements from a mobile The following example shows humidity measurements from a mobile
device with a 1-wire address 10e2073a01080063, starting at Mon Oct 31 device with a 1-wire address 10e2073a01080063, starting at Mon Oct 31
13:24:24 UTC 2011. The device also provides position data, which is 13:24:24 UTC 2011. The device also provides position data, which is
provided in the same measurement or parameter array as separate provided in the same measurement or parameter array as separate
entries. Note time is used to for correlating data that belongs entries. Note time is used to for correlating data that belongs
together, e.g., a measurement and a parameter associated with it. together, e.g., a measurement and a parameter associated with it.
Finally, the device also reports extra data about its battery status Finally, the device also reports extra data about its battery status
at a separate time. at a separate time.
[ [
{"bn":"urn:dev:ow:10e2073a01080063","bt":1.320067464e+09,"bu":"%RH","v":20}, {"bn":"urn:dev:ow:10e2073a01080063","bt":1.320067464e+09,
{"u":"lon","v":24.30621}, "bu":"%RH","v":20},
{"u":"lat","v":60.07965}, {"u":"lon","v":24.30621},
{"t":60,"v":20.3}, {"u":"lat","v":60.07965},
{"u":"lon","t":60,"v":24.30622}, {"t":60,"v":20.3},
{"u":"lat","t":60,"v":60.07965}, {"u":"lon","t":60,"v":24.30622},
{"t":120,"v":20.7}, {"u":"lat","t":60,"v":60.07965},
{"u":"lon","t":120,"v":24.30623}, {"t":120,"v":20.7},
{"u":"lat","t":120,"v":60.07966}, {"u":"lon","t":120,"v":24.30623},
{"u":"%EL","t":150,"v":98}, {"u":"lat","t":120,"v":60.07966},
{"t":180,"v":21.2}, {"u":"%EL","t":150,"v":98},
{"u":"lon","t":180,"v":24.30628}, {"t":180,"v":21.2},
{"u":"lat","t":180,"v":60.07967} {"u":"lon","t":180,"v":24.30628},
] {"u":"lat","t":180,"v":60.07967}
]
The size of this example represented in various forms, as well as The size of this example represented in various forms, as well as
that form compressed with gzip is given in the following table. that form compressed with gzip is given in the following table.
+----------+------+-----------------+ +----------+------+-----------------+
| Encoding | Size | Compressed Size | | Encoding | Size | Compressed Size |
+----------+------+-----------------+ +----------+------+-----------------+
| JSON | 573 | 206 | | JSON | 573 | 206 |
| XML | 649 | 235 | | XML | 649 | 235 |
| CBOR | 254 | 196 | | CBOR | 254 | 196 |
| EXI | 173 | 196 | | EXI | 174 | 197 |
+----------+------+-----------------+ +----------+------+-----------------+
Table 2: Size Comparisons Table 2: Size Comparisons
Note the EXI sizes are not using the schema guidance so the EXI Note the EXI sizes are not using the schema guidance so the EXI
representation could be a bit smaller. representation could be a bit smaller.
5.1.4. Resolved Data 5.1.4. Resolved Data
The following shows the example from the previous section show in The following shows the example from the previous section show in
resolved format. resolved format.
[ [
{"n":"urn:dev:ow:10e2073a01080063","u":"%RH","t":1.320067464e+09,"v":20}, {"n":"urn:dev:ow:10e2073a01080063","u":"%RH","t":1.320067464e+09,
{"n":"urn:dev:ow:10e2073a01080063","u":"lon","t":1.320067464e+09,"v":24.30621}, "v":20},
{"n":"urn:dev:ow:10e2073a01080063","u":"lat","t":1.320067464e+09,"v":60.07965}, {"n":"urn:dev:ow:10e2073a01080063","u":"lon","t":1.320067464e+09,
{"n":"urn:dev:ow:10e2073a01080063","u":"%RH","t":1.320067524e+09,"v":20.3}, "v":24.30621},
{"n":"urn:dev:ow:10e2073a01080063","u":"lon","t":1.320067524e+09,"v":24.30622}, {"n":"urn:dev:ow:10e2073a01080063","u":"lat","t":1.320067464e+09,
{"n":"urn:dev:ow:10e2073a01080063","u":"lat","t":1.320067524e+09,"v":60.07965}, "v":60.07965},
{"n":"urn:dev:ow:10e2073a01080063","u":"%RH","t":1.320067584e+09,"v":20.7}, {"n":"urn:dev:ow:10e2073a01080063","u":"%RH","t":1.320067524e+09,
{"n":"urn:dev:ow:10e2073a01080063","u":"lon","t":1.320067584e+09,"v":24.30623}, "v":20.3},
{"n":"urn:dev:ow:10e2073a01080063","u":"lat","t":1.320067584e+09,"v":60.07966}, {"n":"urn:dev:ow:10e2073a01080063","u":"lon","t":1.320067524e+09,
{"n":"urn:dev:ow:10e2073a01080063","u":"%EL","t":1.320067614e+09,"v":98}, "v":24.30622},
{"n":"urn:dev:ow:10e2073a01080063","u":"%RH","t":1.320067644e+09,"v":21.2}, {"n":"urn:dev:ow:10e2073a01080063","u":"lat","t":1.320067524e+09,
{"n":"urn:dev:ow:10e2073a01080063","u":"lon","t":1.320067644e+09,"v":24.30628}, "v":60.07965},
{"n":"urn:dev:ow:10e2073a01080063","u":"lat","t":1.320067644e+09,"v":60.07967} {"n":"urn:dev:ow:10e2073a01080063","u":"%RH","t":1.320067584e+09,
] "v":20.7},
{"n":"urn:dev:ow:10e2073a01080063","u":"lon","t":1.320067584e+09,
"v":24.30623},
{"n":"urn:dev:ow:10e2073a01080063","u":"lat","t":1.320067584e+09,
"v":60.07966},
{"n":"urn:dev:ow:10e2073a01080063","u":"%EL","t":1.320067614e+09,
"v":98},
{"n":"urn:dev:ow:10e2073a01080063","u":"%RH","t":1.320067644e+09,
"v":21.2},
{"n":"urn:dev:ow:10e2073a01080063","u":"lon","t":1.320067644e+09,
"v":24.30628},
{"n":"urn:dev:ow:10e2073a01080063","u":"lat","t":1.320067644e+09,
"v":60.07967}
]
5.1.5. Multiple Data Types 5.1.5. Multiple Data Types
The following example shows a sensor that returns different data The following example shows a sensor that returns different data
types. types.
[ [
{"bn":"urn:dev:ow:10e2073a01080063-","n":"temp","u":"Cel","v":23.1}, {"bn":"urn:dev:ow:10e2073a01080063;","n":"temp","u":"Cel","v":23.1},
{"n":"label","vs":"Machine Room"}, {"n":"label","vs":"Machine Room"},
{"n":"open","vb":false}, {"n":"open","vb":false},
{"n":"nfv-reader","vd":"aGkgCg=="} {"n":"nfv-reader","vd":"aGkgCg=="}
] ]
5.1.6. Collection of Resources 5.1.6. Collection of Resources
The following example shows how to query one device that can provide The following example shows how to query one device that can provide
multiple measurements. The example assumes that a client has fetched multiple measurements. The example assumes that a client has fetched
information from a device at 2001:db8::2 by performing a GET information from a device at 2001:db8::2 by performing a GET
operation on http://[2001:db8::2] at Mon Oct 31 16:27:09 UTC 2011, operation on http://[2001:db8::2] at Mon Oct 31 16:27:09 UTC 2011,
and has gotten two separate values as a result, a temperature and and has gotten two separate values as a result, a temperature and
humidity measurement. humidity measurement.
[ [
{"bn":"http://[2001:db8::2]/","bt":1.320078429e+09,"bver":5,"n":"temperature", {"bn":"http://[2001:db8::2]/","bt":1.320078429e+09,
"u":"Cel","v":27.2}, "n":"temperature","u":"Cel","v":27.2},
{"n":"humidity", {"n":"humidity","u":"%RH","v":80}
"u":"%RH","v":80} ]
]
5.1.7. Setting an Actuator
The following example show the SenML that could be used to set the
current set point of a typical residential thermostat which has a
temperature set point, a switch to turn on and off the heat, and a
switch to turn on the fan override.
[
{"bn":"urn:dev:ow:10e2073a01080063;"},
{"n":"temp","u":"Cel","v":23.1},
{"n":"heat","u":"/","v":1},
{"n":"fan","u":"/","v":0}
]
In the following example two different lights are turned on. It is
assumed that the lights are on a 802.1BA network that can guarantee
delivery of the messages to the two lights within 15 ms and uses
802.1AS for time synchronization. The controller has set the time of
the lights coming on to 20 ms in the future from the current time.
This allows both lights to receive the message, wait till that time,
then apply the switch command so that both lights come on at the same
time.
[
{"bt":1.320078429e+09,"bu":"/","n":"http://[2001:db8::3]/","v":1},
{"n":"http://[2001:db8::4]/","v":1}
]
The following shows two lights being turned off using a non
deterministic network that has a high odds of delivering a message in
less than 100 ms and uses NTP for time synchronization. The current
time is 1320078429. The user has just turned off a light switch
which is turning off two lights. Both lights are dimmed to 50%
brightness immediately to give the user instant feedback that
something is changing. However given the network, the lights will
probably dim at somewhat different times. Then 100 ms in the future,
both lights will go off at the same time. The instant but not
synchronized dimming gives the user the sensation of quick responses
and the timed off 100 ms in the future gives the perception of both
lights going off at the same time.
[
{"bt":1.320078429e+09,"bu":"/","n":"http://[2001:db8::3]/","v":0.5},
{"n":"http://[2001:db8::4]/","v":0.5},
{"n":"http://[2001:db8::3]/","t":0.1,"v":0},
{"n":"http://[2001:db8::4]/","t":0.1,"v":0}
]
6. CBOR Representation (application/senml+cbor) 6. CBOR Representation (application/senml+cbor)
The CBOR [RFC7049] representation is equivalent to the JSON The CBOR [RFC7049] representation is equivalent to the JSON
representation, with the following changes: representation, with the following changes:
o For JSON Numbers, the CBOR representation can use integers, o For JSON Numbers, the CBOR representation can use integers,
floating point numbers, or decimal fractions (CBOR Tag 4); however floating point numbers, or decimal fractions (CBOR Tag 4); however
a representation SHOULD be chosen such that when the CBOR value is a representation SHOULD be chosen such that when the CBOR value is
converted back to an IEEE double precision floating point value, converted back to an IEEE double precision floating point value,
it has exactly the same value as the original Number. For the it has exactly the same value as the original Number. For the
version number, only an unsigned integer is allowed. version number, only an unsigned integer is allowed.
o Characters in the String Value are encoded using a definite length o Characters in the String Value are encoded using a definite length
text string (type 3). Octets in the Data Value are encoded using text string (type 3). Octets in the Data Value are encoded using
a definite length byte string (type 2) . a definite length byte string (type 2) .
o For compactness, the CBOR representation uses integers for the map o For compactness, the CBOR representation uses integers for the map
keys defined in Table 3. This table is conclusive, i.e., there is keys defined in Table 3. This table is conclusive, i.e., there is
no intention to define any additional integer map keys; any no intention to define any additional integer map keys; any
extensions will use string map keys. extensions will use string map keys. This allows translators
converting between CBOR and JSON representations to convert also
all future labels without needing to update implementations.
+---------------+-------+------------+ +---------------+-------+------------+
| Name | Label | CBOR Label | | Name | Label | CBOR Label |
+---------------+-------+------------+ +---------------+-------+------------+
| Version | bver | -1 | | Version | bver | -1 |
| Base Name | bn | -2 | | Base Name | bn | -2 |
| Base Time | bt | -3 | | Base Time | bt | -3 |
| Base Units | bu | -4 | | Base Units | bu | -4 |
| Base Value | bv | -5 | | Base Value | bv | -5 |
| Base Sum | bs | -6 | | Base Sum | bs | -6 |
skipping to change at page 14, line 35 skipping to change at page 16, line 35
Table 3: CBOR representation: integers for map keys Table 3: CBOR representation: integers for map keys
o For streaming SensML in CBOR representation, the array containing o For streaming SensML in CBOR representation, the array containing
the records SHOULD be an CBOR indefinite length array while for the records SHOULD be an CBOR indefinite length array while for
non streaming SenML, a definite length array MUST be used. non streaming SenML, a definite length array MUST be used.
The following example shows a dump of the CBOR example for the same The following example shows a dump of the CBOR example for the same
sensor measurement as in Section 5.1.2. sensor measurement as in Section 5.1.2.
0000 87 a7 21 78 1c 75 72 6e 3a 64 65 76 3a 6f 77 3a |..!x.urn:dev:ow:| 0000 87 a7 21 78 1b 75 72 6e 3a 64 65 76 3a 6f 77 3a |..!x.urn:dev:ow:|
0010 31 30 65 32 30 37 33 61 30 31 30 38 30 30 36 33 |10e2073a01080063| 0010 31 30 65 32 30 37 33 61 30 31 30 38 30 30 36 3b |10e2073a0108006;|
0020 2f 22 fb 41 d3 03 a1 5b 00 10 62 23 61 41 20 05 |/".A...[..b#aA .| 0020 22 fb 41 d3 03 a1 5b 00 10 62 23 61 41 20 05 00 |".A...[..b#aA ..|
0030 00 67 76 6f 6c 74 61 67 65 01 61 56 02 fb 40 5e |.gvoltage.aV..@^| 0030 67 76 6f 6c 74 61 67 65 01 61 56 02 fb 40 5e 06 |gvoltage.aV..@^.|
0040 06 66 66 66 66 66 a3 00 67 63 75 72 72 65 6e 74 |.fffff..gcurrent| 0040 66 66 66 66 66 a3 00 67 63 75 72 72 65 6e 74 06 |fffff..gcurrent.|
0050 06 24 02 fb 3f f3 33 33 33 33 33 33 a3 00 67 63 |.$..?.333333..gc| 0050 24 02 fb 3f f3 33 33 33 33 33 33 a3 00 67 63 75 |$..?.333333..gcu|
0060 75 72 72 65 6e 74 06 23 02 fb 3f f4 cc cc cc cc |urrent.#..?.....| 0060 72 72 65 6e 74 06 23 02 fb 3f f4 cc cc cc cc cc |rrent.#..?......|
0070 cc cd a3 00 67 63 75 72 72 65 6e 74 06 22 02 fb |....gcurrent."..| 0070 cd a3 00 67 63 75 72 72 65 6e 74 06 22 02 fb 3f |...gcurrent."..?|
0080 3f f6 66 66 66 66 66 66 a3 00 67 63 75 72 72 65 |?.ffffff..gcurre| 0080 f6 66 66 66 66 66 66 a3 00 67 63 75 72 72 65 6e |.ffffff..gcurren|
0090 6e 74 06 21 02 f9 3e 00 a3 00 67 63 75 72 72 65 |nt.!..>...gcurre| 0090 74 06 21 02 f9 3e 00 a3 00 67 63 75 72 72 65 6e |t.!..>...gcurren|
00a0 6e 74 06 20 02 fb 3f f9 99 99 99 99 99 9a a3 00 |nt. ..?.........| 00a0 74 06 20 02 fb 3f f9 99 99 99 99 99 9a a3 00 67 |t. ..?.........g|
00b0 67 63 75 72 72 65 6e 74 06 00 02 fb 3f fb 33 33 |gcurrent....?.33| 00b0 63 75 72 72 65 6e 74 06 00 02 fb 3f fb 33 33 33 |current....?.333|
00c0 33 33 33 33 |3333| 00c0 33 33 33 |333|
00c4 00c3
7. XML Representation (application/senml+xml) 7. XML Representation (application/senml+xml)
A SenML Pack or Stream can also be represented in XML format as A SenML Pack or Stream can also be represented in XML format as
defined in this section. defined in this section.
Only the UTF-8 form of XML is allowed. Characters in the String Only the UTF-8 form of XML is allowed. Characters in the String
Value are encoded using the escape sequences defined in [RFC7159]. Value are encoded using the escape sequences defined in [RFC7159].
Octets in the Data Value are base64 encoded with URL safe alphabet as Octets in the Data Value are base64 encoded with URL safe alphabet as
defined in Section 5 of [RFC4648]. defined in Section 5 of [RFC4648].
The following example shows an XML example for the same sensor The following example shows an XML example for the same sensor
measurement as in Section 5.1.2. measurement as in Section 5.1.2.
<sensml xmlns="urn:ietf:params:xml:ns:senml"> <sensml xmlns="urn:ietf:params:xml:ns:senml">
<senml bn="urn:dev:ow:10e2073a01080063/" bt="1.276020076001e+09" <senml bn="urn:dev:ow:10e2073a0108006;" bt="1.276020076001e+09"
bu="A" bver="5" n="voltage" u="V" v="120.1"></senml> bu="A" bver="5" n="voltage" u="V" v="120.1"></senml>
<senml n="current" t="-5" v="1.2"></senml> <senml n="current" t="-5" v="1.2"></senml>
<senml n="current" t="-4" v="1.3"></senml> <senml n="current" t="-4" v="1.3"></senml>
<senml n="current" t="-3" v="1.4"></senml> <senml n="current" t="-3" v="1.4"></senml>
<senml n="current" t="-2" v="1.5"></senml> <senml n="current" t="-2" v="1.5"></senml>
<senml n="current" t="-1" v="1.6"></senml> <senml n="current" t="-1" v="1.6"></senml>
<senml n="current" v="1.7"></senml> <senml n="current" v="1.7"></senml>
</sensml> </sensml>
The SenML Stream is represented as a sensml tag that contains a The SenML Stream is represented as a sensml tag that contains a
skipping to change at page 18, line 21 skipping to change at page 20, line 21
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified" elementFormDefault="qualified"
targetNamespace="urn:ietf:params:xml:ns:senml" targetNamespace="urn:ietf:params:xml:ns:senml"
xmlns:ns1="urn:ietf:params:xml:ns:senml"> xmlns:ns1="urn:ietf:params:xml:ns:senml">
<xs:element name="senml"> <xs:element name="senml">
<xs:complexType> <xs:complexType>
<xs:attribute name="bn" type="xs:string" /> <xs:attribute name="bn" type="xs:string" />
<xs:attribute name="bt" type="xs:double" /> <xs:attribute name="bt" type="xs:double" />
<xs:attribute name="bv" type="xs:double" /> <xs:attribute name="bv" type="xs:double" />
<xs:attribute name="bs" type="xs:double" />
<xs:attribute name="bu" type="xs:string" /> <xs:attribute name="bu" type="xs:string" />
<xs:attribute name="bver" type="xs:int" /> <xs:attribute name="bver" type="xs:int" />
<xs:attribute name="l" type="xs:string" /> <xs:attribute name="l" type="xs:string" />
<xs:attribute name="n" type="xs:string" /> <xs:attribute name="n" type="xs:string" />
<xs:attribute name="s" type="xs:double" /> <xs:attribute name="s" type="xs:double" />
<xs:attribute name="t" type="xs:double" /> <xs:attribute name="t" type="xs:double" />
<xs:attribute name="u" type="xs:string" /> <xs:attribute name="u" type="xs:string" />
<xs:attribute name="ut" type="xs:double" /> <xs:attribute name="ut" type="xs:double" />
<xs:attribute name="v" type="xs:double" /> <xs:attribute name="v" type="xs:double" />
<xs:attribute name="vb" type="xs:boolean" /> <xs:attribute name="vb" type="xs:boolean" />
skipping to change at page 19, line 6 skipping to change at page 21, line 6
</xs:sequence> </xs:sequence>
</xs:complexType> </xs:complexType>
</xs:element> </xs:element>
</xs:schema> </xs:schema>
The following shows a hexdump of the EXI produced from encoding the The following shows a hexdump of the EXI produced from encoding the
following XML example. Note this example is the same information as following XML example. Note this example is the same information as
the first example in Section 5.1.2 in JSON format. the first example in Section 5.1.2 in JSON format.
<sensml xmlns="urn:ietf:params:xml:ns:senml"> <sensml xmlns="urn:ietf:params:xml:ns:senml">
<senml bn="urn:dev:ow:10e2073a01080063" n="voltage" u="V" <senml bn="urn:dev:ow:10e2073a01080063;" n="voltage" u="V"
v="120.1"></senml> v="120.1"></senml>
<senml n="current" u="A" v="1.2"></senml> <senml n="current" u="A" v="1.2"></senml>
</sensml> </sensml>
Which compresses with EXI to the following displayed in hexdump: Which compresses with EXI to the following displayed in hexdump:
0000 a0 30 3d cd 95 b9 b5 b0 b9 9d 95 b8 b9 e1 cd 90 |.0=.............| 0000 a0 30 3d cd 95 b9 b5 b0 b9 9d 95 b8 b9 e1 cd 90 |.0=.............|
0010 80 eb ab 93 71 d3 23 2b b1 d3 7b b9 d1 89 83 29 |....q.#+..{....)| 0010 80 79 d5 c9 b8 e9 91 95 d8 e9 bd dc e8 c4 c1 94 |.y..............|
0020 91 81 b9 9b 09 81 89 81 c1 81 81 b1 9a 04 bb 37 |...............7| 0020 c8 c0 dc cd 84 c0 c4 c0 e0 c0 c0 d8 cc ed 82 5d |...............]|
0030 b6 3a 30 b3 b2 90 1a b1 58 84 c0 32 84 b1 ba b9 |.:0.....X..2....| 0030 9b db 1d 18 59 d9 48 0d 58 ac 42 60 18 e1 2c 6e |....Y.H.X.B`..,n|
0040 39 32 b7 3a 10 1a 09 06 40 38 |92.:....@8| 0040 ae 4e 4c ad ce 84 06 82 41 90 0e |.NL.....A..|
004a 004b
The above example used the bit packed form of EXI but it is also The above example used the bit packed form of EXI but it is also
possible to use a byte packed form of EXI which can makes it easier possible to use a byte packed form of EXI which can makes it easier
for a simple sensor to produce valid EXI without really implementing for a simple sensor to produce valid EXI without really implementing
EXI. Consider the example of a temperature sensor that produces a EXI. Consider the example of a temperature sensor that produces a
value in tenths of degrees Celsius over a range of 0.0 to 55.0. It value in tenths of degrees Celsius over a range of 0.0 to 55.0. It
would produce an XML SenML file such as: would produce an XML SenML file such as:
<sensml xmlns="urn:ietf:params:xml:ns:senml"> <sensml xmlns="urn:ietf:params:xml:ns:senml">
<senml n="urn:dev:ow:10e2073a01080063" u="Cel" v="23.1"></senml> <senml n="urn:dev:ow:10e2073a01080063" u="Cel" v="23.1"></senml>
</sensml> </sensml>
The compressed form, using the byte alignment option of EXI, for the The compressed form, using the byte alignment option of EXI, for the
above XML is the following: above XML is the following:
0000 a0 00 48 81 ee 6c ad cd ad 85 cc ec ad c5 cf 0e |..H..l..........| 0000 a0 00 48 81 ee 6c ad cd ad 85 cc ec ad c5 cf 0e |..H..l..........|
0010 6c 80 01 05 1d 75 72 6e 3a 64 65 76 3a 6f 77 3a |l....urn:dev:ow:| 0010 6c 80 01 07 1d 75 72 6e 3a 64 65 76 3a 6f 77 3a |l....urn:dev:ow:|
0020 31 30 65 32 30 37 33 61 30 31 30 38 30 30 36 33 |10e2073a01080063| 0020 31 30 65 32 30 37 33 61 30 31 30 38 30 30 36 33 |10e2073a01080063|
0030 02 05 43 65 6c 01 00 e7 01 01 00 03 01 |..Cel........| 0030 02 05 43 65 6c 01 00 e7 01 01 00 03 01 |..Cel........|
003d 003d
A small temperature sensor devices that only generates this one EXI A small temperature sensor devices that only generates this one EXI
file does not really need an full EXI implementation. It can simply file does not really need an full EXI implementation. It can simply
hard code the output replacing the 1-wire device ID starting at byte hard code the output replacing the 1-wire device ID starting at byte
0x20 and going to byte 0x2F with it's device ID, and replacing the 0x20 and going to byte 0x2F with it's device ID, and replacing the
value "0xe7 0x01" at location 0x37 and 0x38 with the current value "0xe7 0x01" at location 0x37 and 0x38 with the current
temperature. The EXI Specification [W3C.REC-exi-20110310] contains temperature. The EXI Specification [W3C.REC-exi-20140211] contains
the full information 'on how floating point numbers are represented, the full information 'on how floating point numbers are represented,
but for the purpose of this sensor, the temperature can be converted but for the purpose of this sensor, the temperature can be converted
to an integer in tenths of degrees (231 in this example). EXI stores to an integer in tenths of degrees (231 in this example). EXI stores
7 bits of the integer in each byte with the top bit set to one if 7 bits of the integer in each byte with the top bit set to one if
there are further bytes. So the first bytes at is set to low 7 bits there are further bytes. So the first bytes at is set to low 7 bits
of the integer temperature in tenths of degrees plus 0x80. In this of the integer temperature in tenths of degrees plus 0x80. In this
example 231 & 0x7F + 0x80 = 0xE7. The second byte is set to the example 231 & 0x7F + 0x80 = 0xE7. The second byte is set to the
integer temperature in tenths of degrees right shifted 7 bits. In integer temperature in tenths of degrees right shifted 7 bits. In
this example 231 >> 7 = 0x01. this example 231 >> 7 = 0x01.
skipping to change at page 27, line 40 skipping to change at page 29, line 40
IANA table to have their ID set to this new schemaID value. IANA table to have their ID set to this new schemaID value.
11.3. Media Type Registration 11.3. Media Type Registration
The following registrations are done following the procedure The following registrations are done following the procedure
specified in [RFC6838] and [RFC7303]. specified in [RFC6838] and [RFC7303].
Note to RFC Editor - please remove this paragraph. Note that a Note to RFC Editor - please remove this paragraph. Note that a
request for media type review for senml+json was sent to the media- request for media type review for senml+json was sent to the media-
types@iana.org on Sept 21, 2010. A second request for all the types types@iana.org on Sept 21, 2010. A second request for all the types
was sent on TODO. was sent on October 7, 2016.
11.3.1. senml+json Media Type Registration 11.3.1. senml+json Media Type Registration
Type name: application Type name: application
Subtype name: senml+json and sensml+json Subtype name: senml+json and sensml+json
Required parameters: none Required parameters: none
Optional parameters: none Optional parameters: none
skipping to change at page 29, line 15 skipping to change at page 31, line 15
11.3.2. senml+cbor Media Type Registration 11.3.2. senml+cbor Media Type Registration
Type name: application Type name: application
Subtype name: senml+cbor and sensml+cbor Subtype name: senml+cbor and sensml+cbor
Required parameters: none Required parameters: none
Optional parameters: none Optional parameters: none
Encoding considerations: TBD Encoding considerations: Must be encoded as using [RFC7049]. See
RFC-AAAA for details.
Security considerations: See Section 11.3.1 Security considerations: Sensor data can contain a wide range of
information ranging from information that is very public, such the
outside temperature in a given city, to very private information that
requires integrity and confidentiality protection, such as patient
health information. This format does not provide any security and
instead relies on the transport protocol that carries it to provide
security. Given applications need to look at the overall context of
how this media type will be used to decide if the security is
adequate.
Interoperability considerations: TBD Interoperability considerations: Applications should ignore any key
value pairs that they do not understand. This allows backwards
compatibility extensions to this specification. The "bver" field can
be used to ensure the receiver supports a minimal level of
functionality needed by the creator of the CBOR object.
Published specification: RFC-AAAA Published specification: RFC-AAAA
Applications that use this media type: See Section 11.3.1 Applications that use this media type: The type is used by systems
that report e.g., electrical power usage and environmental
information such as temperature and humidity. It can be used for a
wide range of sensor reporting systems.
Additional information: Additional information:
Magic number(s): none Magic number(s): none
File extension(s): senmlc and sensmlc File extension(s): senmlc and sensmlc
Macintosh file type code(s): none Macintosh file type code(s): none
Person & email address to contact for further information: Cullen Person & email address to contact for further information: Cullen
skipping to change at page 30, line 4 skipping to change at page 32, line 19
11.3.3. senml+xml Media Type Registration 11.3.3. senml+xml Media Type Registration
Type name: application Type name: application
Subtype name: senml+xml and sensml+xml Subtype name: senml+xml and sensml+xml
Required parameters: none Required parameters: none
Optional parameters: none Optional parameters: none
Encoding considerations: TBD
Security considerations: See Section 11.3.1 Encoding considerations: Must be encoded as using
[W3C.REC-xml-20081126]. See RFC-AAAA for details.
Interoperability considerations: TBD Security considerations: Sensor data can contain a wide range of
information ranging from information that is very public, such the
outside temperature in a given city, to very private information that
requires integrity and confidentiality protection, such as patient
health information. This format does not provide any security and
instead relies on the transport protocol that carries it to provide
security. Given applications need to look at the overall context of
how this media type will be used to decide if the security is
adequate.
Interoperability considerations: Applications should ignore any tags
or attributes that they do not understand. This allows backwards
compatibility extensions to this specification. The "bver" attribute
in the senml tag can be used to ensure the receiver supports a
minimal level of functionality needed by the creator of the XML.
Published specification: RFC-AAAA Published specification: RFC-AAAA
Applications that use this media type: See Section 11.3.1 Applications that use this media type: The type is used by systems
that report e.g., electrical power usage and environmental
information such as temperature and humidity. It can be used for a
wide range of sensor reporting systems.
Additional information: Additional information:
Magic number(s): none Magic number(s): none
File extension(s): senmlx and sensmlx File extension(s): senmlx and sensmlx
Macintosh file type code(s): none Macintosh file type code(s): none
Person & email address to contact for further information: Cullen Person & email address to contact for further information: Cullen
Jennings <fluffy@iii.ca> Jennings <fluffy@iii.ca>
Intended usage: COMMON Intended usage: COMMON
Restrictions on usage: None Restrictions on usage: None
Author: Cullen Jennings <fluffy@iii.ca> Author: Cullen Jennings <fluffy@iii.ca>
skipping to change at page 30, line 43 skipping to change at page 33, line 27
11.3.4. senml+exi Media Type Registration 11.3.4. senml+exi Media Type Registration
Type name: application Type name: application
Subtype name: senml+exi and sensml+exi Subtype name: senml+exi and sensml+exi
Required parameters: none Required parameters: none
Optional parameters: none Optional parameters: none
Encoding considerations: TBD Encoding considerations: Must be encoded as using
[W3C.REC-exi-20140211]. See RFC-AAAA for details.
Security considerations: TBD Security considerations: Sensor data can contain a wide range of
information ranging from information that is very public, such the
outside temperature in a given city, to very private information that
requires integrity and confidentiality protection, such as patient
health information. This format does not provide any security and
instead relies on the transport protocol that carries it to provide
security. Given applications need to look at the overall context of
how this media type will be used to decide if the security is
adequate.
Interoperability considerations: TBD Interoperability considerations: Applications should ignore any tags
or attributes that they do not understand. This allows backwards
compatibility extensions to this specification. The "bver" attribute
in the senml tag can be used to ensure the receiver supports a
minimal level of functionality needed by the creator of the XML.
Further information on using schemas to guide the EXI can be found in
RFC-AAAA.
Published specification: RFC-AAAA Published specification: RFC-AAAA
Applications that use this media type: See Section 11.3.1 Applications that use this media type: The type is used by systems
that report e.g., electrical power usage and environmental
information such as temperature and humidity. It can be used for a
wide range of sensor reporting systems.
Additional information: Additional information:
Magic number(s): none Magic number(s): none
File extension(s): senmle and sensmle File extension(s): senmle and sensmle
Macintosh file type code(s): none Macintosh file type code(s): none
Person & email address to contact for further information: Cullen Person & email address to contact for further information: Cullen
Jennings <fluffy@iii.ca> Jennings <fluffy@iii.ca>
skipping to change at page 32, line 37 skipping to change at page 35, line 37
Sensor data can range from information with almost no security Sensor data can range from information with almost no security
considerations, such as the current temperature in a given city, to considerations, such as the current temperature in a given city, to
highly sensitive medical or location data. This specification highly sensitive medical or location data. This specification
provides no security protection for the data but is meant to be used provides no security protection for the data but is meant to be used
inside another container or transport protocol such as S/MIME or HTTP inside another container or transport protocol such as S/MIME or HTTP
with TLS that can provide integrity, confidentiality, and with TLS that can provide integrity, confidentiality, and
authentication information about the source of the data. authentication information about the source of the data.
14. Acknowledgement 14. Acknowledgement
We would like to thank Lisa Dusseault, Joe Hildebrand, Lyndsay We would like to thank Alexander Pelov, Andrew McClure, Andrew
Campbell, Martin Thomson, John Klensin, Bjoern Hoehrmann, Christian Mcgregor, Bjoern Hoehrmann, Christian Amsuess, Christian Groves,
Groves, and Christian Amsuess, for their review comments. Daniel Peintner, Jan-Piet Mens, Joe Hildebrand, John Klensin, Karl
Palsson, Lennart Duhrsen, Lisa Dusseault, Lyndsay Campbell, Martin
Thomson, Michael Koster, and Stephen Farrell, for their review
comments.
15. References 15. References
15.1. Normative References 15.1. Normative References
[BIPM] Bureau International des Poids et Mesures, "The [BIPM] Bureau International des Poids et Mesures, "The
International System of Units (SI)", 8th edition, 2006. International System of Units (SI)", 8th edition, 2006.
[IEEE.754.1985] [IEEE.754.1985]
Institute of Electrical and Electronics Engineers, Institute of Electrical and Electronics Engineers,
"Standard for Binary Floating-Point Arithmetic", IEEE "Standard for Binary Floating-Point Arithmetic",
Standard 754, August 1985. IEEE Standard 754, August 1985.
[NIST811] Thompson, A. and B. Taylor, "Guide for the Use of the [NIST811] Thompson, A. and B. Taylor, "Guide for the Use of the
International System of Units (SI)", NIST Special International System of Units (SI)", NIST Special
Publication 811, 2008. Publication 811, 2008.
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/ Requirement Levels", BCP 14, RFC 2119,
RFC2119, March 1997, DOI 10.17487/RFC2119, March 1997,
<http://www.rfc-editor.org/info/rfc2119>. <http://www.rfc-editor.org/info/rfc2119>.
[RFC3688] Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688, [RFC3688] Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688,
DOI 10.17487/RFC3688, January 2004, DOI 10.17487/RFC3688, January 2004,
<http://www.rfc-editor.org/info/rfc3688>. <http://www.rfc-editor.org/info/rfc3688>.
[RFC4648] Josefsson, S., "The Base16, Base32, and Base64 Data [RFC4648] Josefsson, S., "The Base16, Base32, and Base64 Data
Encodings", RFC 4648, DOI 10.17487/RFC4648, October 2006, Encodings", RFC 4648, DOI 10.17487/RFC4648, October 2006,
<http://www.rfc-editor.org/info/rfc4648>. <http://www.rfc-editor.org/info/rfc4648>.
[RFC5226] Narten, T. and H. Alvestrand, "Guidelines for Writing an [RFC5226] Narten, T. and H. Alvestrand, "Guidelines for Writing an
IANA Considerations Section in RFCs", BCP 26, RFC 5226, IANA Considerations Section in RFCs", BCP 26, RFC 5226,
DOI 10.17487/RFC5226, May 2008, DOI 10.17487/RFC5226, May 2008,
<http://www.rfc-editor.org/info/rfc5226>. <http://www.rfc-editor.org/info/rfc5226>.
[RFC6838] Freed, N., Klensin, J., and T. Hansen, "Media Type [RFC6838] Freed, N., Klensin, J., and T. Hansen, "Media Type
Specifications and Registration Procedures", BCP 13, RFC Specifications and Registration Procedures", BCP 13,
6838, DOI 10.17487/RFC6838, January 2013, RFC 6838, DOI 10.17487/RFC6838, January 2013,
<http://www.rfc-editor.org/info/rfc6838>. <http://www.rfc-editor.org/info/rfc6838>.
[RFC7049] Bormann, C. and P. Hoffman, "Concise Binary Object [RFC7049] Bormann, C. and P. Hoffman, "Concise Binary Object
Representation (CBOR)", RFC 7049, DOI 10.17487/RFC7049, Representation (CBOR)", RFC 7049, DOI 10.17487/RFC7049,
October 2013, <http://www.rfc-editor.org/info/rfc7049>. October 2013, <http://www.rfc-editor.org/info/rfc7049>.
[RFC7159] Bray, T., Ed., "The JavaScript Object Notation (JSON) Data [RFC7159] Bray, T., Ed., "The JavaScript Object Notation (JSON) Data
Interchange Format", RFC 7159, DOI 10.17487/RFC7159, March Interchange Format", RFC 7159, DOI 10.17487/RFC7159, March
2014, <http://www.rfc-editor.org/info/rfc7159>. 2014, <http://www.rfc-editor.org/info/rfc7159>.
[RFC7252] Shelby, Z., Hartke, K., and C. Bormann, "The Constrained [RFC7252] Shelby, Z., Hartke, K., and C. Bormann, "The Constrained
Application Protocol (CoAP)", RFC 7252, DOI 10.17487/ Application Protocol (CoAP)", RFC 7252,
RFC7252, June 2014, DOI 10.17487/RFC7252, June 2014,
<http://www.rfc-editor.org/info/rfc7252>. <http://www.rfc-editor.org/info/rfc7252>.
[RFC7303] Thompson, H. and C. Lilley, "XML Media Types", RFC 7303, [RFC7303] Thompson, H. and C. Lilley, "XML Media Types", RFC 7303,
DOI 10.17487/RFC7303, July 2014, DOI 10.17487/RFC7303, July 2014,
<http://www.rfc-editor.org/info/rfc7303>. <http://www.rfc-editor.org/info/rfc7303>.
[W3C.REC-exi-20110310] [W3C.REC-exi-20140211]
Schneider, J. and T. Kamiya, "Efficient XML Interchange Schneider, J., Kamiya, T., Peintner, D., and R. Kyusakov,
(EXI) Format 1.0", World Wide Web Consortium "Efficient XML Interchange (EXI) Format 1.0 (Second
Recommendation REC-exi-20110310, March 2011, Edition)", World Wide Web Consortium Recommendation REC-
<http://www.w3.org/TR/2011/REC-exi-20110310>. exi-20140211, February 2014,
<http://www.w3.org/TR/2014/REC-exi-20140211>.
[W3C.REC-xml-20081126]
Bray, T., Paoli, J., Sperberg-McQueen, M., Maler, E., and
F. Yergeau, "Extensible Markup Language (XML) 1.0 (Fifth
Edition)", World Wide Web Consortium Recommendation REC-
xml-20081126, November 2008,
<http://www.w3.org/TR/2008/REC-xml-20081126>.
15.2. Informative References 15.2. Informative References
[I-D.arkko-core-dev-urn] [I-D.arkko-core-dev-urn]
Arkko, J., Jennings, C., and Z. Shelby, "Uniform Resource Arkko, J., Jennings, C., and Z. Shelby, "Uniform Resource
Names for Device Identifiers", draft-arkko-core-dev-urn-03 Names for Device Identifiers", draft-arkko-core-dev-urn-03
(work in progress), July 2012. (work in progress), July 2012.
[I-D.greevenbosch-appsawg-cbor-cddl] [I-D.greevenbosch-appsawg-cbor-cddl]
Vigano, C. and H. Birkholz, "CBOR data definition language Vigano, C. and H. Birkholz, "CBOR data definition language
(CDDL): a notational convention to express CBOR data (CDDL): a notational convention to express CBOR data
structures", draft-greevenbosch-appsawg-cbor-cddl-08 (work structures", draft-greevenbosch-appsawg-cbor-cddl-09 (work
in progress), March 2016. in progress), September 2016.
[I-D.ietf-core-links-json] [I-D.ietf-core-links-json]
Li, K., Rahman, A., and C. Bormann, "Representing CoRE Li, K., Rahman, A., and C. Bormann, "Representing CoRE
Formats in JSON and CBOR", draft-ietf-core-links-json-06 Formats in JSON and CBOR", draft-ietf-core-links-json-06
(work in progress), July 2016. (work in progress), July 2016.
[RFC2141] Moats, R., "URN Syntax", RFC 2141, DOI 10.17487/RFC2141, [RFC2141] Moats, R., "URN Syntax", RFC 2141, DOI 10.17487/RFC2141,
May 1997, <http://www.rfc-editor.org/info/rfc2141>. May 1997, <http://www.rfc-editor.org/info/rfc2141>.
[RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform [RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform
Resource Identifier (URI): Generic Syntax", STD 66, RFC Resource Identifier (URI): Generic Syntax", STD 66,
3986, DOI 10.17487/RFC3986, January 2005, RFC 3986, DOI 10.17487/RFC3986, January 2005,
<http://www.rfc-editor.org/info/rfc3986>. <http://www.rfc-editor.org/info/rfc3986>.
[RFC4122] Leach, P., Mealling, M., and R. Salz, "A Universally [RFC4122] Leach, P., Mealling, M., and R. Salz, "A Universally
Unique IDentifier (UUID) URN Namespace", RFC 4122, DOI Unique IDentifier (UUID) URN Namespace", RFC 4122,
10.17487/RFC4122, July 2005, DOI 10.17487/RFC4122, July 2005,
<http://www.rfc-editor.org/info/rfc4122>. <http://www.rfc-editor.org/info/rfc4122>.
[RFC5952] Kawamura, S. and M. Kawashima, "A Recommendation for IPv6 [RFC5952] Kawamura, S. and M. Kawashima, "A Recommendation for IPv6
Address Text Representation", RFC 5952, DOI 10.17487/ Address Text Representation", RFC 5952,
RFC5952, August 2010, DOI 10.17487/RFC5952, August 2010,
<http://www.rfc-editor.org/info/rfc5952>. <http://www.rfc-editor.org/info/rfc5952>.
[RFC6690] Shelby, Z., "Constrained RESTful Environments (CoRE) Link [RFC6690] Shelby, Z., "Constrained RESTful Environments (CoRE) Link
Format", RFC 6690, DOI 10.17487/RFC6690, August 2012, Format", RFC 6690, DOI 10.17487/RFC6690, August 2012,
<http://www.rfc-editor.org/info/rfc6690>. <http://www.rfc-editor.org/info/rfc6690>.
[RFC7721] Cooper, A., Gont, F., and D. Thaler, "Security and Privacy [RFC7721] Cooper, A., Gont, F., and D. Thaler, "Security and Privacy
Considerations for IPv6 Address Generation Mechanisms", Considerations for IPv6 Address Generation Mechanisms",
RFC 7721, DOI 10.17487/RFC7721, March 2016, RFC 7721, DOI 10.17487/RFC7721, March 2016,
<http://www.rfc-editor.org/info/rfc7721>. <http://www.rfc-editor.org/info/rfc7721>.
skipping to change at page 35, line 29 skipping to change at page 38, line 38
used for additional information about a SenML Record. The definition used for additional information about a SenML Record. The definition
and usage of the contents of this value are specified in and usage of the contents of this value are specified in
[I-D.ietf-core-links-json]. [I-D.ietf-core-links-json].
For JSON and XML the attribute has a label of "l" and a value that is For JSON and XML the attribute has a label of "l" and a value that is
a string. a string.
The following shows an example of the links extension. The following shows an example of the links extension.
[ [
{"bn":"urn:dev:ow:10e2073a01080063/","bt":1.320078429e+09, {"bn":"urn:dev:ow:10e2073a01080063;","bt":1.320078429e+09,
"l":"[{\"href\":\"humidity\",\"foo\":\"bar1\"}", "l":"[{\"href\":\"humidity\",\"foo\":\"bar1\"}",
"n":"temperature","u":"Cel","v":27.2}, "n":"temperature","u":"Cel","v":27.2},
{"n":"humidity","u":"%RH","v":80} {"n":"humidity","u":"%RH","v":80}
] ]
Authors' Addresses Authors' Addresses
Cullen Jennings Cullen Jennings
Cisco Cisco
400 3rd Avenue SW 400 3rd Avenue SW
Calgary, AB T2P 4H2 Calgary, AB T2P 4H2
Canada Canada
Phone: +1 408 421-9990
Email: fluffy@iii.ca Email: fluffy@iii.ca
Zach Shelby Zach Shelby
ARM ARM
150 Rose Orchard 150 Rose Orchard
San Jose 95134 San Jose 95134
USA USA
Phone: +1-408-203-9434 Phone: +1-408-203-9434
Email: zach.shelby@arm.com Email: zach.shelby@arm.com
 End of changes. 54 change blocks. 
169 lines changed or deleted 302 lines changed or added

This html diff was produced by rfcdiff 1.45. The latest version is available from http://tools.ietf.org/tools/rfcdiff/