One document matched: draft-jennings-core-senml-04.xml


<?xml version="1.0" encoding="UTF-8"?>
  <?xml-stylesheet type="text/xsl" href="rfc2629.xslt" ?>

<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
]>

<rfc ipr="trust200902" docName="draft-jennings-core-senml-04" category="std">

<?rfc toc="yes"?>
<?rfc symrefs="yes"?>
<?rfc iprnotified="yes"?>
<?rfc strict="yes"?>
<?rfc compact="yes"?>
<?rfc sortrefs="yes"?>
<?rfc colonspace="yes"?>
<?rfc rfcedstyle="no"?>
<?rfc tocdepth="4"?>

  <front>
    <title abbrev="Sensor Markup">Media Types for Sensor Markup Language (SENML)</title>

    <author initials="C." surname="Jennings" fullname="Cullen Jennings">
      <organization>Cisco</organization>
      <address>
        <postal>
          <street>400 3rd Avenue SW</street>
          <city>Calgary</city>
          <region>AB</region>
          <code>T2P 4H2</code>
          <country>Canada</country>
        </postal>
        <phone>+1 408 421-9990</phone>
        
        <email>fluffy@cisco.com</email>
        
      </address>
    </author>
    <author initials="Z." surname="Shelby" fullname="Zach Shelby">
      <organization>ARM</organization>
      <address>
        <postal>
          <street>150 Rose Orchard</street>
          <city>San Jose</city>
          
          <code>95134</code>
          <country>USA</country>
        </postal>
        <phone>+1-408-203-9434</phone>
        
        <email>zach.shelby@arm.com</email>
        
      </address>
    </author>
    <author initials="J." surname="Arkko" fullname="Jari Arkko">
      <organization>Ericsson</organization>
      <address>
        <postal>
          <street></street>
          <city>Jorvas</city>
          
          <code>02420</code>
          <country>Finland</country>
        </postal>
        
        
        <email>jari.arkko@piuha.net</email>
        
      </address>
    </author>
    <author initials="A." surname="Keranen" fullname="Ari Keranen">
      <organization>Ericsson</organization>
      <address>
        <postal>
          <street></street>
          <city>Jorvas</city>
          
          <code>02420</code>
          <country>Finland</country>
        </postal>
        
        
        <email>ari.keranen@ericsson.com</email>
        
      </address>
    </author>

    <date year="2016" month="January"/>

    <area>ART</area>
    
    

    <abstract>


<t>This specification defines media types for representing
simple sensor measurements and device parameters in the Sensor
Markup Language (SenML). Representations are defined in
JavaScript Object Notation (JSON), Concise Binary Object
Representation (CBOR), eXtensible Markup Language (XML), and
Efficient XML Interchange (EXI), which share the common SenML
data model. A simple sensor, such as a temperature sensor, could
use this media type in protocols such as HTTP or CoAP to
transport the measurements of the sensor or to be
configured.</t>



    </abstract>


  </front>

  <middle>


<section anchor="overview" title="Overview">

<t>Connecting sensors to the internet is not new, and there have been many
protocols designed to facilitate it. This specification defines new media types
for carrying simple sensor information in a protocol such as HTTP or CoAP called
the Sensor Markup Language (SenML). This format was designed so that processors
with very limited capabilities could easily encode a sensor measurement into the
media type, while at the same time a server parsing the data could relatively
efficiently collect a large number of sensor measurements.  The markup language
can be used for a variety of data flow models, most notably data feeds pushed
from a sensor to a collector, and the web resource model where the sensor is
requested as a resource representation (e.g., “GET /sensor/temperature”).</t>

<t>There are many types of more complex measurements and measurements that this
media type would not be suitable for.  SenML strikes a balance between having
some information about the sensor carried with the sensor data so that the data
is self describing but it also tries to make that a fairly minimal set of
auxiliary information for efficiency reason. Other information abot the sensor
can be discovered by other methods suc as using the CoRE Link Format
<xref target="RFC6690"/>.</t>

<t>SenML is defined by a data model for measurements and simple meta-data about
measurements and devices. The data is structured as a single array that contains
a series of SenML Records which can each contain attributes such as an unique
identifier for the sensor, the time the measurement was made, the unit the
measurement is in, and the current value of the sensor.  Serializations for this
data model are defined for JSON <xref target="RFC7159"/>, CBOR <xref target="RFC7049"/>, XML, and
Efficient XML Interchange (EXI) <xref target="W3C.REC-exi-20110310"/>.</t>

<t>For example, the following shows a measurement from a temperature
gauge encoded in the JSON syntax.</t>

<figure><artwork><![CDATA[
[{ "n": "urn:dev:ow:10e2073a01080063", "v":23.1, "u":"Cel" }]
]]></artwork></figure>

<t>In the example above, the array has a single SenML record with a measurement for
a sensor named “urn:dev:ow:10e2073a01080063” with a current value of 23.5 degrees
Celsius.</t>

</section>
<section anchor="requirements-and-design-goals" title="Requirements and Design Goals">

<t>The design goal is to be able to send simple sensor measurements in small
packets on mesh networks from large numbers of constrained devices. Keeping the
total size of payload under 80 bytes makes this easy to use on a wireless mesh
network. It is always difficult to define what small code is, but there is a
desire to be able to implement this in roughly 1 KB of flash on a 8 bit
microprocessor. Experience with Google power meter and large scale deployments
has indicated that the solution needs to support allowing multiple measurements
to be batched into a single HTTP or CoAP request. This “batch” upload capability
allows the server side to efficiently support a large number of devices. It also
conveniently supports batch transfers from proxies and storage devices, even in
situations where the sensor itself sends just a single data item at a time. The
multiple measurements could be from multiple related sensors or from the same
sensor but at different times.</t>

<t>The basic design is an array with a series of measurements. The following
example shows two meassuremets made at different times. The value of the
measurements are in the “v” tag, the time of the measurement is in the “t” while
the “n” has the unique sensor name and unit is carried in the “u”.</t>

<figure><artwork><![CDATA[
[
    { "n": "urn:dev:ow:10e2073a01080063",
      "t": 1276020076, "v":23.5, "u":"Cel" },
    { "n": "urn:dev:ow:10e2073a01080063",
      "t": 1276020091, "v":23.6, "u":"Cel" }
]
]]></artwork></figure>

<t>To keep the messages small, it does not make sense to repeat the n in each SenML
Record so there is a concept of a Base Name which is simply a strong that is
prepended to the Name field of any elements that record or any records that
follow it and don’t contain a Base Name. So a more compact form of the example
above is the following.</t>

<figure><artwork><![CDATA[
[
    { "bn": "urn:dev:ow:10e2073a01080063",
      "t": 1276020076, "v":23.5, "u":"Cel" },
    {  "t": 1276020091, "v":23.6, "u":"Cel" }
]
]]></artwork></figure>

<t>In the above example the Base Name is in the “bn” tag and the “n” tags in each
Record are the empty string so they are omitted. The Base Name also could be put
in a separate Record such as the following example. </t>

<figure><artwork><![CDATA[
[
    { "bn": "urn:dev:ow:10e2073a01080063" },
    { "t": 1276020076, "v":23.5, "u":"Cel" },
    { "t": 1276020091, "v":23.6, "u":"Cel" }
]
]]></artwork></figure>

<t>Some devices have accurate time while others do not so SenML supports absolute and relative times. Time is
represented in floating point as second and values greater than zero represent
an absolute time relative to the unix epoch while values of 0 or less represent
a relative time in the past from the current time. A simple sensor with no
absolute wall clock time might take a measurement every second and batch up 60
of them then send it to a server. It would include the relative time the
measurement was made to the time the batch was send in the SenML. The server
might have accurate NTP time and use the time it received the data, and the
relative offset, to replace the times in the SenML with absolute times before
saving the SenML in a document database. </t>

</section>
<section anchor="terminology" title="Terminology">

<t>The key words “MUST”, “MUST NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”,
“SHOULD NOT”, “RECOMMENDED”, “NOT RECOMMENDED”, “MAY”, and “OPTIONAL” in this
document are to be interpreted as described in <xref target="RFC2119"/>.</t>

</section>
<section anchor="semant" title="Semantics">

<t>Each SenML representation carries a single array that represents a set of
measurements and/or parameters. This array contains a serious of object with
several optional attributes described below:</t>

