draft-ietf-core-senml-16.txt | rfc8428.txt | |||
---|---|---|---|---|
Network Working Group C. Jennings | Internet Engineering Task Force (IETF) C. Jennings | |||
Internet-Draft Cisco | Request for Comments: 8428 Cisco | |||
Intended status: Standards Track Z. Shelby | Category: Standards Track Z. Shelby | |||
Expires: November 19, 2018 ARM | ISSN: 2070-1721 ARM | |||
J. Arkko | J. Arkko | |||
A. Keranen | A. Keranen | |||
Ericsson | Ericsson | |||
C. Bormann | C. Bormann | |||
Universitaet Bremen TZI | Universitaet Bremen TZI | |||
May 18, 2018 | August 2018 | |||
Sensor Measurement Lists (SenML) | Sensor Measurement Lists (SenML) | |||
draft-ietf-core-senml-16 | ||||
Abstract | Abstract | |||
This specification defines a format for representing simple sensor | This specification defines a format for representing simple sensor | |||
measurements and device parameters in the Sensor Measurement Lists | measurements and device parameters in 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 one of these media types in protocols | temperature sensor, could use one of these media types in protocols | |||
such as HTTP or CoAP to transport the measurements of the sensor or | such as HTTP or the Constrained Application Protocol (CoAP) to | |||
to be configured. | transport the measurements of the sensor or to be configured. | |||
Status of This Memo | Status of This Memo | |||
This Internet-Draft is submitted in full conformance with the | This is an Internet Standards Track document. | |||
provisions of BCP 78 and BCP 79. | ||||
Internet-Drafts are working documents of the Internet Engineering | ||||
Task Force (IETF). Note that other groups may also distribute | ||||
working documents as Internet-Drafts. The list of current Internet- | ||||
Drafts is at https://datatracker.ietf.org/drafts/current/. | ||||
Internet-Drafts are draft documents valid for a maximum of six months | This document is a product of the Internet Engineering Task Force | |||
and may be updated, replaced, or obsoleted by other documents at any | (IETF). It represents the consensus of the IETF community. It has | |||
time. It is inappropriate to use Internet-Drafts as reference | received public review and has been approved for publication by the | |||
material or to cite them other than as "work in progress." | Internet Engineering Steering Group (IESG). Further information on | |||
Internet Standards is available in Section 2 of RFC 7841. | ||||
This Internet-Draft will expire on November 19, 2018. | Information about the current status of this document, any errata, | |||
and how to provide feedback on it may be obtained at | ||||
https://www.rfc-editor.org/info/rfc8428. | ||||
Copyright Notice | Copyright Notice | |||
Copyright (c) 2018 IETF Trust and the persons identified as the | Copyright (c) 2018 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 | |||
(https://trustee.ietf.org/license-info) in effect on the date of | (https://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 | |||
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 . . . . . . . . . . . . . . . . . . . . . . . . . 6 | |||
4. SenML Structure and Semantics . . . . . . . . . . . . . . . . 6 | 4. SenML Structure and Semantics . . . . . . . . . . . . . . . . 6 | |||
4.1. Base Fields . . . . . . . . . . . . . . . . . . . . . . . 6 | 4.1. Base Fields . . . . . . . . . . . . . . . . . . . . . . . 7 | |||
4.2. Regular Fields . . . . . . . . . . . . . . . . . . . . . 7 | 4.2. Regular Fields . . . . . . . . . . . . . . . . . . . . . 7 | |||
4.3. SenML Labels . . . . . . . . . . . . . . . . . . . . . . 8 | 4.3. SenML Labels . . . . . . . . . . . . . . . . . . . . . . 8 | |||
4.4. Extensibility . . . . . . . . . . . . . . . . . . . . . . 8 | 4.4. Extensibility . . . . . . . . . . . . . . . . . . . . . . 9 | |||
4.5. Records and Their Fields . . . . . . . . . . . . . . . . 9 | 4.5. Records and Their Fields . . . . . . . . . . . . . . . . 9 | |||
4.5.1. Names . . . . . . . . . . . . . . . . . . . . . . . . 9 | 4.5.1. Names . . . . . . . . . . . . . . . . . . . . . . . . 9 | |||
4.5.2. Units . . . . . . . . . . . . . . . . . . . . . . . . 9 | 4.5.2. Units . . . . . . . . . . . . . . . . . . . . . . . . 10 | |||
4.5.3. Time . . . . . . . . . . . . . . . . . . . . . . . . 10 | 4.5.3. Time . . . . . . . . . . . . . . . . . . . . . . . . 10 | |||
4.5.4. Values . . . . . . . . . . . . . . . . . . . . . . . 11 | 4.5.4. Values . . . . . . . . . . . . . . . . . . . . . . . 11 | |||
4.6. Resolved Records . . . . . . . . . . . . . . . . . . . . 11 | 4.6. Resolved Records . . . . . . . . . . . . . . . . . . . . 12 | |||
4.7. Associating Meta-data . . . . . . . . . . . . . . . . . . 12 | 4.7. Associating Metadata . . . . . . . . . . . . . . . . . . 12 | |||
4.8. Sensor Streaming Measurement Lists (SensML) . . . . . . . 12 | 4.8. Sensor Streaming Measurement Lists (SenSML) . . . . . . . 12 | |||
4.9. Configuration and Actuation usage . . . . . . . . . . . . 12 | 4.9. Configuration and Actuation Usage . . . . . . . . . . . . 13 | |||
5. JSON Representation (application/senml+json) . . . . . . . . 13 | 5. JSON Representation (application/senml+json) . . . . . . . . 13 | |||
5.1. Examples . . . . . . . . . . . . . . . . . . . . . . . . 14 | 5.1. Examples . . . . . . . . . . . . . . . . . . . . . . . . 14 | |||
5.1.1. Single Datapoint . . . . . . . . . . . . . . . . . . 14 | 5.1.1. Single Data Point . . . . . . . . . . . . . . . . . . 14 | |||
5.1.2. Multiple Datapoints . . . . . . . . . . . . . . . . . 14 | 5.1.2. Multiple Data Points . . . . . . . . . . . . . . . . 14 | |||
5.1.3. Multiple Measurements . . . . . . . . . . . . . . . . 15 | 5.1.3. Multiple Measurements . . . . . . . . . . . . . . . . 15 | |||
5.1.4. Resolved Data . . . . . . . . . . . . . . . . . . . . 16 | 5.1.4. Resolved Data . . . . . . . . . . . . . . . . . . . . 17 | |||
5.1.5. Multiple Data Types . . . . . . . . . . . . . . . . . 17 | 5.1.5. Multiple Data Types . . . . . . . . . . . . . . . . . 17 | |||
5.1.6. Collection of Resources . . . . . . . . . . . . . . . 17 | 5.1.6. Collection of Resources . . . . . . . . . . . . . . . 18 | |||
5.1.7. Setting an Actuator . . . . . . . . . . . . . . . . . 17 | 5.1.7. Setting an Actuator . . . . . . . . . . . . . . . . . 18 | |||
6. CBOR Representation (application/senml+cbor) . . . . . . . . 18 | 6. CBOR Representation (application/senml+cbor) . . . . . . . . 19 | |||
7. XML Representation (application/senml+xml) . . . . . . . . . 20 | 7. XML Representation (application/senml+xml) . . . . . . . . . 21 | |||
8. EXI Representation (application/senml-exi) . . . . . . . . . 22 | 8. EXI Representation (application/senml-exi) . . . . . . . . . 23 | |||
9. Fragment Identification Methods . . . . . . . . . . . . . . . 25 | 9. Fragment Identification Methods . . . . . . . . . . . . . . . 26 | |||
9.1. Fragment Identification Examples . . . . . . . . . . . . 25 | 9.1. Fragment Identification Examples . . . . . . . . . . . . 26 | |||
9.2. Fragment Identification for the XML and EXI Formats . . . 26 | 9.2. Fragment Identification for XML and EXI Formats . . . . . 27 | |||
10. Usage Considerations . . . . . . . . . . . . . . . . . . . . 26 | 10. Usage Considerations . . . . . . . . . . . . . . . . . . . . 27 | |||
11. CDDL . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 | 11. CDDL . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 | |||
12. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 29 | 12. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 30 | |||
12.1. Units Registry . . . . . . . . . . . . . . . . . . . . . 29 | 12.1. SenML Units Registry . . . . . . . . . . . . . . . . . . 30 | |||
12.2. SenML Label Registry . . . . . . . . . . . . . . . . . . 33 | 12.2. SenML Labels Registry . . . . . . . . . . . . . . . . . 35 | |||
12.3. Media Type Registrations . . . . . . . . . . . . . . . . 34 | 12.3. Media Type Registrations . . . . . . . . . . . . . . . . 36 | |||
12.3.1. senml+json Media Type Registration . . . . . . . . . 35 | 12.3.1. senml+json Media Type Registration . . . . . . . . . 37 | |||
12.3.2. sensml+json Media Type Registration . . . . . . . . 36 | 12.3.2. sensml+json Media Type Registration . . . . . . . . 38 | |||
12.3.3. senml+cbor Media Type Registration . . . . . . . . . 37 | 12.3.3. senml+cbor Media Type Registration . . . . . . . . . 39 | |||
12.3.4. sensml+cbor Media Type Registration . . . . . . . . 38 | 12.3.4. sensml+cbor Media Type Registration . . . . . . . . 41 | |||
12.3.5. senml+xml Media Type Registration . . . . . . . . . 39 | 12.3.5. senml+xml Media Type Registration . . . . . . . . . 42 | |||
12.3.6. sensml+xml Media Type Registration . . . . . . . . . 41 | 12.3.6. sensml+xml Media Type Registration . . . . . . . . . 43 | |||
12.3.7. senml-exi Media Type Registration . . . . . . . . . 42 | 12.3.7. senml-exi Media Type Registration . . . . . . . . . 44 | |||
12.3.8. sensml-exi Media Type Registration . . . . . . . . . 43 | 12.3.8. sensml-exi Media Type Registration . . . . . . . . . 45 | |||
12.4. XML Namespace Registration . . . . . . . . . . . . . . . 44 | 12.4. XML Namespace Registration . . . . . . . . . . . . . . . 47 | |||
12.5. CoAP Content-Format Registration . . . . . . . . . . . . 44 | 12.5. CoAP Content-Format Registration . . . . . . . . . . . . 47 | |||
13. Security Considerations . . . . . . . . . . . . . . . . . . . 45 | 13. Security Considerations . . . . . . . . . . . . . . . . . . . 47 | |||
14. Privacy Considerations . . . . . . . . . . . . . . . . . . . 46 | 14. Privacy Considerations . . . . . . . . . . . . . . . . . . . 48 | |||
15. Acknowledgement . . . . . . . . . . . . . . . . . . . . . . . 46 | 15. References . . . . . . . . . . . . . . . . . . . . . . . . . 49 | |||
16. References . . . . . . . . . . . . . . . . . . . . . . . . . 46 | 15.1. Normative References . . . . . . . . . . . . . . . . . . 49 | |||
16.1. Normative References . . . . . . . . . . . . . . . . . . 46 | 15.2. Informative References . . . . . . . . . . . . . . . . . 51 | |||
16.2. Informative References . . . . . . . . . . . . . . . . . 49 | Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . . 53 | |||
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 51 | Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 54 | |||
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 | |||
a format and media types for carrying simple sensor information in a | a format and media types for carrying simple sensor information in | |||
protocol such as HTTP [RFC7230] or CoAP [RFC7252]. The SenML format | protocols such as HTTP [RFC7230] or CoAP [RFC7252]. The SenML format | |||
is designed so that processors with very limited capabilities could | is designed so that processors with very limited capabilities could | |||
easily encode a sensor measurement into the media type, while at the | easily encode a sensor measurement into the media type, while at the | |||
same time a server parsing the data could relatively efficiently | same time, a server parsing the data could collect a large number of | |||
collect a large number of sensor measurements. SenML can be used for | sensor measurements in a relatively efficient manner. SenML can be | |||
a variety of data flow models, most notably data feeds pushed from a | used for a variety of data flow models, most notably data feeds | |||
sensor to a collector, and the web resource model where the sensor is | pushed from a sensor to a collector, and for the web resource model | |||
requested as a resource representation (e.g., "GET /sensor/ | where the sensor data is requested as a resource representation | |||
temperature"). | (e.g., "GET /sensor/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 | |||
to make that a fairly minimal set of auxiliary information for | tries to make that a fairly minimal set of auxiliary information for | |||
efficiency reason. Other information about the sensor can be | efficiency reasons. 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 Constrained RESTful | |||
[RFC6690]. | Environments (CoRE) Link Format [RFC6690]. | |||
SenML is defined by a data model for measurements and simple meta- | SenML is defined by a data model for measurements and simple metadata | |||
data about measurements and devices. The data is structured as a | about measurements and devices. The data is structured as a single | |||
single array that contains a series of SenML Records which can each | array that contains a series of SenML Records that can each contain | |||
contain fields such as an unique identifier for the sensor, the time | fields such as a unique identifier for the sensor, the time the | |||
the measurement was made, the unit the measurement is in, and the | measurement was made, the unit the measurement is in, and the current | |||
current value of the sensor. Serializations for this data model are | value of the sensor. Serializations for this data model are defined | |||
defined for JSON [RFC8259], CBOR [RFC7049], XML | for JSON [RFC8259], CBOR [RFC7049], XML [W3C.REC-xml-20081126], and | |||
[W3C.REC-xml-20081126], and Efficient XML Interchange (EXI) | Efficient XML Interchange (EXI) [W3C.REC-exi-20140211]. | |||
[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 | |||
current value of 23.1 degrees Celsius. | current value of 23.1 degrees Celsius. | |||
2. Requirements and Design Goals | 2. Requirements and Design Goals | |||
The design goal is to be able to send simple sensor measurements in | The design goal is to be able to send simple sensor measurements in | |||
small packets from large numbers of constrained devices. Keeping the | small packets from large numbers of constrained devices. Keeping the | |||
total size of payload small makes it easy to use SenML also in | total size of the payload small makes it easy to also use SenML in | |||
constrained networks, e.g., in a 6LoWPAN [RFC4944]. It is always | constrained networks, e.g., in an IPv6 over Low-Power Wireless | |||
difficult to define what small code is, but there is a desire to be | Personal Area Network (6LoWPAN) [RFC4944]. It is always difficult to | |||
able to implement this in roughly 1 KB of flash on a 8 bit | define what small code is, but there is a desire to be able to | |||
microprocessor. Experience with power meters and other large scale | implement this in roughly 1 KB of flash on an 8-bit microprocessor. | |||
deployments has indicated that the solution needs to support allowing | Experience with power meters and other large-scale deployments has | |||
multiple measurements to be batched into a single HTTP or CoAP | indicated that the solution needs to support allowing multiple | |||
request. This "batch" upload capability allows the server side to | measurements to be batched into a single HTTP or CoAP request. This | |||
efficiently support a large number of devices. It also conveniently | "batch" upload capability allows the server side to efficiently | |||
supports batch transfers from proxies and storage devices, even in | support a large number of devices. It also conveniently supports | |||
situations where the sensor itself sends just a single data item at a | batch transfers from proxies and storage devices, even in situations | |||
time. The multiple measurements could be from multiple related | where the sensor itself sends just a single data item at a time. The | |||
sensors or from the same sensor but at different times. | multiple measurements could be from multiple related sensors or from | |||
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 given by the "v" field, the time of a | The value of a measurement is given by the "v" field, the time of a | |||
measurement is in the "t" field, the "n" field has a unique sensor | measurement is in the "t" field, the "n" field has a unique sensor | |||
name, and the unit of the measurement is carried in the "u" field. | name, and the unit of the measurement is carried in the "u" field. | |||
[ | [ | |||
{"n":"urn:dev:ow:10e2073a01080063","u":"Cel","t":1.276020076e+09, | {"n":"urn:dev:ow:10e2073a01080063","u":"Cel","t":1.276020076e+09, | |||
"v":23.5}, | "v":23.5}, | |||
{"n":"urn:dev:ow:10e2073a01080063","u":"Cel","t":1.276020091e+09, | {"n":"urn:dev:ow:10e2073a01080063","u":"Cel","t":1.276020091e+09, | |||
"v":23.6} | "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" | |||
field in each SenML Record so there is a concept of a Base Name which | field in each SenML Record, so there is a concept of a Base Name, | |||
is simply a string that is prepended to the Name field of all | which 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, | {"bn":"urn:dev:ow:10e2073a01080063","u":"Cel","t":1.276020076e+09, | |||
"v":23.5}, | "v":23.5}, | |||
{"u":"Cel","t":1.276020091e+09, | {"u":"Cel","t":1.276020091e+09, | |||
"v":23.6} | "v":23.6} | |||
] | ] | |||
In the above example the Base Name is in the "bn" field and the "n" | In the above example, the Base Name is in the "bn" field, and the "n" | |||
fields in each Record are the empty string so they are omitted. | fields in each Record are empty strings, 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 | |||
absolute and relative times. Time is represented in floating point | supports absolute and relative times. Time is represented in | |||
as seconds. Values greater than or equal to 2**28 represent an | floating point as seconds. Values greater than or equal to 2**28 | |||
absolute time relative to the Unix epoch. Values less than 2**28 | represent an absolute time relative to the Unix epoch. Values less | |||
represent time relative to the current time. | than 2**28 represent time relative to the current time. | |||
A simple sensor with no absolute wall clock time might take a | A simple sensor with no absolute wall-clock time might take a | |||
measurement every second, batch up 60 of them, and then send the | measurement every second, batch up 60 of them, and then send the | |||
batch to a server. It would include the relative time each | batch to a server. It would include the relative time each | |||
measurement was made compared to the time the batch was sent in each | measurement was made compared to the time the batch was sent in each | |||
SenML Record. The server might have accurate NTP time and use the | SenML Record. If the server has accurate time based on, e.g., the | |||
time it received the data, and the relative offset, to replace the | Network Time Protocol (NTP), it may use the time it received the data | |||
times in the SenML with absolute times before saving the SenML | and the relative offset to replace the times in the SenML with | |||
information in a document database. | absolute times before saving the SenML information 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 BCP | "OPTIONAL" in this document are to be interpreted as described in | |||
14 [RFC2119] [RFC8174] when, and only when, they appear in all | BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all | |||
capitals, as shown here. | capitals, as shown here. | |||
This document also uses the following terms: | This document also uses the following terms: | |||
SenML Record: One measurement or configuration instance in time | SenML Record: One measurement or configuration instance in time | |||
presented using the SenML data model. | presented using the SenML data model. | |||
SenML Pack: One or more SenML Records in an array structure. | SenML Pack: One or more SenML Records in an array structure. | |||
SenML Label: A short name used in SenML Records to denote different | SenML Label: A short name used in SenML Records to denote different | |||
SenML fields (e.g., "v" for "value"). | SenML fields (e.g., "v" for "value"). | |||
SenML Field: A component of a record that associates a value to a | SenML Field: A component of a record that associates a value to a | |||
SenML Label for this record. | SenML Label for this record. | |||
SensML: Sensor Streaming Measurement List (see Section 4.8). | SenSML: Sensor Streaming Measurement List (see Section 4.8). | |||
SensML Stream: One or more SenML Records to be processed as a | SenSML Stream: One or more SenML Records to be processed as a | |||
stream. | stream. | |||
This document uses the terms "attribute" and "tag" where they occur | This document uses the terms "attribute" and "tag" where they occur | |||
with the underlying technologies (XML, CBOR [RFC7049], and Link | with the underlying technologies (XML, CBOR [RFC7049], and the CoRE | |||
Format [RFC6690]), not for SenML concepts per se. Note that | Link Format [RFC6690]); they are not used for SenML concepts, per se. | |||
"attribute" has been widely used previously as a synonym for SenML | However, note that "attribute" has been widely used in the past as a | |||
"field", though. | synonym for the SenML "field". | |||
All comparisons of text strings are performed byte-by-byte (and | All comparisons of text strings are performed byte by byte, which | |||
therefore necessarily case-sensitive). | results in the comparisons being case sensitive. | |||
Where arithmetic is used, this specification uses the notation | Where arithmetic is used, this specification uses the familiar | |||
familiar from the programming language C, except that the operator | notation of the programming language C, except that the operator "**" | |||
"**" stands for exponentiation. | stands for exponentiation. | |||
4. SenML Structure and Semantics | 4. SenML Structure and Semantics | |||
Each SenML Pack carries a single array that represents a set of | Each SenML Pack carries a single array that represents a set of | |||
measurements and/or parameters. This array contains a series of | measurements and/or parameters. This array contains a series of | |||
SenML Records with several fields described below. There are two | SenML Records with several fields described below. There are two | |||
kinds of fields: base and regular. Both the base fields and the | kinds of fields: base and regular. Both the base and regular fields | |||
regular fields can be included in any SenML Record. The base fields | can be included in any SenML Record. The base fields apply to the | |||
apply to the entries in the Record and also to all Records after it | entries in the Record and also to all Records after it up to, but not | |||
up to, but not including, the next Record that has that same base | including, the next Record that has that same base field. All base | |||
field. All base fields are optional. Regular fields can be included | fields are optional. Regular fields can be included in any SenML | |||
in any SenML Record and apply only to that Record. | Record and apply only to that Record. | |||
4.1. Base Fields | 4.1. Base Fields | |||
Base Name: This is a string that is prepended to the names found in | Base Name: This is a string that is prepended to the names found in | |||
the entries. | the entries. | |||
Base Time: A base time that is added to the time found in an entry. | Base Time: A base time that is added to the time found in an entry. | |||
Base Unit: A base unit that is assumed for all entries, unless | Base Unit: A base unit that is assumed for all entries, unless | |||
otherwise indicated. If a record does not contain a Unit value, | otherwise indicated. If a record does not contain a Unit value, | |||
then the Base Unit is used. Otherwise the value found in the Unit | then the Base Unit is used. Otherwise, the value found in the | |||
(if any) is used. | Unit (if any) is used. | |||
Base Value: A base value is added to the value found in an entry, | Base Value: A base value is added to the value found in an entry, | |||
similar to Base Time. | similar to Base Time. | |||
Base Sum: A base sum is added to the sum found in an entry, similar | Base Sum: A base sum is added to the sum found in an entry, similar | |||
to Base Time. | to Base Time. | |||
Version: Version number of media type format. This field is an | Base Version: Version number of the media type format. This field | |||
optional positive integer and defaults to 5 if not present. [RFC | is an optional positive integer and defaults to 10 if not present. | |||
Editor: change the default value to 10 when this specification is | ||||
published as an RFC and remove this note] | ||||
4.2. Regular Fields | 4.2. Regular Fields | |||
Name: Name of the sensor or parameter. When appended to the Base | Name: Name of the sensor or parameter. When appended to the Base | |||
Name field, this must result in a globally unique identifier for | Name field, this must result in a globally unique identifier for | |||
the resource. The name is optional, if the Base Name is present. | the resource. The name is optional, if the Base Name is present. | |||
If the name is missing, Base Name must uniquely identify the | If the name is missing, the Base Name must uniquely identify the | |||
resource. This can be used to represent a large array of | resource. This can be used to represent a large array of | |||
measurements from the same sensor without having to repeat its | measurements from the same sensor without having to repeat its | |||
identifier on every measurement. | identifier on every measurement. | |||
Unit: Unit for a measurement value. Optional. | Unit: Unit for a measurement value. Optional. | |||
Value: Value of the entry. Optional if a Sum value is present, | Value: Value of the entry. Optional if a Sum value is present; | |||
otherwise required. Values are represented using basic data | otherwise, it's required. Values are represented using basic data | |||
types. This specification defines floating point numbers ("v" | types. This specification defines floating-point numbers ("v" | |||
field for "Value"), booleans ("vb" for "Boolean Value"), strings | field for "Value"), booleans ("vb" for "Boolean Value"), strings | |||
("vs" for "String Value") and binary data ("vd" for "Data Value"). | ("vs" for "String Value"), and binary data ("vd" for "Data | |||
Exactly one value field MUST appear unless there is Sum field in | Value"). Exactly one Value field MUST appear unless there is a | |||
which case it is allowed to have no Value field. | Sum field, in which case it is allowed to have no Value field. | |||
Sum: Integrated sum of the values over time. Optional. This field | Sum: Integrated sum of the values over time. Optional. This field | |||
is in the unit specified in the Unit value multiplied by seconds. | is in the unit specified in the Unit value multiplied by seconds. | |||
For historical reason it is named sum instead of integral. | For historical reasons, it is named "sum" instead of "integral". | |||
Time: Time when value was recorded. Optional. | Time: Time when the value was recorded. Optional. | |||
Update Time: Period of time in seconds that represents the maximum | Update Time: Period of 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. Optional. This can be used to detect the failure of | measurement. Optional. This can be used to detect the failure of | |||
sensors or communications path from the sensor. | sensors or the communications path from the sensor. | |||
4.3. SenML Labels | 4.3. SenML Labels | |||
Table 1 provides an overview of all SenML fields defined by this | Table 1 provides an overview of all SenML fields defined by this | |||
document with their respective labels and data types. | document with their respective labels and data types. | |||
+---------------+-------+------------+------------+------------+ | +---------------+-------+------------+------------+------------+ | |||
| Name | Label | CBOR Label | JSON Type | XML Type | | | Name | Label | CBOR Label | JSON Type | XML Type | | |||
+---------------+-------+------------+------------+------------+ | +---------------+-------+------------+------------+------------+ | |||
| Base Name | bn | -2 | String | string | | | Base Name | bn | -2 | String | string | | |||
| Base Time | bt | -3 | Number | double | | | Base Time | bt | -3 | Number | double | | |||
| Base Unit | bu | -4 | String | string | | | Base Unit | bu | -4 | String | string | | |||
| Base Value | bv | -5 | Number | double | | | Base Value | bv | -5 | Number | double | | |||
| Base Sum | bs | -6 | Number | double | | | Base Sum | bs | -6 | Number | double | | |||
| Version | bver | -1 | Number | int | | | Base Version | bver | -1 | Number | int | | |||
| Name | n | 0 | String | string | | | Name | n | 0 | String | string | | |||
| Unit | u | 1 | String | string | | | Unit | u | 1 | String | string | | |||
| Value | v | 2 | Number | double | | | Value | v | 2 | Number | double | | |||
| String Value | vs | 3 | String | string | | | String Value | vs | 3 | String | string | | |||
| Boolean Value | vb | 4 | Boolean | boolean | | | Boolean Value | vb | 4 | Boolean | boolean | | |||
| Data Value | vd | 8 | String (*) | string (*) | | | Data Value | vd | 8 | String (*) | string (*) | | |||
| Value Sum | s | 5 | Number | double | | | Sum | s | 5 | Number | double | | |||
| Time | t | 6 | Number | double | | | Time | t | 6 | Number | double | | |||
| Update Time | ut | 7 | Number | double | | | Update Time | ut | 7 | Number | double | | |||
+---------------+-------+------------+------------+------------+ | +---------------+-------+------------+------------+------------+ | |||
Table 1: SenML Labels | Table 1: SenML Labels | |||
(*) Data Value is base64 encoded string with URL safe alphabet as | (*) Data Value is a base64-encoded string with the URL-safe alphabet | |||
defined in Section 5 of [RFC4648], with padding omitted. | as defined in Section 5 of [RFC4648], with padding omitted. (In | |||
CBOR, the octets in the Data Value are encoded using a definite- | ||||
length byte string, major type 2.) | ||||
For details of the JSON representation see Section 5, for the CBOR | For details of the JSON representation, see Section 5; for CBOR, see | |||
Section 6, and for the XML Section 7. | Section 6; and for XML, see Section 7. | |||
4.4. Extensibility | 4.4. Extensibility | |||
The SenML format can be extended with further custom fields. Both | The SenML format can be extended with further custom fields. Both | |||
new base and regular fields are allowed. See Section 12.2 for | new base and regular fields are allowed. See Section 12.2 for | |||
details. Implementations MUST ignore fields they don't recognize | details. Implementations MUST ignore fields they don't recognize | |||
unless that field has a label name that ends with the '_' character | unless that field has a label name that ends with the "_" character, | |||
in which case an error MUST be generated. | in which case an error MUST be generated. | |||
All SenML Records in a Pack MUST have the same version number. This | All SenML Records in a Pack MUST have the same version number. This | |||
is typically done by adding a Base Version field to only the first | is typically done by adding a Base Version field to only the first | |||
Record in the Pack, or by using the default value. | Record in the Pack or by using the default value. | |||
Systems reading one of the objects MUST check for the Version field. | Systems reading one of the objects MUST check for the Base Version | |||
If this value is a version number larger than the version which the | field. If this value is a version number larger than the version | |||
system understands, the system MUST NOT use this object. This allows | that the system understands, the system MUST NOT use this object. | |||
the version number to indicate that the object contains structure or | This allows the version number to indicate that the object contains | |||
semantics that is different from what is defined in the present | structure or semantics that is different from what is defined in the | |||
document beyond just making use of the extension points provided | present document beyond just making use of the extension points | |||
here. New version numbers can only be defined in an RFC that updates | provided here. New version numbers can only be defined in an RFC | |||
this specification or it successors. | that updates this specification or its successors. | |||
4.5. Records and Their Fields | 4.5. Records and Their Fields | |||
4.5.1. Names | 4.5.1. Names | |||
The Name value is concatenated to the Base Name value to yield the | The Name value is concatenated to the Base Name value to yield the | |||
name of the sensor. The resulting concatenated name needs to | name of the sensor. The resulting concatenated name needs to | |||
uniquely identify and differentiate the sensor from all others. The | uniquely identify and differentiate the sensor from all others. The | |||
concatenated name MUST consist only of characters out of the set "A" | concatenated name MUST consist only of characters out of the set "A" | |||
to "Z", "a" to "z", "0" to "9", "-", ":", ".", "/", and "_"; | to "Z", "a" to "z", and "0" to "9", as well as "-", ":", ".", "/", | |||
furthermore, it MUST start with a character out of the set "A" to | and "_"; furthermore, it MUST start with a character out of the set | |||
"Z", "a" to "z", or "0" to "9". This restricted character set was | "A" to "Z", "a" to "z", or "0" to "9". This restricted character set | |||
chosen so that concatenated names can be used directly within various | was chosen so that concatenated names can be used directly within | |||
URI schemes (including segments of an HTTP path with no special | various URI schemes (including segments of an HTTP path with no | |||
encoding; note that a name that contains "/" characters maps into | special encoding; note that a name that contains "/" characters maps | |||
multiple URI path segments) and can be used directly in many | into multiple URI path segments) and can be used directly in many | |||
databases and analytic systems. [RFC5952] contains advice on | databases and analytic systems. [RFC5952] contains advice on | |||
encoding an IPv6 address in a name. See Section 14 for privacy | encoding an IPv6 address in a name. See Section 14 for privacy | |||
considerations that apply to the use of long-term stable unique | considerations that apply to the use of long-term stable unique | |||
identifiers. | identifiers. | |||
Although it is RECOMMENDED that concatenated names are represented as | Although it is RECOMMENDED that concatenated names be represented as | |||
URIs [RFC3986] or URNs [RFC8141], the restricted character set | URIs [RFC3986] or URNs [RFC8141], the restricted character set | |||
specified above puts strict limits on the URI schemes and URN | specified above puts strict limits on the URI schemes and URN | |||
namespaces that can be used. As a result, implementers need to take | namespaces that can be used. As a result, implementers need to take | |||
care in choosing the naming scheme for concatenated names, because | care in choosing the naming scheme for concatenated names, because | |||
such names both need to be unique and need to conform to the | such names both need to be unique and need to conform to the | |||
restricted character set. One approach is to include a bit string | restricted character set. One approach is to include a bit string | |||
that has guaranteed uniqueness (such as a 1-wire address [AN1796]). | that has guaranteed uniqueness (such as a 1-wire address [AN1796]). | |||
Some of the examples within this document use the device URN | Some of the examples within this document use the device URN | |||
namespace as specified in [I-D.ietf-core-dev-urn]. UUIDs [RFC4122] | namespace as specified in [DEVICE-URN]. Universally Unique | |||
are another way to generate a unique name. However, the restricted | Identifiers (UUIDs) [RFC4122] are another way to generate a unique | |||
character set does not allow the use of many URI schemes, such as the | name. However, the restricted character set does not allow the use | |||
'tag' scheme [RFC4151] and the 'ni' scheme [RFC6920], in names as | of many URI schemes, such as the "tag" scheme [RFC4151] and the "ni" | |||
such. The use of URIs with characters incompatible with this set, | scheme [RFC6920], in names as such. The use of URIs with characters | |||
and possible mapping rules between the two, are outside of the scope | incompatible with this set and possible mapping rules between the two | |||
of the present document. | are outside the scope of the present document. | |||
4.5.2. Units | 4.5.2. Units | |||
If the Record has no Unit, the Base Unit is used as the Unit. Having | If the Record has no Unit, the Base Unit is used as the Unit. Having | |||
no Unit and no Base Unit is allowed; any information that may be | no Unit and no Base Unit is allowed; any information that may be | |||
required about units applicable to the value then needs to be | required about units applicable to the value then needs to be | |||
provided by the application context. | provided by the application context. | |||
4.5.3. Time | 4.5.3. Time | |||
If either the Base Time or Time value is missing, the missing field | If either the Base Time or Time value is missing, the missing field | |||
is considered to have a value of zero. The Base Time and Time values | is considered to have a value of zero. The Base Time and Time values | |||
are added together to get the time of measurement. | are added together to get a value representing the time of | |||
measurement. | ||||
Values less than 268,435,456 (2**28) represent time relative to the | Values less than 268,435,456 (2**28) represent time relative to the | |||
current time. That is, a time of zero indicates that the sensor does | current time. That is, a time of zero indicates that the sensor does | |||
not know the absolute time and the measurement was made roughly | not know the absolute time and the measurement was made roughly | |||
"now". A negative value indicates seconds in the past from roughly | "now". A negative value indicates seconds in the past from roughly | |||
"now". Positive values up to 2**28 indicate seconds in the future | "now". Positive values up to 2**28 indicate seconds in the future | |||
from "now". Positive values can be used, e.g., for actuation use | from "now". An example for employing positive values would be | |||
when the desired change should happen in the future but the sender or | actuation use, when the desired change should happen in the future, | |||
the receiver does not have accurate time available. | but the sender or the receiver does not have accurate time available. | |||
Values greater than or equal to 2**28 represent an absolute time | Values greater than or equal to 2**28 represent an absolute time | |||
relative to the Unix epoch (1970-01-01T00:00Z in UTC time) and the | relative to the Unix epoch (1970-01-01T00:00Z in UTC time), and the | |||
time is counted same way as the Portable Operating System Interface | time is counted the same way as the Portable Operating System | |||
(POSIX) "seconds since the epoch" [TIME_T]. Therefore the smallest | Interface (POSIX) "seconds since the epoch" [TIME_T]. Therefore, the | |||
absolute time value that can be expressed (2**28) is 1978-07-04 | smallest absolute Time value that can be expressed (2**28) is | |||
21:24:16 UTC. | 1978-07-04 21:24:16 UTC. | |||
Because time values up to 2**28 are used for presenting time relative | Because Time values up to 2**28 are used for representing time | |||
to "now" and Time and Base Time are added together, care must be | relative to "now" and Time and Base Time are added together, care | |||
taken to ensure that the sum does not inadvertently reach 2**28 | must be taken to ensure that the sum does not inadvertently reach | |||
(i.e., absolute time) when relative time was intended to be used. | 2**28 (i.e., absolute time) when relative time was intended to be | |||
used. | ||||
Obviously, "now"-referenced SenML records are only useful within a | Obviously, SenML Records referenced to "now" are only useful within a | |||
specific communication context (e.g., based on information on when | specific communication context (e.g., based on information on when | |||
the SenML pack, or a specific record in a SensML stream, was sent) or | the SenML Pack, or a specific Record in a SenSML Stream, was sent) or | |||
together with some other context information that can be used for | together with some other context information that can be used for | |||
deriving a meaning of "now"; the expectation for any archival use is | deriving a meaning of "now"; the expectation for any archival use is | |||
that they will be processed into UTC-referenced records before that | that they will be processed into UTC-referenced records before that | |||
context would cease to be available. This specification deliberately | context would cease to be available. This specification deliberately | |||
leaves the accuracy of "now" very vague as it is determined by the | leaves the accuracy of "now" very vague as it is determined by the | |||
overall systems that use SenML. In a system where a sensor without | overall systems that use SenML. In a system where a sensor without | |||
wall-clock time sends a SenML record with a "now"-referenced time | wall-clock time sends a SenML Record with a time referenced to "now" | |||
over a high speed RS 485 link to an embedded system with accurate | over a high-speed RS-485 link to an embedded system with accurate | |||
time that resolves "now" based on the time of reception, the | time that resolves "now" based on the time of reception, the | |||
resulting time uncertainty could be within 1 ms. At the other | resulting time uncertainty could be within 1 ms. At the other | |||
extreme, a deployment that sends SenML wind speed readings over a LEO | extreme, a deployment that sends SenML wind-speed readings over a | |||
satellite link from a mountain valley might have resulting reception | Low-Earth Orbit (LEO) satellite link from a mountain valley might | |||
time values that are easily a dozen minutes off the actual time of | have resulting reception Time values that are easily a dozen minutes | |||
the sensor reading, with the time uncertainty depending on satellite | off the actual time of the sensor reading, with the time uncertainty | |||
locations and conditions. | depending on satellite locations and conditions. | |||
4.5.4. Values | 4.5.4. Values | |||
If only one of the Base Sum or Sum value is present, the missing | If only one of the Base Sum or Sum value is present, the missing | |||
field is considered to have a value of zero. The Base Sum and Sum | field is considered to have a value of zero. The Base Sum and Sum | |||
values are added together to get the sum of measurement. If neither | values are added together to get the sum of measurement. If neither | |||
the Base Sum or Sum are present, then the measurement does not have a | the Base Sum nor the Sum is present, then the measurement does not | |||
sum value. | have a Sum value. | |||
If the Base Value or Value is not present, the missing field(s) are | If the Base Value or Value is not present, the missing field(s) is | |||
considered to have a value of zero. The Base Value and Value are | considered to have a value of zero. The Base Value and Value are | |||
added together to get the value of the measurement. | added together to get the value of the measurement. | |||
Representing the statistical characteristics of measurements, such as | Representing the statistical characteristics of measurements, such as | |||
accuracy, can be very complex. Future specification may add new | accuracy, can be very complex. Future specification may add new | |||
fields to provide better information about the statistical properties | fields to provide better information about the statistical properties | |||
of the measurement. | of the measurement. | |||
In summary, the structure of a SenML record is laid out to support a | In summary, the structure of a SenML Record is laid out to support a | |||
single measurement per record. If multiple data values are measured | single measurement per Record. If multiple data values are measured | |||
at the same time (e.g., air pressure and altitude), they are best | at the same time (e.g., air pressure and altitude), they are best | |||
kept as separate records linked through their Time value; this is | kept as separate Records linked through their Time value; this is | |||
even true where one of the data values is more "meta" than others | even true when one of the data values is more "meta" than others | |||
(e.g., describes a condition that influences other measurements at | (e.g., describes a condition that influences other measurements at | |||
the same time). | the same time). | |||
4.6. Resolved Records | 4.6. Resolved Records | |||
Sometimes it is useful to be able to refer to a defined normalized | Sometimes it is useful to be able to refer to a defined normalized | |||
format for SenML records. This normalized format tends to get used | format for SenML Records. This normalized format tends to get used | |||
for big data applications and intermediate forms when converting to | for big data applications and intermediate forms when converting to | |||
other formats. Also, if SenML Records are used outside of a SenML | other formats. Also, if SenML Records are used outside of a SenML | |||
Pack, they need to be resolved first to ensure applicable base values | Pack, they need to be resolved first to ensure applicable base values | |||
are applied. | are applied. | |||
A SenML Record is referred to as "resolved" if it does not contain | A SenML Record is referred to as "resolved" if it does not contain | |||
any base values, i.e., labels starting with the character 'b', except | any base values, i.e., labels starting with the character "b", except | |||
for Version fields (see below), and has no relative times. To | for Base Version fields (see below), and has no relative times. To | |||
resolve the Records, the applicable base values of the SenML Pack (if | resolve the Records, the applicable base values of the SenML Pack (if | |||
any) are applied to the Record. That is, for the base values in the | any) are applied to the Record. That is, for the base values in the | |||
Record or before the Record in the Pack, name and base name are | Record or before the Record in the Pack, Name and Base Name are | |||
concatenated, base time is added to the time of the Record, if the | concatenated, the Base Time is added to the time of the Record, the | |||
Record did not contain Unit the Base Unit is applied to the record, | Base Unit is applied to the Record if it did not contain a Unit, etc. | |||
etc. In addition the records need to be in chronological order in | In addition, the Records need to be in chronological order in the | |||
the Pack. An example of this is shown in Section 5.1.4. | Pack. An example of this is shown in Section 5.1.4. | |||
The Version field MUST NOT be present in resolved records if the | The Base Version field MUST NOT be present in resolved Records if the | |||
SenML version defined in this document is used and MUST be present | SenML version defined in this document is used; otherwise, it MUST be | |||
otherwise in all the resolved SenML Records. | present in all the resolved SenML Records. | |||
Future specification that defines new base fields need to specify how | A future specification that defines new base fields needs to specify | |||
the field is resolved. | how the field is resolved. | |||
4.7. Associating Meta-data | 4.7. Associating Metadata | |||
SenML is designed to carry the minimum dynamic information about | SenML is designed to carry the minimum dynamic information about | |||
measurements, and for efficiency reasons does not carry significant | measurements and, for efficiency reasons, does not carry significant | |||
static meta-data about the device, object or sensors. Instead, it is | static metadata about the device, object, or sensors. Instead, it is | |||
assumed that this meta-data is carried out of band. For web | assumed that this metadata is carried out of band. For web resources | |||
resources using SenML Packs, this meta-data can be made available | using SenML Packs, this metadata can be made available using the CoRE | |||
using the CoRE Link Format [RFC6690]. The most obvious use of this | Link Format [RFC6690]. The most obvious use of this link format is | |||
link format is to describe that a resource is available in a SenML | to describe that a resource is available in a SenML format in the | |||
format in the first place. The relevant media type indicator is | first place. The relevant media type indicator is included in the | |||
included in the Content-Type (ct=) link attribute (which is defined | Content-Type (ct=) link attribute (which is defined for the link | |||
for the Link Format in Section 7.2.1 of [RFC7252]). | format in Section 7.2.1 of [RFC7252]). | |||
4.8. Sensor Streaming Measurement Lists (SensML) | 4.8. Sensor Streaming Measurement Lists (SenSML) | |||
In some usage scenarios of SenML, the implementations store or | In some usage scenarios of SenML, the implementations store or | |||
transmit SenML in a stream-like fashion, where data is collected over | transmit SenML in a stream-like fashion, where data is collected over | |||
time and continuously added to the object. This mode of operation is | time and continuously added to the object. This mode of operation is | |||
optional, but systems or protocols using SenML in this fashion MUST | optional, but systems or protocols using SenML in this fashion MUST | |||
specify that they are doing this. SenML defines separate media types | specify that they are doing this. SenML defines separate media types | |||
to indicate Sensor Streaming Measurement Lists (SensML) for this | to indicate Sensor Streaming Measurement Lists (SenSML) for this | |||
usage (see Section 12.3.2). In this situation, the SensML stream can | usage (see Section 12.3.2). In this situation, the SenSML Stream can | |||
be sent and received in a partial fashion, i.e., a measurement entry | be sent and received in a partial fashion, i.e., a measurement entry | |||
can be read as soon as the SenML Record is received and does not have | can be read as soon as the SenML Record is received and does not have | |||
to wait for the full SensML Stream to be complete. | to wait for the full SenSML Stream to be complete. | |||
If times relative to "now" (see Section 4.5.3) are used in SenML | If times relative to "now" (see Section 4.5.3) are used in SenML | |||
Records of a SensML stream, their interpretation of "now" is based on | Records of a SenSML Stream, their interpretation of "now" is based on | |||
the time when the specific Record is sent in the stream. | the time when the specific Record is sent in the stream. | |||
4.9. Configuration and Actuation usage | 4.9. Configuration and Actuation Usage | |||
SenML can also be used for configuring parameters and controlling | SenML can also be used for configuring parameters and controlling | |||
actuators. When a SenML Pack is sent (e.g., using a HTTP/CoAP POST | actuators. When a SenML Pack is sent (e.g., using an HTTP/CoAP POST | |||
or PUT method) and the semantics of the target are such that SenML is | or PUT method) and the semantics of the target are such that SenML is | |||
interpreted as configuration/actuation, SenML Records are interpreted | interpreted as configuration/actuation, SenML Records are interpreted | |||
as a request to change the values of given (sub)resources (given as | as a request to change the values of given (sub)resources (given as | |||
names) to given values at the given time(s). The semantics of the | names) to given values at the given time(s). The semantics of the | |||
target resource supporting this usage can be described, e.g., using | target resource supporting this usage can be described, e.g., using | |||
[I-D.ietf-core-interfaces]. Examples of actuation usage are shown in | [RID-CoRE]. Examples of actuation usage are shown in Section 5.1.7. | |||
Section 5.1.7. | ||||
5. JSON Representation (application/senml+json) | 5. JSON Representation (application/senml+json) | |||
For the SenML fields shown in Table 2, the SenML labels are used as | For the SenML fields shown in Table 2, the SenML Labels are used as | |||
the JSON object member names within JSON objects representing the | the JSON object member names within JSON objects representing the | |||
JSON SenML Records. | JSON SenML Records. | |||
+---------------+-------+---------+ | +---------------+-------+-----------+ | |||
| Name | label | Type | | | Name | Label | JSON Type | | |||
+---------------+-------+---------+ | +---------------+-------+-----------+ | |||
| Base Name | bn | String | | | Base Name | bn | String | | |||
| Base Time | bt | Number | | | Base Time | bt | Number | | |||
| Base Unit | bu | String | | | Base Unit | bu | String | | |||
| Base Value | bv | Number | | | Base Value | bv | Number | | |||
| Base Sum | bs | Number | | | Base Sum | bs | Number | | |||
| Version | bver | Number | | | Base Version | bver | Number | | |||
| Name | n | String | | | Name | n | String | | |||
| Unit | u | String | | | Unit | u | String | | |||
| Value | v | Number | | | Value | v | Number | | |||
| String Value | vs | String | | | String Value | vs | String | | |||
| Boolean Value | vb | Boolean | | | Boolean Value | vb | Boolean | | |||
| Data Value | vd | String | | | Data Value | vd | String | | |||
| Value Sum | s | Number | | | Sum | s | Number | | |||
| Time | t | Number | | | Time | t | Number | | |||
| Update Time | ut | Number | | | Update Time | ut | Number | | |||
+---------------+-------+---------+ | +---------------+-------+-----------+ | |||
Table 2: JSON SenML Labels | Table 2: JSON SenML Labels | |||
The root JSON value consists of an array with one JSON object for | The root JSON value consists of an array with one JSON object for | |||
each SenML Record. All the fields in the above table MAY occur in | each SenML Record. All the fields in the above table MAY occur in | |||
the records with member values of the type specified in the table. | the Records with member values of the type specified in the table. | |||
Only the UTF-8 [RFC3629] form of JSON is allowed. Characters in the | Only the UTF-8 [RFC3629] form of JSON is allowed. Characters in the | |||
String Value are encoded using the escape sequences defined in | String Value are encoded using the escape sequences defined in | |||
[RFC8259]. Octets in the Data Value are base64 encoded with URL safe | [RFC8259]. Octets in the Data Value are base64 encoded with the URL- | |||
alphabet as defined in Section 5 of [RFC4648], with padding omitted. | safe alphabet as defined in Section 5 of [RFC4648], with padding | |||
omitted. | ||||
Systems receiving measurements MUST be able to process the range of | Systems receiving measurements MUST be able to process the range of | |||
floating point numbers that are representable as an IEEE double | floating-point numbers that are representable as IEEE double- | |||
precision floating point numbers [IEEE.754.1985]. This allows time | precision, floating-point numbers [IEEE.754]. This allows Time | |||
values to have better than microsecond precision over the next 100 | values to have better than microsecond precision over the next 100 | |||
years. The number of significant digits in any measurement is not | years. The number of significant digits in any measurement is not | |||
relevant, so a reading of 1.1 has exactly the same semantic meaning | relevant, so a reading of 1.1 has exactly the same semantic meaning | |||
as 1.10. If the value has an exponent, the "e" MUST be in lower | as 1.10. If the value has an exponent, the "e" MUST be in lower | |||
case. In the interest of avoiding unnecessary verbosity and speeding | case. In the interest of avoiding unnecessary verbosity and speeding | |||
up processing, the mantissa SHOULD be less than 19 characters long | up processing, the mantissa SHOULD be less than 19 characters long, | |||
and the exponent SHOULD be less than 5 characters long. | and the exponent SHOULD be less than 5 characters long. | |||
5.1. Examples | 5.1. Examples | |||
5.1.1. Single Datapoint | 5.1.1. Single Data Point | |||
The following shows a temperature reading taken approximately "now" | The following shows a temperature reading taken approximately "now" | |||
by a 1-wire sensor device that was assigned the unique 1-wire address | by a 1-wire sensor device that was assigned the unique 1-wire address | |||
of 10e2073a01080063: | of 10e2073a01080063: | |||
[ | [ | |||
{"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 Data Points | |||
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 it 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:10e2073a0108006:","bt":1.276020076001e+09, | {"bn":"urn:dev:ow:10e2073a0108006:","bt":1.276020076001e+09, | |||
"bu":"A","bver":5, | "bu":"A","bver":5, | |||
"n":"voltage","u":"V","v":120.1}, | "n":"voltage","u":"V","v":120.1}, | |||
{"n":"current","t":-5,"v":1.2}, | {"n":"current","t":-5,"v":1.2}, | |||
{"n":"current","t":-4,"v":1.3}, | {"n":"current","t":-4,"v":1.3}, | |||
{"n":"current","t":-3,"v":1.4}, | {"n":"current","t":-3,"v":1.4}, | |||
{"n":"current","t":-2,"v":1.5}, | {"n":"current","t":-2,"v":1.5}, | |||
{"n":"current","t":-1,"v":1.6}, | {"n":"current","t":-1,"v":1.6}, | |||
{"n":"current","v":1.7} | {"n":"current","v":1.7} | |||
] | ] | |||
As an example of Sensor Streaming Measurement Lists (SensML), the | As an example of SenSML, the following stream of measurements may be | |||
following stream of measurements may be sent via a long lived HTTP | sent via a long-lived HTTP POST from the producer of the stream to | |||
POST from the producer of the stream to its consumer, and each | its consumer, and each measurement object may be reported at the time | |||
measurement object may be reported at the time it was measured: | it was measured: | |||
[ | [ | |||
{"bn":"urn:dev:ow:10e2073a01080063","bt":1.320067464e+09, | {"bn":"urn:dev:ow:10e2073a01080063","bt":1.320067464e+09, | |||
"bu":"%RH","v":21.2}, | "bu":"%RH","v":21.2}, | |||
{"t":10,"v":21.3}, | {"t":10,"v":21.3}, | |||
{"t":20,"v":21.4}, | {"t":20,"v":21.4}, | |||
{"t":30,"v":21.4}, | {"t":30,"v":21.4}, | |||
{"t":40,"v":21.5}, | {"t":40,"v":21.5}, | |||
{"t":50,"v":21.5}, | {"t":50,"v":21.5}, | |||
{"t":60,"v":21.5}, | {"t":60,"v":21.5}, | |||
{"t":70,"v":21.6}, | {"t":70,"v":21.6}, | |||
{"t":80,"v":21.7}, | {"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 that time is used to correlate 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, | {"bn":"urn:dev:ow:10e2073a01080063","bt":1.320067464e+09, | |||
"bu":"%RH","v":20}, | "bu":"%RH","v":20}, | |||
{"u":"lon","v":24.30621}, | {"u":"lon","v":24.30621}, | |||
{"u":"lat","v":60.07965}, | {"u":"lat","v":60.07965}, | |||
{"t":60,"v":20.3}, | {"t":60,"v":20.3}, | |||
skipping to change at page 15, line 46 ¶ | skipping to change at page 16, line 22 ¶ | |||
{"u":"lat","t":60,"v":60.07965}, | {"u":"lat","t":60,"v":60.07965}, | |||
{"t":120,"v":20.7}, | {"t":120,"v":20.7}, | |||
{"u":"lon","t":120,"v":24.30623}, | {"u":"lon","t":120,"v":24.30623}, | |||
{"u":"lat","t":120,"v":60.07966}, | {"u":"lat","t":120,"v":60.07966}, | |||
{"u":"%EL","t":150,"v":98}, | {"u":"%EL","t":150,"v":98}, | |||
{"t":180,"v":21.2}, | {"t":180,"v":21.2}, | |||
{"u":"lon","t":180,"v":24.30628}, | {"u":"lon","t":180,"v":24.30628}, | |||
{"u":"lat","t":180,"v":60.07967} | {"u":"lat","t":180,"v":60.07967} | |||
] | ] | |||
The size of this example represented in various forms, as well as | The following table shows the size of this example in various forms, | |||
that form compressed with gzip is given in the following table. | as well as the size of each of these forms compressed with gzip. | |||
+----------+------+-----------------+ | +----------+------+-----------------+ | |||
| 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 | 161 | 184 | | | EXI | 161 | 184 | | |||
+----------+------+-----------------+ | +----------+------+-----------------+ | |||
Table 3: Size Comparisons | Table 3: Size Comparisons | |||
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 in resolved | |||
resolved format. | format. | |||
[ | [ | |||
{"n":"urn:dev:ow:10e2073a01080063","u":"%RH","t":1.320067464e+09, | {"n":"urn:dev:ow:10e2073a01080063","u":"%RH","t":1.320067464e+09, | |||
"v":20}, | "v":20}, | |||
{"n":"urn:dev:ow:10e2073a01080063","u":"lon","t":1.320067464e+09, | {"n":"urn:dev:ow:10e2073a01080063","u":"lon","t":1.320067464e+09, | |||
"v":24.30621}, | "v":24.30621}, | |||
{"n":"urn:dev:ow:10e2073a01080063","u":"lat","t":1.320067464e+09, | {"n":"urn:dev:ow:10e2073a01080063","u":"lat","t":1.320067464e+09, | |||
"v":60.07965}, | "v":60.07965}, | |||
{"n":"urn:dev:ow:10e2073a01080063","u":"%RH","t":1.320067524e+09, | {"n":"urn:dev:ow:10e2073a01080063","u":"%RH","t":1.320067524e+09, | |||
"v":20.3}, | "v":20.3}, | |||
skipping to change at page 17, line 14 ¶ | skipping to change at page 17, line 48 ¶ | |||
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":"nfc-reader","vd":"aGkgCg"} | |||
] | ] | |||
5.1.6. Collection of Resources | 5.1.6. Collection of Resources | |||
The following example shows the results from a query to one device | The following example shows the results from a query to one device | |||
that aggregates multiple measurements from other devices. The | that aggregates multiple measurements from other devices. The | |||
example assumes that a client has fetched information from a device | example assumes that a client has fetched information from a device | |||
at 2001:db8::2 by performing a GET operation on http://[2001:db8::2] | at 2001:db8::2 by performing a GET operation on http://[2001:db8::2] | |||
at Mon Oct 31 16:27:09 UTC 2011, and has gotten two separate values | at Mon Oct 31 16:27:09 UTC 2011 and has gotten two separate values as | |||
as a result, a temperature and humidity measurement as well as the | a result: a temperature and humidity measurement as well as the | |||
results from another device at http://[2001:db8::1] that also had a | results from another device at http://[2001:db8::1] that also had a | |||
temperature and humidity. Note that the last record would use the | temperature and humidity measurement. Note that the last record | |||
Base Name from the 3rd record but the Base Time from the first | would use the Base Name from the 3rd record but the Base Time from | |||
record. | the first record. | |||
[ | [ | |||
{"bn":"2001:db8::2/","bt":1.320078429e+09, | {"bn":"2001:db8::2/","bt":1.320078429e+09, | |||
"n":"temperature","u":"Cel","v":25.2}, | "n":"temperature","u":"Cel","v":25.2}, | |||
{"n":"humidity","u":"%RH","v":30}, | {"n":"humidity","u":"%RH","v":30}, | |||
{"bn":"2001:db8::1/","n":"temperature","u":"Cel","v":12.3}, | {"bn":"2001:db8::1/","n":"temperature","u":"Cel","v":12.3}, | |||
{"n":"humidity","u":"%RH","v":67} | {"n":"humidity","u":"%RH","v":67} | |||
] | ] | |||
5.1.7. Setting an Actuator | 5.1.7. Setting an Actuator | |||
The following example show the SenML that could be used to set the | The following example shows the SenML that could be used to set the | |||
current set point of a typical residential thermostat which has a | current set point of a typical residential thermostat that has a | |||
temperature set point, a switch to turn on and off the heat, and a | temperature set point, a switch to turn on and off the heat, and a | |||
switch to turn on the fan override. | switch to turn on the fan override. | |||
[ | [ | |||
{"bn":"urn:dev:ow:10e2073a01080063:"}, | {"bn":"urn:dev:ow:10e2073a01080063:"}, | |||
{"n":"temp","u":"Cel","v":23.1}, | {"n":"temp","u":"Cel","v":23.1}, | |||
{"n":"heat","u":"/","v":1}, | {"n":"heat","u":"/","v":1}, | |||
{"n":"fan","u":"/","v":0} | {"n":"fan","u":"/","v":0} | |||
] | ] | |||
In the following example two different lights are turned on. It is | ||||
In the following example, two different lights are turned on. It is | ||||
assumed that the lights are on a network that can guarantee delivery | assumed that the lights are on a network that can guarantee delivery | |||
of the messages to the two lights within 15 ms (e.g. a network using | of the messages to the two lights within 15 ms (e.g., a network using | |||
802.1BA [IEEE802.1ba-2011] and 802.1AS [IEEE802.1as-2011] for time | 802.1BA [IEEE802.1BA] and 802.1AS [IEEE802.1AS] for time | |||
synchronization). The controller has set the time of the lights | synchronization). The controller has set the time of the lights to | |||
coming on to 20 ms in the future from the current time. This allows | come on at 20 ms in the future from the current time. This allows | |||
both lights to receive the message, wait till that time, then apply | 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. | the switch command so that both lights come on at the same time. | |||
[ | [ | |||
{"bt":1.320078429e+09,"bu":"/","n":"2001:db8::3","v":1}, | {"bt":1.320078429e+09,"bu":"/","n":"2001:db8::3","v":1}, | |||
{"n":"2001:db8::4","v":1} | {"n":"2001:db8::4","v":1} | |||
] | ] | |||
The following shows two lights being turned off using a | ||||
The following shows two lights being turned off using a non | non-deterministic network that has high odds of delivering a message | |||
deterministic network that has a high odds of delivering a message in | in less than 100 ms and uses NTP for time synchronization. The | |||
less than 100 ms and uses NTP for time synchronization. The current | current time is 1320078429. The user has just turned off a light | |||
time is 1320078429. The user has just turned off a light switch | switch that is turning off two lights. Both lights are immediately | |||
which is turning off two lights. Both lights are dimmed to 50% | dimmed to 50% brightness to give the user instant feedback that | |||
brightness immediately to give the user instant feedback that | something is changing. However, given the network, the lights will | |||
something is changing. However given the network, the lights will | ||||
probably dim at somewhat different times. Then 100 ms in the future, | 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 | both lights will go off at the same time. The instant, but not | |||
synchronized dimming gives the user the sensation of quick responses | synchronized, dimming gives the user the sensation of quick | |||
and the timed off 100 ms in the future gives the perception of both | responses, and the timed-off 100 ms in the future gives the | |||
lights going off at the same time. | perception of both lights going off at the same time. | |||
[ | [ | |||
{"bt":1.320078429e+09,"bu":"/","n":"2001:db8::3","v":0.5}, | {"bt":1.320078429e+09,"bu":"/","n":"2001:db8::3","v":0.5}, | |||
{"n":"2001:db8::4","v":0.5}, | {"n":"2001:db8::4","v":0.5}, | |||
{"n":"2001:db8::3","t":0.1,"v":0}, | {"n":"2001:db8::3","t":0.1,"v":0}, | |||
{"n":"2001:db8::4","t":0.1,"v":0} | {"n":"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); | |||
a representation SHOULD be chosen such that when the CBOR value is | however, a representation SHOULD be chosen such that when the CBOR | |||
converted back to an IEEE double precision floating point value, | value is converted to an IEEE double-precision, floating-point | |||
it has exactly the same value as the original Number. For the | value, it has exactly the same value as the original JSON Number | |||
version number, only an unsigned integer is allowed. | converted to that form. For the 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 text string | |||
text string (type 3). Octets in the Data Value are encoded using | with a definite length (major type 3). Octets in the Data Value | |||
a definite length byte string (type 2). | are encoded using a byte string with a definite length (major type | |||
2). | ||||
o For compactness, the CBOR representation uses integers for the | o For compactness, the CBOR representation uses integers for the | |||
labels, as defined in Table 4. This table is conclusive, i.e., | labels, as defined in Table 4. This table is conclusive, i.e., | |||
there is no intention to define any additional integer map keys; | there is no intention to define any additional integer map keys; | |||
any extensions will use string map keys. This allows translators | any extensions will use string map keys. This allows translators | |||
converting between CBOR and JSON representations to convert also | converting between CBOR and JSON representations to also convert | |||
all future labels without needing to update implementations. The | all future labels without needing to update implementations. Base | |||
base values are given negative CBOR labels and others non-negative | values are given negative CBOR labels, and others are given | |||
labels. | non-negative labels. | |||
+---------------+-------+------------+ | +---------------+-------+------------+ | |||
| Name | Label | CBOR Label | | | Name | Label | CBOR Label | | |||
+---------------+-------+------------+ | +---------------+-------+------------+ | |||
| Version | bver | -1 | | | Base Version | bver | -1 | | |||
| Base Name | bn | -2 | | | Base Name | bn | -2 | | |||
| Base Time | bt | -3 | | | Base Time | bt | -3 | | |||
| Base Unit | bu | -4 | | | Base Unit | bu | -4 | | |||
| Base Value | bv | -5 | | | Base Value | bv | -5 | | |||
| Base Sum | bs | -6 | | | Base Sum | bs | -6 | | |||
| Name | n | 0 | | | Name | n | 0 | | |||
| Unit | u | 1 | | | Unit | u | 1 | | |||
| Value | v | 2 | | | Value | v | 2 | | |||
| String Value | vs | 3 | | | String Value | vs | 3 | | |||
| Boolean Value | vb | 4 | | | Boolean Value | vb | 4 | | |||
| Value Sum | s | 5 | | | Sum | s | 5 | | |||
| Time | t | 6 | | | Time | t | 6 | | |||
| Update Time | ut | 7 | | | Update Time | ut | 7 | | |||
| Data Value | vd | 8 | | | Data Value | vd | 8 | | |||
+---------------+-------+------------+ | +---------------+-------+------------+ | |||
Table 4: CBOR representation: integers for map keys | Table 4: 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 a CBOR indefinite length array while for | the records SHOULD be a CBOR array with an indefinite length; for | |||
non-streaming SenML, a definite length array MUST be used. | non-streaming SenML, an array with a definite length 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 1b 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 3a |10e2073a0108006:| | 0010 31 30 65 32 30 37 33 61 30 31 30 38 30 30 36 3a |10e2073a0108006:| | |||
0020 22 fb 41 d3 03 a1 5b 00 10 62 23 61 41 20 05 00 |".A...[..b#aA ..| | 0020 22 fb 41 d3 03 a1 5b 00 10 62 23 61 41 20 05 00 |".A...[..b#aA ..| | |||
0030 67 76 6f 6c 74 61 67 65 01 61 56 02 fb 40 5e 06 |gvoltage.aV..@^.| | 0030 67 76 6f 6c 74 61 67 65 01 61 56 02 fb 40 5e 06 |gvoltage.aV..@^.| | |||
0040 66 66 66 66 66 a3 00 67 63 75 72 72 65 6e 74 06 |fffff..gcurrent.| | 0040 66 66 66 66 66 a3 00 67 63 75 72 72 65 6e 74 06 |fffff..gcurrent.| | |||
0050 24 02 fb 3f f3 33 33 33 33 33 33 a3 00 67 63 75 |$..?.333333..gcu| | 0050 24 02 fb 3f f3 33 33 33 33 33 33 a3 00 67 63 75 |$..?.333333..gcu| | |||
skipping to change at page 20, line 33 ¶ | skipping to change at page 21, line 17 ¶ | |||
-3: 1276020076.001, -4: "A", -1: 5, 0: "voltage", 1: "V", 2: 120.1}, | -3: 1276020076.001, -4: "A", -1: 5, 0: "voltage", 1: "V", 2: 120.1}, | |||
{0: "current", 6: -5, 2: 1.2}, {0: "current", 6: -4, 2: 1.3}, | {0: "current", 6: -5, 2: 1.2}, {0: "current", 6: -4, 2: 1.3}, | |||
{0: "current", 6: -3, 2: 1.4}, {0: "current", 6: -2, 2: 1.5}, | {0: "current", 6: -3, 2: 1.4}, {0: "current", 6: -2, 2: 1.5}, | |||
{0: "current", 6: -1, 2: 1.6}, {0: "current", 6: 0, 2: 1.7}] | {0: "current", 6: -1, 2: 1.6}, {0: "current", 6: 0, 2: 1.7}] | |||
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. Octets in the Data Value are | |||
Value are encoded using the escape sequences defined in [RFC8259]. | base64 encoded with the URL-safe alphabet as defined in Section 5 of | |||
Octets in the Data Value are base64 encoded with URL safe alphabet as | [RFC4648], with padding omitted. | |||
defined in Section 5 of [RFC4648]. | ||||
The following example shows an XML example for the same sensor | The following shows an XML example for the same sensor measurement as | |||
measurement as in Section 5.1.2. | 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:10e2073a0108006:" 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> | |||
skipping to change at page 21, line 4 ¶ | skipping to change at page 21, line 34 ¶ | |||
<sensml xmlns="urn:ietf:params:xml:ns:senml"> | <sensml xmlns="urn:ietf:params:xml:ns:senml"> | |||
<senml bn="urn:dev:ow:10e2073a0108006:" 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 element that contains a | The SenML Stream is represented as a sensml element that contains a | |||
series of senml elements for each SenML Record. The SenML fields are | series of senml elements for each SenML Record. The SenML fields are | |||
represented as XML attributes. For each field defined in this | represented as XML attributes. For each field defined in this | |||
document, the following table shows the SenML labels, which are used | document, the following table shows the SenML Labels, which are used | |||
for the XML attribute name, as well as the according restrictions on | for the XML attribute name, as well as the according restrictions on | |||
the XML attribute values ("type") as used in the XML senml elements. | the XML attribute values ("type") as used in the XML senml elements. | |||
+---------------+-------+---------+ | +---------------+-------+----------+ | |||
| Name | Label | Type | | | Name | Label | XML Type | | |||
+---------------+-------+---------+ | +---------------+-------+----------+ | |||
| Base Name | bn | string | | | Base Name | bn | string | | |||
| Base Time | bt | double | | | Base Time | bt | double | | |||
| Base Unit | bu | string | | | Base Unit | bu | string | | |||
| Base Value | bv | double | | | Base Value | bv | double | | |||
| Base Sum | bs | double | | | Base Sum | bs | double | | |||
| Base Version | bver | int | | | Base Version | bver | int | | |||
| Name | n | string | | | Name | n | string | | |||
| Unit | u | string | | | Unit | u | string | | |||
| Value | v | double | | | Value | v | double | | |||
| String Value | vs | string | | | String Value | vs | string | | |||
| Data Value | vd | string | | | Data Value | vd | string | | |||
| Boolean Value | vb | boolean | | | Boolean Value | vb | boolean | | |||
| Value Sum | s | double | | | Sum | s | double | | |||
| Time | t | double | | | Time | t | double | | |||
| Update Time | ut | double | | | Update Time | ut | double | | |||
+---------------+-------+---------+ | +---------------+-------+----------+ | |||
Table 5: XML SenML Labels | Table 5: XML SenML Labels | |||
The RelaxNG [RNC] schema for the XML is: | The RelaxNG [RNC] Schema for the XML is: | |||
default namespace = "urn:ietf:params:xml:ns:senml" | default namespace = "urn:ietf:params:xml:ns:senml" | |||
namespace rng = "http://relaxng.org/ns/structure/1.0" | namespace rng = "http://relaxng.org/ns/structure/1.0" | |||
senml = element senml { | senml = element senml { | |||
attribute bn { xsd:string }?, | attribute bn { xsd:string }?, | |||
attribute bt { xsd:double }?, | attribute bt { xsd:double }?, | |||
attribute bv { xsd:double }?, | attribute bv { xsd:double }?, | |||
attribute bs { xsd:double }?, | attribute bs { xsd:double }?, | |||
attribute bu { xsd:string }?, | attribute bu { xsd:string }?, | |||
skipping to change at page 22, line 27 ¶ | skipping to change at page 23, line 4 ¶ | |||
attribute s { xsd:double }?, | attribute s { xsd:double }?, | |||
attribute t { xsd:double }?, | attribute t { xsd:double }?, | |||
attribute u { xsd:string }?, | attribute u { xsd:string }?, | |||
attribute ut { xsd:double }?, | attribute ut { xsd:double }?, | |||
attribute v { xsd:double }?, | attribute v { xsd:double }?, | |||
attribute vb { xsd:boolean }?, | attribute vb { xsd:boolean }?, | |||
attribute vs { xsd:string }?, | attribute vs { xsd:string }?, | |||
attribute vd { xsd:string }? | attribute vd { xsd:string }? | |||
} | } | |||
sensml = | sensml = | |||
element sensml { | element sensml { | |||
senml+ | senml+ | |||
} | } | |||
start = sensml | start = sensml | |||
8. EXI Representation (application/senml-exi) | 8. EXI Representation (application/senml-exi) | |||
For efficient transmission of SenML over e.g. a constrained network, | For efficient transmission of SenML over, e.g., a constrained | |||
Efficient XML Interchange (EXI) can be used. This encodes the XML | network, EXI can be used. This encodes the XML Schema | |||
Schema [W3C.REC-xmlschema-1-20041028] structure of SenML into binary | [W3C.REC-xmlschema-1-20041028] structure of SenML into binary tags | |||
tags and values rather than ASCII text. An EXI representation of | and values rather than ASCII text. An EXI representation of SenML | |||
SenML SHOULD be made using the strict schema-mode of EXI. This mode | SHOULD be made using the strict schema mode of EXI. However, this | |||
however does not allow tag extensions to the schema, and therefore | mode does not allow tag extensions to the schema; therefore, any | |||
any extensions will be lost in the encoding. For uses where | extensions will be lost in the encoding. For uses where extensions | |||
extensions need to be preserved in EXI, the non-strict schema mode of | need to be preserved in EXI, the non-strict schema mode of EXI MAY be | |||
EXI MAY be used. | used. | |||
The EXI header MUST include an "EXI Options", as defined in | The EXI header MUST include "EXI Options", as defined in | |||
[W3C.REC-exi-20140211], with an schemaId set to the value of "a" | [W3C.REC-exi-20140211], with a schemaId set to the value of "a", | |||
indicating the schema provided in this specification. Future | indicating the schema provided in this specification. Future | |||
revisions to the schema can change the value of the schemaId to allow | revisions to the schema can change the value of the schemaId to allow | |||
for backwards compatibility. When the data will be transported over | for backwards compatibility. When the data will be transported over | |||
CoAP or HTTP, an EXI Cookie SHOULD NOT be used as it simply makes | CoAP or HTTP, an EXI Cookie SHOULD NOT be used as it simply makes | |||
things larger and is redundant to information provided in the | things larger and is redundant to information provided in the | |||
Content-Type header. | 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"> | |||
<xs:complexType> | <xs:complexType> | |||
<xs:attribute name="bn" type="xs:string" /> | <xs:attribute name="bn" type="xs:string" /> | |||
skipping to change at page 23, line 44 ¶ | skipping to change at page 24, line 42 ¶ | |||
<xs:element name="sensml"> | <xs:element name="sensml"> | |||
<xs:complexType> | <xs:complexType> | |||
<xs:sequence> | <xs:sequence> | |||
<xs:element maxOccurs="unbounded" ref="ns1:senml" /> | <xs:element maxOccurs="unbounded" ref="ns1:senml" /> | |||
</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 that this example is the same | |||
the first example in Section 5.1.2 in JSON format. | information as the first example in Section 5.1.2 but 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 0d 84 80 f3 ab 93 71 d3 23 2b b1 d3 7b b9 |.0......q.#+..{.| | 0000 a0 30 0d 84 80 f3 ab 93 71 d3 23 2b b1 d3 7b b9 |.0......q.#+..{.| | |||
0010 d1 89 83 29 91 81 b9 9b 09 81 89 81 c1 81 81 b1 |...)............| | 0010 d1 89 83 29 91 81 b9 9b 09 81 89 81 c1 81 81 b1 |...)............| | |||
0020 99 d2 84 bb 37 b6 3a 30 b3 b2 90 1a b1 58 84 c0 |....7.:0.....X..| | 0020 99 d2 84 bb 37 b6 3a 30 b3 b2 90 1a b1 58 84 c0 |....7.:0.....X..| | |||
0030 33 04 b1 ba b9 39 32 b7 3a 10 1a 09 06 40 38 |3....92.:....@8| | 0030 33 04 b1 ba b9 39 32 b7 3a 10 1a 09 06 40 38 |3....92.:....@8| | |||
003f | 003f | |||
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 make 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 80 6c 20 01 06 1d 75 72 6e 3a 64 65 76 |..H.l ...urn:dev| | 0000 a0 00 48 80 6c 20 01 06 1d 75 72 6e 3a 64 65 76 |..H.l ...urn:dev| | |||
0010 3a 6f 77 3a 31 30 65 32 30 37 33 61 30 31 30 38 |:ow:10e2073a0108| | 0010 3a 6f 77 3a 31 30 65 32 30 37 33 61 30 31 30 38 |:ow:10e2073a0108| | |||
0020 30 30 36 33 02 05 43 65 6c 01 00 e7 01 01 00 03 |0063..Cel.......| | 0020 30 30 36 33 02 05 43 65 6c 01 00 e7 01 01 00 03 |0063..Cel.......| | |||
0030 01 |.| | 0030 01 |.| | |||
0031 | 0031 | |||
A small temperature sensor device that only generates this one EXI | A small temperature sensor device that only generates this one EXI | |||
file does not really need a full EXI implementation. It can simply | file does not really need a 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 | |||
0x14 and going to byte 0x23 with its device ID, and replacing the | 0x14 and going to byte 0x23 with its device ID and replacing the | |||
value "0xe7 0x01" at location 0x31 and 0x32 with the current | value "0xe7 0x01" at location 0x2b and 0x2c 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 byte is set to the 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. Fragment Identification Methods | 9. Fragment Identification Methods | |||
A SenML Pack typically consists of multiple SenML Records and for | A SenML Pack typically consists of multiple SenML Records, and for | |||
some applications it may be useful to be able to refer with a | some applications, it may be useful to be able to refer to a single | |||
Fragment Identifier to a single record, or a set of records, in a | Record, or a set of Records, in a Pack with a fragment identifier. | |||
Pack. The fragment identifier is only interpreted by a client and | The fragment identifier is only interpreted by a client and does not | |||
does not impact retrieval of a representation. The SenML Fragment | impact retrieval of a representation. The SenML fragment | |||
Identification is modeled after CSV Fragment Identifiers [RFC7111]. | identification is modeled after Comma-Separated Value (CSV) fragment | |||
identifiers [RFC7111]. | ||||
To select a single SenML Record, the "rec" scheme followed by a | To select a single SenML Record, the "rec" scheme followed by a | |||
single number is used. For the purpose of numbering records, the | 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 | 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 '-' | giving the first and the last record number separated by a "-" | |||
character. Instead of the second number, the '*' character can be | character. Instead of the second number, the "*" character can be | |||
used to indicate the last SenML Record in the Pack. A set of records | 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 | can also be selected using a comma-separated list of Record positions | |||
or ranges. | or ranges. | |||
(We use the term "selecting a record" for identifying it as part of | (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 | 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 | Record still needs to be interpreted as part of the Pack, e.g., using | |||
the base values defined in earlier records) | the base values defined in earlier Records.) | |||
9.1. Fragment Identification Examples | 9.1. Fragment Identification Examples | |||
The 3rd SenML Record from "coap://example.com/temp" resource can be | The 3rd SenML Record from the "coap://example.com/temp" resource can | |||
selected with: | be selected with: | |||
coap://example.com/temp#rec=3 | coap://example.com/temp#rec=3 | |||
Records from 3rd to 6th can be selected with: | Records from 3rd to 6th can be selected with: | |||
coap://example.com/temp#rec=3-6 | coap://example.com/temp#rec=3-6 | |||
Records from 19th to the last can be selected with: | Records from 19th to the last can be selected with: | |||
coap://example.com/temp#rec=19-* | coap://example.com/temp#rec=19-* | |||
The 3rd and 5th record can be selected with: | The 3rd and 5th Records can be selected with: | |||
coap://example.com/temp#rec=3,5 | coap://example.com/temp#rec=3,5 | |||
To select the Records from third to fifth, the 10th record, and all | To select the Records from third to fifth, the 10th Record, and all | |||
from 19th to the last: | Records from 19th to the last: | |||
coap://example.com/temp#rec=3-5,10,19-* | coap://example.com/temp#rec=3-5,10,19-* | |||
9.2. Fragment Identification for the XML and EXI Formats | 9.2. Fragment Identification for XML and EXI Formats | |||
In addition to the SenML Fragment Identifiers described above, with | In addition to the SenML fragment identifiers described above, with | |||
the XML and EXI SenML formats also the syntax defined in the XPointer | the XML and EXI SenML formats, the syntax defined in the XPointer | |||
element() Scheme [XPointerElement] of the XPointer Framework | element() Scheme [XPointerElement] of the XPointer Framework | |||
[XPointerFramework] can be used. (This is required by [RFC7303] for | [XPointerFramework] can be used. (This is required by [RFC7303] for | |||
media types using the "+xml" structured syntax suffix. SenML allows | media types using the syntax suffix structured with "+xml". For | |||
this for the EXI formats as well for consistency.) | consistency, SenML allows this for the EXI formats as well.) | |||
Note that fragment identifiers are available to the client side only; | Note that fragment identifiers are available to the client side only; | |||
they are not provided in transfer protocols such as CoAP or HTTP. | they are not provided in transfer protocols such as CoAP or HTTP. | |||
Thus, they cannot be used by the server in deciding which media type | Thus, they cannot be used by the server in deciding which media type | |||
to send. Where a server has multiple representations available for a | to send. Where a server has multiple representations available for a | |||
resource identified by a URI, it might send a JSON or CBOR | resource identified by a URI, it might send a JSON or CBOR | |||
representation when the client was directed to use an XML/EXI | representation when the client was directed to use an XML/EXI | |||
fragment identifier with this. Clients can prevent running into this | fragment identifier with it. Clients can prevent running into this | |||
problem by explicitly requesting an XML or EXI media type (e.g., | problem by explicitly requesting an XML or EXI media type (e.g., | |||
using the CoAP Accept option) when XML/EXI-only fragment identifier | using the CoAP Accept option) when XML-/EXI-only fragment identifier | |||
syntax is in use in the URI. | syntax is in use in the URI. | |||
10. Usage Considerations | 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 an integrated sum. For many types of measurements, the | as well as an integrated sum. For many types of measurements, the | |||
sum is more useful than the current value. For historical reasons, | sum is more useful than the current value. For historical reasons, | |||
this field is called "sum" instead of "integral" which would more | this field is called "Sum" instead of "integral", which would more | |||
accurately describe its function. For example, an electrical meter | accurately describe its function. For example, an electrical meter | |||
that measures the energy a given computer uses will typically want to | that measures the energy a given computer uses will typically want to | |||
measure the cumulative amount of energy used. This is less prone to | measure the cumulative amount of energy used. This is less prone to | |||
error than reporting the power each second and trying to have | error than reporting the power each second and trying to have | |||
something on the server side sum together all the power measurements. | something on the server side sum together all the power measurements. | |||
If the network between the sensor and the meter goes down over some | If the network between the sensor and the meter goes down over some | |||
period of time, when it comes back up, the cumulative sum helps | period of time, when it comes back up, the cumulative sum helps | |||
reflect what happened while the network was down. A meter like this | reflect what happened while the network was down. A meter like this | |||
would typically report a measurement with the unit set to watts, but | would typically report a measurement with the unit set to watts, but | |||
it would put the sum of energy used in the "s" field of the | it would put the sum of energy used in the "s" field of the | |||
skipping to change at page 27, line 5 ¶ | skipping to change at page 28, line 5 ¶ | |||
"v" field. | "v" field. | |||
While the benefit of using the integrated sum is fairly clear for | While the benefit of using the integrated sum is fairly clear for | |||
measurements like power and energy, it is less obvious for something | measurements like power and energy, it is less obvious for something | |||
like temperature. Reporting the sum of the temperature makes it easy | like temperature. Reporting the sum of the temperature makes it easy | |||
to compute averages even when the individual temperature values are | to compute averages even when the individual temperature values are | |||
not reported frequently enough to compute accurate averages. | not reported frequently enough to compute accurate averages. | |||
Implementers are encouraged to report the cumulative sum as well as | Implementers are encouraged to report the cumulative sum as well as | |||
the raw value of a given sensor. | the raw value of a given sensor. | |||
Applications that use the cumulative sum values need to understand | Applications that use the cumulative Sum values need to understand | |||
they are very loosely defined by this specification, and depending on | they are very loosely defined by this specification, and depending on | |||
the particular sensor implementation may behave in unexpected ways. | the particular sensor implementation, they may behave in unexpected | |||
Applications should be able to deal with the following issues: | ways. Applications should be able to deal with the following issues: | |||
1. Many sensors will allow the cumulative sums to "wrap" back to | 1. Many sensors will allow the cumulative sums to "wrap" back to | |||
zero after the value gets sufficiently large. | zero after the value gets sufficiently large. | |||
2. Some sensors will reset the cumulative sum back to zero when the | 2. Some sensors will reset the cumulative sum back to zero when the | |||
device is reset, loses power, or is replaced with a different | device is reset, loses power, or is replaced with a different | |||
sensor. | sensor. | |||
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 non- | |||
positive, the sum should never get smaller; so if the sum does get | negative, the sum should never get smaller; 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. | |||
Despite the name sum, the sum field is not useful for applications | Despite the name "Sum", the Sum field is not useful for applications | |||
that maintain a running count of the number of times that an event | that maintain a running count of the number of times an event | |||
happened or keeping track of a counter such as the total number of | happened or that keep track of a counter such as the total number of | |||
bytes sent on an interface. Data like that can be sent directly in | bytes sent on an interface. Data like that can be sent directly in | |||
the value field. | the Value field. | |||
11. CDDL | 11. CDDL | |||
As a convenient reference, the JSON and CBOR representations can be | As a convenient reference, the JSON and CBOR representations can be | |||
described with the common CDDL [I-D.ietf-cbor-cddl] specification in | described with the common Concise Data Definition Language (CDDL) | |||
Figure 1 (informative). | specification [CDDL-CBOR] in Figure 1 (informative). | |||
SenML-Pack = [1* record] | SenML-Pack = [1* record] | |||
record = { | record = { | |||
? 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 | ? bs => numeric, ; Base Sum | |||
? bver => uint, ; Base Version | ? bver => uint, ; Base Version | |||
? n => tstr, ; Name | ? n => tstr, ; Name | |||
? u => tstr, ; Units | ? u => tstr, ; Units | |||
? s => numeric, ; Value Sum | ? s => numeric, ; Sum | |||
? t => numeric, ; Time | ? t => numeric, ; Time | |||
? ut => numeric, ; Update Time | ? ut => numeric, ; Update Time | |||
? ( 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 | |||
* key-value-pair | * key-value-pair | |||
} | } | |||
; now define the generic versions | ; now define the generic versions | |||
key-value-pair = ( label => value ) | key-value-pair = ( label => value ) | |||
label = non-b-label / b-label | label = non-b-label / b-label | |||
non-b-label = tstr .regexp "[A-Zac-z0-9][-_:.A-Za-z0-9]*" / uint | non-b-label = tstr .regexp "[A-Zac-z0-9][-_:.A-Za-z0-9]*" / uint | |||
b-label = tstr .regexp "b[-_:.A-Za-z0-9]+" / nint | b-label = tstr .regexp "b[-_:.A-Za-z0-9]+" / nint | |||
value = tstr / binary-value / numeric / bool | value = tstr / binary-value / numeric / bool | |||
numeric = number / decfrac | numeric = number / decfrac | |||
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" | bv = "bv" vb = "vb" | |||
bs = "bs" | 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 | bv = -5 vb = 4 | |||
bs = -6 | bs = -6 | |||
binary-value = bstr | binary-value = bstr | |||
Figure 3: CBOR-specific CDDL specification for SenML | Figure 3: CBOR-Specific CDDL Specification for SenML | |||
12. IANA Considerations | 12. IANA Considerations | |||
Note to RFC Editor: Please replace all occurrences of "RFC-AAAA" with | IANA has created a new "Sensor Measurement Lists (SenML)" registry | |||
the RFC number of this specification. | that contains the subregistries defined in Sections 12.1 and 12.2. | |||
IANA will create a new registry for "Sensor Measurement Lists (SenML) | ||||
Parameters". The sub-registries defined in Section 12.1 and | ||||
Section 12.2 will be created inside this registry. | ||||
12.1. Units Registry | 12.1. SenML Units Registry | |||
IANA will create a registry of SenML unit symbols. The primary | IANA has created a registry of SenML unit symbols called the "SenML | |||
purpose of this registry is to make sure that symbols uniquely map to | Units" registry. The primary purpose of this registry is to make | |||
give type of measurement. Definitions for many of these units can be | sure that symbols uniquely map to indicate a type of measurement. | |||
found in location such as [NIST811] and [BIPM]. Units marked with an | Definitions for many of these units can be found in other | |||
asterisk are NOT RECOMMENDED to be produced by new implementations, | publications such as [NIST811] and [BIPM]. Units marked with an | |||
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 corresponding SenML units that are closer to the unscaled SI | |||
units. | ||||
+----------+------------------------------------+-------+-----------+ | +----------+------------------------------------+-------+-----------+ | |||
| Symbol | Description | Type | Reference | | | Symbol | Description | Type | Reference | | |||
+----------+------------------------------------+-------+-----------+ | +----------+------------------------------------+-------+-----------+ | |||
| m | meter | float | RFC-AAAA | | | m | meter | float | RFC 8428 | | |||
| kg | kilogram | float | RFC-AAAA | | | kg | kilogram | float | RFC 8428 | | |||
| g | gram* | float | RFC-AAAA | | | g | gram* | float | RFC 8428 | | |||
| s | second | float | RFC-AAAA | | | s | second | float | RFC 8428 | | |||
| A | ampere | float | RFC-AAAA | | | A | ampere | float | RFC 8428 | | |||
| K | kelvin | float | RFC-AAAA | | | K | kelvin | float | RFC 8428 | | |||
| cd | candela | float | RFC-AAAA | | | cd | candela | float | RFC 8428 | | |||
| mol | mole | float | RFC-AAAA | | | mol | mole | float | RFC 8428 | | |||
| Hz | hertz | float | RFC-AAAA | | | Hz | hertz | float | RFC 8428 | | |||
| rad | radian | float | RFC-AAAA | | | rad | radian | float | RFC 8428 | | |||
| sr | steradian | float | RFC-AAAA | | | sr | steradian | float | RFC 8428 | | |||
| N | newton | float | RFC-AAAA | | | N | newton | float | RFC 8428 | | |||
| Pa | pascal | float | RFC-AAAA | | | Pa | pascal | float | RFC 8428 | | |||
| J | joule | float | RFC-AAAA | | | J | joule | float | RFC 8428 | | |||
| W | watt | float | RFC-AAAA | | | W | watt | float | RFC 8428 | | |||
| C | coulomb | float | RFC-AAAA | | | C | coulomb | float | RFC 8428 | | |||
| V | volt | float | RFC-AAAA | | | V | volt | float | RFC 8428 | | |||
| F | farad | float | RFC-AAAA | | | F | farad | float | RFC 8428 | | |||
| Ohm | ohm | float | RFC-AAAA | | | Ohm | ohm | float | RFC 8428 | | |||
| S | siemens | float | RFC-AAAA | | | S | siemens | float | RFC 8428 | | |||
| Wb | weber | float | RFC-AAAA | | | Wb | weber | float | RFC 8428 | | |||
| T | tesla | float | RFC-AAAA | | | T | tesla | float | RFC 8428 | | |||
| H | henry | float | RFC-AAAA | | | H | henry | float | RFC 8428 | | |||
| Cel | degrees Celsius | float | RFC-AAAA | | | Cel | degrees Celsius | float | RFC 8428 | | |||
| lm | lumen | float | RFC-AAAA | | | lm | lumen | float | RFC 8428 | | |||
| lx | lux | float | RFC-AAAA | | | lx | lux | float | RFC 8428 | | |||
| Bq | becquerel | float | RFC-AAAA | | | Bq | becquerel | float | RFC 8428 | | |||
| Gy | gray | float | RFC-AAAA | | | Gy | gray | float | RFC 8428 | | |||
| Sv | sievert | float | RFC-AAAA | | | Sv | sievert | float | RFC 8428 | | |||
| kat | katal | float | RFC-AAAA | | | kat | katal | float | RFC 8428 | | |||
| m2 | square meter (area) | float | RFC-AAAA | | | m2 | square meter (area) | float | RFC 8428 | | |||
| m3 | cubic meter (volume) | float | RFC-AAAA | | | m3 | cubic meter (volume) | float | RFC 8428 | | |||
| l | liter (volume)* | float | RFC-AAAA | | | l | liter (volume)* | float | RFC 8428 | | |||
| m/s | meter per second (velocity) | float | RFC-AAAA | | | m/s | meter per second (velocity) | float | RFC 8428 | | |||
| m/s2 | meter per square second | float | RFC-AAAA | | | m/s2 | meter per square second | float | RFC 8428 | | |||
| | (acceleration) | | | | | | (acceleration) | | | | |||
| m3/s | cubic meter per second (flow rate) | float | RFC-AAAA | | | m3/s | cubic meter per second (flow rate) | float | RFC 8428 | | |||
| l/s | liter per second (flow rate)* | float | RFC-AAAA | | | l/s | liter per second (flow rate)* | float | RFC 8428 | | |||
| W/m2 | watt per square meter (irradiance) | float | RFC-AAAA | | | W/m2 | watt per square meter (irradiance) | float | RFC 8428 | | |||
| cd/m2 | candela per square meter | float | RFC-AAAA | | | cd/m2 | candela per square meter | float | RFC 8428 | | |||
| | (luminance) | | | | | | (luminance) | | | | |||
| bit | bit (information content) | float | RFC-AAAA | | | bit | bit (information content) | float | RFC 8428 | | |||
| bit/s | bit per second (data rate) | float | RFC-AAAA | | | bit/s | bit per second (data rate) | float | RFC 8428 | | |||
| lat | degrees latitude (note 1) | float | RFC-AAAA | | | lat | degrees latitude (Note 1) | float | RFC 8428 | | |||
| lon | degrees longitude (note 1) | float | RFC-AAAA | | | lon | degrees longitude (Note 1) | float | RFC 8428 | | |||
| pH | pH value (acidity; logarithmic | float | RFC-AAAA | | | pH | pH value (acidity; logarithmic | float | RFC 8428 | | |||
| | quantity) | | | | | | quantity) | | | | |||
| dB | decibel (logarithmic quantity) | float | RFC-AAAA | | | dB | decibel (logarithmic quantity) | float | RFC 8428 | | |||
| dBW | decibel relative to 1 W (power | float | RFC-AAAA | | | dBW | decibel relative to 1 W (power | float | RFC 8428 | | |||
| | level) | | | | | | level) | | | | |||
| Bspl | bel (sound pressure level; | float | RFC-AAAA | | | Bspl | bel (sound pressure level; | float | RFC 8428 | | |||
| | logarithmic quantity)* | | | | | | logarithmic quantity)* | | | | |||
| count | 1 (counter value) | float | RFC-AAAA | | | count | 1 (counter value) | float | RFC 8428 | | |||
| / | 1 (Ratio e.g., value of a switch, | float | RFC-AAAA | | | / | 1 (ratio, e.g., value of a switch; | float | RFC 8428 | | |||
| | note 2) | | | | | | Note 2) | | | | |||
| % | 1 (Ratio e.g., value of a switch, | float | RFC-AAAA | | | % | 1 (ratio, e.g., value of a switch; | float | RFC 8428 | | |||
| | note 2)* | | | | | | Note 2)* | | | | |||
| %RH | Percentage (Relative Humidity) | float | RFC-AAAA | | | %RH | percentage (relative humidity) | float | RFC 8428 | | |||
| %EL | Percentage (remaining battery | float | RFC-AAAA | | | %EL | percentage (remaining battery | float | RFC 8428 | | |||
| | energy level) | | | | | | energy level) | | | | |||
| EL | seconds (remaining battery energy | float | RFC-AAAA | | | EL | seconds (remaining battery energy | float | RFC 8428 | | |||
| | level) | | | | | | level) | | | | |||
| 1/s | 1 per second (event rate) | float | RFC-AAAA | | | 1/s | 1 per second (event rate) | float | RFC 8428 | | |||
| 1/min | 1 per minute (event rate, "rpm")* | float | RFC-AAAA | | | 1/min | 1 per minute (event rate, "rpm")* | float | RFC 8428 | | |||
| beat/min | 1 per minute (Heart rate in beats | float | RFC-AAAA | | | beat/min | 1 per minute (heart rate in beats | float | RFC 8428 | | |||
| | per minute)* | | | | | | per minute)* | | | | |||
| beats | 1 (Cumulative number of heart | float | RFC-AAAA | | | beats | 1 (cumulative number of heart | float | RFC 8428 | | |||
| | beats)* | | | | | | beats)* | | | | |||
| S/m | Siemens per meter (conductivity) | float | RFC-AAAA | | | S/m | siemens per meter (conductivity) | float | RFC 8428 | | |||
+----------+------------------------------------+-------+-----------+ | +----------+------------------------------------+-------+-----------+ | |||
Table 6 | Table 6: IANA Registry for SenML Units | |||
o Note 1: Assumed to be in WGS84 unless another reference frame is | o Note 1: Assumed to be in World Geodetic System 1984 (WGS84), | |||
known for the sensor. | unless another reference frame is known for the sensor. | |||
o Note 2: A value of 0.0 indicates the switch is off while 1.0 | o Note 2: A value of 0.0 indicates the switch is off, 1.0 indicates | |||
indicates on and 0.5 would be half on. The preferred name of this | on, and 0.5 indicates half on. The preferred name of this unit is | |||
unit is "/". For historical reasons, the name "%" is also | "/". For historical reasons, the name "%" is also provided for | |||
provided for the same unit - but note that while that name | the same unit, but note that while that name strongly suggests a | |||
strongly suggests a percentage (0..100) -- it is however NOT a | percentage (0..100), it is NOT a percentage but the absolute | |||
percentage, but the absolute ratio! | ratio! | |||
New entries can be added to the registration by Expert Review as | New entries can be added to the registration by Expert Review as | |||
defined in [RFC8126]. Experts should exercise their own good | defined in [RFC8126]. Experts should exercise their own good | |||
judgment but need to consider the following guidelines: | judgment but need to consider the following guidelines: | |||
1. There needs to be a real and compelling use for any new unit to | 1. There needs to be a real and compelling use for any new unit to | |||
be added. | be added. | |||
2. Each unit should define the semantic information and be chosen | 2. Each unit should define the semantic information and be chosen | |||
carefully. Implementers need to remember that the same word may | carefully. Implementers need to remember that the same word may | |||
be used in different real-life contexts. For example, degrees | be used in different real-life contexts. For example, degrees | |||
when measuring latitude have no semantic relation to degrees | when measuring latitude have no semantic relation to degrees | |||
when measuring temperature; thus two different units are needed. | when measuring temperature; thus, two different units are | |||
needed. | ||||
3. These measurements are produced by computers for consumption by | 3. These measurements are produced by computers for consumption by | |||
computers. The principle is that conversion has to be easily be | computers. The principle is that conversion has to be easily | |||
done when both reading and writing the media type. The value of | done when both reading and writing the media type. The value of | |||
a single canonical representation outweighs the convenience of | a single canonical representation outweighs the convenience of | |||
easy human representations or loss of precision in a conversion. | easy human representations or loss of precision in a conversion. | |||
4. Use of SI prefixes such as "k" before the unit is not | 4. Use of System of Units (SI) prefixes such as "k" before the unit | |||
recommended. Instead one can represent the value using | is not recommended. Instead, one can represent the value using | |||
scientific notation such a 1.2e3. The "kg" unit is exception to | scientific notation such as 1.2e3. The "kg" unit is an | |||
this rule since it is an SI base unit; the "g" unit is provided | exception to this rule since it is an SI base unit; the "g" unit | |||
for legacy compatibility. | is provided for legacy compatibility. | |||
5. For a given type of measurement, there will only be one unit | 5. For a given type of measurement, there will only be one unit | |||
type defined. So for length, meters are defined and other | type defined. So for length, meter is defined, and other | |||
lengths such as mile, foot, light year are not allowed. For | lengths such as mile, foot, and light year are not allowed. For | |||
most cases, the SI unit is preferred. | most cases, the SI unit is preferred. | |||
(Note that some amount of judgment will be required here, as | (Note that some amount of judgment will be required here, as | |||
even SI itself is not entirely consistent in this respect. For | even SI itself is not entirely consistent in this respect. For | |||
instance, for temperature [ISO-80000-5] defines a quantity, item | instance, for temperature, [ISO-80000-5] defines a quantity, | |||
5-1 (thermodynamic temperature), and a corresponding unit 5-1.a | item 5-1 (thermodynamic temperature), and a corresponding unit | |||
(Kelvin), and then goes ahead to define another quantity right | of 5-1.a (Kelvin); [ISO-80000-5] goes on to define another | |||
besides that, item 5-2 ("Celsius temperature"), and the | quantity, item 5-2 ("Celsius temperature"), and the | |||
corresponding unit 5-2.a (degree Celsius). The latter quantity | corresponding unit of 5-2.a (degree Celsius). The latter | |||
is defined such that it gives the thermodynamic temperature as a | quantity is defined such that it gives the thermodynamic | |||
delta from T0 = 275.15 K. ISO 80000-5 is defining both units | temperature as a delta from T0 = 275.15 K. ISO 80000-5 is | |||
side by side, and not really expressing a preference. This | defining both units side by side and not really expressing a | |||
level of recognition of the alternative unit degree Celsius is | preference. This level of recognition of the alternative unit | |||
the reason why Celsius temperatures exceptionally seem | degree Celsius is the reason why Celsius temperatures seem | |||
acceptable in the SenML units list alongside Kelvin.) | exceptionally acceptable in the SenML units list alongside | |||
Kelvin.) | ||||
6. Symbol names that could be easily confused with existing common | 6. Symbol names that could be easily confused with existing common | |||
units or units combined with prefixes should be avoided. For | units or units combined with prefixes should be avoided. For | |||
example, selecting a unit name of "mph" to indicate something | example, selecting a unit name of "mph" to indicate something | |||
that had nothing to do with velocity would be a bad choice, as | that had nothing to do with velocity would be a bad choice, as | |||
"mph" is commonly used to mean miles per hour. | "mph" is commonly used to mean "miles per hour". | |||
7. The following should not be used because the are common SI | 7. The following should not be used because they are common SI | |||
prefixes: Y, Z, E, P, T, G, M, k, h, da, d, c, n, u, p, f, a, z, | prefixes: Y, Z, E, P, T, G, M, k, h, da, d, c, u, n, p, f, a, z, | |||
y, Ki, Mi, Gi, Ti, Pi, Ei, Zi, Yi. | y, Ki, Mi, Gi, Ti, Pi, Ei, Zi, and Yi. | |||
8. The following units should not be used as they are commonly used | 8. The following units should not be used as they are commonly used | |||
to represent other measurements Ky, Gal, dyn, etg, P, St, Mx, G, | to represent other measurements: Ky, Gal, dyn, etg, P, St, Mx, | |||
Oe, Gb, sb, Lmb, mph, Ci, R, RAD, REM, gal, bbl, qt, degF, Cal, | G, Oe, Gb, sb, Lmb, mph, Ci, R, RAD, REM, gal, bbl, qt, degF, | |||
BTU, HP, pH, B/s, psi, Torr, atm, at, bar, kWh. | Cal, BTU, HP, pH, B/s, psi, Torr, atm, at, bar, and kWh. | |||
9. The unit names are case sensitive and the correct case needs to | 9. The unit names are case sensitive, and the correct case needs to | |||
be used, but symbols that differ only in case should not be | be used; however, symbols that differ only in case should not be | |||
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 "/" indicates that the units that | |||
follow are the reciprocal. A unit should have only one / in the | follow are the reciprocals. A unit should have only one "/" in | |||
name. | the 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]. | |||
12.2. SenML Label Registry | 12.2. SenML Labels Registry | |||
IANA will create a new registry for SenML labels. The initial | IANA has created a new registry for SenML Labels called the "SenML | |||
content of the registry is: | Labels" registry. The initial contents of the registry are as | |||
follows: | ||||
+--------------+-------+----+-----------+----------+----+-----------+ | +--------------+-------+----+-----------+----------+----+-----------+ | |||
| Name | Label | CL | JSON Type | XML Type | EI | Reference | | | Name | Label | CL | JSON Type | XML Type | EI | Reference | | |||
+--------------+-------+----+-----------+----------+----+-----------+ | +--------------+-------+----+-----------+----------+----+-----------+ | |||
| Base Name | bn | -2 | String | string | a | RFC-AAAA | | | Base Name | bn | -2 | String | string | a | RFC 8428 | | |||
| Base Time | bt | -3 | Number | double | a | RFC-AAAA | | | Base Time | bt | -3 | Number | double | a | RFC 8428 | | |||
| Base Unit | bu | -4 | String | string | a | RFC-AAAA | | | Base Unit | bu | -4 | String | string | a | RFC 8428 | | |||
| Base Value | bv | -5 | Number | double | a | RFC-AAAA | | | Base Value | bv | -5 | Number | double | a | RFC 8428 | | |||
| Base Sum | bs | -6 | Number | double | a | RFC-AAAA | | | Base Sum | bs | -6 | Number | double | a | RFC 8428 | | |||
| Base Version | bver | -1 | Number | int | a | RFC-AAAA | | | Base Version | bver | -1 | Number | int | a | RFC 8428 | | |||
| Name | n | 0 | String | string | a | RFC-AAAA | | | Name | n | 0 | String | string | a | RFC 8428 | | |||
| Unit | u | 1 | String | string | a | RFC-AAAA | | | Unit | u | 1 | String | string | a | RFC 8428 | | |||
| Value | v | 2 | Number | double | a | RFC-AAAA | | | Value | v | 2 | Number | double | a | RFC 8428 | | |||
| String Value | vs | 3 | String | string | a | RFC-AAAA | | | String Value | vs | 3 | String | string | a | RFC 8428 | | |||
| Boolean | vb | 4 | Boolean | boolean | a | RFC-AAAA | | | Boolean | vb | 4 | Boolean | boolean | a | RFC 8428 | | |||
| Value | | | | | | | | | Value | | | | | | | | |||
| Data Value | vd | 8 | String | string | a | RFC-AAAA | | | Data Value | vd | 8 | String | string | a | RFC 8428 | | |||
| Value Sum | s | 5 | Number | double | a | RFC-AAAA | | | Sum | s | 5 | Number | double | a | RFC 8428 | | |||
| Time | t | 6 | Number | double | a | RFC-AAAA | | | Time | t | 6 | Number | double | a | RFC 8428 | | |||
| Update Time | ut | 7 | Number | double | a | RFC-AAAA | | | Update Time | ut | 7 | Number | double | a | RFC 8428 | | |||
+--------------+-------+----+-----------+----------+----+-----------+ | +--------------+-------+----+-----------+----------+----+-----------+ | |||
Table 7: IANA Registry for SenML Labels, CL = CBOR Label, EI = EXI ID | Note that CL = CBOR Label and EI = EXI ID. | |||
This is the same table as Table 1, with notes removed, and with | Table 7: IANA Registry for SenML Labels | |||
columns added for the information that is all the same for this | ||||
initial set of registrations, but will need to be supplied with a | ||||
different value for new registrations. | ||||
All new entries must define the Label Name, Label, and XML Type but | This is the same table as Table 1, with notes removed and columns | |||
the CBOR labels SHOULD be left empty as CBOR will use the string | added for the information that is all the same for this initial set | |||
encoding for any new labels. The EI column contains the EXI schemaId | of registrations, but it will need to be supplied with different | |||
value of the first Schema which includes this label or is empty if | values for new registrations. | |||
this label was not intended for use with EXI. The Note field SHOULD | ||||
All new entries must define the Name, Label, and XML Type, but the | ||||
CBOR labels SHOULD be left empty as CBOR will use the string encoding | ||||
for any new labels. The EI column contains the EXI schemaId value of | ||||
the first schema that includes this label, or it is empty if this | ||||
label was not intended for use with EXI. The Reference column 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 lose any information from the JSON value. EXI uses the XML | does not lose any information from the JSON value. EXI uses the XML | |||
types. | types. | |||
New entries can be added to the registration by Expert Review as | New entries can be added to the registration by Expert Review as | |||
defined in [RFC8126]. Experts should exercise their own good | defined in [RFC8126]. Experts should exercise their own good | |||
judgment but need to consider that shorter labels should have more | judgment but need to consider that shorter labels should have more | |||
strict review. New entries should not be made that counteract the | strict review. New entries should not be made that counteract the | |||
advice at the end of Section 4.5.4. | advice at the end of Section 4.5.4. | |||
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 the character 'b'. Regular labels MUST NOT start | MUST start with the character "b". Regular labels MUST NOT start | |||
with that character. All new SenML labels with Value semantics (see | with that character. All new SenML Labels with Value semantics (see | |||
Section 4.2) MUST have "Value" in their (long form) name. | Section 4.2) MUST have "Value" in their (long-form) name. | |||
Extensions that add a label that is intended for use with XML need to | Extensions that add a label intended for use with XML need to create | |||
create a new RelaxNG scheme that includes all the labels in the IANA | a new RelaxNG Schema that includes all the labels in the "SenML | |||
registry. | Labels" 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 "SenML | |||
registry and then allocate a new EXI schemaId value. Moving to the | Labels" registry and then allocate a new EXI schemaId value. Moving | |||
next letter in the alphabet is the suggested way to create the new | to the next letter in the alphabet is the suggested way to create the | |||
value for the EXI schemaId. Any labels with previously blank ID | new value for the EXI schemaId. Any labels with previously blank ID | |||
values SHOULD be updated in the IANA table to have their ID set to | values SHOULD be updated in the "SenML Labels" registry to have their | |||
this new schemaId value. | ID set to this new schemaId value. | |||
Extensions that are mandatory to understand to correctly process the | Extensions that are mandatory to understand to correctly process the | |||
Pack MUST have a label name that ends with the '_' character. | Pack MUST have a label name that ends with the "_" character. | |||
12.3. Media Type Registrations | 12.3. Media Type Registrations | |||
The following registrations are done following the procedure | The registrations in the subsections below follow the procedures | |||
specified in [RFC6838] and [RFC7303]. This document registers media | specified in [RFC6838] and [RFC7303]. This document registers media | |||
types for each serialization format of SenML (JSON, CBOR, XML, and | types for each serialization format of SenML (JSON, CBOR, XML, and | |||
EXI) and also a corresponding set of media types for the streaming | EXI) and also a corresponding set of media types for streaming use | |||
use (SensML, see Section 4.8). Clipboard formats are defined for the | (SenSML; see Section 4.8). Clipboard formats are defined for the | |||
JSON and XML forms of SenML but not for streams or non-textual | JSON and XML forms of SenML but not for streams or non-textual | |||
formats. | formats. | |||
The reason there are both SenML and the streaming SensML formats is | The reason there are both SenML and the streaming SenSML formats is | |||
that they are not the same data formats and they require separate | that they are not the same data formats, and they require separate | |||
negotiation to understand if they are supported and which one is | negotiation to understand if they are supported and which one is | |||
being used. The non streaming format is required to have some sort | being used. The non-streaming format is required to have some sort | |||
of end of pack syntax which indicates there will be no more records. | of end-of-pack syntax that indicates there will be no more records. | |||
Many implementations that receive SenML wait for this end of pack | Many implementations that receive SenML wait for this end-of-pack | |||
marker before processing any of the records. On the other hand, with | marker before processing any of the records. On the other hand, with | |||
the streaming formats, it is explicitly not required to wait for this | the streaming formats, it is explicitly not required to wait for this | |||
end of pack marker. Many implementations that produce streaming | end-of-pack marker. Many implementations that produce streaming | |||
SensML will never send this end of pack marker so implementations | SenSML will never send this end-of-pack marker, so implementations | |||
that receive streaming SensML can not wait for the end of pack marker | that receive streaming SenSML cannot wait for the end-of-pack marker | |||
before they start processing the records. Given the SenML and | before they start processing the records. Given that SenML and | |||
streaming SenML are different data formats, and the requirement for | streaming SenML are different data formats, and considering the | |||
separate negotiation, a media type for each one is needed. | requirement for separate negotiation, a media type for each one is | |||
needed. | ||||
Note to RFC Editor - please remove this paragraph. Note that a | ||||
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 | ||||
was sent on October 31, 2016. Please change all instances of RFC- | ||||
AAAA with the RFC number of this document. | ||||
12.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 | Subtype name: senml+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 [RFC8259]. See RFC-AAAA for details. This | encoding allowed in [RFC8259]. See RFC 8428 for details. This | |||
simplifies implementation of very simple system and does not impose | simplifies implementation of a 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: See Section 13 of RFC-AAAA. | Security considerations: See Section 13 of RFC 8428. | |||
Interoperability considerations: Applications MUST ignore any JSON | Interoperability considerations: Applications MUST ignore any JSON | |||
key value pairs that they do not understand unless the key ends with | key-value pairs that they do not understand unless the key ends with | |||
the '_' character in which case an error MUST be generated. This | the "_" character, in which case an error MUST be generated. This | |||
allows backwards compatible extensions to this specification. The | allows backwards-compatible extensions to this specification. The | |||
"bver" field can be used to ensure the receiver supports a minimal | "bver" field can be used to ensure the receiver supports a minimal | |||
level of functionality needed by the creator of the JSON object. | level of functionality needed by the creator of the JSON object. | |||
Published specification: RFC-AAAA | Published specification: RFC 8428 | |||
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 | Fragment identifier considerations: Fragment identification for | |||
application/senml+json is supported by using fragment identifiers as | application/senml+json is supported by using fragment identifiers as | |||
specified by RFC-AAAA. | specified by RFC 8428. | |||
Additional information: | Additional information: | |||
Magic number(s): none | Deprecated alias names for this type: N/A | |||
File extension(s): senml | ||||
Windows Clipboard Name: "JSON Sensor Measurement List" | Magic number(s): N/A | |||
Macintosh file type code(s): none | File extension(s): senml | |||
Macintosh Universal Type Identifier code: org.ietf.senml-json | Windows Clipboard Name: "JSON Sensor Measurement List" | |||
conforms to public.text | ||||
Person & email address to contact for further information: Cullen | Macintosh file type code(s): none | |||
Jennings <fluffy@iii.ca> | ||||
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 | 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 | |||
12.3.2. sensml+json Media Type Registration | 12.3.2. sensml+json Media Type Registration | |||
Type name: application | Type name: application | |||
Subtype name: sensml+json | 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 [RFC8259]. See RFC-AAAA for details. This | encoding allowed in [RFC8259]. See RFC 8428 for details. This | |||
simplifies implementation of very simple system and does not impose | simplifies implementation of a 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: See Section 13 of RFC-AAAA. | Security considerations: See Section 13 of RFC 8428. | |||
Interoperability considerations: Applications MUST ignore any JSON | Interoperability considerations: Applications MUST ignore any JSON | |||
key value pairs that they do not understand unless the key ends with | key-value pairs that they do not understand unless the key ends with | |||
the '_' character in which case an error MUST be generated. This | the "_" character, in which case an error MUST be generated. This | |||
allows backwards compatible extensions to this specification. The | allows backwards-compatible extensions to this specification. The | |||
"bver" field can be used to ensure the receiver supports a minimal | "bver" field can be used to ensure the receiver supports a minimal | |||
level of functionality needed by the creator of the JSON object. | level of functionality needed by the creator of the JSON object. | |||
Published specification: RFC-AAAA | Published specification: RFC 8428 | |||
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 | Fragment identifier considerations: Fragment identification for | |||
application/sensml+json is supported by using fragment identifiers as | application/sensml+json is supported by using fragment identifiers as | |||
specified by RFC-AAAA. | specified by RFC 8428. | |||
Additional information: | Additional information: | |||
Magic number(s): none | Deprecated alias names for this type: N/A | |||
File extension(s): sensml | Magic number(s): N/A | |||
Macintosh file type code(s): none | File extension(s): sensml | |||
Person & email address to contact for further information: Cullen | Macintosh file type code(s): none | |||
Jennings <fluffy@iii.ca> | ||||
Person & email address to contact for further information: | ||||
Cullen 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 | |||
12.3.3. senml+cbor Media Type Registration | 12.3.3. senml+cbor Media Type Registration | |||
Type name: application | Type name: application | |||
Subtype name: senml+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 | |||
RFC-AAAA for details. | 8428 for details. | |||
Security considerations: See Section 13 of RFC-AAAA. | Security considerations: See Section 13 of RFC 8428. | |||
Interoperability considerations: Applications MUST ignore any key | Interoperability considerations: Applications MUST ignore any key- | |||
value pairs that they do not understand unless the key ends with the | value pairs that they do not understand unless the key ends with the | |||
'_' character in which case an error MUST be generated. This allows | "_" character, in which case an error MUST be generated. This allows | |||
backwards compatible extensions to this specification. The "bver" | backwards-compatible extensions to this specification. The "bver" | |||
field can be used to ensure the receiver supports a minimal level of | field can 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 8428 | |||
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 | Fragment identifier considerations: Fragment identification for | |||
application/senml+cbor is supported by using fragment identifiers as | application/senml+cbor is supported by using fragment identifiers as | |||
specified by RFC-AAAA. | specified by RFC 8428. | |||
Additional information: | Additional information: | |||
Magic number(s): none | Deprecated alias names for this type: N/A | |||
File extension(s): senmlc | Magic number(s): N/A | |||
Macintosh file type code(s): none | File extension(s): senmlc | |||
Macintosh Universal Type Identifier code: org.ietf.senml-cbor | Macintosh file type code(s): none | |||
conforms to public.data | ||||
Person & email address to contact for further information: Cullen | Macintosh Universal Type Identifier code: org.ietf.senml-cbor | |||
Jennings <fluffy@iii.ca> | conforms to public.data | |||
Person & email address to contact for further information: | ||||
Cullen 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 | |||
12.3.4. sensml+cbor Media Type Registration | 12.3.4. sensml+cbor Media Type Registration | |||
Type name: application | Type name: application | |||
Subtype name: sensml+cbor | Subtype name: sensml+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 | |||
RFC-AAAA for details. | 8428 for details. | |||
Security considerations: See Section 13 of RFC-AAAA. | Security considerations: See Section 13 of RFC 8428. | |||
Interoperability considerations: Applications MUST ignore any key | Interoperability considerations: Applications MUST ignore any key- | |||
value pairs that they do not understand unless the key ends with the | value pairs that they do not understand unless the key ends with the | |||
'_' character in which case an error MUST be generated. This allows | "_" character, in which case an error MUST be generated. This allows | |||
backwards compatible extensions to this specification. The "bver" | backwards-compatible extensions to this specification. The "bver" | |||
field can be used to ensure the receiver supports a minimal level of | field can 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 8428 | |||
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 | Fragment identifier considerations: Fragment identification for | |||
application/sensml+cbor is supported by using fragment identifiers as | application/sensml+cbor is supported by using fragment identifiers as | |||
specified by RFC-AAAA. | specified by RFC 8428. | |||
Additional information: | Additional information: | |||
Magic number(s): none | Deprecated alias names for this type: N/A | |||
File extension(s): sensmlc | Magic number(s): N/A | |||
Macintosh file type code(s): none | File extension(s): sensmlc | |||
Person & email address to contact for further information: Cullen | Macintosh file type code(s): none | |||
Jennings <fluffy@iii.ca> | ||||
Intended usage: COMMON | Person & email address to contact for further information: | |||
Cullen Jennings <fluffy@iii.ca> | ||||
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 | |||
12.3.5. senml+xml Media Type Registration | 12.3.5. senml+xml Media Type Registration | |||
Type name: application | Type name: application | |||
skipping to change at page 40, line 4 ¶ | skipping to change at page 42, line 19 ¶ | |||
12.3.5. senml+xml Media Type Registration | 12.3.5. senml+xml Media Type Registration | |||
Type name: application | Type name: application | |||
Subtype name: senml+xml | 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 8428 for details. | |||
Security considerations: See Section 13 of RFC-AAAA. | Security considerations: See Section 13 of RFC 8428. | |||
Interoperability considerations: Applications MUST ignore any XML | Interoperability considerations: Applications MUST ignore any XML | |||
tags or attributes that they do not understand unless the attribute | tags or attributes that they do not understand unless the attribute | |||
name ends with the '_' character in which case an error MUST be | name ends with the "_" character, in which case an error MUST be | |||
generated. This allows backwards compatible extensions to this | generated. This allows backwards-compatible extensions to this | |||
specification. The "bver" attribute in the senml XML tag can be used | specification. The "bver" attribute in the senml XML tag can be used | |||
to ensure the receiver supports a minimal level of functionality | to ensure the receiver supports a minimal level of functionality | |||
needed by the creator of the XML SenML Pack. | needed by the creator of the XML SenML Pack. | |||
Published specification: RFC-AAAA | Published specification: RFC 8428 | |||
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 | Fragment identifier considerations: Fragment identification for | |||
application/senml+xml is supported by using fragment identifiers as | application/senml+xml is supported by using fragment identifiers as | |||
specified by RFC-AAAA. | specified by RFC 8428. | |||
Additional information: | Additional information: | |||
Magic number(s): none | Deprecated alias names for this type: N/A | |||
File extension(s): senmlx | Magic number(s): N/A | |||
Windows Clipboard Name: "XML Sensor Measurement List" | 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 | Macintosh Universal Type Identifier code: org.ietf.senml-xml | |||
to public.xml | conforms to public.xml | |||
Person & email address to contact for further information: Cullen | Person & email address to contact for further information: | |||
Jennings <fluffy@iii.ca> | Cullen 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 | |||
12.3.6. sensml+xml Media Type Registration | 12.3.6. sensml+xml Media Type Registration | |||
Type name: application | Type name: application | |||
Subtype name: sensml+xml | Subtype name: sensml+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 8428 for details. | |||
Security considerations: See Section 13 of RFC-AAAA. | Security considerations: See Section 13 of RFC 8428. | |||
Interoperability considerations: Applications MUST ignore any XML | Interoperability considerations: Applications MUST ignore any XML | |||
tags or attributes that they do not understand unless the attribute | tags or attributes that they do not understand unless the attribute | |||
name ends with the '_' character in which case an error MUST be | name ends with the "_" character, in which case an error MUST be | |||
generated. This allows backwards compatible extensions to this | generated. This allows backwards-compatible extensions to this | |||
specification. The "bver" attribute in the senml XML tag can be used | specification. The "bver" attribute in the senml XML tag can be used | |||
to ensure the receiver supports a minimal level of functionality | to ensure the receiver supports a minimal level of functionality | |||
needed by the creator of the XML SenML Pack. | needed by the creator of the XML SenML Pack. | |||
Published specification: RFC-AAAA | Published specification: RFC 8428 | |||
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 | Fragment identifier considerations: Fragment identification for | |||
application/sensml+xml is supported by using fragment identifiers as | application/sensml+xml is supported by using fragment identifiers as | |||
specified by RFC-AAAA. | specified by RFC 8428. | |||
Additional information: | Additional information: | |||
Magic number(s): none | Deprecated alias names for this type: N/A | |||
File extension(s): sensmlx | Magic number(s): N/A | |||
Macintosh file type code(s): none | File extension(s): sensmlx | |||
Person & email address to contact for further information: Cullen | Macintosh file type code(s): none | |||
Jennings <fluffy@iii.ca> | ||||
Person & email address to contact for further information: | ||||
Cullen 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 | |||
12.3.7. senml-exi Media Type Registration | 12.3.7. senml-exi Media Type Registration | |||
Type name: application | Type name: application | |||
Subtype name: senml-exi | Subtype name: senml-exi | |||
skipping to change at page 42, line 19 ¶ | skipping to change at page 44, line 41 ¶ | |||
Type name: application | Type name: application | |||
Subtype name: senml-exi | 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 8428 for details. | |||
Security considerations: See Section 13 of RFC-AAAA. | Security considerations: See Section 13 of RFC 8428. | |||
Interoperability considerations: Applications MUST ignore any XML | Interoperability considerations: Applications MUST ignore any XML | |||
tags or attributes that they do not understand unless the attribute | tags or attributes that they do not understand unless the attribute | |||
name ends with the '_' character in which case an error MUST be | name ends with the "_" character, in which case an error MUST be | |||
generated. This allows backwards compatible extensions to this | generated. This allows backwards-compatible extensions to this | |||
specification. The "bver" attribute in the senml XML tag can be used | specification. The "bver" attribute in the senml XML tag can be used | |||
to ensure the receiver supports a minimal level of functionality | to ensure the receiver supports a minimal level of functionality | |||
needed by the creator of the XML SenML Pack. Further information on | needed by the creator of the XML SenML Pack. Further information on | |||
using schemas to guide the EXI can be found in RFC-AAAA. | using schemas to guide the EXI can be found in RFC 8428. | |||
Published specification: RFC-AAAA | Published specification: RFC 8428 | |||
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 | Fragment identifier considerations: Fragment identification for | |||
application/senml-exi is supported by using fragment identifiers as | application/senml-exi is supported by using fragment identifiers as | |||
specified by RFC-AAAA. | specified by RFC 8428. | |||
Additional information: | Additional information: | |||
Magic number(s): none | Deprecated alias names for this type: N/A | |||
File extension(s): senmle | Magic number(s): N/A | |||
Macintosh file type code(s): none | File extension(s): senmle | |||
Macintosh Universal Type Identifier code: org.ietf.senml-exi conforms | ||||
to public.data | ||||
Person & email address to contact for further information: Cullen | Macintosh file type code(s): none | |||
Jennings <fluffy@iii.ca> | ||||
Macintosh Universal Type Identifier code: org.ietf.senml-exi | ||||
conforms to public.data | ||||
Person & email address to contact for further information: | ||||
Cullen 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 | |||
12.3.8. sensml-exi Media Type Registration | 12.3.8. sensml-exi Media Type Registration | |||
Type name: application | Type name: application | |||
Subtype name: sensml-exi | Subtype name: sensml-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 8428 for details. | |||
Security considerations: See Section 13 of RFC-AAAA. | Security considerations: See Section 13 of RFC 8428. | |||
Interoperability considerations: Applications MUST ignore any XML | Interoperability considerations: Applications MUST ignore any XML | |||
tags or attributes that they do not understand unless the attribute | tags or attributes that they do not understand unless the attribute | |||
name ends with the '_' character in which case an error MUST be | name ends with the "_" character, in which case an error MUST be | |||
generated. This allows backwards compatible extensions to this | generated. This allows backwards-compatible extensions to this | |||
specification. The "bver" attribute in the senml XML tag can be used | specification. The "bver" attribute in the senml XML tag can be used | |||
to ensure the receiver supports a minimal level of functionality | to ensure the receiver supports a minimal level of functionality | |||
needed by the creator of the XML SenML Pack. Further information on | needed by the creator of the XML SenML Pack. Further information on | |||
using schemas to guide the EXI can be found in RFC-AAAA. | using schemas to guide the EXI can be found in RFC 8428. | |||
Published specification: RFC-AAAA | Published specification: RFC 8428 | |||
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 | Fragment identifier considerations: Fragment identification for | |||
application/sensml-exi is supported by using fragment identifiers as | application/sensml-exi is supported by using fragment identifiers as | |||
specified by RFC-AAAA. | specified by RFC 8428. | |||
Additional information: | Additional information: | |||
Magic number(s): none | Deprecated alias names for this type: N/A | |||
File extension(s): sensmle | Magic number(s): N/A | |||
Macintosh file type code(s): none | File extension(s): sensmle | |||
Person & email address to contact for further information: Cullen | Macintosh file type code(s): none | |||
Jennings <fluffy@iii.ca> | ||||
Person & email address to contact for further information: | ||||
Cullen 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 | |||
12.4. XML Namespace Registration | 12.4. XML Namespace Registration | |||
This document registers the following XML namespaces in the IETF XML | This document registers the following XML namespace 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 | |||
12.5. CoAP Content-Format Registration | 12.5. CoAP Content-Format Registration | |||
IANA is requested to assign CoAP Content-Format IDs for the SenML | IANA has assigned CoAP Content-Format IDs for the SenML media types | |||
media types in the "CoAP Content-Formats" sub-registry, within the | in the "CoAP Content-Formats" subregistry within the "Constrained | |||
"CoRE Parameters" registry [RFC7252]. IDs for the JSON, CBOR, and | RESTful Environments (CoRE) Parameters" registry [RFC7252]. IDs for | |||
EXI Content-Formats are assigned from the "Expert Review" (0-255) | the JSON, CBOR, and EXI Content-Formats have been assigned in the | |||
range and for the XML Content-Format from the "IETF Review or IESG | 0-255 range (Expert Review), and IDs for the XML Content-Formats have | |||
Approval" range. The assigned IDs are shown in Table 8. | been assigned in the 256-9999 range (IETF Review or IESG Approval). | |||
The assigned IDs are shown in the table below: | ||||
+-------------------------+----------+---------+-----------+ | +-------------------------+----------+-----+-----------+ | |||
| Media type | Encoding | ID | Reference | | | Media Type | Encoding | ID | Reference | | |||
+-------------------------+----------+---------+-----------+ | +-------------------------+----------+-----+-----------+ | |||
| application/senml+json | - | TBD:110 | RFC-AAAA | | | application/senml+json | - | 110 | RFC 8428 | | |||
| application/sensml+json | - | TBD:111 | RFC-AAAA | | | application/sensml+json | - | 111 | RFC 8428 | | |||
| application/senml+cbor | - | TBD:112 | RFC-AAAA | | | application/senml+cbor | - | 112 | RFC 8428 | | |||
| application/sensml+cbor | - | TBD:113 | RFC-AAAA | | | application/sensml+cbor | - | 113 | RFC 8428 | | |||
| application/senml-exi | - | TBD:114 | RFC-AAAA | | | application/senml-exi | - | 114 | RFC 8428 | | |||
| application/sensml-exi | - | TBD:115 | RFC-AAAA | | | application/sensml-exi | - | 115 | RFC 8428 | | |||
| application/senml+xml | - | TBD:310 | RFC-AAAA | | | application/senml+xml | - | 310 | RFC 8428 | | |||
| application/sensml+xml | - | TBD:311 | RFC-AAAA | | | application/sensml+xml | - | 311 | RFC 8428 | | |||
+-------------------------+----------+---------+-----------+ | +-------------------------+----------+-----+-----------+ | |||
Table 8: CoAP Content-Format IDs | Table 8: CoAP Content-Format IDs | |||
13. Security Considerations | 13. Security Considerations | |||
Sensor data presented with SenML can contain a wide range of | Sensor data presented with SenML can contain a wide array of | |||
information ranging from information that is very public, such as the | information that ranges from very public (such as the outside | |||
outside temperature in a given city, to very private information that | temperature in a given city) to very private (such as patient health | |||
requires integrity and confidentiality protection, such as patient | information that requires integrity and confidentiality protection). | |||
health information. When SenML is used for configuration or | When SenML is used for configuration or actuation, it can be used to | |||
actuation, it can be used to change the state of systems and also | change the state of systems and also impact the physical world, e.g., | |||
impact the physical world, e.g., by turning off a heater or opening a | by turning off a heater or opening a lock. Malicious use of SenML to | |||
lock. | change system state could have severe consequences, potentially | |||
including violation of physical security, property damage, and even | ||||
loss of life. | ||||
The SenML formats alone do not provide any security and instead rely | SenML formats alone do not provide any security and instead rely on | |||
on the protocol that carries them to provide security. Applications | the protocol that carries them to provide security. Applications | |||
using SenML need to look at the overall context of how these formats | using SenML need to look at the overall context of how these formats | |||
will be used to decide if the security is adequate. In particular | will be used to decide if the security is adequate. In particular, | |||
for sensitive sensor data and actuation use it is important to ensure | for sensitive sensor data and actuation use, it is important to | |||
that proper security mechanisms are used to provide, e.g., | ensure that proper security mechanisms are used to provide, e.g., | |||
confidentiality, data integrity, and authentication as appropriate | confidentiality, data integrity, and authentication as appropriate | |||
for the usage. | for the usage. | |||
The SenML formats defined by this specification do not contain any | SenML formats defined by this specification do not contain any | |||
executable content. However, future extensions could potentially | executable content. However, future extensions could potentially | |||
embed application specific executable content in the data. | embed application-specific executable content in the data. | |||
SenML Records are intended to be interpreted in the context of any | SenML Records are intended to be interpreted in the context of any | |||
applicable base values. If records become separated from the record | applicable base values. If Records become separated from the Record | |||
that establishes the base values, the data will be useless or, worse, | that establishes the base values, the data will be useless or, worse, | |||
wrong. Care needs to be taken in keeping the integrity of a Pack | wrong. Care needs to be taken in keeping the integrity of a Pack | |||
that contains unresolved SenML Records (see Section 4.6). | that contains unresolved SenML Records (see Section 4.6). | |||
See also Section 14. | See also Section 14. | |||
14. Privacy Considerations | 14. Privacy Considerations | |||
Sensor data can range from information with almost no privacy | Sensor data can range from information with almost no privacy | |||
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 transfer protocol such as S/MIME | inside another container or transfer protocol such as S/MIME | |||
[RFC5751] or HTTP with TLS [RFC2818] that can provide integrity, | [RFC5751] or HTTP with TLS [RFC2818] that can provide integrity, | |||
confidentiality, and authentication information about the source of | confidentiality, and authentication information about the source of | |||
the data. | the data. | |||
The name fields need to uniquely identify the sources or destinations | The Name fields need to uniquely identify the sources or destinations | |||
of the values in a SenML Pack. However, the use of long-term stable | of the values in a SenML Pack. However, the use of long-term stable | |||
unique identifiers can be problematic for privacy reasons [RFC6973], | and unique identifiers can be problematic for privacy reasons | |||
depending on the application and the potential of these identifiers | [RFC6973], depending on the application and the potential of these | |||
to be used in correlation with other information. They should be | identifiers to be used in correlation with other information. They | |||
used with care or avoided as for example described for IPv6 addresses | should be used with care or avoided, for example, as described for | |||
in [RFC7721]. | IPv6 addresses in [RFC7721]. | |||
15. Acknowledgement | ||||
We would like to thank Alexander Pelov, Alexey Melnikov, Andrew | ||||
McClure, Andrew McGregor, Bjoern Hoehrmann, Christian Amsuess, | ||||
Christian Groves, Daniel Peintner, Jan-Piet Mens, Jim Schaad, Joe | ||||
Hildebrand, John Klensin, Karl Palsson, Lennart Duhrsen, Lisa | ||||
Dusseault, Lyndsay Campbell, Martin Thomson, Michael Koster, Peter | ||||
Saint-Andre, Roni Even, and Stephen Farrell, for their review | ||||
comments. | ||||
16. References | 15. References | |||
16.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] IEEE, "Standard for Binary Floating-Point Arithmetic", | |||
Institute of Electrical and Electronics Engineers, | IEEE Standard 754. | |||
"Standard for Binary Floating-Point Arithmetic", | ||||
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, DOI 10.6028/NIST.SP.811e2008, March 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/RFC2119, March 1997, | DOI 10.17487/RFC2119, March 1997, | |||
<https://www.rfc-editor.org/info/rfc2119>. | <https://www.rfc-editor.org/info/rfc2119>. | |||
[RFC3629] Yergeau, F., "UTF-8, a transformation format of ISO | [RFC3629] Yergeau, F., "UTF-8, a transformation format of ISO | |||
10646", STD 63, RFC 3629, DOI 10.17487/RFC3629, November | 10646", STD 63, RFC 3629, DOI 10.17487/RFC3629, November | |||
2003, <https://www.rfc-editor.org/info/rfc3629>. | 2003, <https://www.rfc-editor.org/info/rfc3629>. | |||
skipping to change at page 48, line 10 ¶ | skipping to change at page 50, line 24 ¶ | |||
[RFC8259] Bray, T., Ed., "The JavaScript Object Notation (JSON) Data | [RFC8259] Bray, T., Ed., "The JavaScript Object Notation (JSON) Data | |||
Interchange Format", STD 90, RFC 8259, | Interchange Format", STD 90, RFC 8259, | |||
DOI 10.17487/RFC8259, December 2017, | DOI 10.17487/RFC8259, December 2017, | |||
<https://www.rfc-editor.org/info/rfc8259>. | <https://www.rfc-editor.org/info/rfc8259>. | |||
[RNC] ISO/IEC, "Information technology -- Document Schema | [RNC] ISO/IEC, "Information technology -- Document Schema | |||
Definition Language (DSDL) -- Part 2: Regular-grammar- | Definition Language (DSDL) -- Part 2: Regular-grammar- | |||
based validation -- RELAX NG", ISO/IEC 19757-2, Annex | based validation -- RELAX NG", ISO/IEC 19757-2, Annex | |||
C: RELAX NG Compact syntax, December 2008. | C: RELAX NG Compact syntax, December 2008. | |||
[TIME_T] The Open Group Base Specifications, "Vol. 1: Base | [TIME_T] The Open Group Base Specifications, "Open Group Standard - | |||
Definitions, Issue 7", Section 4.15 'Seconds Since the | Vol. 1: Base Definitions, Issue 7", Section 4.16, "Seconds | |||
Epoch', IEEE Std 1003.1, 2013 Edition, 2013, | Since the Epoch", IEEE Standard 1003.1, 2018, | |||
<http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/ | <http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/ | |||
V1_chap04.html#tag_04_15>. | V1_chap04.html#tag_04_16>. | |||
[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)", W3C Recommendation REC-exi-20140211, February | |||
exi-20140211, February 2014, | 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)", W3C Recommendation REC-xml-20081126, November | |||
xml-20081126, November 2008, | 2008, <http://www.w3.org/TR/2008/REC-xml-20081126>. | |||
<http://www.w3.org/TR/2008/REC-xml-20081126>. | ||||
[W3C.REC-xmlschema-1-20041028] | [W3C.REC-xmlschema-1-20041028] | |||
Thompson, H., Beech, D., Maloney, M., and N. Mendelsohn, | Thompson, H., Beech, D., Maloney, M., and N. Mendelsohn, | |||
"XML Schema Part 1: Structures Second Edition", World Wide | "XML Schema Part 1: Structures Second Edition", W3C | |||
Web Consortium Recommendation REC-xmlschema-1-20041028, | Recommendation REC-xmlschema-1-20041028, October 2004, | |||
October 2004, | ||||
<http://www.w3.org/TR/2004/REC-xmlschema-1-20041028>. | <http://www.w3.org/TR/2004/REC-xmlschema-1-20041028>. | |||
[XPointerElement] | [XPointerElement] | |||
Grosso, P., Maler, E., Marsh, J., and N. Walsh, "XPointer | Grosso, P., Maler, E., Marsh, J., and N. Walsh, "XPointer | |||
element() Scheme", W3C Recommendation REC-xptr-element, | element() Scheme", W3C Recommendation REC-xptr-element, | |||
March 2003, | March 2003, | |||
<https://www.w3.org/TR/2003/REC-xptr-element-20030325/>. | <https://www.w3.org/TR/2003/REC-xptr-element-20030325/>. | |||
[XPointerFramework] | [XPointerFramework] | |||
Grosso, P., Maler, E., Marsh, J., and N. Walsh, "XPointer | Grosso, P., Maler, E., Marsh, J., and N. Walsh, "XPointer | |||
Framework", W3C Recommendation REC-XPointer-Framework, | Framework", W3C Recommendation REC-XPointer-Framework, | |||
March 2003, | March 2003, | |||
<http://www.w3.org/TR/2003/REC-xptr-framework-20030325/>. | <http://www.w3.org/TR/2003/REC-xptr-framework-20030325/>. | |||
16.2. Informative References | 15.2. Informative References | |||
[AN1796] Linke, B., "Overview of 1-Wire Technology and Its Use", | [AN1796] Linke, B., "Overview of 1-Wire Technology and Its Use", | |||
June 2008, | Maxim Integrated, Tutorial 1796, June 2008, | |||
<http://pdfserv.maximintegrated.com/en/an/AN1796.pdf>. | <http://pdfserv.maximintegrated.com/en/an/AN1796.pdf>. | |||
[I-D.ietf-cbor-cddl] | [CDDL-CBOR] | |||
Birkholz, H., Vigano, C., and C. Bormann, "Concise data | Birkholz, H., Vigano, C., and C. Bormann, "Concise data | |||
definition language (CDDL): a notational convention to | definition language (CDDL): a notational convention to | |||
express CBOR data structures", draft-ietf-cbor-cddl-02 | express CBOR and JSON data structures", Work in Progress, | |||
(work in progress), February 2018. | draft-ietf-cbor-cddl-05, August 2018. | |||
[I-D.ietf-core-dev-urn] | [DEVICE-URN] | |||
Arkko, J., Jennings, C., and Z. Shelby, "Uniform Resource | Arkko, J., Jennings, C., and Z. Shelby, "Uniform Resource | |||
Names for Device Identifiers", draft-ietf-core-dev-urn-01 | Names for Device Identifiers", Work in Progress, | |||
(work in progress), March 2018. | draft-ietf-core-dev-urn-02, July 2018. | |||
[I-D.ietf-core-interfaces] | ||||
Shelby, Z., Vial, M., Koster, M., Groves, C., Zhu, J., and | ||||
B. Silverajan, "Reusable Interface Definitions for | ||||
Constrained RESTful Environments", draft-ietf-core- | ||||
interfaces-11 (work in progress), March 2018. | ||||
[IEEE802.1as-2011] | [IEEE802.1AS] | |||
IEEE, "IEEE Standard for Local and Metropolitan Area | IEEE, "IEEE Standard for Local and Metropolitan Area | |||
Networks - Timing and Synchronization for Time-Sensitive | Networks - Timing and Synchronization for Time-Sensitive | |||
Applications in Bridged Local Area Networks", 2011. | Applications in Bridged Local Area Networks", IEEE | |||
Standard 802.1AS. | ||||
[IEEE802.1ba-2011] | [IEEE802.1BA] | |||
IEEE, "IEEE Standard for Local and metropolitan area | IEEE, "IEEE Standard for Local and metropolitan area | |||
networks--Audio Video Bridging (AVB) Systems", 2011. | networks--Audio Video Bridging (AVB) Systems", IEEE | |||
Standard 802.1BA. | ||||
[ISO-80000-5] | [ISO-80000-5] | |||
"Quantities and units - Part 5: Thermodynamics", | ISO, "Quantities and units - Part 5: Thermodynamics", | |||
ISO 80000-5, Edition 1.0, May 2007. | ISO 80000-5, Edition 1.0, May 2007. | |||
[RFC2818] Rescorla, E., "HTTP Over TLS", RFC 2818, | [RFC2818] Rescorla, E., "HTTP Over TLS", RFC 2818, | |||
DOI 10.17487/RFC2818, May 2000, | DOI 10.17487/RFC2818, May 2000, | |||
<https://www.rfc-editor.org/info/rfc2818>. | <https://www.rfc-editor.org/info/rfc2818>. | |||
[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 3986, DOI 10.17487/RFC3986, January 2005, | RFC 3986, DOI 10.17487/RFC3986, January 2005, | |||
<https://www.rfc-editor.org/info/rfc3986>. | <https://www.rfc-editor.org/info/rfc3986>. | |||
skipping to change at page 51, line 14 ¶ | skipping to change at page 53, line 14 ¶ | |||
[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, | |||
<https://www.rfc-editor.org/info/rfc7721>. | <https://www.rfc-editor.org/info/rfc7721>. | |||
[RFC8141] Saint-Andre, P. and J. Klensin, "Uniform Resource Names | [RFC8141] Saint-Andre, P. and J. Klensin, "Uniform Resource Names | |||
(URNs)", RFC 8141, DOI 10.17487/RFC8141, April 2017, | (URNs)", RFC 8141, DOI 10.17487/RFC8141, April 2017, | |||
<https://www.rfc-editor.org/info/rfc8141>. | <https://www.rfc-editor.org/info/rfc8141>. | |||
[RID-CoRE] | ||||
Shelby, Z., Vial, M., Groves, C., Zhu, J., and B. | ||||
Silverajan, Ed., "Reusable Interface Definitions for | ||||
Constrained RESTful Environments", Work in Progress, | ||||
draft-ietf-core-interfaces-12, June 2018. | ||||
[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", Version 2.1, Regenstrief Institute and | |||
University School of Informatics, 2013, | the UCUM Organization, November 2017, | |||
<http://unitsofmeasure.org/ucum.html>. | <http://unitsofmeasure.org/ucum.html>. | |||
Acknowledgements | ||||
We would like to thank Alexander Pelov, Alexey Melnikov, Andrew | ||||
McClure, Andrew McGregor, Bjoern Hoehrmann, Christian Amsuess, | ||||
Christian Groves, Daniel Peintner, Jan-Piet Mens, Jim Schaad, Joe | ||||
Hildebrand, John Klensin, Karl Palsson, Lennart Duhrsen, Lisa | ||||
Dusseault, Lyndsay Campbell, Martin Thomson, Michael Koster, Peter | ||||
Saint-Andre, Roni Even, and Stephen Farrell, for their review | ||||
comments. | ||||
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 | |||
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 | United States of America | |||
Phone: +1-408-203-9434 | Phone: +1-408-203-9434 | |||
Email: zach.shelby@arm.com | Email: zach.shelby@arm.com | |||
Jari Arkko | Jari Arkko | |||
Ericsson | Ericsson | |||
Jorvas 02420 | Jorvas 02420 | |||
Finland | Finland | |||
Email: jari.arkko@piuha.net | Email: jari.arkko@piuha.net | |||
End of changes. 324 change blocks. | ||||
822 lines changed or deleted | 839 lines changed or added | |||
This html diff was produced by rfcdiff 1.47. The latest version is available from http://tools.ietf.org/tools/rfcdiff/ |