SenML Features and Versions
Universitaet Bremen TZI
Postfach 330440
Bremen
D-28359
Germany
+49-421-218-63921
cabo@tzi.org
Internet-Draft
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.
Discussion Venues
This note is to be removed before publishing as an RFC.
Discussion of this document takes place on the
CORE Working Group mailing list (core@ietf.org),
which is archived at
https://mailarchive.ietf.org/arch/browse/core/.
Source for this draft and an issue tracker can be found at
https://github.com/core-wg/senml-versions.
Status of This Memo
This Internet-Draft is submitted in full conformance with the
provisions of BCP 78 and BCP 79.
Internet-Drafts are working documents of the Internet Engineering Task
Force (IETF). Note that other groups may also distribute working
documents as Internet-Drafts. The list of current Internet-Drafts is
at .
Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress."
This Internet-Draft will expire on 19 May 2021.
Copyright Notice
Copyright (c) 2020 IETF Trust and the persons identified as the
document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents
() 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.
Table of Contents
-
. Introduction
-
. Feature Codes and the Version number
-
. Features: Reserved0, Reserved1, Reserved2, Reserved3
-
. Feature: Secondary Units
-
. Security Considerations
-
. IANA Considerations
-
. Normative References
-
Acknowledgements
-
Author's Address
Introduction
The Sensor Measurement Lists (SenML) specification provides a version
number that is initially set to 10, without further
specification on the way to make use of different version numbers.
The traditional idea of using a version number for evolving an
interchange format presupposes a linear progression of that format.
A more likely form of evolution of SenML is the addition of
independently selectable "features"
that can be added to the base version (version 10) in a fashion that
these are mostly independent of each other. A recipient of a SenML pack can check the
features it implements against those required by the pack, processing the
pack only if all required features are provided in the implementation.
This short document specifies the use of SenML Features and maps
them to SenML version number space, updating .
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 BCP 14 when, and only when, they
appear in all capitals, as shown here.
Where bit arithmetic is explained, this document uses the notation
familiar from the programming language C , except that superscript
notation (example for two to the power of 64: 264) denotes
exponentiation; in the plain text version of this draft, superscript
notation is rendered by C-incompatible surrogate notation as seen in
this example.
Feature Codes and the Version number
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.
The specific version of a SenML pack is composed of a set of
features.
The SenML version number (bver field) is then a bitmap of these
features, specifically the sum of, for each feature present, two taken
to the power of the feature code of that feature.
present(fc) x 2
/__ fc=0
]]>
where present(fc) is 1 if the feature with the feature code fc is
present, 0 otherwise.
Features: Reserved0, Reserved1, Reserved2, Reserved3
For SenML Version 10 as described in , 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,
yielding 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.
Feature: Secondary Units
The feature "Secondary Units" (code number 4) indicates that secondary
unit names MAY be be used in the "u" field of SenML Records, in addition to the
primary unit names already allowed by .
Note that the most basic use of this feature simply sets the SenML
version number to 26 (10 + 24).
Security Considerations
The security considerations of 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.
IANA Considerations
IANA is requested to create a new subregistry "SenML features" within the SenML
registry , with the registration policy "specification required"
and the columns:
- Feature code (an unsigned integer less than 53)
- Feature name (text)
- Specification
The initial content of this registry is as follows:
Features defined for SenML at the time of writing
Feature code |
Feature name |
Specification |
0 |
Reserved0 |
RFCthis |
1 |
Reserved1 |
RFCthis |
2 |
Reserved2 |
RFCthis |
3 |
Reserved3 |
RFCthis |
4 |
Secondary Units |
RFCthis |
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
not allocate more than 10 % of the remaining set per year.
Normative References
Information technology — Programming languages — C
International Organization for Standardization
Sensor Measurement Lists (SenML)
IANA
Key words for use in RFCs to Indicate Requirement Levels
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.
Guidelines for Writing an IANA Considerations Section in RFCs
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).
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.
This is the third edition of this document; it obsoletes RFC 5226.
Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words
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.
Sensor Measurement Lists (SenML)
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.
Additional Units for Sensor Measurement Lists (SenML)
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.
Acknowledgements
Ari Keranen proposed to use the version number as a bitmap and
provided further input on this specification.
Author's Address
Universitaet Bremen TZI
Postfach 330440
Bremen
D-28359
Germany
+49-421-218-63921
cabo@tzi.org