<t><list style='hanging'>
  <t hangText='Base Name:'>
  This is a string that is prepended to the names found in the entries.  This
attribute is optional. This applies to the entries in the Record containing
the Base Name and all entries that come in Records after it until there is a
Record with a new Base Name that replaces this one.</t>
  <t hangText='Base Time:'>
  A base time that is added to the time found in an entry. This attribute is
optional. This applies to the entries in the Record containing the Base Time
and all entries that come in Records after it until there is a Record with a
new Base Time that replaces this one.</t>
  <t hangText='Base Unit:'>
  A base unit that is assumed for all entries, unless otherwise indicated.  This
attribute is optional. If a record does not a unit value, then the base unit
is used otherwise the value of found in the Unit is used. Note the Base Unit
is not prepended to the Unit. This applies to the entries in the Record
containing the Base Unit and all entries that come in Records after it until
there is a Record with a new Base Unit that replaces this one.</t>
  <t hangText='Version:'>
  Version number of media type format. This attribute is optional positive
integer and defaults to 3 if not present. If this value is present at all, it
SHOULD only be used in the first Record in the SenML Stream array. </t>
  <t hangText='Name:'>
  Name of the sensor or parameter. When appended to the Base Name attribute,
this must result in a globally unique identifier for the resource. The name is
optional, if the Base Name is present. If the name is missing, Base Name must
uniquely identify the resource. This can be used to represent a large array of
measurements from the same sensor without having to repeat its identifier on
every measurement.</t>
  <t hangText='Unit:'>
  Units for a measurement value. Optional. If the Record has not Unit, the Base
Unit is used as the Unit.</t>
  <t hangText='Value'>
  Value of the entry.  Optional if a Sum value is present, otherwise
required. Values are represented using three basic data types, Floating point
numbers (“v” field for “Value”), Booleans (“vb” for “Boolean Value”) and
Strings (“vs” for “String Value”). Exactly one of these three fields MUST
appear.</t>
  <t hangText='Sum:'>
  Integrated sum of the values over time. Optional. This attribute is in the
units specified in the Unit value multiplied by seconds.</t>
  <t hangText='Time:'>
  Time when value was recorded. Optional.</t>
  <t hangText='Update Time:'>
  A time in seconds that represents the maximum time before this sensor will
provide an updated reading for a measurement. This can be used to detect the
failure of sensors or communications path from the sensor. Optional.</t>
</list></t>

<t>The SenML format can be extended with further custom attributes. TODO - describe
what extensions are possible and how to do them. </t>

<t>Systems reading one of the objects MUST check for the Version attribute. If this
value is a version number larger than the version which the system understands,
the system SHOULD NOT use this object.  This allows the version number to
indicate that the object contains mandatory to understand attributes. New
version numbers can only be defined in an RFC that updates this specification or
it successors.</t>

<t>The Name value is concatenated to the Base Name value to get the name of the
sensor. The resulting name needs to uniquely identify and differentiate the
sensor from all others. If the object is a representation resulting from the
request of a URI <xref target="RFC3986"/>, then in the absence of the Base Name attribute,
this URI is used as the default value of Base Name. Thus in this case the Name
field needs to be unique for that URI, for example an index or subresource name
of sensors handled by the URI.</t>

<t>Alternatively, for objects not related to a URI, a unique name is required. In
any case, it is RECOMMENDED that the full names are represented as URIs or URNs
<xref target="RFC2141"/>. One way to create a unique name is to include a EUI-48 or EUI-64
identifier (a MAC address) or some other bit string that has guaranteed
uniqueness (such as a 1-wire address) that is assigned to the device. Some of
the examples in this draft use the device URN type as specified in
<xref target="I-D.arkko-core-dev-urn"/>. UUIDs <xref target="RFC4122"/> are another way to generate a
unique name.</t>

<t>The resulting concatenated name MUST consist only of characters out of the set
“A” to “Z”, “a” to “z”, “0” to “9”, “-“, “:”, “.”, or “_” and it MUST start with
a character out of the set “A” to “Z”, “a” to “z”, or “0” to “9”. This
restricted character set was chosen so that these names can be directly used as
in other types of URI including segments of an HTTP path with no special
encoding and can be directly used in many databases and analytic
systems.. <xref target="RFC5952"/> contains advice on encoding an IPv6 address in a name.</t>

<t>If either the Base Time or Time value is missing, the missing attribute is
considered to have a value of zero. The Base Time and Time values are added
together to get the time of measurement. A time of zero indicates that the
sensor does not know the absolute time and the measurement was made roughly
“now”. A negative value is used to indicate seconds in the past from roughly
“now”. A positive value is used to indicate the number of seconds, excluding
leap seconds, since the start of the year 1970 in UTC.</t>

<t>Representing the statistical characteristics of measurements, such as accuracy,
can be very complex. Future specification may add new attributes to provide
better information about the statistical properties of the measurement.</t>

</section>
<section anchor="associating-meta-data" title="Associating Meta-data">

<t>SenML is designed to carry the minimum dynamic information about measurements,
and for efficiency reasons does not carry significant static meta-data about the
device, object or sensors. Instead, it is assumed that this meta-data is carried
out of band. For web resources using SenML representations, this meta-data can
be made available using the CoRE Link Format <xref target="RFC6690"/>. The most obvious use
of this link format is to describe that a resource is available in a SenML
format in the first place. The relevant media type indicator is included in the
Content-Type (ct=) attribute.</t>

</section>
<section anchor="json-representation-applicationsenmljson" title="JSON Representation (application/senml+json)">

<t>Record atributes:</t>

<texttable>
      <ttcol align='right'>SenML</ttcol>
      <ttcol align='left'>JSON</ttcol>
      <ttcol align='left'>Type</ttcol>
      <c>Base Name</c>
      <c>bn</c>
      <c>String</c>
      <c>Base Time</c>
      <c>bt</c>
      <c>Number</c>
      <c>Base Unit</c>
      <c>bu</c>
      <c>Number</c>
      <c>Version</c>
      <c>ver</c>
      <c>Number</c>
      <c>Name</c>
      <c>n</c>
      <c>String</c>
      <c>Unit</c>
      <c>u</c>
      <c>String</c>
      <c>Value</c>
      <c>v</c>
      <c>Floating point</c>
      <c>String Value</c>
      <c>vs</c>
      <c>String</c>
      <c>Boolean Value</c>
      <c>vb</c>
      <c>Boolean</c>
      <c>Value Sum</c>
      <c>s</c>
      <c>Floating point</c>
      <c>Time</c>
      <c>t</c>
      <c>Number</c>
      <c>Update Time</c>
      <c>ut</c>
      <c>Number</c>
</texttable>

<t>All of the data is UTF-8, but since this is for machine to machine
communications on constrained systems, only characters with code points between
U+0001 and U+007F are allowed which corresponds to the ASCII <xref target="RFC0020"/> subset
of UTF-8 with the exception of characters found in the String Value.</t>

<t>Characters in the String Value are encoded TODO. Open Issue How.</t>

<t>The root content consists of an array with and JSON object for each SenML
Record.</t>

<t>The objects MAY contain a “bn” attribute with a value of type string. The object
MAY contain a “bt” attribute with a value of type number. The object MAY contain
a “bu” attribute with a value of type string. The object MAY contain a “ver”
attribute with a value of type number. The object MAY contain other attribute
value pairs.</t>

<t>The objects MAY include the “n”, “u”, and “vs” attributes are of type string,
the “t” and “ut” attributes are of type number, the “vb” attribute is of type
boolean, and the “v” and “s” attributes are of type floating point for the SenML
atributes defined in the table above. All the attributes are optional, but as
specified in <xref target="semant"/>, one of the “v”, “vs”, or “vb” attributes MUST appear
unless the “s” attribute is also present in Records that represent a
measurement.  The “v”, and “vs”, and “vb” attributes MUST NOT appear together in
the same object.</t>

<t>Systems receiving measurements MUST be able to process the range of floating
point numbers that are representable as an IEEE double-precision floating-point
numbers <xref target="IEEE.754.1985"/>. The number of significant digits in any measurement
is not 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 case. <!-- XXX:
Can't really impose this requirement, can we? --> The mantissa SHOULD be less
than 19 characters long and the exponent SHOULD be less than 5 characters
long. This allows time values to have better than micro second precision over
the next 100 years.</t>

<section anchor="examples" title="Examples">

<section anchor="single-datapoint" title="Single Datapoint">

