<?xml version='1.0' encoding='utf-8'?>
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" version="3" category="std" consensus="true" docName="draft-ietf-core-senml-versions-05" indexInclude="true" ipr="trust200902" number="9100" prepTime="2021-08-16T14:52:53" scripts="Common,Latin" sortRefs="true" submissionType="IETF" symRefs="true" tocDepth="3" tocInclude="true" updates="8428" xml:lang="en">
  <link href="https://datatracker.ietf.org/doc/draft-ietf-core-senml-versions-05" rel="prev"/>
  <link href="https://dx.doi.org/10.17487/rfc9100" rel="alternate"/>
  <link href="urn:issn:2070-1721" rel="alternate"/>
  <front>
    <title abbrev="SenML Features and Versions">Sensor Measurement Lists (SenML) Features and Versions</title>
    <seriesInfo name="RFC" value="9100" stream="IETF"/>
    <author initials="C." surname="Bormann" fullname="Carsten Bormann">
      <organization showOnFrontPage="true">Universität Bremen TZI</organization>
      <address>
        <postal>
          <street>Postfach 330440</street>
          <city>Bremen</city>
          <code>D-28359</code>
          <country>Germany</country>
        </postal>
        <phone>+49-421-218-63921</phone>
        <email>cabo@tzi.org</email>
      </address>
    </author>
    <date month="08" year="2021"/>
    <workgroup>CoRE</workgroup>
    <keyword>Internet of Things (IoT)</keyword>
    <keyword>Internet of Things</keyword>
    <keyword>IOT</keyword>
    <keyword>data model</keyword>
    <abstract pn="section-abstract">
      <t indent="0" pn="section-abstract-1">This short document updates RFC 8428, "Sensor Measurement Lists
      (SenML)", by specifying the use of independently selectable "SenML
      Features" and mapping them to SenML version numbers.</t>
    </abstract>
    <boilerplate>
      <section anchor="status-of-memo" numbered="false" removeInRFC="false" toc="exclude" pn="section-boilerplate.1">
        <name slugifiedName="name-status-of-this-memo">Status of This Memo</name>
        <t indent="0" pn="section-boilerplate.1-1">
            This is an Internet Standards Track document.
        </t>
        <t indent="0" pn="section-boilerplate.1-2">
            This document is a product of the Internet Engineering Task Force
            (IETF).  It represents the consensus of the IETF community.  It has
            received public review and has been approved for publication by
            the Internet Engineering Steering Group (IESG).  Further
            information on Internet Standards is available in Section 2 of 
            RFC 7841.
        </t>
        <t indent="0" pn="section-boilerplate.1-3">
            Information about the current status of this document, any
            errata, and how to provide feedback on it may be obtained at
            <eref target="https://www.rfc-editor.org/info/rfc9100" brackets="none"/>.
        </t>
      </section>
      <section anchor="copyright" numbered="false" removeInRFC="false" toc="exclude" pn="section-boilerplate.2">
        <name slugifiedName="name-copyright-notice">Copyright Notice</name>
        <t indent="0" pn="section-boilerplate.2-1">
            Copyright (c) 2021 IETF Trust and the persons identified as the
            document authors. All rights reserved.
        </t>
        <t indent="0" pn="section-boilerplate.2-2">
            This document is subject to BCP 78 and the IETF Trust's Legal
            Provisions Relating to IETF Documents
            (<eref target="https://trustee.ietf.org/license-info" brackets="none"/>) in effect on the date of
            publication of this document. Please review these documents
            carefully, as they describe your rights and restrictions with
            respect to this document. Code Components extracted from this
            document must include Simplified BSD License text as described in
            Section 4.e of the Trust Legal Provisions and are provided without
            warranty as described in the Simplified BSD License.
        </t>
      </section>
    </boilerplate>
    <toc>
      <section anchor="toc" numbered="false" removeInRFC="false" toc="exclude" pn="section-toc.1">
        <name slugifiedName="name-table-of-contents">Table of Contents</name>
        <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1">
          <li pn="section-toc.1-1.1">
            <t indent="0" keepWithNext="true" pn="section-toc.1-1.1.1"><xref derivedContent="1" format="counter" sectionFormat="of" target="section-1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-introduction">Introduction</xref></t>
            <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.1.2">
              <li pn="section-toc.1-1.1.2.1">
                <t indent="0" keepWithNext="true" pn="section-toc.1-1.1.2.1.1"><xref derivedContent="1.1" format="counter" sectionFormat="of" target="section-1.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-terminology">Terminology</xref></t>
              </li>
            </ul>
          </li>
          <li pn="section-toc.1-1.2">
            <t indent="0" pn="section-toc.1-1.2.1"><xref derivedContent="2" format="counter" sectionFormat="of" target="section-2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-feature-codes-and-the-versi">Feature Codes and the Version Number</xref></t>
            <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.2.2">
              <li pn="section-toc.1-1.2.2.1">
                <t indent="0" keepWithNext="true" pn="section-toc.1-1.2.2.1.1"><xref derivedContent="2.1" format="counter" sectionFormat="of" target="section-2.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-discussion">Discussion</xref></t>
              </li>
              <li pn="section-toc.1-1.2.2.2">
                <t indent="0" pn="section-toc.1-1.2.2.2.1"><xref derivedContent="2.2" format="counter" sectionFormat="of" target="section-2.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-updating-section-44-of-rfc-">Updating Section 4.4 of RFC 8428</xref></t>
              </li>
            </ul>
          </li>
          <li pn="section-toc.1-1.3">
            <t indent="0" pn="section-toc.1-1.3.1"><xref derivedContent="3" format="counter" sectionFormat="of" target="section-3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-features-reserved0-reserved">Features: Reserved0, Reserved1, Reserved2, Reserved3</xref></t>
          </li>
          <li pn="section-toc.1-1.4">
            <t indent="0" pn="section-toc.1-1.4.1"><xref derivedContent="4" format="counter" sectionFormat="of" target="section-4"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-feature-secondary-units">Feature: Secondary Units</xref></t>
          </li>
          <li pn="section-toc.1-1.5">
            <t indent="0" pn="section-toc.1-1.5.1"><xref derivedContent="5" format="counter" sectionFormat="of" target="section-5"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-security-considerations">Security Considerations</xref></t>
          </li>
          <li pn="section-toc.1-1.6">
            <t indent="0" pn="section-toc.1-1.6.1"><xref derivedContent="6" format="counter" sectionFormat="of" target="section-6"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-iana-considerations">IANA Considerations</xref></t>
          </li>
          <li pn="section-toc.1-1.7">
            <t indent="0" pn="section-toc.1-1.7.1"><xref derivedContent="7" format="counter" sectionFormat="of" target="section-7"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-references">References</xref></t>
            <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.7.2">
              <li pn="section-toc.1-1.7.2.1">
                <t indent="0" pn="section-toc.1-1.7.2.1.1"><xref derivedContent="7.1" format="counter" sectionFormat="of" target="section-7.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-normative-references">Normative References</xref></t>
              </li>
              <li pn="section-toc.1-1.7.2.2">
                <t indent="0" pn="section-toc.1-1.7.2.2.1"><xref derivedContent="7.2" format="counter" sectionFormat="of" target="section-7.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-informative-references">Informative References</xref></t>
              </li>
            </ul>
          </li>
          <li pn="section-toc.1-1.8">
            <t indent="0" pn="section-toc.1-1.8.1"><xref derivedContent="" format="none" sectionFormat="of" target="section-appendix.a"/><xref derivedContent="" format="title" sectionFormat="of" target="name-acknowledgements">Acknowledgements</xref></t>
          </li>
          <li pn="section-toc.1-1.9">
            <t indent="0" pn="section-toc.1-1.9.1"><xref derivedContent="" format="none" sectionFormat="of" target="section-appendix.b"/><xref derivedContent="" format="title" sectionFormat="of" target="name-authors-address">Author's Address</xref></t>
          </li>
        </ul>
      </section>
    </toc>
  </front>
  <middle>
    <section anchor="intro" numbered="true" toc="include" removeInRFC="false" pn="section-1">
      <name slugifiedName="name-introduction">Introduction</name>
      <t indent="0" pn="section-1-1">The Sensor Measurement Lists (SenML) specification <xref target="RFC8428" format="default" sectionFormat="of" derivedContent="RFC8428"/> provides a version number that is
      initially set to 10, without further specification on the way to make
      use of different version numbers.</t>
      <t indent="0" pn="section-1-2">The common idea of using a version number to indicate the
      evolution of an interchange format generally assumes an incremental
      progression of the version number as the format accretes additional
      features over time. However, in the case of SenML, it is expected that
      the likely evolution will be for independently selectable capability
      <em>features</em> to be added to the basic specification that is
      indicated by version number 10.  To support this model, this document
      repurposes the single version number accompanying a pack of SenML
      records so that it is interpreted as a bitmap that indicates the set of
      features a recipient would need to have implemented to be able to
      process the pack.</t>
      <t indent="0" pn="section-1-3">This short document specifies the use of SenML Features and maps them
      to SenML version number space, updating <xref target="RFC8428" format="default" sectionFormat="of" derivedContent="RFC8428"/>.</t>
      <section anchor="terminology" numbered="true" toc="include" removeInRFC="false" pn="section-1.1">
        <name slugifiedName="name-terminology">Terminology</name>
        <t indent="0" pn="section-1.1-1">The key words "<bcp14>MUST</bcp14>", "<bcp14>MUST NOT</bcp14>",
        "<bcp14>REQUIRED</bcp14>", "<bcp14>SHALL</bcp14>", "<bcp14>SHALL NOT</bcp14>", "<bcp14>SHOULD</bcp14>", "<bcp14>SHOULD NOT</bcp14>",
        "<bcp14>RECOMMENDED</bcp14>", "<bcp14>NOT RECOMMENDED</bcp14>",
        "<bcp14>MAY</bcp14>", and "<bcp14>OPTIONAL</bcp14>" in this document
        are to be interpreted as described in BCP 14 <xref target="RFC2119" format="default" sectionFormat="of" derivedContent="RFC2119"/> <xref target="RFC8174" format="default" sectionFormat="of" derivedContent="RFC8174"/> when, and
        only when, they appear in all capitals, as shown here.</t>
        <t indent="0" pn="section-1.1-2">Where bit arithmetic is explained, this document uses the notation
	familiar from the programming language C <xref target="C" format="default" sectionFormat="of" derivedContent="C"/>, including the <tt>0b</tt> prefix for binary
	numbers defined in Section 5.13.2 of the C++ language standard <xref target="CPLUSPLUS" format="default" sectionFormat="of" derivedContent="CPLUSPLUS"/>, except that superscript
	notation (example for two to the power of 64: 2<sup>64</sup>) denotes
	exponentiation; in the plain text version of this document, superscript
	notation is rendered in paragraph text by C-incompatible surrogate
	notation as seen in this example, and in display math by a crude
	plain text representation, as is the sum (Sigma) sign.</t>
      </section>
    </section>
    <section anchor="codes" numbered="true" toc="include" removeInRFC="false" pn="section-2">
      <name slugifiedName="name-feature-codes-and-the-versi">Feature Codes and the Version Number</name>
      <t indent="0" pn="section-2-1">The present specification defines "SenML Features", each identified
      by a "feature name" (a text string) and a "feature code" (an unsigned
      integer less than 53).</t>
      <t indent="0" pn="section-2-2">The specific version of a SenML pack is composed of a set of
      features.  The SenML version number (<tt>bver</tt> field) is then a
      bitmap of these features represented as an unsigned integer,
      specifically the sum of, for each feature present, two taken to the
      power of the feature code of that feature (<xref target="bitmap-as-sum" format="default" sectionFormat="of" derivedContent="Figure 1"/>).</t>
      <figure anchor="bitmap-as-sum" align="left" suppress-title="false" pn="figure-1">
        <name slugifiedName="name-feature-bitmap-as-a-sum-sig">Feature Bitmap as a Sum (Sigma Symbol) of Feature Bits</name>
        <artset pn="section-2-3.1">
          <artwork type="svg" name="" align="left" alt="" pn="section-2-3.1.1"><svg xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg" height="7.676ex" role="img" viewBox="0 -1867.7 12842.8 3304.9" width="29.829ex">
              <defs>
                <path d="M247 454l-89 -326c-3 -10 -4 -21 -4 -32c0 -38 20 -66 60 -66c108 0 178 113 210 203c8 24 15 49 15 74c0 74 -61 65 -61 109c0 34 25 42 54 42c42 0 47 -51 47 -83c0 -99 -39 -200 -97 -280c-43 -60 -120 -104 -194 -104c-64 0 -116 20 -116 93c0 21 3 42 9 62l58 210 c2 8 5 17 5 25c0 20 -44 20 -57 20v15c52 13 106 20 156 42Z" id="E1-STIXWEBNORMALI-1D463" stroke-width="1"/>
                <path d="M363 112l14 -13c-70 -86 -138 -110 -200 -110c-98 0 -137 84 -137 156c0 23 1 37 6 60c25 111 135 236 262 236c42 0 102 -14 102 -76c0 -127 -167 -176 -286 -182v-28c0 -64 52 -107 113 -107c42 0 90 18 126 64zM124 211h9c104 0 198 69 198 157c0 25 -19 43 -44 43 c-74 0 -134 -115 -163 -200Z" id="E1-STIXWEBNORMALI-1D452" stroke-width="1"/>
                <path d="M175 267l5 -1c9 18 21 38 32 56c34 54 82 119 137 119c29 0 44 -21 44 -48c0 -38 -24 -82 -65 -82c-39 0 -29 38 -47 38c-61 0 -148 -256 -153 -273l-21 -76h-77l92 364c3 11 4 18 4 23c0 13 -11 19 -33 19c-7 0 -21 -2 -27 -3l-2 15l157 23Z" id="E1-STIXWEBNORMALI-1D45F" stroke-width="1"/>
                <path d="M390 441l-24 -146h-15c0 64 -36 120 -92 120c-25 0 -51 -17 -51 -58c0 -55 134 -147 134 -242c0 -62 -48 -125 -135 -125c-34 0 -98 20 -110 20c-9 0 -18 -4 -30 -21h-17l25 156h16c0 -63 41 -130 104 -130c59 0 73 50 73 89c0 82 -130 132 -130 230c0 79 59 107 114 107 c43 0 63 -20 92 -20c11 0 22 10 30 20h16Z" id="E1-STIXWEBNORMALI-1D460" stroke-width="1"/>
                <path d="M257 566c0 -26 -22 -46 -48 -46c-29 0 -48 20 -48 46c0 25 19 50 48 50c26 0 48 -25 48 -50zM227 441l-92 -364c-1 -6 -1 -10 -1 -14c0 -7 6 -10 13 -10c22 0 28 12 64 51l13 -10c-35 -45 -85 -105 -134 -105c-28 0 -40 19 -40 46c0 12 0 31 79 338c1 2 2 9 2 12 c0 17 -8 22 -31 22c-9 0 -21 -2 -28 -4l-3 16Z" id="E1-STIXWEBNORMALI-1D456" stroke-width="1"/>
                <path d="M438 287c0 -139 -110 -298 -263 -298c-101 0 -135 90 -135 163c0 128 103 289 251 289c80 0 147 -46 147 -154zM357 318c0 38 -14 93 -67 93c-82 0 -169 -149 -169 -285c0 -33 3 -107 59 -107c106 0 177 223 177 299Z" id="E1-STIXWEBNORMALI-1D45C" stroke-width="1"/>
                <path d="M467 96l-5 -6c-28 -34 -76 -98 -128 -98c-32 0 -41 23 -41 46c0 13 4 29 7 40l57 221c2 8 7 28 7 42c0 19 -6 38 -24 38c-38 0 -101 -86 -132 -133c-36 -54 -62 -101 -68 -122l-33 -124h-77l95 374c0 18 -3 32 -30 32c-10 0 -21 -2 -28 -3l-2 15l159 23l-51 -189h3 c5 0 54 70 56 73c40 50 100 116 160 116c44 0 56 -29 56 -62c0 -25 -6 -50 -11 -70l-59 -231c-1 -2 -1 -5 -1 -10c1 -6 4 -14 15 -14c24 0 48 36 62 53Z" id="E1-STIXWEBNORMALI-1D45B" stroke-width="1"/>
                <path d="M637 320h-589v66h589v-66zM637 120h-589v66h589v-66Z" id="E1-STIXWEBMAIN-3D" stroke-width="1"/>
                <path d="M1202 465l-74 -416h-1038l557 735l-521 715h976v-351h-36c0 19 -7 45 -11 65c-28 131 -95 183 -162 191c-28 4 -71 5 -106 5h-377l411 -564l-470 -613h568c139 0 208 69 244 233h39Z" id="E1-STIXWEBSIZE1-2211" stroke-width="1"/>
                <path d="M248 437h37c63 0 58 77 101 141c31 47 74 90 150 90c50 0 79 -24 79 -59c0 -28 -21 -40 -41 -40c-28 0 -35 11 -35 25s9 29 9 37c0 5 -3 8 -15 8c-50 0 -89 -54 -110 -132l-19 -70h80l-12 -38h-76l-79 -306c-7 -27 -15 -65 -30 -102c-33 -83 -87 -178 -175 -178 c-48 0 -72 24 -72 54c0 24 14 49 43 49c27 0 37 -18 37 -33c0 -19 -16 -20 -16 -32c0 -6 6 -9 15 -9c65 0 95 158 110 215l87 342h-77Z" id="E1-STIXWEBNORMALI-1D453" stroke-width="1"/>
                <path d="M363 111l12 -13c-51 -60 -113 -109 -198 -109c-97 0 -137 78 -137 155c0 140 121 297 263 297c50 0 97 -27 97 -76c0 -38 -16 -70 -54 -70c-26 0 -38 21 -38 38c0 24 29 36 29 58c0 12 -10 21 -34 21c-119 0 -176 -179 -176 -259c0 -87 49 -109 94 -109 c61 0 107 33 142 67Z" id="E1-STIXWEBNORMALI-1D450" stroke-width="1"/>
                <path d="M476 330c0 -172 -63 -344 -226 -344c-171 0 -226 186 -226 350c0 177 69 340 230 340c131 0 222 -141 222 -346zM380 325c0 208 -44 325 -132 325c-83 0 -128 -118 -128 -321s44 -317 130 -317c85 0 130 115 130 313Z" id="E1-STIXWEBMAIN-30" stroke-width="1"/>
                <path d="M438 681l-36 -85c-3 -7 -11 -13 -27 -13h-194l-40 -85c143 -27 193 -49 250 -128c26 -36 35 -74 35 -127c0 -96 -30 -158 -98 -208c-47 -34 -102 -49 -170 -49c-75 0 -127 24 -127 62c0 25 17 38 45 38c23 0 42 -5 74 -31c28 -23 51 -32 71 -32c70 0 135 83 135 169 c0 64 -22 114 -67 150c-47 38 -117 70 -213 70c-9 0 -12 2 -12 8c0 2 1 5 1 5l109 237h207c23 0 32 5 48 26Z" id="E1-STIXWEBMAIN-35" stroke-width="1"/>
                <path d="M474 137l-54 -137h-391v12l178 189c94 99 130 175 130 260c0 91 -54 141 -139 141c-72 0 -107 -32 -147 -130l-21 5c21 117 85 199 208 199c113 0 185 -77 185 -176c0 -79 -39 -154 -128 -248l-165 -176h234c42 0 63 11 96 67Z" id="E1-STIXWEBMAIN-32" stroke-width="1"/>
                <path d="M253 370l14 13c39 37 78 58 113 58c61 0 94 -54 94 -155c0 -129 -110 -298 -254 -298c-24 0 -42 4 -61 19l-24 -100c-3 -13 -5 -24 -5 -35c0 -22 11 -43 61 -43h16l-3 -12h-234l3 12c62 3 69 33 81 79l117 464c0 19 -1 33 -31 33c-8 0 -20 -2 -28 -4l-2 16l158 24 l-18 -69zM214 238l-46 -200c14 -16 34 -21 46 -21c101 0 176 173 176 285c0 63 -28 83 -51 83c-53 0 -105 -61 -125 -147Z" id="E1-STIXWEBNORMALI-1D45D" stroke-width="1"/>
                <path d="M283 438l-10 -38h-70l-78 -320c-1 -3 -2 -8 -2 -11c0 -6 3 -12 16 -12c0 0 23 2 60 52l13 -11c-24 -31 -74 -107 -133 -107c-31 0 -39 25 -39 52c0 13 2 26 5 37l81 320h-77l5 29c75 14 136 51 177 138h13l-31 -129h70Z" id="E1-STIXWEBNORMALI-1D461" stroke-width="1"/>
                <path d="M304 -161l-12 -16c-158 90 -244 259 -244 429c0 185 87 329 247 424l9 -16c-139 -119 -170 -212 -170 -405c0 -186 30 -299 170 -416Z" id="E1-STIXWEBMAIN-28" stroke-width="1"/>
                <path d="M29 660l12 16c153 -92 244 -259 244 -429c0 -185 -88 -327 -247 -424l-9 16c142 117 170 211 170 405c0 187 -25 302 -170 416Z" id="E1-STIXWEBMAIN-29" stroke-width="1"/>
                <path d="M203 253c0 -32 -27 -60 -59 -60c-33 0 -61 30 -61 60s28 60 61 60c32 0 59 -28 59 -60Z" id="E1-STIXWEBMAIN-22C5" stroke-width="1"/>
              </defs>
              <g fill="black" stroke="currentColor" stroke-width="0" transform="matrix(1 0 0 -1 0 0)">
                <use xlink:href="#E1-STIXWEBNORMALI-1D463" x="0" y="0"/>
                <use xlink:href="#E1-STIXWEBNORMALI-1D452" x="506" y="0"/>
                <use xlink:href="#E1-STIXWEBNORMALI-1D45F" x="952" y="0"/>
                <use xlink:href="#E1-STIXWEBNORMALI-1D460" x="1360" y="0"/>
                <use xlink:href="#E1-STIXWEBNORMALI-1D456" x="1801" y="0"/>
                <use xlink:href="#E1-STIXWEBNORMALI-1D45C" x="2112" y="0"/>
                <use xlink:href="#E1-STIXWEBNORMALI-1D45B" x="2571" y="0"/>
                <use xlink:href="#E1-STIXWEBMAIN-3D" x="3346" y="0"/>
                <g transform="translate(4309,0)">
                  <use xlink:href="#E1-STIXWEBSIZE1-2211" x="137" y="-524"/>
                  <g transform="translate(0,-1122)">
                    <use xlink:href="#E1-STIXWEBNORMALI-1D453" transform="scale(0.707)" x="0" y="0"/>
                    <use xlink:href="#E1-STIXWEBNORMALI-1D450" transform="scale(0.707)" x="615" y="0"/>
                    <use xlink:href="#E1-STIXWEBMAIN-3D" transform="scale(0.707)" x="1031" y="0"/>
                    <use xlink:href="#E1-STIXWEBMAIN-30" transform="scale(0.707)" x="1716" y="0"/>
                  </g>
                  <g transform="translate(429,1176)">
                    <use xlink:href="#E1-STIXWEBMAIN-35" transform="scale(0.707)"/>
                    <use xlink:href="#E1-STIXWEBMAIN-32" transform="scale(0.707)" x="500" y="0"/>
                  </g>
                </g>
                <use xlink:href="#E1-STIXWEBNORMALI-1D45D" x="6043" y="0"/>
                <use xlink:href="#E1-STIXWEBNORMALI-1D45F" x="6533" y="0"/>
                <use xlink:href="#E1-STIXWEBNORMALI-1D452" x="6941" y="0"/>
                <use xlink:href="#E1-STIXWEBNORMALI-1D460" x="7387" y="0"/>
                <use xlink:href="#E1-STIXWEBNORMALI-1D452" x="7827" y="0"/>
                <use xlink:href="#E1-STIXWEBNORMALI-1D45B" x="8273" y="0"/>
                <use xlink:href="#E1-STIXWEBNORMALI-1D461" x="8770" y="0"/>
                <use xlink:href="#E1-STIXWEBMAIN-28" x="9084" y="0"/>
                <use xlink:href="#E1-STIXWEBNORMALI-1D453" x="9417" y="0"/>
                <use xlink:href="#E1-STIXWEBNORMALI-1D450" x="10033" y="0"/>
                <use xlink:href="#E1-STIXWEBMAIN-29" x="10448" y="0"/>
                <use xlink:href="#E1-STIXWEBMAIN-22C5" x="11004" y="0"/>
                <g transform="translate(11513,0)">
                  <use xlink:href="#E1-STIXWEBMAIN-32" x="0" y="0"/>
                  <g transform="translate(500,412)">
                    <use xlink:href="#E1-STIXWEBNORMALI-1D453" transform="scale(0.707)" x="0" y="0"/>
                    <use xlink:href="#E1-STIXWEBNORMALI-1D450" transform="scale(0.707)" x="615" y="0"/>
                  </g>
                </g>
              </g>
            </svg>
          </artwork>
          <artwork type="ascii-art" name="" align="left" alt="" pn="section-2-3.1.2">
           __ 52                     fc
