draft-ietf-core-senml-04.txt   draft-ietf-core-senml-05.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: May 4, 2017 ARM Expires: September 14, 2017 ARM
J. Arkko J. Arkko
A. Keranen A. Keranen
Ericsson Ericsson
C. Bormann C. Bormann
Universitaet Bremen TZI Universitaet Bremen TZI
October 31, 2016 March 13, 2017
Media Types for Sensor Measurement Lists (SenML) Media Types for Sensor Measurement Lists (SenML)
draft-ietf-core-senml-04 draft-ietf-core-senml-05
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 Measurement Lists 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
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 May 4, 2017. This Internet-Draft will expire on September 14, 2017.
Copyright Notice Copyright Notice
Copyright (c) 2016 IETF Trust and the persons identified as the Copyright (c) 2017 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
carefully, as they describe your rights and restrictions with respect carefully, as they describe your rights and restrictions with respect
to this document. Code Components extracted from this document must to this document. Code Components extracted from this document must
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
skipping to change at page 2, line 43 skipping to change at page 2, line 43
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 . . . . . . . . . . . . . . . . . 13 5.1.5. Multiple Data Types . . . . . . . . . . . . . . . . . 13
5.1.6. Collection of Resources . . . . . . . . . . . . . . . 13 5.1.6. Collection of Resources . . . . . . . . . . . . . . . 13
5.1.7. Setting an Actuator . . . . . . . . . . . . . . . . . 14 5.1.7. Setting an Actuator . . . . . . . . . . . . . . . . . 14
6. CBOR Representation (application/senml+cbor) . . . . . . . . 15 6. CBOR Representation (application/senml+cbor) . . . . . . . . 15
7. XML Representation (application/senml+xml) . . . . . . . . . 17 7. XML Representation (application/senml+xml) . . . . . . . . . 17
8. EXI Representation (application/senml+exi) . . . . . . . . . 19 8. EXI Representation (application/senml+exi) . . . . . . . . . 19
9. Usage Considerations . . . . . . . . . . . . . . . . . . . . 22 9. Fragment Identification Methods . . . . . . . . . . . . . . . 22
10. CDDL . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 9.1. Fragment Identification Examples . . . . . . . . . . . . 22
11. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 24 10. Usage Considerations . . . . . . . . . . . . . . . . . . . . 23
11.1. Units Registry . . . . . . . . . . . . . . . . . . . . . 25 11. CDDL . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
11.2. SenML Label Registry . . . . . . . . . . . . . . . . . . 28 12. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 25
11.3. Media Type Registration . . . . . . . . . . . . . . . . 29 12.1. Units Registry . . . . . . . . . . . . . . . . . . . . . 26
11.3.1. senml+json Media Type Registration . . . . . . . . . 29 12.2. SenML Label Registry . . . . . . . . . . . . . . . . . . 29
11.3.2. senml+cbor Media Type Registration . . . . . . . . . 31 12.3. Media Type Registration . . . . . . . . . . . . . . . . 30
11.3.3. senml+xml Media Type Registration . . . . . . . . . 32 12.3.1. senml+json Media Type Registration . . . . . . . . . 30
11.3.4. senml+exi Media Type Registration . . . . . . . . . 33 12.3.2. sensml+json Media Type Registration . . . . . . . . 32
12.3.3. senml+cbor Media Type Registration . . . . . . . . . 33
11.4. XML Namespace Registration . . . . . . . . . . . . . . . 34 12.3.4. sensml+cbor Media Type Registration . . . . . . . . 34
11.5. CoAP Content-Format Registration . . . . . . . . . . . . 34 12.3.5. senml+xml Media Type Registration . . . . . . . . . 36
12. Security Considerations . . . . . . . . . . . . . . . . . . . 35 12.3.6. sensml+xml Media Type Registration . . . . . . . . . 37
13. Privacy Considerations . . . . . . . . . . . . . . . . . . . 35 12.3.7. senml+exi Media Type Registration . . . . . . . . . 38
14. Acknowledgement . . . . . . . . . . . . . . . . . . . . . . . 35 12.3.8. sensml+exi Media Type Registration . . . . . . . . . 40
15. References . . . . . . . . . . . . . . . . . . . . . . . . . 35 12.4. XML Namespace Registration . . . . . . . . . . . . . . . 41
15.1. Normative References . . . . . . . . . . . . . . . . . . 35 12.5. CoAP Content-Format Registration . . . . . . . . . . . . 41
15.2. Informative References . . . . . . . . . . . . . . . . . 37 13. Security Considerations . . . . . . . . . . . . . . . . . . . 42
Appendix A. Links Extension . . . . . . . . . . . . . . . . . . 38 14. Privacy Considerations . . . . . . . . . . . . . . . . . . . 42
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 38 15. Acknowledgement . . . . . . . . . . . . . . . . . . . . . . . 42
16. References . . . . . . . . . . . . . . . . . . . . . . . . . 42
16.1. Normative References . . . . . . . . . . . . . . . . . . 42
16.2. Informative References . . . . . . . . . . . . . . . . . 44
Appendix A. Links Extension . . . . . . . . . . . . . . . . . . 45
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 45
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
of sensor measurements. The markup language can be used for a of sensor measurements. SenML can be used for a variety of data flow
variety of data flow models, most notably data feeds pushed from a models, most notably data feeds pushed from a sensor to a collector,
sensor to a collector, and the web resource model where the sensor is and the web resource model where the sensor is requested as a
requested as a resource representation (e.g., "GET /sensor/ resource representation (e.g., "GET /sensor/temperature").
temperature").
There are many types of more complex measurements and measurements There are many types of more complex measurements and measurements
that this media type would not be suitable for. SenML strikes a that this media type would not be suitable for. SenML strikes a
balance between having some information about the sensor carried with balance between having some information about the sensor carried with
the sensor data so that the data is self describing but it also tries the sensor data so that the data is self describing but it also tries
to make that a fairly minimal set of auxiliary information for to make that a fairly minimal set of auxiliary information for
efficiency reason. Other information about the sensor can be efficiency reason. Other information about the sensor can be
discovered by other methods such as using the CoRE Link Format discovered by other methods such as using the CoRE Link Format
[RFC6690]. [RFC6690].
skipping to change at page 5, line 21 skipping to change at page 5, line 21
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, batch up 60 of them, and then send the batch to a server. It
include the relative time the measurement was made to the time the would include the relative time each measurement was made compared to
batch was send in the SenML Pack. The server might have accurate NTP the time the batch was sent in each SenML Record. The server might
time and use the time it received the data, and the relative offset, have accurate NTP time and use the time it received the data, and the
to replace the times in the SenML with absolute times before saving relative offset, to replace the times in the SenML with absolute
the SenML Pack in a document database. times before saving the SenML Pack in a document database.
3. Terminology 3. Terminology
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
"OPTIONAL" in this document are to be interpreted as described in "OPTIONAL" in this document are to be interpreted as described in
[RFC2119]. [RFC2119].
This document also uses the following terms: This document also uses the following terms:
skipping to change at page 7, line 15 skipping to change at page 7, line 15
Time: Time when value was recorded. Optional. Time: Time when value was recorded. Optional.
Update Time: An optional time in seconds that represents the maximum Update Time: An optional time in seconds that represents the maximum
time before this sensor will provide an updated reading for a time before this sensor will provide an updated reading for a
measurement. This can be used to detect the failure of sensors or measurement. This can be used to detect the failure of sensors or
communications path from the sensor. communications path from the sensor.
4.3. Considerations 4.3. Considerations
The SenML format can be extended with further custom attributes. The SenML format can be extended with further custom attributes.
Both new base and regular attributes are allowed. See Section 11.2 Both new base and regular attributes are allowed. See Section 12.2
for details. Implementations MUST ignore attributes they don't for details. Implementations MUST ignore attributes they don't
recognize. recognize.
Systems reading one of the objects MUST check for the Version Systems reading one of the objects MUST check for the Version
attribute. If this value is a version number larger than the version attribute. If this value is a version number larger than the version
which the system understands, the system SHOULD NOT use this object. which the system understands, the system SHOULD NOT use this object.
This allows the version number to indicate that the object contains This allows the version number to indicate that the object contains
mandatory to understand attributes. New version numbers can only be mandatory to understand attributes. New version numbers can only be
defined in an RFC that updates this specification or it successors. defined in an RFC that updates this specification or it successors.
skipping to change at page 11, line 4 skipping to change at page 11, line 4
{"n":"current","t":-1,"v":1.6}, {"n":"current","t":-1,"v":1.6},
{"n":"current","v":1.7} {"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 Measurement Lists 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 12.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:
[ [
skipping to change at page 12, line 31 skipping to change at page 12, line 31
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 | 174 | 197 | | EXI | 162 | 185 |
+----------+------+-----------------+ +----------+------+-----------------+
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
skipping to change at page 19, line 48 skipping to change at page 19, line 48
For efficient transmission of SenML over e.g. a constrained network, For efficient transmission of SenML over e.g. a constrained network,
Efficient XML Interchange (EXI) can be used. This encodes the XML Efficient XML Interchange (EXI) can be used. This encodes the XML
Schema structure of SenML into binary tags and values rather than Schema structure of SenML into binary tags and values rather than
ASCII text. An EXI representation of SenML SHOULD be made using the ASCII text. An EXI representation of SenML SHOULD be made using the
strict schema-mode of EXI. This mode however does not allow tag strict schema-mode of EXI. This mode however does not allow tag
extensions to the schema, and therefore any extensions will be lost extensions to the schema, and therefore any extensions will be lost
in the encoding. For uses where extensions need to be preserved in in the encoding. For uses where extensions need to be preserved in
EXI, the non-strict schema mode of EXI MAY be used. EXI, the non-strict schema mode of EXI MAY be used.
The EXI header option MUST be included. An EXI schemaID options MUST The EXI header MUST include an "EXI Options", as defined in
be set to the value of "a" indicating the scheme provided in this [W3C.REC-exi-20140211], with an schemaId set to the value of "a"
specification. Future revisions to the schema can change this indicating the schema provided in this specification. Future
schemaID to allow for backwards compatibility. When the data will be revisions to the schema can change the value of the schemaId to allow
transported over CoAP or HTTP, an EXI Cookie SHOULD NOT be used as it for backwards compatibility. When the data will be transported over
simply makes things larger and is redundant to information provided CoAP or HTTP, an EXI Cookie SHOULD NOT be used as it simply makes
in the Content-Type header. things larger and is redundant to information provided in the
Content-Type header.
The following is the XSD Schema to be used for strict schema guided The following is the XSD Schema to be used for strict schema guided
EXI processing. It is generated from the RelaxNG. EXI processing. It is generated from the RelaxNG.
<?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">
skipping to change at page 21, line 13 skipping to change at page 21, line 13
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 0d 84 80 79 d5 c9 b8 e9 91 95 d8 e9 bd dc |.0...y..........|
0010 80 79 d5 c9 b8 e9 91 95 d8 e9 bd dc e8 c4 c1 94 |.y..............| 0010 e8 c4 c1 94 c8 c0 dc cd 84 c0 c4 c0 e0 c0 c0 d8 |................|
0020 c8 c0 dc cd 84 c0 c4 c0 e0 c0 c0 d8 cc ed 82 5d |...............]| 0020 cc ed 82 5d 9b db 1d 18 59 d9 48 0d 58 ac 42 60 |...]....Y.H.X.B`|
0030 9b db 1d 18 59 d9 48 0d 58 ac 42 60 18 e1 2c 6e |....Y.H.X.B`..,n| 0030 18 e1 2c 6e ae 4e 4c ad ce 84 06 82 41 90 0e |..,n.NL.....A..|
0040 ae 4e 4c ad ce 84 06 82 41 90 0e |.NL.....A..| 003f
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 80 6c 20 01 07 1d 75 72 6e 3a 64 65 76 |..H.l ...urn:dev|
0010 6c 80 01 07 1d 75 72 6e 3a 64 65 76 3a 6f 77 3a |l....urn:dev:ow:| 0010 3a 6f 77 3a 31 30 65 32 30 37 33 61 30 31 30 38 |:ow:10e2073a0108|
0020 31 30 65 32 30 37 33 61 30 31 30 38 30 30 36 33 |10e2073a01080063| 0020 30 30 36 33 02 05 43 65 6c 01 00 e7 01 01 00 03 |0063..Cel.......|
0030 02 05 43 65 6c 01 00 e7 01 01 00 03 01 |..Cel........| 0030 01 |.|
003d 0031
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-20140211] 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.
9. Usage Considerations 9. Fragment Identification Methods
A SenML Pack typically consists of multiple SenML Records and for
some applications it may be useful to be able to refer with a
Fragment Identifier to a single record, or a set of records, in a
Pack. The fragment identifier is only interpreted by a client and
does not impact retrieval of a representation. The SenML Fragment
Identification is modeled after CSV Fragment Identifiers [RFC7111].
To select a single SenML Record, the "rec" scheme followed by a
single number is used. For the purpose of numbering records, the
first record is at position 1. A range of records can be selected by
giving the first and the last record number separated by a '-'
character. Instead of the second number, the "*" character can be
used to indicate the last Senml Record in the Pack. A set of records
can also be selected using a comma separated list of record positions
or ranges.
(We use the term "selecting a record" for identifying it as part of
the fragment, not in the sense of isolating it from the Pack -- the
record still needs to be interpreted as part of the Pack, e.g., using
the base values defined in record 1.)
9.1. Fragment Identification Examples
The 3rd SenML Record from "coap://example.com/temp" resource can be
selected with:
coap://example.com/temp#rec=3
Records from 3rd to 6th can be selected with:
coap://example.com/temp#rec=3-6
Records from 19th to the last can be selected with:
coap://example.com/temp#rec=19-*
The 3rd and 5th record can be selected with:
coap://example.com/temp#rec=3,5
To select the Records from third to fifth, the 10th record, and all
from 19th to the last:
coap://example.com/temp#rec=3-5,10,19-*
10. Usage Considerations
The measurements support sending both the current value of a sensor The measurements support sending both the current value of a sensor
as well as the an integrated sum. For many types of measurements, as well as the an integrated sum. For many types of measurements,
the sum is more useful than the current value. For example, an the sum is more useful than the current value. For example, an
electrical meter that measures the energy a given computer uses will electrical meter that measures the energy a given computer uses will
typically want to measure the cumulative amount of energy used. This typically want to measure the cumulative amount of energy used. This
is less prone to error than reporting the power each second and is less prone to error than reporting the power each second and
trying to have something on the server side sum together all the trying to have something on the server side sum together all the
power measurements. If the network between the sensor and the meter power measurements. If the network between the sensor and the meter
goes down over some period of time, when it comes back up, the goes down over some period of time, when it comes back up, the
skipping to change at page 23, line 7 skipping to change at page 24, line 5
3. Applications cannot make assumptions about when the device 3. Applications cannot make assumptions about when the device
started accumulating values into the sum. started accumulating values into the sum.
Typically applications can make some assumptions about specific Typically applications can make some assumptions about specific
sensors that will allow them to deal with these problems. A common sensors that will allow them to deal with these problems. A common
assumption is that for sensors whose measurement values are always assumption is that for sensors whose measurement values are always
positive, the sum should never get smaller; so if the sum does get positive, the sum should never get smaller; so if the sum does get
smaller, the application will know that one of the situations listed smaller, the application will know that one of the situations listed
above has happened. above has happened.
10. CDDL 11. CDDL
For reference, the JSON and CBOR representations can be described For reference, the JSON and CBOR representations can be described
with the common CDDL [I-D.greevenbosch-appsawg-cbor-cddl] with the common CDDL [I-D.greevenbosch-appsawg-cbor-cddl]
specification in Figure 1. specification in Figure 1.
SenML-Pack = [initial-record, * follow-on-record] SenML-Pack = [initial-record, * follow-on-record]
initial-record = initial-defined .and initial-generic initial-record = initial-defined .and initial-generic
follow-on-record = follow-on-defined .and follow-on-generic follow-on-record = follow-on-defined .and follow-on-generic
; first do a specification of the labels as defined: ; first do a specification of the labels as defined:
initial-defined = { initial-defined = {
? bn => tstr, ; Base Name ? bn => tstr, ; Base Name
? bt => numeric, ; Base Time ? bt => numeric, ; Base Time
? bu => tstr, ; Base Units ? bu => tstr, ; Base Units
? bv => numeric, ; Base value ? bv => numeric, ; Base value
? bs => numeric, ; Base sum
? bver => uint, ; Base Version ? bver => uint, ; Base Version
follow-on-defined-group, follow-on-defined-group,
+ base-key-value-pair + base-key-value-pair
} }
follow-on-defined-group = ( follow-on-defined-group = (
? n => tstr, ; Name ? n => tstr, ; Name
? u => tstr, ; Units ? u => tstr, ; Units
? s => numeric, ; Value Sum ? s => numeric, ; Value Sum
? t => numeric, ; Time ? t => numeric, ; Time
? ut => numeric, ; Update Time ? ut => numeric, ; Update Time
? l => tstr, ; Link
* key-value-pair, * key-value-pair,
? ( v => numeric // ; Numeric Value ? ( v => numeric // ; Numeric Value
vs => tstr // ; String Value vs => tstr // ; String Value
vb => bool // ; Boolean Value vb => bool // ; Boolean Value
vd => binary-value ) ; Data Value vd => binary-value ) ; Data Value
) )
follow-on-defined = { follow-on-defined-group } follow-on-defined = { follow-on-defined-group }
; now define the generic versions ; now define the generic versions
skipping to change at page 24, line 28 skipping to change at page 25, line 28
Figure 1: Common CDDL specification for CBOR and JSON SenML Figure 1: Common CDDL specification for CBOR and JSON SenML
For JSON, we use text labels and base64url-encoded binary data For JSON, we use text labels and base64url-encoded binary data
(Figure 2). (Figure 2).
bver = "bver" n = "n" s = "s" bver = "bver" n = "n" s = "s"
bn = "bn" u = "u" t = "t" bn = "bn" u = "u" t = "t"
bt = "bt" v = "v" ut = "ut" bt = "bt" v = "v" ut = "ut"
bu = "bu" vs = "vs" vd = "vd" bu = "bu" vs = "vs" vd = "vd"
bv = "bv" vb = "vb" l = "l" bv = "bv" vb = "vb" l = "l"
bs = "bs"
binary-value = tstr ; base64url encoded binary-value = tstr ; base64url encoded
Figure 2: JSON-specific CDDL specification for SenML Figure 2: JSON-specific CDDL specification for SenML
For CBOR, we use integer labels and native binary data (Figure 3). For CBOR, we use integer labels and native binary data (Figure 3).
bver = -1 n = 0 s = 5 bver = -1 n = 0 s = 5
bn = -2 u = 1 t = 6 bn = -2 u = 1 t = 6
bt = -3 v = 2 ut = 7 bt = -3 v = 2 ut = 7
bu = -4 vs = 3 vd = 8 bu = -4 vs = 3 vd = 8
bv = -5 vb = 4 l = 9 bv = -5 vb = 4 l = 9
bs = -6
binary-value = bstr binary-value = bstr
Figure 3: CBOR-specific CDDL specification for SenML Figure 3: CBOR-specific CDDL specification for SenML
11. IANA Considerations 12. IANA Considerations
Note to RFC Editor: Please replace all occurrences of "RFC-AAAA" with Note to RFC Editor: Please replace all occurrences of "RFC-AAAA" with
the RFC number of this specification. the RFC number of this specification.
11.1. Units Registry 12.1. Units Registry
IANA will create a registry of SenML unit symbols. The primary IANA will create a registry of SenML unit symbols. The primary
purpose of this registry is to make sure that symbols uniquely map to purpose of this registry is to make sure that symbols uniquely map to
give type of measurement. Definitions for many of these units can be give type of measurement. Definitions for many of these units can be
found in location such as [NIST811] and [BIPM]. Units marked with an found in location such as [NIST811] and [BIPM]. Units marked with an
asterisk are NOT RECOMMENDED to be produced by new implementations, asterisk are NOT RECOMMENDED to be produced by new implementations,
but are in active use and SHOULD be implemented by consumers that can but are in active use and SHOULD be implemented by consumers that can
use the related base units. use the related base units.
+----------+------------------------------------+-------+-----------+ +----------+------------------------------------+-------+-----------+
skipping to change at page 28, line 13 skipping to change at page 29, line 13
allocated. allocated.
10. A number after a unit typically indicates the previous unit 10. A number after a unit typically indicates the previous unit
raised to that power, and the / indicates that the units that raised to that power, and the / indicates that the units that
follow are the reciprocal. A unit should have only one / in the follow are the reciprocal. A unit should have only one / in the
name. name.
11. A good list of common units can be found in the Unified Code for 11. A good list of common units can be found in the Unified Code for
Units of Measure [UCUM]. Units of Measure [UCUM].
11.2. SenML Label Registry 12.2. SenML Label Registry
IANA will create a new registry for SenML labels. The initial IANA will create a new registry for SenML labels. The initial
content of the registry is: content of the registry is:
+---------------+-------+------+----------+----+---------+ +---------------+-------+------+----------+----+---------+
| Name | Label | CBOR | XML Type | ID | Note | | Name | Label | CBOR | XML Type | ID | Note |
+---------------+-------+------+----------+----+---------+ +---------------+-------+------+----------+----+---------+
| Base Name | bn | -2 | string | a | RFCXXXX | | Base Name | bn | -2 | string | a | RFCXXXX |
| Base Sum | bs | -6 | double | a | RFCXXXX | | Base Sum | bs | -6 | double | a | RFCXXXX |
| Base Time | bt | -3 | double | a | RFCXXXX | | Base Time | bt | -3 | double | a | RFCXXXX |
skipping to change at page 28, line 46 skipping to change at page 29, line 46
| Link | l | 9 | string | a | RFCXXXX | | Link | l | 9 | string | a | RFCXXXX |
+---------------+-------+------+----------+----+---------+ +---------------+-------+------+----------+----+---------+
Table 6: SenML Labels Table 6: SenML Labels
Note to RFC Editor. Please replace RFCXXXX with the number for this Note to RFC Editor. Please replace RFCXXXX with the number for this
RFC. RFC.
All new entries must define the Label Name, Label, and XML Type but All new entries must define the Label Name, Label, and XML Type but
the CBOR labels SHOULD be left empty as CBOR will use the string the CBOR labels SHOULD be left empty as CBOR will use the string
encoding for any new labels. The ID fields contains the EXI schemaID encoding for any new labels. The ID fields contains the EXI schemaId
of the first Schema which includes this label or is empty if this value of the first Schema which includes this label or is empty if
label was not intended for use with EXI. The Note field SHOULD this label was not intended for use with EXI. The Note field SHOULD
contain information about where to find out more information about contain information about where to find out more information about
this label. this label.
The JSON, CBOR, and EXI types are derived from the XML type. All XML The JSON, CBOR, and EXI types are derived from the XML type. All XML
numeric types such as double, float, integer and int become a JSON numeric types such as double, float, integer and int become a JSON
Number. XML boolean and string become a JSON Boolean and String Number. XML boolean and string become a JSON Boolean and String
respectively. CBOR represents numeric values with a CBOR type that respectively. CBOR represents numeric values with a CBOR type that
does not loose any information from the JSON value. EXI uses the XML does not loose any information from the JSON value. EXI uses the XML
types. types.
skipping to change at page 29, line 27 skipping to change at page 30, line 27
All new SenML labels that have "base" semantics (see Section 4.1) All new SenML labels that have "base" semantics (see Section 4.1)
MUST start with character 'b'. Regular labels MUST NOT start with MUST start with character 'b'. Regular labels MUST NOT start with
that character. that character.
Extensions that add a label that is intended for use with XML need to Extensions that add a label that is intended for use with XML need to
create a new RelaxNG scheme that includes all the labels in the IANA create a new RelaxNG scheme that includes all the labels in the IANA
registry. registry.
Extensions that add a label that is intended for use with EXI need to Extensions that add a label that is intended for use with EXI need to
create a new XSD Schema that includes all the labels in the IANA create a new XSD Schema that includes all the labels in the IANA
registry then allocate a new EXI schemaID. Moving to the next letter registry then allocate a new EXI schemaId value. Moving to the next
in the alphabet is the suggested way to create the new EXI schemaID. letter in the alphabet is the suggested way to create the new value
Any labels with previously blank ID values SHOULD be updated in the for the EXI schemaId. Any labels with previously blank ID values
IANA table to have their ID set to this new schemaID value. SHOULD be updated in the IANA table to have their ID set to this new
schemaId value.
11.3. Media Type Registration 12.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]. Clipboard formats are defined
for the JSON and XML form of lists but do not make sense for streams
or other formats.
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 October 7, 2016. was sent on October 31, 2016.
11.3.1. senml+json Media Type Registration 12.3.1. senml+json Media Type Registration
Type name: application Type name: application
Subtype name: senml+json and sensml+json Subtype name: senml+json
Required parameters: none
Optional parameters: none
Encoding considerations: Must be encoded as using a subset of the
encoding allowed in [RFC7159]. See RFC-AAAA for details. This
simplifies implementation of very simple system and does not impose
any significant limitations as all this data is meant for machine to
machine communications and is not meant to be human readable.
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 JSON
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 JSON object.
Published specification: RFC-AAAA
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.
Fragment identifier considerations: Fragment identification for
application/senml+json is supported by using fragment identifiers as
specified by RFC-AAAA.
Additional information:
Magic number(s): none
File extension(s): senml
Windows Clipboard Name: "JSON Sensor Measurement List"
Macintosh file type code(s): none
Macintosh Universal Type Identifier code: org.ietf.senml-json
conforms to public.text
Person & email address to contact for further information: Cullen
Jennings <fluffy@iii.ca>
Intended usage: COMMON
Restrictions on usage: None
Author: Cullen Jennings <fluffy@iii.ca>
Change controller: IESG
12.3.2. sensml+json Media Type Registration
Type name: application
Subtype name: sensml+json
Required parameters: none Required parameters: none
Optional parameters: none Optional parameters: none
Encoding considerations: Must be encoded as using a subset of the Encoding considerations: Must be encoded as using a subset of the
encoding allowed in [RFC7159]. See RFC-AAAA for details. This encoding allowed in [RFC7159]. See RFC-AAAA for details. This
simplifies implementation of very simple system and does not impose simplifies implementation of very simple system and does not impose
any significant limitations as all this data is meant for machine to any significant limitations as all this data is meant for machine to
machine communications and is not meant to be human readable. machine communications and is not meant to be human readable.
Security considerations: Sensor data can contain a wide range of Security considerations: Sensor data can contain a wide range of
information ranging from information that is very public, such the information ranging from information that is very public, such the
outside temperature in a given city, to very private information that outside temperature in a given city, to very private information that
requires integrity and confidentiality protection, such as patient requires integrity and confidentiality protection, such as patient
skipping to change at page 30, line 33 skipping to change at page 33, line 7
be used to ensure the receiver supports a minimal level of be used to ensure the receiver supports a minimal level of
functionality needed by the creator of the JSON object. functionality needed by the creator of the JSON object.
Published specification: RFC-AAAA Published specification: RFC-AAAA
Applications that use this media type: The type is used by systems Applications that use this media type: The type is used by systems
that report e.g., electrical power usage and environmental that report e.g., electrical power usage and environmental
information such as temperature and humidity. It can be used for a information such as temperature and humidity. It can be used for a
wide range of sensor reporting systems. wide range of sensor reporting systems.
Fragment identifier considerations: Fragment identification for
application/senml+json is supported by using fragment identifiers as
specified by RFC-AAAA.
Additional information: Additional information:
Magic number(s): none Magic number(s): none
File extension(s): senml and sensml File extension(s): sensml
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>
Change controller: IESG Change controller: IESG
11.3.2. senml+cbor Media Type Registration 12.3.3. senml+cbor Media Type Registration
Type name: application Type name: application
Subtype name: senml+cbor and sensml+cbor Subtype name: senml+cbor
Required parameters: none Required parameters: none
Optional parameters: none Optional parameters: none
Encoding considerations: Must be encoded as using [RFC7049]. See Encoding considerations: Must be encoded as using [RFC7049]. See
RFC-AAAA for details. RFC-AAAA for details.
Security considerations: Sensor data can contain a wide range of Security considerations: Sensor data can contain a wide range of
information ranging from information that is very public, such the information ranging from information that is very public, such the
skipping to change at page 31, line 41 skipping to change at page 34, line 18
be used to ensure the receiver supports a minimal level of be used to ensure the receiver supports a minimal level of
functionality needed by the creator of the CBOR object. functionality needed by the creator of the CBOR object.
Published specification: RFC-AAAA Published specification: RFC-AAAA
Applications that use this media type: The type is used by systems Applications that use this media type: The type is used by systems
that report e.g., electrical power usage and environmental that report e.g., electrical power usage and environmental
information such as temperature and humidity. It can be used for a information such as temperature and humidity. It can be used for a
wide range of sensor reporting systems. wide range of sensor reporting systems.
Fragment identifier considerations: Fragment identification for
application/senml+cbor is supported by using fragment identifiers as
specified by RFC-AAAA.
Additional information: Additional information:
Magic number(s): none Magic number(s): none
File extension(s): senmlc and sensmlc File extension(s): senmlc
Macintosh file type code(s): none Macintosh file type code(s): none
Macintosh Universal Type Identifier code: org.ietf.senml-cbor
conforms to public.data
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>
Change controller: IESG Change controller: IESG
11.3.3. senml+xml Media Type Registration 12.3.4. sensml+cbor Media Type Registration
Type name: application Type name: application
Subtype name: senml+xml and sensml+xml Subtype name: sensml+cbor
Required parameters: none
Optional parameters: none
Encoding considerations: Must be encoded as using [RFC7049]. See
RFC-AAAA for details.
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 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
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.
Fragment identifier considerations: Fragment identification for
application/senml+cbor is supported by using fragment identifiers as
specified by RFC-AAAA.
Additional information:
Magic number(s): none
File extension(s): sensmlc
Macintosh file type code(s): none
Person & email address to contact for further information: Cullen
Jennings <fluffy@iii.ca>
Intended usage: COMMON
Restrictions on usage: None
Author: Cullen Jennings <fluffy@iii.ca>
Change controller: IESG
12.3.5. senml+xml Media Type Registration
Type name: application
Subtype name: senml+xml
Required parameters: none Required parameters: none
Optional parameters: none Optional parameters: none
Encoding considerations: Must be encoded as using Encoding considerations: Must be encoded as using
[W3C.REC-xml-20081126]. See RFC-AAAA for details. [W3C.REC-xml-20081126]. See RFC-AAAA for details.
Security considerations: Sensor data can contain a wide range of Security considerations: Sensor data can contain a wide range of
information ranging from information that is very public, such the information ranging from information that is very public, such the
skipping to change at page 32, line 46 skipping to change at page 36, line 41
in the senml tag can be used to ensure the receiver supports a in the senml tag can be used to ensure the receiver supports a
minimal level of functionality needed by the creator of the XML. 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: The type is used by systems Applications that use this media type: The type is used by systems
that report e.g., electrical power usage and environmental that report e.g., electrical power usage and environmental
information such as temperature and humidity. It can be used for a information such as temperature and humidity. It can be used for a
wide range of sensor reporting systems. wide range of sensor reporting systems.
Fragment identifier considerations: Fragment identification for
application/senml+xml is supported by using fragment identifiers as
specified by RFC-AAAA.
Additional information: Additional information:
Magic number(s): none Magic number(s): none
File extension(s): senmlx and sensmlx File extension(s): senmlx
Windows Clipboard Name: "XML Sensor Measurement List"
Macintosh file type code(s): none Macintosh file type code(s): none
Macintosh Universal Type Identifier code: org.ietf.senml-xml conforms
to public.xml
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>
Change controller: IESG Change controller: IESG
11.3.4. senml+exi Media Type Registration 12.3.6. sensml+xml Media Type Registration
Type name: application Type name: application
Subtype name: senml+exi and sensml+exi Subtype name: sensml+xml
Required parameters: none
Optional parameters: none
Encoding considerations: Must be encoded as using
[W3C.REC-xml-20081126]. See RFC-AAAA for details.
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
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.
Fragment identifier considerations: Fragment identification for
application/senml+xml is supported by using fragment identifiers as
specified by RFC-AAAA.
Additional information:
Magic number(s): none
File extension(s): sensmlx
Macintosh file type code(s): none
Person & email address to contact for further information: Cullen
Jennings <fluffy@iii.ca>
Intended usage: COMMON
Restrictions on usage: None
Author: Cullen Jennings <fluffy@iii.ca>
Change controller: IESG
12.3.7. senml+exi Media Type Registration
Type name: application
Subtype name: senml+exi
Required parameters: none Required parameters: none
Optional parameters: none Optional parameters: none
Encoding considerations: Must be encoded as using Encoding considerations: Must be encoded as using
[W3C.REC-exi-20140211]. See RFC-AAAA for details. [W3C.REC-exi-20140211]. See RFC-AAAA for details.
Security considerations: Sensor data can contain a wide range of Security considerations: Sensor data can contain a wide range of
information ranging from information that is very public, such the information ranging from information that is very public, such the
skipping to change at page 34, line 7 skipping to change at page 39, line 22
Further information on using schemas to guide the EXI can be found in Further information on using schemas to guide the EXI can be found in
RFC-AAAA. RFC-AAAA.
Published specification: RFC-AAAA Published specification: RFC-AAAA
Applications that use this media type: The type is used by systems Applications that use this media type: The type is used by systems
that report e.g., electrical power usage and environmental that report e.g., electrical power usage and environmental
information such as temperature and humidity. It can be used for a information such as temperature and humidity. It can be used for a
wide range of sensor reporting systems. wide range of sensor reporting systems.
Fragment identifier considerations: Fragment identification for
application/senml+exi is supported by using fragment identifiers as
specified by RFC-AAAA.
Additional information: Additional information:
Magic number(s): none Magic number(s): none
File extension(s): senmle and sensmle File extension(s): senmle
Macintosh file type code(s): none Macintosh file type code(s): none
Macintosh Universal Type Identifier code: org.ietf.senml-exi conforms
to public.data
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>
Change controller: IESG Change controller: IESG
11.4. XML Namespace Registration 12.3.8. sensml+exi Media Type Registration
Type name: application
Subtype name: sensml+exi
Required parameters: none
Optional parameters: none
Encoding considerations: Must be encoded as using
[W3C.REC-exi-20140211]. See RFC-AAAA for details.
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.
Further information on using schemas to guide the EXI can be found in
RFC-AAAA.
Published specification: RFC-AAAA
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.
Fragment identifier considerations: Fragment identification for
application/senml+exi is supported by using fragment identifiers as
specified by RFC-AAAA.
Additional information:
Magic number(s): none
File extension(s): sensmle
Macintosh file type code(s): none
Person & email address to contact for further information: Cullen
Jennings <fluffy@iii.ca>
Intended usage: COMMON
Restrictions on usage: None
Author: Cullen Jennings <fluffy@iii.ca>
Change controller: IESG
12.4. XML Namespace Registration
This document registers the following XML namespaces in the IETF XML This document registers the following XML namespaces in the IETF XML
registry defined in [RFC3688]. registry defined in [RFC3688].
URI: urn:ietf:params:xml:ns:senml URI: urn:ietf:params:xml:ns:senml
Registrant Contact: The IESG. Registrant Contact: The IESG.
XML: N/A, the requested URIs are XML namespaces XML: N/A, the requested URIs are XML namespaces
11.5. CoAP Content-Format Registration 12.5. CoAP Content-Format Registration
IANA is requested to assign CoAP Content-Format IDs for the SenML IANA is requested to assign CoAP Content-Format IDs for the SenML
media types in the "CoAP Content-Formats" sub-registry, within the media types in the "CoAP Content-Formats" sub-registry, within the
"CoRE Parameters" registry [RFC7252]. All IDs are assigned from the "CoRE Parameters" registry [RFC7252]. All IDs are assigned from the
"Expert Review" (0-255) range. The assigned IDs are show in Table 7. "Expert Review" (0-255) range. The assigned IDs are show in Table 7.
+-------------------------+-----+ +-------------------------+-----+
| Media type | ID | | Media type | ID |
+-------------------------+-----+ +-------------------------+-----+
| application/senml+json | TBD | | application/senml+json | TBD |
skipping to change at page 35, line 20 skipping to change at page 42, line 5
| application/senml+cbor | TBD | | application/senml+cbor | TBD |
| application/sensml+cbor | TBD | | application/sensml+cbor | TBD |
| application/senml+xml | TBD | | application/senml+xml | TBD |
| application/sensml+xml | TBD | | application/sensml+xml | TBD |
| application/senml+exi | TBD | | application/senml+exi | TBD |
| application/sensml+exi | TBD | | application/sensml+exi | TBD |
+-------------------------+-----+ +-------------------------+-----+
Table 7: CoAP Content-Format IDs Table 7: CoAP Content-Format IDs
12. Security Considerations 13. Security Considerations
See Section 13. Further discussion of security properties can be See Section 14. Further discussion of security properties can be
found in Section 11.3. found in Section 12.3.
13. Privacy Considerations 14. Privacy Considerations
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 15. Acknowledgement
We would like to thank Alexander Pelov, Andrew McClure, Andrew We would like to thank Alexander Pelov, Andrew McClure, Andrew
Mcgregor, Bjoern Hoehrmann, Christian Amsuess, Christian Groves, Mcgregor, Bjoern Hoehrmann, Christian Amsuess, Christian Groves,
Daniel Peintner, Jan-Piet Mens, Joe Hildebrand, John Klensin, Karl Daniel Peintner, Jan-Piet Mens, Joe Hildebrand, John Klensin, Karl
Palsson, Lennart Duhrsen, Lisa Dusseault, Lyndsay Campbell, Martin Palsson, Lennart Duhrsen, Lisa Dusseault, Lyndsay Campbell, Martin
Thomson, Michael Koster, and Stephen Farrell, for their review Thomson, Michael Koster, and Stephen Farrell, for their review
comments. comments.
15. References 16. References
15.1. Normative References 16.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", "Standard for Binary Floating-Point Arithmetic", IEEE
IEEE Standard 754, August 1985. 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, Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/
DOI 10.17487/RFC2119, March 1997, 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, Specifications and Registration Procedures", BCP 13, RFC
RFC 6838, DOI 10.17487/RFC6838, January 2013, 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, Application Protocol (CoAP)", RFC 7252, DOI 10.17487/
DOI 10.17487/RFC7252, June 2014, 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-20140211] [W3C.REC-exi-20140211]
Schneider, J., Kamiya, T., Peintner, D., and R. Kyusakov, Schneider, J., Kamiya, T., Peintner, D., and R. Kyusakov,
"Efficient XML Interchange (EXI) Format 1.0 (Second "Efficient XML Interchange (EXI) Format 1.0 (Second
Edition)", World Wide Web Consortium Recommendation REC- Edition)", World Wide Web Consortium Recommendation REC-
exi-20140211, February 2014, exi-20140211, February 2014,
<http://www.w3.org/TR/2014/REC-exi-20140211>. <http://www.w3.org/TR/2014/REC-exi-20140211>.
[W3C.REC-xml-20081126] [W3C.REC-xml-20081126]
Bray, T., Paoli, J., Sperberg-McQueen, M., Maler, E., and Bray, T., Paoli, J., Sperberg-McQueen, M., Maler, E., and
F. Yergeau, "Extensible Markup Language (XML) 1.0 (Fifth F. Yergeau, "Extensible Markup Language (XML) 1.0 (Fifth
Edition)", World Wide Web Consortium Recommendation REC- Edition)", World Wide Web Consortium Recommendation REC-
xml-20081126, November 2008, xml-20081126, November 2008,
<http://www.w3.org/TR/2008/REC-xml-20081126>. <http://www.w3.org/TR/2008/REC-xml-20081126>.
15.2. Informative References 16.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-09 (work structures", draft-greevenbosch-appsawg-cbor-cddl-09 (work
skipping to change at page 37, line 41 skipping to change at page 44, line 27
[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, Resource Identifier (URI): Generic Syntax", STD 66, RFC
RFC 3986, DOI 10.17487/RFC3986, January 2005, 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, Unique IDentifier (UUID) URN Namespace", RFC 4122, DOI
DOI 10.17487/RFC4122, July 2005, 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, Address Text Representation", RFC 5952, DOI 10.17487/
DOI 10.17487/RFC5952, August 2010, 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>.
[RFC7111] Hausenblas, M., Wilde, E., and J. Tennison, "URI Fragment
Identifiers for the text/csv Media Type", RFC 7111, DOI
10.17487/RFC7111, January 2014,
<http://www.rfc-editor.org/info/rfc7111>.
[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>.
[UCUM] Schadow, G. and C. McDonald, "The Unified Code for Units [UCUM] Schadow, G. and C. McDonald, "The Unified Code for Units
of Measure (UCUM)", Regenstrief Institute and Indiana of Measure (UCUM)", Regenstrief Institute and Indiana
University School of Informatics, 2013, University School of Informatics, 2013,
<http://unitsofmeasure.org/ucum.html>. <http://unitsofmeasure.org/ucum.html>.
 End of changes. 66 change blocks. 
109 lines changed or deleted 442 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/