<t>The following shows a temperature reading taken approximately “now” by a 1-wire
sensor device that was assigned the unique 1-wire address of 10e2073a01080063:</t>

<figure><artwork><![CDATA[
[{ "n": "urn:dev:ow:10e2073a01080063", "v":23.1, "u":"Cel" }]
]]></artwork></figure>

</section>
<section anchor="co-ex" title="Multiple Datapoints">

<t>The following example shows voltage and current now, i.e., at an unspecified
time. The device has an EUI-64 MAC address of 0024befffe804ff1.</t>

<figure><artwork><![CDATA[
[{"bn": "urn:dev:mac:0024befffe804ff1/"},
 { "n": "voltage", "t": 0, "u": "V", "v": 120.1 },
 { "n": "current", "t": 0, "u": "A", "v": 1.2 } 
]
]]></artwork></figure>

<t>The next example is similar to the above one, but shows current at Tue Jun 8
18:01:16 UTC 2010 and at each second for the previous 5 seconds.</t>

<figure><artwork><![CDATA[
[{"bn": "urn:dev:mac:0024befffe804ff1/",
  "bt": 1276020076,
  "bu": "A",
  "ver": 3},
   { "n": "voltage", "u": "V", "v": 120.1 },
   { "n": "current", "t": -5, "v": 1.2 },
   { "n": "current", "t": -4, "v": 1.30 },
   { "n": "current", "t": -3, "v": 0.14e1 },
   { "n": "current", "t": -2, "v": 1.5 },
   { "n": "current", "t": -1, "v": 1.6 },
   { "n": "current", "t": 0,  "v": 1.7 } 
]
]]></artwork></figure>

<t>Note that in some usage scenarios of SenML the implementations MAY store or
transmit SenML in a stream-like fashion, where data is collected over time and
continuously added to the object. This mode of operation is optional, but
systems or protocols using SenML in this fashion MUST specify that they are
doing this. SenML defines a separate mine type (TODO) to indicate Senor
Streaming Markup Langage (SensML) for this usage. In this situation the SensML
stream can be sent and received in a partial fashion, i.e., a measurement entry
can be read as soon as the SenML Record is received and not have to wait for the
full SenML Stream to be complete.</t>

<t>For instance, the following stream of measurements may be sent via a long lived
HTTP POST from the producer of a SensML to the consumer of that, and each
measurement object may be reported at the time it measured:</t>