version = \           present(fc) ⋅ 2
          /__ fc = 0
</artwork>
        </artset>
      </figure>
      <t indent="0" pn="section-2-4">where present(fc) is 1 if the feature with the feature code <tt>fc</tt> is
present, 0 otherwise.
(The expression 2<sup>fc</sup> can be implemented as <tt>1 &lt;&lt; fc</tt> in C
and related languages.)</t>
      <section anchor="discussion" numbered="true" toc="include" removeInRFC="false" pn="section-2.1">
        <name slugifiedName="name-discussion">Discussion</name>
        <t indent="0" pn="section-2.1-1">Representing features as a bitmap within a number is quite
        efficient as long as feature codes are sparingly allocated (see also
        <xref target="iana" format="default" sectionFormat="of" derivedContent="Section 6"/>).</t>
        <t indent="0" pn="section-2.1-2">Compatibility with the existing SenML version number, 10 decimal
        (0b1010), requires reserving four of the least significant bit
        positions for the base version as described in <xref target="resv" format="default" sectionFormat="of" derivedContent="Section 3"/>.  There is an upper limit to the range of the
        integer numbers that can be represented in all SenML representations:
        practical JSON limits this to 2<sup>53</sup>-1 <xref target="RFC7493" format="default" sectionFormat="of" derivedContent="RFC7493"/>.  This means the feature codes 4 to 52 are
        available, one of which is taken by the feature defined in <xref target="secondary-units" format="default" sectionFormat="of" derivedContent="Section 4"/>, leaving 48 for
        allocation.  (The current version 10 (with all other feature codes
        unset) can be visualized as
        <tt>0b00000000000000000000000000000000000000000000000001010</tt>.)
        For a lifetime of this scheme of several decades, approximately two
        feature codes per year or fewer should be allocated.  Note that less
        generally applicable features can always be communicated via fields
        labeled with names that end with the "_" character ("must-understand
        fields"). See <xref section="4.4" sectionFormat="of" target="RFC8428" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8428#section-4.4" derivedContent="RFC8428"/> for details.</t>
        <t indent="0" pn="section-2.1-3">Most representations visible to engineers working with SenML will
        use decimal numbers.  For instance, 26 (0b11010, 0x1a) denotes a version that adds
        the "Secondary Units" feature (<xref target="secondary-units" format="default" sectionFormat="of" derivedContent="Section 4"/>).  This is slightly unwieldy but will be quickly
        memorized in practice.</t>
        <t indent="0" pn="section-2.1-4">As a general observation, ending up over time with dozens of
individually selectable optional extensions may lead to too many
variants of what is supported by different implementations, reducing
interoperability.  So, in practice, it is still desirable to batch up
extensions that are expected to be supported together into a single
feature bit, leading to a sort of hybrid between completely
independent extensions and a linear version scheme.  This is also
another reason why a space of 48 remaining feature codes should
suffice for a while.</t>
      </section>
      <section anchor="updating-section-44-of-rfc8428" numbered="true" toc="include" removeInRFC="false" pn="section-2.2">
        <name slugifiedName="name-updating-section-44-of-rfc-">Updating Section 4.4 of RFC 8428</name>
        <t indent="0" pn="section-2.2-1">The last paragraph of <xref section="4.4" sectionFormat="of" target="RFC8428" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8428#section-4.4" derivedContent="RFC8428"/> may be read to give the impression
        that SenML version numbers are totally ordered, i.e., that an
        implementation that understands version n also always understands all
        versions k &lt; n.  If this ever was true for SenML versions before
        10, it certainly is no longer true with this specification.</t>
        <t indent="0" pn="section-2.2-2">Any SenML pack that sets feature bits beyond the first four will
lead to a version number that actually is greater than 10, so the
requirement in <xref section="4.4" sectionFormat="of" target="RFC8428" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8428#section-4.4" derivedContent="RFC8428"/> will prevent false
interoperability with version 10 implementations.</t>
        <t indent="0" pn="section-2.2-3">Implementations that do implement feature bits beyond the first four,
i.e., versions greater than 10, will instead need to perform a bitwise
comparison of the feature bitmap as described in this specification
and ensure that all features indicated are understood before using the
pack.
For example, an implementation that implements basic SenML (version number
10) plus only a future feature code 5 will accept version number 42,
but it would not be able to work with a pack indicating version number
26 (base specification plus feature code 4).
(If the implementation <em>requires</em> feature code 5 without being
backwards compatible, it will accept 42, but not 10.)</t>
      </section>
    </section>
    <section anchor="resv" numbered="true" toc="include" removeInRFC="false" pn="section-3">
      <name slugifiedName="name-features-reserved0-reserved">Features: Reserved0, Reserved1, Reserved2, Reserved3</name>
      <t indent="0" pn="section-3-1">For SenML version 10 as described in <xref target="RFC8428" format="default" sectionFormat="of" derivedContent="RFC8428"/>, the feature codes 0 to 3 are already in use.
      Reserved1 (1) and Reserved3 (3) are always present, and the features
      Reserved0 (0) and Reserved2 (2) are always absent, i.e., the four
      least significant bits set to 0b1010 indicate a version number of 10 if
      no other feature is in use.  These four reserved feature codes are not
      to be used with any more specific semantics except in a specification
      that updates the present specification.  (Note that Reserved0 and
      Reserved2 could be used in such a specification in a way similar to that
      of feature codes 4 to 52 in the present specification.)</t>
    </section>
    <section anchor="secondary-units" numbered="true" toc="include" removeInRFC="false" pn="section-4">
      <name slugifiedName="name-feature-secondary-units">Feature: Secondary Units</name>
      <t indent="0" pn="section-4-1">The feature "Secondary Units" (code number 4) indicates that
      secondary unit names <xref target="RFC8798" format="default" sectionFormat="of" derivedContent="RFC8798"/>
        <bcp14>MAY</bcp14> be used in the "u" field of SenML records in addition
      to the primary unit names already allowed by <xref target="RFC8428" format="default" sectionFormat="of" derivedContent="RFC8428"/>.</t>
      <t indent="0" pn="section-4-2">Note that the most basic use of this feature simply sets the SenML
version number to 26 (10 + 2<sup>4</sup>).</t>
    </section>
    <section anchor="seccons" numbered="true" toc="include" removeInRFC="false" pn="section-5">
      <name slugifiedName="name-security-considerations">Security Considerations</name>
      <t indent="0" pn="section-5-1">The security considerations of <xref target="RFC8428" format="default" sectionFormat="of" derivedContent="RFC8428"/> apply.
This specification provides structure to the interpretation of the
SenML version number, which poses no additional security
considerations except for some potential for surprise that version
numbers do not simply increase linearly.</t>
    </section>
    <section anchor="iana" numbered="true" toc="include" removeInRFC="false" pn="section-6">
      <name slugifiedName="name-iana-considerations">IANA Considerations</name>
      <t indent="0" pn="section-6-1">IANA has created a new "<xref section="SenML Features" sectionFormat="bare" target="IANA.SENML" relative="#senml-features" format="default" derivedLink="https://www.iana.org/assignments/senml#senml-features" derivedContent="IANA.SENML"/>"
      subregistry within the "Sensor Measurement Lists (SenML)" registry <xref target="IANA.SENML" format="default" sectionFormat="of" derivedContent="IANA.SENML"/> with the registration policy
      "Specification Required" <xref target="RFC8126" format="default" sectionFormat="of" derivedContent="RFC8126"/> and
      the columns:</t>
      <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-6-2">
        <li pn="section-6-2.1">Feature Code (an unsigned integer less than 53)</li>
        <li pn="section-6-2.2">Feature Name (text)</li>
        <li pn="section-6-2.3">Reference</li>
      </ul>
      <t indent="0" pn="section-6-3">To facilitate the use of feature names in programs, the designated
      expert is requested to ensure that feature names are usable as
      identifiers in most programming languages, after lowercasing the feature
      name in the registry entry and replacing blank space with underscores or
      hyphens, and that they also are distinct in this form.</t>
      <t indent="0" pn="section-6-4">The initial content of this registry is as follows:</t>
      <table anchor="feat" align="center" pn="table-1">
        <name slugifiedName="name-features-defined-for-senml-">Features Defined for SenML at the Time of Writing</name>
        <thead>
          <tr>
            <th align="left" colspan="1" rowspan="1">Feature Code</th>
            <th align="left" colspan="1" rowspan="1">Feature Name</th>
            <th align="left" colspan="1" rowspan="1">Reference</th>
          </tr>
        </thead>
        <tbody>
          <tr>
            <td align="left" colspan="1" rowspan="1">0</td>
            <td align="left" colspan="1" rowspan="1">Reserved0</td>
            <td align="left" colspan="1" rowspan="1">[RFC9100]</td>
          </tr>
          <tr>
            <td align="left" colspan="1" rowspan="1">1</td>
            <td align="left" colspan="1" rowspan="1">Reserved1</td>
            <td align="left" colspan="1" rowspan="1">[RFC9100]</td>
          </tr>
          <tr>
            <td align="left" colspan="1" rowspan="1">2</td>
            <td align="left" colspan="1" rowspan="1">Reserved2</td>
            <td align="left" colspan="1" rowspan="1">[RFC9100]</td>
          </tr>
          <tr>
            <td align="left" colspan="1" rowspan="1">3</td>
            <td align="left" colspan="1" rowspan="1">Reserved3</td>
            <td align="left" colspan="1" rowspan="1">[RFC9100]</td>
          </tr>
          <tr>
            <td align="left" colspan="1" rowspan="1">4</td>
            <td align="left" colspan="1" rowspan="1">Secondary Units</td>
            <td align="left" colspan="1" rowspan="1">[RFC9100] <xref target="RFC8798" format="default" sectionFormat="of" derivedContent="RFC8798"/></td>
          </tr>
        </tbody>
      </table>
      <t indent="0" pn="section-6-6">As the number of features that can be registered has a hard limit (48
codes left at the time of writing), the designated expert is
specifically instructed to maintain a frugal regime of code point
allocation, keeping code points available for SenML Features that are
likely to be useful for non-trivial subsets of the SenML ecosystem.
Quantitatively, the expert could, for instance, steer the allocation to
a target of not allocating more than 10% of the remaining set per year.</t>
      <t indent="0" pn="section-6-7">Where the specification of the feature code is provided in a document
that is separate from the specification of the feature itself (as with
feature code 4 above), both specifications should be listed.</t>
    </section>
  </middle>
  <back>
    <references pn="section-7">
      <name slugifiedName="name-references">References</name>
      <references pn="section-7.1">
        <name slugifiedName="name-normative-references">Normative References</name>
        <reference anchor="C" target="https://www.iso.org/standard/74528.html" quoteTitle="true" derivedAnchor="C">
          <front>
            <title>Information technology - Programming languages - C</title>
            <author>
              <organization showOnFrontPage="true">International Organization for Standardization</organization>
            </author>
            <date year="2018" month="June"/>
          </front>
          <seriesInfo name="ISO/IEC" value="9899:2018, Fourth Edition"/>
        </reference>
        <reference anchor="CPLUSPLUS" target="https://www.iso.org/standard/79358.html" quoteTitle="true" derivedAnchor="CPLUSPLUS">
          <front>
            <title>Programming languages - C++</title>
            <author>
              <organization showOnFrontPage="true">International Organization for Standardization</organization>
            </author>
            <date year="2020" month="December"/>
          </front>
          <seriesInfo name="ISO/IEC" value="14882:2020, Sixth Edition"/>
        </reference>
        <reference anchor="IANA.SENML" target="https://www.iana.org/assignments/senml" quoteTitle="true" derivedAnchor="IANA.SENML">
          <front>
            <title>Sensor Measurement Lists (SenML)</title>
            <author>
              <organization showOnFrontPage="true">IANA</organization>
            </author>
            <date/>
          </front>
        </reference>
        <reference anchor="RFC2119" target="https://www.rfc-editor.org/info/rfc2119" quoteTitle="true" derivedAnchor="RFC2119">
          <front>
            <title>Key words for use in RFCs to Indicate Requirement Levels</title>
            <author initials="S." surname="Bradner" fullname="S. Bradner">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="1997" month="March"/>
            <abstract>
              <t indent="0">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="RFC8126" target="https://www.rfc-editor.org/info/rfc8126" quoteTitle="true" derivedAnchor="RFC8126">
          <front>
            <title>Guidelines for Writing an IANA Considerations Section in RFCs</title>
            <author initials="M." surname="Cotton" fullname="M. Cotton">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="B." surname="Leiba" fullname="B. Leiba">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="T." surname="Narten" fullname="T. Narten">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2017" month="June"/>
            <abstract>
              <t indent="0">Many protocols make use of points of extensibility that use constants to identify various protocol parameters.  To ensure that the values in these fields do not have conflicting uses and to promote interoperability, their allocations are often coordinated by a central record keeper.  For IETF protocols, that role is filled by the Internet Assigned Numbers Authority (IANA).</t>
              <t indent="0">To make assignments in a given registry prudently, guidance describing the conditions under which new values should be assigned, as well as when and how modifications to existing values can be made, is needed.  This document defines a framework for the documentation of these guidelines by specification authors, in order to assure that the provided guidance for the IANA Considerations is clear and addresses the various issues that are likely in the operation of a registry.</t>
              <t indent="0">This is the third edition of this document; it obsoletes RFC 5226.</t>
            </abstract>
          </front>
          <seriesInfo name="BCP" value="26"/>
          <seriesInfo name="RFC" value="8126"/>
          <seriesInfo name="DOI" value="10.17487/RFC8126"/>
        </reference>
        <reference anchor="RFC8174" target="https://www.rfc-editor.org/info/rfc8174" quoteTitle="true" derivedAnchor="RFC8174">
          <front>
            <title>Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words</title>
            <author initials="B." surname="Leiba" fullname="B. Leiba">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2017" month="May"/>
            <abstract>
              <t indent="0">RFC 2119 specifies common key words that may be used in protocol  specifications.  This document aims to reduce the ambiguity by clarifying that only UPPERCASE usage of the key words have the  defined special meanings.</t>
            </abstract>
          </front>
          <seriesInfo name="BCP" value="14"/>
          <seriesInfo name="RFC" value="8174"/>
          <seriesInfo name="DOI" value="10.17487/RFC8174"/>
        </reference>
        <reference anchor="RFC8428" target="https://www.rfc-editor.org/info/rfc8428" quoteTitle="true" derivedAnchor="RFC8428">
          <front>
            <title>Sensor Measurement Lists (SenML)</title>
            <author initials="C." surname="Jennings" fullname="C. Jennings">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="Z." surname="Shelby" fullname="Z. Shelby">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="J." surname="Arkko" fullname="J. Arkko">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="A." surname="Keranen" fullname="A. Keranen">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="C." surname="Bormann" fullname="C. Bormann">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2018" month="August"/>
            <abstract>
              <t indent="0">This specification defines a format for representing simple sensor measurements and device parameters in Sensor Measurement Lists (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 one of these media types in protocols such as HTTP or the Constrained Application Protocol (CoAP) to transport the measurements of the sensor or to be configured.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="8428"/>
          <seriesInfo name="DOI" value="10.17487/RFC8428"/>
        </reference>
        <reference anchor="RFC8798" target="https://www.rfc-editor.org/info/rfc8798" quoteTitle="true" derivedAnchor="RFC8798">
          <front>
            <title>Additional Units for Sensor Measurement Lists (SenML)</title>
            <author initials="C." surname="Bormann" fullname="C. Bormann">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2020" month="June"/>
            <abstract>
              <t indent="0">The Sensor Measurement Lists (SenML) media type supports the indication of units for a quantity represented.  This short document registers a number of additional unit names in the IANA registry for units in SenML.  It also defines a registry for secondary units that cannot be in SenML's main registry, as they are derived by linear transformation from units already in that registry.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="8798"/>
          <seriesInfo name="DOI" value="10.17487/RFC8798"/>
        </reference>
      </references>
      <references pn="section-7.2">
        <name slugifiedName="name-informative-references">Informative References</name>
        <reference anchor="RFC7493" target="https://www.rfc-editor.org/info/rfc7493" quoteTitle="true" derivedAnchor="RFC7493">
          <front>
            <title>The I-JSON Message Format</title>
            <author initials="T." surname="Bray" fullname="T. Bray" role="editor">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2015" month="March"/>
            <abstract>
              <t indent="0">I-JSON (short for "Internet JSON") is a restricted profile of JSON designed to maximize interoperability and increase confidence that software can process it successfully with predictable results.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="7493"/>
          <seriesInfo name="DOI" value="10.17487/RFC7493"/>
        </reference>
      </references>
    </references>
    <section numbered="false" anchor="acks" toc="include" removeInRFC="false" pn="section-appendix.a">
      <name slugifiedName="name-acknowledgements">Acknowledgements</name>
      <t indent="0" pn="section-appendix.a-1"><contact fullname="Ari Keränen"/> proposed to use the version number
      as a bitmap and provided further input on this specification.  <contact fullname="Jaime Jiménez"/> helped clarify the document by providing a
      review and acted as Document Shepherd.  <contact fullname="Elwyn Davies"/> provided a detailed GENART
      review with directly implementable text suggestions that now form part
      of this specification.  <contact fullname="Rob Wilton"/> supplied
      comments, one of which became the last paragraph of <xref target="discussion" format="default" sectionFormat="of" derivedContent="Section 2.1"/>; <contact fullname="Éric       Vyncke"/> helped with <xref target="codes" format="default" sectionFormat="of" derivedContent="Section 2"/>.
      Additional thanks go to the other IESG reviewers.</t>
    </section>
    <section anchor="authors-addresses" numbered="false" removeInRFC="false" toc="include" pn="section-appendix.b">
      <name slugifiedName="name-authors-address">Author's Address</name>
      <author initials="C." surname="Bormann" fullname="Carsten Bormann">
        <organization showOnFrontPage="true">Universität Bremen TZI</organization>
        <address>
          <postal>
            <street>Postfach 330440</street>
            <city>Bremen</city>
            <code>D-28359</code>
            <country>Germany</country>
          </postal>
          <phone>+49-421-218-63921</phone>
          <email>cabo@tzi.org</email>
        </address>
      </author>
    </section>
  </back>
</rfc>