<figure><artwork><![CDATA[
[ {"bn": "http://[2001:db8::1]",
  "bt": 1320067464,
  "bu": "%RH"},
   { "v": 21.2, "t": 0 },
   { "v": 21.3, "t": 10 },
   { "v": 21.4, "t": 20 },
   { "v": 21.4, "t": 30 },
   { "v": 21.5, "t": 40 },
   { "v": 21.5, "t": 50 },
   { "v": 21.5, "t": 60 },
   { "v": 21.6, "t": 70 },
   { "v": 21.7, "t": 80 },
   { "v": 21.5, "t": 90 },
...
]]></artwork></figure>

</section>
<section anchor="an-co-ex" title="Multiple Measurements">

<t>The following example shows humidity measurements from a mobile
device with an IPv6 address 2001:db8::1, starting at Mon Oct 31
13:24:24 UTC 2011. The device also provides position data, which is
provided in the same measurement or parameter array as separate
entries. Note time is used to for correlating data that belongs
together, e.g., a measurement and a parameter associated with it.
Finally, the device also reports extra data about its battery status
at a separate time.</t>

<figure><artwork><![CDATA[
[{"bn": "http://[2001:db8::1]",
  "bt": 1320067464,
  "bu": "%RH"},
   { "v": 20.0, "t": 0 },
   { "v": 24.30621, "u": "lon", "t": 0 },
   { "v": 60.07965, "u": "lat", "t": 0 },  
   { "v": 20.3, "t": 60 },
   { "v": 24.30622, "u": "lon", "t": 60 },
   { "v": 60.07965, "u": "lat", "t": 60 },
   { "v": 20.7, "t": 120 },
   { "v": 24.30623, "u": "lon", "t": 120 },
   { "v": 60.07966, "u": "lat", "t": 120 },
   { "v": 98.0, "u": "%EL", "t": 150 },
   { "v": 21.2, "t": 180 },
   { "v": 24.30628, "u": "lon", "t": 180 },
   { "v": 60.07967, "u": "lat", "t": 180 } 
]
]]></artwork></figure>

</section>
<section anchor="rest-ex" title="Collection of Resources">

<t>The following example shows how to query one device that can
provide multiple measurements. The 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 Mon Oct 31 16:27:09 UTC 2011,
and has gotten two separate values as a result, a temperature and
humidity measurement.</t>

<figure><artwork><![CDATA[
[{"bn": "http://[2001:db8::2]/",
  "bt": 1320078429,
  "ver": 3},
   { "n": "temperature", "v": 27.2, "u": "Cel" },
   { "n": "humidity", "v": 80, "u": "%RH" } 
]
]]></artwork></figure>

</section>
</section>
</section>
<section anchor="sec-cbor" title="CBOR Representation (application/senml+cbor)">

<t>The CBOR <xref target="RFC7049"/> representation is equivalent to the JSON representation,
with the following changes:</t>

<t><list style='symbols'>
  <t>For compactness, the CBOR representation uses integers for the map keys
defined in <xref target="tbl-cbor-labels"/>. This table is conclusive, i.e., there is no
intention to define any additional integer map keys; any extensions will use
string map keys.</t>
  <t>For JSON Numbers, the CBOR representation can use integers, floating point
numbers, or decimal fractions (CBOR Tag 4); the common limitations of JSON
implementations are not relevant for these. For the version number, however,
only an unsigned integer is allowed.</t>
</list></t>

<texttable title="CBOR representation: integers for map keys" anchor="tbl-cbor-labels">
      <ttcol align='right'>Name</ttcol>
      <ttcol align='left'>JSON label</ttcol>
      <ttcol align='right'>CBOR label</ttcol>
      <c>Version</c>
      <c>ver</c>
      <c>-1</c>
      <c>Base Name</c>
      <c>bn</c>
      <c>-2</c>
      <c>Base Time</c>
      <c>bt</c>
      <c>-3</c>
      <c>Base Units</c>
      <c>bu</c>
      <c>-4</c>
      <c>Name</c>
      <c>n</c>
      <c>0</c>
      <c>Units</c>
      <c>u</c>
      <c>1</c>
      <c>Value</c>
      <c>v</c>
      <c>2</c>
      <c>String Value</c>
      <c>vs</c>
      <c>3</c>
      <c>Boolean Value</c>
      <c>vb</c>
      <c>4</c>
      <c>Value Sum</c>
      <c>s</c>
      <c>5</c>
      <c>Time</c>
      <c>t</c>
      <c>6</c>
      <c>Update Time</c>
      <c>ut</c>
      <c>7</c>
</texttable>

</section>
<section anchor="sec-xml-examle" title="XML Representation (application/senml+xml)">

<t>A SenML Stream  can also be represented in XML format as defined in this
section. The following example shows an XML example for the same sensor
measurement as in <xref target="co-ex"/>.</t>

<figure><artwork><![CDATA[
<senmls xmlns="urn:ietf:params:xml:ns:senml">
  <senml bn="urn:dev:mac:0024befffe804ff1/" bt="1276020076" bu="A"
  ver="3"></senml>
  <senml n="voltage" u="V" v="120.1"></senml>
  <senml n="current" t="-5" v="1.2"></senml>
  <senml n="current" t="-4" v="1.3"></senml>
  <senml n="current" t="-3" v="1.4"></senml>
  <senml n="current" t="-2" v="1.5"></senml>
  <senml n="current" t="-1" v="1.6"></senml>
  <senml n="current" v="1.7"></senml>
</senmls>
]]></artwork></figure>

<t>TODO - tag names in examples are wrong</t>

<t>The SenML Stream is represented as a sensml tag that contains a series of
senml tags for each SenML Record. The SenML Fields are represents as XML
attributes.  The following table shows the mapping the SenML Field names to the
atribute used on the XML senml tag.</t>

<texttable>
      <ttcol align='right'>SenML Field</ttcol>
      <ttcol align='left'>XML</ttcol>
      <ttcol align='left'>Type</ttcol>
      <c>Base Name</c>
      <c>bn</c>
      <c>string</c>
      <c>Base Time</c>
      <c>bt</c>
      <c>int</c>
      <c>Base Unit</c>
      <c>bu</c>
      <c>int</c>
      <c>Version</c>
      <c>ver</c>
      <c>int</c>
      <c>Name</c>
      <c>n</c>
      <c>string</c>
      <c>Unit</c>
      <c>u</c>
      <c>string</c>
      <c>Value</c>
      <c>v</c>
      <c>float</c>
      <c>String Value</c>
      <c>vs</c>
      <c>string</c>
      <c>Boolean Value</c>
      <c>vb</c>
      <c>boolean</c>
      <c>Value Sum</c>
      <c>s</c>
      <c>float</c>
      <c>Time</c>
      <c>t</c>
      <c>int</c>
      <c>Update Time</c>
      <c>ut</c>
      <c>int</c>
</texttable>

<t>The RelaxNG schema for the XML is:</t>

<figure><artwork><![CDATA[
default namespace = "urn:ietf:params:xml:ns:senml"
namespace rng = "http://relaxng.org/ns/structure/1.0"

senml = element senml {
  attribute bn { xsd:string }?,
  attribute bt { xsd:int }?,
  attribute bu { xsd:string }?,
  attribute n { xsd:string }?,
  attribute s { xsd:float }?,
  attribute t { xsd:int }?,
  attribute u { xsd:string }?,
  attribute ut { xsd:int }?,
  attribute v { xsd:float }?,
  attribute vb { xsd:boolean }?,
  attribute ver { xsd:int }?,
  attribute vs { xsd:string }?
}

senmls =
  element senmls {
    senml+
}

start = senmls
]]></artwork></figure>

</section>
<section anchor="exi-representation-applicationsenml-exi" title="EXI Representation (application/senml-exi)">

<t>For efficient transmission of SenML over e.g. a constrained network, Efficient
XML Interchange (EXI) can be used. This encodes the XML Schema structure of
SenML into binary tags and values rather than ASCII text.  An EXI representation
of SenML SHOULD be made using the strict schema-mode of EXI. This mode however
does not allow tag extensions to the schema, and therefore any extensions will
be lost in the encoding.  For uses where extensions need to be preserved in EXI,
the non-strict schema mode of EXI MAY be used.</t>

<t>The EXI header option MUST be included. An EXI schemaID options MUST be set to
the value of “a” indicating the scheme provided in this specification. Future
revisions to the schema can change this schemaID to allow for backwards
compatibility. When the data will be transported over CoAP or HTTP, an EXI
Cookie SHOULD NOT be used as it simply makes things larger and is redundant to
information provided in the Content-Type header.</t>

<t>TODO - examples are probably have the wrong setting the schemaID </t>

<t>The following is the XSD Schema to be used for strict schema guided EXI
processing. It is generated from the RelaxNG.</t>

<figure><artwork><![CDATA[
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified"
targetNamespace="urn:ietf:params:xml:ns:senml"
xmlns:ns1="urn:ietf:params:xml:ns:senml">
  <xs:element name="senml">
    <xs:complexType>
      <xs:attribute name="bn" type="xs:string" />
      <xs:attribute name="bt" type="xs:int" />
      <xs:attribute name="bu" type="xs:string" />
      <xs:attribute name="n" type="xs:string" />
      <xs:attribute name="s" type="xs:float" />
      <xs:attribute name="t" type="xs:int" />
      <xs:attribute name="u" type="xs:string" />
      <xs:attribute name="ut" type="xs:int" />
      <xs:attribute name="v" type="xs:float" />
      <xs:attribute name="vb" type="xs:boolean" />
      <xs:attribute name="ver" type="xs:int" />
      <xs:attribute name="vs" type="xs:string" />
    </xs:complexType>
  </xs:element>
  <xs:element name="senmls">
    <xs:complexType>
      <xs:sequence>
        <xs:element maxOccurs="unbounded" ref="ns1:senml" />
      </xs:sequence>
    </xs:complexType>
  </xs:element>
</xs:schema>
]]></artwork></figure>

<t>The following shows a hexdump of the EXI produced from encoding the
following XML example. Note this example is the same information as the
first example in <xref target="co-ex"/> in JSON format.</t>

<figure><artwork><![CDATA[
<senmls xmlns="urn:ietf:params:xml:ns:senml">
  <senml bn="urn:dev:mac:0024befffe804ff1/"></senml>
  <senml n="voltage" u="V" v="120.1"></senml>
  <senml n="current" u="A" v="1.2"></senml>
</senmls>
]]></artwork></figure>

<t>TODO - replace ex8 with ex2 as they are the same. Replace ex9 with ex1. Simplify
rest of examples.</t>

<t>Which compresses to the following displayed in hexdump:</t>

<figure><artwork><![CDATA[
0000000 a0 30 41 cd 95 b9 b5 b0 cc b9 9d 95 b8 b9 e1 cd
0000010 90 80 fb ab 93 71 d3 23 2b b1 d3 6b 0b 19 d1 81
0000020 81 91 a3 13 2b 33 33 33 29 c1 81 a3 33 31 89 7d
0000030 8c 25 d9 bd b1 d1 85 9d 94 80 d5 8a c4 26 01 8c
0000040 25 8d d5 c9 c9 95 b9 d0 80 d0 48 32 01 c0      
000004e
]]></artwork></figure>

<t>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 for
a simple sensor to produce valid EXI without really implementing 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 would
produce an XML SenML file such as:</t>

<figure><artwork><![CDATA[
<senmls xmlns="urn:ietf:params:xml:ns:senml">
  <senml n="urn:dev:ow:10e2073a01080063" u="Cel" v="23.1"></senml>
</senmls>
]]></artwork></figure>

<t>The compressed form, using the byte alignment option of EXI, for the
above XML is the following:</t>

<figure><artwork><![CDATA[
00 a0 00 48 82 0e 6c ad cd ad 86 65 cc ec ad c5 cf |..H..l....e.....|
10 0e 6c 80 01 03 1d 75 72 6e 3a 64 65 76 3a 6f 77 |.l....urn:dev:ow|
20 3a 31 30 65 32 30 37 33 61 30 31 30 38 30 30 36 |:10e2073a0108006|
30 33 02 05 43 65 6c 01 00 e7 01 01 00 03 01       |3..Cel........|
3e
]]></artwork></figure>

<t>A small temperature sensor devices that only generates this one EXI file does
not really need an full EXI implementation. It can simple hard code the output
replacing the one wire device ID starting at byte 0x16 and going to byte 0x31
with it’s device ID, and replacing the value “0xe7 0x01” at location 0x38 to
0x39 with the current temperature. The EXI Specification
<xref target="W3C.REC-exi-20110310"/> contains the full information ‘on how floating point
numbers are represented, 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 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 of the integer
temperature in tenths of degrees plus 0x80. In this example 231 & 0x7F + 0x80 =
0xE7. The second byte is set to the integer temperature in tenths of degrees
right shifted 7 bits. In this example 231 » 7 = 0x01.</t>

</section>
<section anchor="usage-considerations" title="Usage Considerations">

<t>The measurements support sending both the current value of a sensor as well as
the an integrated sum. For many types of measurements, the sum is more useful
than the current value. For example, an electrical meter that measures the
energy a given computer uses will typically want to measure the cumulative
amount of energy used. This is less prone to error than reporting the power each
second and trying to have something on the server side sum together all the
power measurements. 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
reflect what happened while the network was down. A meter like this would
typically report a measurement with the units set to watts, but it would put the
sum of energy used in the “s” attribute of the measurement. It might optionally
include the current power in the “v” attribute.</t>

<t>While the benefit of using the integrated sum is fairly clear for measurements
like power and energy, it is less obvious for something like
temperature. Reporting the sum of the temperature makes it easy to compute
averages even when the individual temperature values are not reported frequently
enough to compute accurate averages. Implementors are encouraged to report the
cumulative sum as well as the raw value of a given sensor.</t>

<t>Applications that use the cumulative sum values need to understand they are very
loosely defined by this specification, and depending on the particular sensor
implementation may behave in unexpected ways.  Applications should be able to
deal with the following issues:</t>

<t><list style='numbers'>
  <t>Many sensors will allow the cumulative sums to “wrap” back to zero after the
  value gets sufficiently large.</t>
  <t>Some sensors will reset the cumulative sum back to zero when the device is
  reset, loses power, or is replaced with a different sensor.</t>
  <t>Applications cannot make assumptions about when the device started
  accumulating values into the sum.</t>
</list></t>

<t>Typically applications can make some assumptions about specific sensors that
will allow them to deal with these problems. A common assumption is that for
sensors whose measurement values are always positive, the sum should never get
smaller; so if the sum does get smaller, the application will know that one of
the situations listed above has happened.</t>

</section>
<section anchor="iana-considerations" title="IANA Considerations">

<t>Note to RFC Editor: Please replace all occurrences of “RFC-AAAA” with
the RFC number of this specification.</t>

<section anchor="sec-units" title="Units Registry">

<t>IANA will create a registry of unit symbols. The primary purpose of
this registry is to make sure that symbols uniquely map to give type
of measurement. Definitions for many of these units can be found in 
location such as <xref target="NIST811"/> and <xref target="BIPM"/>.</t>

<texttable anchor="tbl-iana-symbols">
      <ttcol align='right'>Symbol</ttcol>
      <ttcol align='left'>Description</ttcol>
      <ttcol align='left'>Type</ttcol>
      <ttcol align='left'>Reference</ttcol>
      <c>m</c>
      <c>meter</c>
      <c>float</c>
      <c>RFC-AAAA</c>
      <c>kg</c>
      <c>kilogram</c>
      <c>float</c>
      <c>RFC-AAAA</c>
      <c>s</c>
      <c>second</c>
      <c>float</c>
      <c>RFC-AAAA</c>
      <c>A</c>
      <c>ampere</c>
      <c>float</c>
      <c>RFC-AAAA</c>
      <c>K</c>
      <c>kelvin</c>
      <c>float</c>
      <c>RFC-AAAA</c>
      <c>cd</c>
      <c>candela</c>
      <c>float</c>
      <c>RFC-AAAA</c>
      <c>mol</c>
      <c>mole</c>
      <c>float</c>
      <c>RFC-AAAA</c>
      <c>Hz</c>
      <c>hertz</c>
      <c>float</c>
      <c>RFC-AAAA</c>
      <c>rad</c>
      <c>radian</c>
      <c>float</c>
      <c>RFC-AAAA</c>
      <c>sr</c>
      <c>steradian</c>
      <c>float</c>
      <c>RFC-AAAA</c>
      <c>N</c>
      <c>newton</c>
      <c>float</c>
      <c>RFC-AAAA</c>
      <c>Pa</c>
      <c>pascal</c>
      <c>float</c>
      <c>RFC-AAAA</c>
      <c>J</c>
      <c>joule</c>
      <c>float</c>
      <c>RFC-AAAA</c>
      <c>W</c>
      <c>watt</c>
      <c>float</c>
      <c>RFC-AAAA</c>
      <c>C</c>
      <c>coulomb</c>
      <c>float</c>
      <c>RFC-AAAA</c>
      <c>V</c>
      <c>volt</c>
      <c>float</c>
      <c>RFC-AAAA</c>
      <c>F</c>
      <c>farad</c>
      <c>float</c>
      <c>RFC-AAAA</c>
      <c>Ohm</c>
      <c>ohm</c>
      <c>float</c>
      <c>RFC-AAAA</c>
      <c>S</c>
      <c>siemens</c>
      <c>float</c>
      <c>RFC-AAAA</c>
      <c>Wb</c>
      <c>weber</c>
      <c>float</c>
      <c>RFC-AAAA</c>
      <c>T</c>
      <c>tesla</c>
      <c>float</c>
      <c>RFC-AAAA</c>
      <c>H</c>
      <c>henry</c>
      <c>float</c>
      <c>RFC-AAAA</c>
      <c>Cel</c>
      <c>degrees Celsius</c>
      <c>float</c>
      <c>RFC-AAAA</c>
      <c>lm</c>
      <c>lumen</c>
      <c>float</c>
      <c>RFC-AAAA</c>
      <c>lx</c>
      <c>lux</c>
      <c>float</c>
      <c>RFC-AAAA</c>
      <c>Bq</c>
      <c>becquerel</c>
      <c>float</c>
      <c>RFC-AAAA</c>
      <c>Gy</c>
      <c>gray</c>
      <c>float</c>
      <c>RFC-AAAA</c>
      <c>Sv</c>
      <c>sievert</c>
      <c>float</c>
      <c>RFC-AAAA</c>
      <c>kat</c>
      <c>katal</c>
      <c>float</c>
      <c>RFC-AAAA</c>
      <c>pH</c>
      <c>pH acidity</c>
      <c>float</c>
      <c>RFC-AAAA</c>
      <c>%</c>
      <c>Value of a switch (note 1)</c>
      <c>float</c>
      <c>RFC-AAAA</c>
      <c>count</c>
      <c>counter value</c>
      <c>float</c>
      <c>RFC-AAAA</c>
      <c>%RH</c>
      <c>Relative Humidity</c>
      <c>float</c>
      <c>RFC-AAAA</c>
      <c>m2</c>
      <c>area</c>
      <c>float</c>
      <c>RFC-AAAA</c>
      <c>l</c>
      <c>volume in liters</c>
      <c>float</c>
      <c>RFC-AAAA</c>
      <c>m/s</c>
      <c>velocity</c>
      <c>float</c>
      <c>RFC-AAAA</c>
      <c>m/s2</c>
      <c>acceleration</c>
      <c>float</c>
      <c>RFC-AAAA</c>
      <c>l/s</c>
      <c>flow rate in liters per second</c>
      <c>float</c>
      <c>RFC-AAAA</c>
      <c>W/m2</c>
      <c>irradiance</c>
      <c>float</c>
      <c>RFC-AAAA</c>
      <c>cd/m2</c>
      <c>luminance</c>
      <c>float</c>
      <c>RFC-AAAA</c>
      <c>Bspl</c>
      <c>bel sound pressure level</c>
      <c>float</c>
      <c>RFC-AAAA</c>
      <c>bit/s</c>
      <c>bits per second</c>
      <c>float</c>
      <c>RFC-AAAA</c>
      <c>lat</c>
      <c>degrees latitude (note 2)</c>
      <c>float</c>
      <c>RFC-AAAA</c>
      <c>lon</c>
      <c>degrees longitude (note 2)</c>
      <c>float</c>
      <c>RFC-AAAA</c>
      <c>%EL</c>
      <c>remaining battery energy level in percents</c>
      <c>float</c>
      <c>RFC-AAAA</c>
      <c>EL</c>
      <c>remaining battery energy level in seconds</c>
      <c>float</c>
      <c>RFC-AAAA</c>
      <c>beat/m</c>
      <c>Heart rate in beats per minute</c>
      <c>float</c>
      <c>RFC-AAAA</c>
      <c>beats</c>
      <c>Cumulative number of heart beats</c>
      <c>float</c>
      <c>RFC-AAAA</c>
</texttable>

<t><list style='symbols'>
  <t>Note 1: A value of 0.0 indicates the switch is off while 1.0
indicates on and 0.5 would be half on. </t>
  <t>Note 2: Assumed to be in WGS84 unless another reference frame is
known for the sensor.</t>
</list></t>

<t>New entries can be added to the registration by either Expert Review or IESG
Approval as defined in <xref target="RFC5226"/>.  Experts should exercise their own good
judgment but need to consider the following guidelines:</t>

<t><list style='numbers'>
  <t>There needs to be a real and compelling use for any new unit to be added.</t>
  <t>Units should define the semantic information and be chosen
  carefully. Implementors need to remember that the same word may be used in
  different real-life contexts. For example, degrees when measuring latitude
  have no semantic relation to degrees when measuring temperature; thus two
  different units are needed.</t>
  <t>These measurements are produced by computers for consumption by
  computers. The principle is that conversion has to be easily be done when both
  reading and writing the media type. The value of a single canonical
  representation outweighs the convenience of easy human representations or loss
  of precision in a conversion.</t>
  <t>Use of SI prefixes such as “k” before the unit is not allowed.  Instead one
  can represent the value using scientific notation such a 1.2e3.</t>
  <t>For a given type of measurement, there will only be one unit type defined. So
  for length, meters are defined and other lengths such as mile, foot, light
  year are not allowed. For most cases, the SI unit is preferred.</t>
  <t>Symbol names that could be easily confused with existing common units or
  units combined with prefixes should be avoided. For example, selecting a unit
  name of “mph” to indicate something that had nothing to do with velocity would
  be a bad choice, as “mph” is commonly used to mean miles per hour.</t>
  <t>The following should not be used because the are common SI prefixes: Y, Z, E,
  P, T, G, M, k, h, da, d, c, n, u, p, f, a, z, y, Ki, Mi, Gi, Ti, Pi, Ei, Zi,
  Yi.</t>
  <t>The following units should not be used as they are commonly used to represent
  other measurements Ky, Gal, dyn, etg, P, St, Mx, G, Oe, Gb, sb, Lmb, ph, Ci,
  R, RAD, REM, gal, bbl, qt, degF, Cal, BTU, HP, pH, B/s, psi, Torr, atm, at,
  bar, kWh.</t>
  <t>The unit names are case sensitive and the correct case needs to be used, but
  symbols that differ only in case should not be allocated.</t>
  <t>A number after a unit typically indicates the previous unit raised to that
  power, and the / indicates that the units that follow are the reciprocal. A
  unit should have only one / in the name.</t>
  <t>A good list of common units can be found in the Unified Code for Units of
   Measure <xref target="UCUM"/>.</t>
</list></t>

</section>
<section anchor="sec-iana-media" title="Media Type Registration">

<t>The following registrations are done following the procedure
specified in <xref target="RFC6838"/> and <xref target="RFC7303"/>.</t>

<section anchor="senmljson-media-type-registration" title="senml+json Media Type Registration">

<t>Type name: application</t>

<t>Subtype name: senml+json  and sensml+json</t>

<t>Required parameters: none</t>

<t>Optional parameters: none</t>

<t>Encoding considerations: Must be encoded as using a subset of the encoding
allowed in <xref target="RFC7159"/>. See RFC-AAAA for details. This simplifies implementation
of very simple system and does not impose any significant limitations as all
this data is meant for machine to machine communications and is not meant to be
human readable.</t>

<t>Security considerations: Sensor data can contain a wide range of information
ranging from information that is very public, such the outside temperature in a
given city, to very private information that requires integrity and
confidentiality protection, such as patient health information. This format does
not provide any security and instead relies on the transport protocol that
carries it to provide security. Given applications need to look at the overall
context of how this media type will be used to decide if the security is
adequate.</t>

<t>Interoperability considerations: Applications should ignore any JSON key value
pairs that they do not understand. This allows backwards compatibility
extensions to this specification. The “ver” field can be used to ensure the
receiver supports a minimal level of functionality needed by the creator of the
JSON object.</t>

<t>Published specification: RFC-AAAA</t>

<t>Applications that use this media type: The type is used by systems that report
electrical power usage and environmental information such as temperature and
humidity. It can be used for a wide range of sensor reporting systems.</t>

<t>Additional information:</t>

<t>Magic number(s): none</t>

<t>File extension(s): senml</t>

<t>Macintosh file type code(s): none</t>

<t>Person & email address to contact for further information:
Cullen Jennings <fluffy@iii.ca></t>

<t>Intended usage: COMMON</t>

<t>Restrictions on usage: None</t>

<t>Author: Cullen Jennings <fluffy@iii.ca></t>

<t>Change controller: IESG</t>

</section>
<section anchor="senmlcbor-media-type-registration" title="senml+cbor Media Type Registration">

<t>Type name: application</t>

<t>Subtype name: senml+cbor </t>

<t>Required parameters: none</t>

<t>Optional parameters: none</t>

<t>Encoding considerations: TBD</t>

<t>Security considerations: TBD</t>

<t>Interoperability considerations: TBD</t>

<t>Published specification: RFC-AAAA</t>

<t>Applications that use this media type: The type is used
by systems that report electrical power usage and
environmental information such as temperature and
humidity. It can be used for a wide range of sensor
reporting systems.</t>

<t>Additional information:</t>

<t>Magic number(s): none</t>

<t>File extension(s): senml</t>

<t>Macintosh file type code(s): none</t>

<t>Person & email address to contact for further information:
Cullen Jennings <fluffy@iii.ca></t>

<t>Intended usage: COMMON</t>

<t>Restrictions on usage: None</t>

<t>Author: Cullen Jennings <fluffy@iii.ca></t>

<t>Change controller: IESG</t>

</section>
<section anchor="senmlxml-media-type-registration" title="senml+xml Media Type Registration">

<t>Type name: application</t>

<t>Subtype name: senml+xml and sensml+xml</t>

<t>Required parameters: none</t>

<t>Optional parameters: none</t>

<t>Encoding considerations: TBD</t>

<t>Security considerations: TBD</t>

<t>Interoperability considerations: TBD</t>

<t>Published specification: RFC-AAAA</t>

<t>Applications that use this media type: TBD</t>

<t>Additional information:</t>

<t>Magic number(s): none</t>

<t>File extension(s): senml</t>

<t>Macintosh file type code(s): none</t>

<t>Person & email address to contact for further information:
Cullen Jennings <fluffy@iii.ca></t>

<t>Intended usage: COMMON</t>

<t>Restrictions on usage: None</t>

<t>Author: Cullen Jennings <fluffy@iii.ca></t>

<t>Change controller: IESG</t>

</section>
<section anchor="senml-exi-media-type-registration" title="senml-exi Media Type Registration">

<t>Type name: application</t>

<t>Subtype name: senml-exi</t>

<t>Required parameters: none</t>

<t>Optional parameters: none</t>

<t>Encoding considerations: TBD</t>

<t>Security considerations: TBD</t>

<t>Interoperability considerations: TBD</t>

<t>Published specification: RFC-AAAA</t>

<t>Applications that use this media type: TBD</t>

<t>Additional information:</t>

<t>Magic number(s): none</t>

<t>File extension(s): senml</t>

<t>Macintosh file type code(s): none</t>

<t>Person & email address to contact for further information:
Cullen Jennings <fluffy@iii.ca></t>

<t>Intended usage: COMMON</t>

<t>Restrictions on usage: None</t>

<t>Author: Cullen Jennings <fluffy@iii.ca></t>

<t>Change controller: IESG</t>

</section>
</section>
<section anchor="sec-iana-url" title="XML Namespace Registration">

<t>This document registers the following XML namespaces in the IETF
XML registry defined in <xref target="RFC3688"/>.</t>

<t>URI: urn:ietf:params:xml:ns:senml</t>

<t>Registrant Contact: The IESG.</t>

<t>XML: N/A, the requested URIs are XML namespaces</t>

</section>
<section anchor="coap-content-format-registration" title="CoAP Content-Format Registration">

<t>IANA is requested to assign CoAP Content-Format IDs for the SenML media types in
the “CoAP Content-Formats” sub-registry, within the “CoRE Parameters” registry
<xref target="RFC7252"/>. All IDs are assigned from the “Expert Review” (0-255) range. The
assigned IDs are show in <xref target="tbl-coap-content-formats"/>.</t>

<texttable title="CoAP Content-Format IDs" anchor="tbl-coap-content-formats">
      <ttcol align='left'>Media type</ttcol>
      <ttcol align='left'>ID</ttcol>
      <c>application/senml+json</c>
      <c>TBD</c>
      <c>application/sensml+json</c>
      <c>TBD</c>
      <c>application/senml+cbor</c>
      <c>TBD</c>
      <c>application/senml+xml</c>
      <c>TBD</c>
      <c>application/sensml+xml</c>
      <c>TBD</c>
      <c>application/senml-exi</c>
      <c>TBD</c>
</texttable>

</section>
</section>
<section anchor="sec-sec" title="Security Considerations">

<t>See <xref target="sec-privacy"/>. Further discussion of security properties can be found in
<xref target="sec-iana-media"/>.</t>

</section>
<section anchor="sec-privacy" title="Privacy Considerations">

<t>Sensor data can range from information with almost no security considerations,
such as the current temperature in a given city, to highly sensitive medical or
location data. This specification provides no security protection for the data
but is meant to be used inside another container or transport protocol such as
S/MIME or HTTP with TLS that can provide integrity, confidentiality, and
authentication information about the source of the data.</t>

</section>
<section anchor="acknowledgement" title="Acknowledgement">

<t>We would like to thank Lisa Dusseault, Joe Hildebrand, Lyndsay Campbell, Martin
Thomson, John Klensin, Bjoern Hoehrmann, Carsten Bormann, and Christian Amsuess
for their review comments.</t>

<t>The CBOR Representation text was contributed by Carsten Bormann.</t>

</section>


  </middle>

  <back>

    <references title='Normative References'>





<reference anchor="IEEE.754.1985">
<front>
<title>Standard for Binary Floating-Point Arithmetic</title>
<author>
<organization>Institute of Electrical and Electronics Engineers</organization>
</author>
<date month="August" year="1985" />
</front>

<seriesInfo name="IEEE" value="Standard 754" />

</reference>



<reference  anchor='RFC2119' target='http://www.rfc-editor.org/info/rfc2119'>
<front>
<title>Key words for use in RFCs to Indicate Requirement Levels</title>
<author initials='S.' surname='Bradner' fullname='S. Bradner'><organization /></author>
<date year='1997' month='March' />
<abstract><t>In many standards track documents several words are used to signify the requirements in the specification.  These words are often capitalized. This document defines these words as they should be interpreted in IETF documents.  This document specifies an Internet Best Current Practices for the Internet Community, and requests discussion and suggestions for improvements.</t></abstract>
</front>
<seriesInfo name='BCP' value='14'/>
<seriesInfo name='RFC' value='2119'/>
<seriesInfo name='DOI' value='10.17487/RFC2119'/>
</reference>



<reference  anchor='RFC3688' target='http://www.rfc-editor.org/info/rfc3688'>
<front>
<title>The IETF XML Registry</title>
<author initials='M.' surname='Mealling' fullname='M. Mealling'><organization /></author>
<date year='2004' month='January' />
<abstract><t>This document describes an IANA maintained registry for IETF standards which use Extensible Markup Language (XML) related items such as Namespaces, Document Type Declarations (DTDs), Schemas, and Resource Description Framework (RDF) Schemas.</t></abstract>
</front>
<seriesInfo name='BCP' value='81'/>
<seriesInfo name='RFC' value='3688'/>
<seriesInfo name='DOI' value='10.17487/RFC3688'/>
</reference>



<reference  anchor='RFC5226' target='http://www.rfc-editor.org/info/rfc5226'>
<front>
<title>Guidelines for Writing an IANA Considerations Section in RFCs</title>
<author initials='T.' surname='Narten' fullname='T. Narten'><organization /></author>
<author initials='H.' surname='Alvestrand' fullname='H. Alvestrand'><organization /></author>
<date year='2008' month='May' />
<abstract><t>Many protocols make use of identifiers consisting of constants and other well-known values.  Even after a protocol has been defined and deployment has begun, new values may need to be assigned (e.g., for a new option type in DHCP, or a new encryption or authentication transform for IPsec).  To ensure that such quantities have consistent values and interpretations across all implementations, their assignment must be administered by a central authority.  For IETF protocols, that role is provided by the Internet Assigned Numbers Authority (IANA).</t><t>In order for IANA to manage a given namespace prudently, it needs guidelines describing the conditions under which new values can be assigned or when modifications to existing values can be made.  If IANA is expected to play a role in the management of a namespace, IANA must be given clear and concise instructions describing that role.  This document discusses issues that should be considered in formulating a policy for assigning values to a namespace and provides guidelines for authors on the specific text that must be included in documents that place demands on IANA.</t><t>This document obsoletes RFC 2434.  This document specifies an Internet Best  Current Practices for the Internet Community, and requests discussion and  suggestions for improvements.</t></abstract>
</front>
<seriesInfo name='BCP' value='26'/>
<seriesInfo name='RFC' value='5226'/>
<seriesInfo name='DOI' value='10.17487/RFC5226'/>
</reference>



<reference  anchor='RFC6838' target='http://www.rfc-editor.org/info/rfc6838'>
<front>
<title>Media Type Specifications and Registration Procedures</title>
<author initials='N.' surname='Freed' fullname='N. Freed'><organization /></author>
<author initials='J.' surname='Klensin' fullname='J. Klensin'><organization /></author>
<author initials='T.' surname='Hansen' fullname='T. Hansen'><organization /></author>
<date year='2013' month='January' />
<abstract><t>This document defines procedures for the specification and registration of media types for use in HTTP, MIME, and other Internet protocols.  This memo documents an Internet Best Current Practice.</t></abstract>
</front>
<seriesInfo name='BCP' value='13'/>
<seriesInfo name='RFC' value='6838'/>
<seriesInfo name='DOI' value='10.17487/RFC6838'/>
</reference>



<reference  anchor='RFC7049' target='http://www.rfc-editor.org/info/rfc7049'>
<front>
<title>Concise Binary Object Representation (CBOR)</title>
<author initials='C.' surname='Bormann' fullname='C. Bormann'><organization /></author>
<author initials='P.' surname='Hoffman' fullname='P. Hoffman'><organization /></author>
<date year='2013' month='October' />
<abstract><t>The Concise Binary Object Representation (CBOR) is a data format whose design goals include the possibility of extremely small code size, fairly small message size, and extensibility without the need for version negotiation.  These design goals make it different from earlier binary serializations such as ASN.1 and MessagePack.</t></abstract>
</front>
<seriesInfo name='RFC' value='7049'/>
<seriesInfo name='DOI' value='10.17487/RFC7049'/>
</reference>



<reference  anchor='RFC7159' target='http://www.rfc-editor.org/info/rfc7159'>
<front>
<title>The JavaScript Object Notation (JSON) Data Interchange Format</title>
<author initials='T.' surname='Bray' fullname='T. Bray' role='editor'><organization /></author>
<date year='2014' month='March' />
<abstract><t>JavaScript Object Notation (JSON) is a lightweight, text-based, language-independent data interchange format.  It was derived from the ECMAScript Programming Language Standard.  JSON defines a small set of formatting rules for the portable representation of structured data.</t><t>This document removes inconsistencies with other specifications of JSON, repairs specification errors, and offers experience-based interoperability guidance.</t></abstract>
</front>
<seriesInfo name='RFC' value='7159'/>
<seriesInfo name='DOI' value='10.17487/RFC7159'/>
</reference>



<reference  anchor='RFC7252' target='http://www.rfc-editor.org/info/rfc7252'>
<front>
<title>The Constrained Application Protocol (CoAP)</title>
<author initials='Z.' surname='Shelby' fullname='Z. Shelby'><organization /></author>
<author initials='K.' surname='Hartke' fullname='K. Hartke'><organization /></author>
<author initials='C.' surname='Bormann' fullname='C. Bormann'><organization /></author>
<date year='2014' month='June' />
<abstract><t>The Constrained Application Protocol (CoAP) is a specialized web transfer protocol for use with constrained nodes and constrained (e.g., low-power, lossy) networks.  The nodes often have 8-bit microcontrollers with small amounts of ROM and RAM, while constrained networks such as IPv6 over Low-Power Wireless Personal Area Networks (6LoWPANs) often have high packet error rates and a typical throughput of 10s of kbit/s.  The protocol is designed for machine- to-machine (M2M) applications such as smart energy and building automation.</t><t>CoAP provides a request/response interaction model between application endpoints, supports built-in discovery of services and resources, and includes key concepts of the Web such as URIs and Internet media types.  CoAP is designed to easily interface with HTTP for integration with the Web while meeting specialized requirements such as multicast support, very low overhead, and simplicity for constrained environments.</t></abstract>
</front>
<seriesInfo name='RFC' value='7252'/>
<seriesInfo name='DOI' value='10.17487/RFC7252'/>
</reference>



<reference  anchor='RFC7303' target='http://www.rfc-editor.org/info/rfc7303'>
<front>
<title>XML Media Types</title>
<author initials='H.' surname='Thompson' fullname='H. Thompson'><organization /></author>
<author initials='C.' surname='Lilley' fullname='C. Lilley'><organization /></author>
<date year='2014' month='July' />
<abstract><t>This specification standardizes three media types -- application/xml, application/xml-external-parsed-entity, and application/xml-dtd -- for use in exchanging network entities that are related to the Extensible Markup Language (XML) while defining text/xml and text/ xml-external-parsed-entity as aliases for the respective application/ types.  This specification also standardizes the '+xml' suffix for naming media types outside of these five types when those media types represent XML MIME entities.</t></abstract>
</front>
<seriesInfo name='RFC' value='7303'/>
<seriesInfo name='DOI' value='10.17487/RFC7303'/>
</reference>



<reference anchor='W3C.REC-exi-20110310'
           target='http://www.w3.org/TR/2011/REC-exi-20110310'>
<front>
<title>Efficient XML Interchange (EXI) Format 1.0</title>

<author initials='J.' surname='Schneider' fullname='John Schneider'>
    <organization />
</author>

<author initials='T.' surname='Kamiya' fullname='Takuki Kamiya'>
    <organization />
</author>

<date month='March' day='10' year='2011' />
</front>

<seriesInfo name='World Wide Web Consortium Recommendation' value='REC-exi-20110310' />
<format type='HTML' target='http://www.w3.org/TR/2011/REC-exi-20110310' />
</reference>


<reference anchor="BIPM" >
  <front>
    <title>The International System of Units (SI)</title>
    <author >
      <organization>Bureau International des Poids et Mesures</organization>
    </author>
    <date year="2006"/>
  </front>
  <seriesInfo name="8th" value="edition"/>
</reference>
<reference anchor="NIST811" >
  <front>
    <title>Guide for the Use of the International System of Units (SI)</title>
    <author initials="A." surname="Thompson">
      <organization></organization>
    </author>
    <author initials="B." surname="Taylor">
      <organization></organization>
    </author>
    <date year="2008"/>
  </front>
  <seriesInfo name="NIST" value="Special Publication 811"/>
</reference>


    </references>

    <references title='Informative References'>





<reference  anchor='RFC0020' target='http://www.rfc-editor.org/info/rfc20'>
<front>
<title>ASCII format for network interchange</title>
<author initials='V.G.' surname='Cerf' fullname='V.G. Cerf'><organization /></author>
<date year='1969' month='October' />
</front>
<seriesInfo name='STD' value='80'/>
<seriesInfo name='RFC' value='20'/>
<seriesInfo name='DOI' value='10.17487/RFC0020'/>
</reference>



<reference  anchor='RFC2141' target='http://www.rfc-editor.org/info/rfc2141'>
<front>
<title>URN Syntax</title>
<author initials='R.' surname='Moats' fullname='R. Moats'><organization /></author>
<date year='1997' month='May' />
<abstract><t>Uniform Resource Names (URNs) are intended to serve as persistent, location-independent, resource identifiers. This document sets forward the canonical syntax for URNs. [STANDARDS-TRACK]</t></abstract>
</front>
<seriesInfo name='RFC' value='2141'/>
<seriesInfo name='DOI' value='10.17487/RFC2141'/>
</reference>



<reference  anchor='RFC3986' target='http://www.rfc-editor.org/info/rfc3986'>
<front>
<title>Uniform Resource Identifier (URI): Generic Syntax</title>
<author initials='T.' surname='Berners-Lee' fullname='T. Berners-Lee'><organization /></author>
<author initials='R.' surname='Fielding' fullname='R. Fielding'><organization /></author>
<author initials='L.' surname='Masinter' fullname='L. Masinter'><organization /></author>
<date year='2005' month='January' />
<abstract><t>A Uniform Resource Identifier (URI) is a compact sequence of characters that identifies an abstract or physical resource.  This specification defines the generic URI syntax and a process for resolving URI references that might be in relative form, along with guidelines and security considerations for the use of URIs on the Internet.  The URI syntax defines a grammar that is a superset of all valid URIs, allowing an implementation to parse the common components of a URI reference without knowing the scheme-specific requirements of every possible identifier.  This specification does not define a generative grammar for URIs; that task is performed by the individual specifications of each URI scheme.  [STANDARDS-TRACK]</t></abstract>
</front>
<seriesInfo name='STD' value='66'/>
<seriesInfo name='RFC' value='3986'/>
<seriesInfo name='DOI' value='10.17487/RFC3986'/>
</reference>



<reference  anchor='RFC4122' target='http://www.rfc-editor.org/info/rfc4122'>
<front>
<title>A Universally Unique IDentifier (UUID) URN Namespace</title>
<author initials='P.' surname='Leach' fullname='P. Leach'><organization /></author>
<author initials='M.' surname='Mealling' fullname='M. Mealling'><organization /></author>
<author initials='R.' surname='Salz' fullname='R. Salz'><organization /></author>
<date year='2005' month='July' />
<abstract><t>This specification defines a Uniform Resource Name namespace for UUIDs (Universally Unique IDentifier), also known as GUIDs (Globally Unique IDentifier).  A UUID is 128 bits long, and can guarantee uniqueness across space and time.  UUIDs were originally used in the Apollo Network Computing System and later in the Open Software Foundation\'s (OSF) Distributed Computing Environment (DCE), and then in Microsoft Windows platforms.</t><t>This specification is derived from the DCE specification with the kind permission of the OSF (now known as The Open Group).  Information from earlier versions of the DCE specification have been incorporated into this document.  [STANDARDS-TRACK]</t></abstract>
</front>
<seriesInfo name='RFC' value='4122'/>
<seriesInfo name='DOI' value='10.17487/RFC4122'/>
</reference>



<reference  anchor='RFC5952' target='http://www.rfc-editor.org/info/rfc5952'>
<front>
<title>A Recommendation for IPv6 Address Text Representation</title>
<author initials='S.' surname='Kawamura' fullname='S. Kawamura'><organization /></author>
<author initials='M.' surname='Kawashima' fullname='M. Kawashima'><organization /></author>
<date year='2010' month='August' />
<abstract><t>As IPv6 deployment increases, there will be a dramatic increase in the need to use IPv6 addresses in text.  While the IPv6 address architecture in Section 2.2 of RFC 4291 describes a flexible model for text representation of an IPv6 address, this flexibility has been causing problems for operators, system engineers, and users.  This document defines a canonical textual representation format.  It does not define a format for internal storage, such as within an application or database.  It is expected that the canonical format will be followed by humans and systems when representing IPv6 addresses as text, but all implementations must accept and be able to handle any legitimate RFC 4291 format.  [STANDARDS-TRACK]</t></abstract>
</front>
<seriesInfo name='RFC' value='5952'/>
<seriesInfo name='DOI' value='10.17487/RFC5952'/>
</reference>



<reference  anchor='RFC6690' target='http://www.rfc-editor.org/info/rfc6690'>
<front>
<title>Constrained RESTful Environments (CoRE) Link Format</title>
<author initials='Z.' surname='Shelby' fullname='Z. Shelby'><organization /></author>
<date year='2012' month='August' />
<abstract><t>This specification defines Web Linking using a link format for use by constrained web servers to describe hosted resources, their attributes, and other relationships between links.  Based on the HTTP Link Header field defined in RFC 5988, the Constrained RESTful Environments (CoRE) Link Format is carried as a payload and is assigned an Internet media type.  "RESTful" refers to the Representational State Transfer (REST) architecture.  A well-known URI is defined as a default entry point for requesting the links hosted by a server.  [STANDARDS-TRACK]</t></abstract>
</front>
<seriesInfo name='RFC' value='6690'/>
<seriesInfo name='DOI' value='10.17487/RFC6690'/>
</reference>



<reference anchor='I-D.arkko-core-dev-urn'>
<front>
<title>Uniform Resource Names for Device Identifiers</title>

<author initials='J' surname='Arkko' fullname='Jari Arkko'>
    <organization />
</author>

<author initials='C' surname='Jennings' fullname='Cullen Jennings'>
    <organization />
</author>

<author initials='Z' surname='Shelby' fullname='Zach Shelby'>
    <organization />
</author>

<date month='July' day='9' year='2012' />

<abstract><t>This memo describes a new Uniform Resource Name (URN) namespace for hardware device identifiers.  A general representation of device identity can be useful in many applications, such as in sensor data streams and storage, or equipment inventories.  A URN-based representation can be easily passed along in any application that needs the information.</t></abstract>

</front>

<seriesInfo name='Internet-Draft' value='draft-arkko-core-dev-urn-03' />
<format type='TXT'
        target='http://www.ietf.org/internet-drafts/draft-arkko-core-dev-urn-03.txt' />
</reference>


<reference anchor="UCUM" target="http://unitsofmeasure.org/ucum.html">
  <front>
    <title>The Unified Code for Units of Measure (UCUM)</title>
    <author initials="G." surname="Schadow">
      <organization></organization>
    </author>
    <author initials="C." surname="McDonald">
      <organization></organization>
    </author>
    <date year="2013"/>
  </front>
  <seriesInfo name="Regenstrief Institute and Indiana University School of" value="Informatics"/>
</reference>


    </references>



  </back>
</rfc>


PAFTECH AB 2003-20262026-04-23 14:32:57