Network Working Group | C. Bormann |
Internet-Draft | Universitaet Bremen TZI |
Updates: 8428 (if approved) | October 12, 2019 |
Intended status: Standards Track | |
Expires: April 14, 2020 |
Additional Units for SenML
draft-ietf-core-senml-more-units-02
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; RFC 8428 is updated to also accept these units.
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 https://datatracker.ietf.org/drafts/current/.
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 April 14, 2020.
Copyright (c) 2019 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 (https://trustee.ietf.org/license-info) 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.
The Sensor Measurement Lists (SenML, [RFC8428]) media type supports the indication of a unit, using the SenML field “u”, for the quantity given as a data value in a SenML record. For this purpose, SenML defines an IANA registry of defined Unit names and their meanings; in the present document, we call the Unit names registered there “primary Unit names”.
This short document registers a number of additional units in the IANA registry for Units in SenML that appear to be necessary for further adopting SenML in other Standards Development Organizations (SDOs).
The document also defines a registry for secondary Unit names that cannot be in SenML’s main registry as they are derived by linear transformation from units already in that registry. [RFC8428] is updated to also accept these secondary Unit names in place of the (primary) Unit names defined in [RFC8428].
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 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here.
IANA is requested to assign new units in the “SenML Units” subregistry of the SenML registry [IANA.senml] (as defined in [RFC8428]):
Symbol | Description | Type | Reference |
---|---|---|---|
B | Byte (information content) | float | RFCthis |
VA | volt-ampere (Apparent Power) | float | RFCthis |
VAs | volt-ampere seconds (Apparent Energy) | float | RFCthis |
var | volt-ampere reactive (Reactive Power) | float | RFCthis |
vars | volt-ampere reactive seconds (Reactive Energy) | float | RFCthis |
J/m | joule per meter (Energy per distance) | float | RFCthis |
kg/m3 | kilograms per cubic meter (mass concentration) | float | RFCthis |
deg | degrees (angle)* | float | RFCthis |
SenML [RFC8428] takes the position that unscaled SI units should always be used. However, SenML makes one exception: The degree Celsius (as Cel) is allowed as an alternative to the K (Kelvin).
This document takes the position that the same should apply to a small number of alternative units in wide use:
The unit “degrees” is in wide use in practice for plane angles (as in heading, bearing, etc.). It is marked with an asterisk because the preferred coherent SI unit is radian (“rad”).
The Joule per meter is not a traditional electromagnetic unit. It and its scaled derivatives (in particular Wh/km) are used to describe the energy expended for achieving motion over a given distance, e.g., as an equivalent for electrical cars of the inverse of “mileage”.
IANA is requested to create a “secondary units” subregistry in the SenML registry [IANA.senml] defined in [RFC8428].
The registry has six columns:
Quantities expressed in the secondary unit can be converted into the SenML unit by first multiplying their value with the scale number and then adding the offset, yielding the value in the given SenML unit.
The initial content of the secondary units registry is provided in Table 2:
secondary unit | description | SenML unit | scale | off set | refer- ence |
---|---|---|---|---|---|
ms | millisecond | s | 1/1000 | 0 | RFCthis |
min | minute | s | 60 | 0 | RFCthis |
h | hour | s | 3600 | 0 | RFCthis |
kW | kilowatt | W | 1000 | 0 | RFCthis |
kVA | kilovolt-ampere | VA | 1000 | 0 | RFCthis |
kvar | kilovar | var | 1000 | 0 | RFCthis |
Ah | ampere-hour | C | 3600 | 0 | RFCthis |
Wh | watt-hour | J | 3600 | 0 | RFCthis |
kWh | kilowatt-hour | J | 3600000 | 0 | RFCthis |
varh | var-hour | vars | 3600 | 0 | RFCthis |
kvarh | kilovar-hour | vars | 3600000 | 0 | RFCthis |
kVAh | kilovolt-ampere-hour | VAs | 3600000 | 0 | RFCthis |
Wh/km | watts-hour per kilometer | J/m | 3.6 | 0 | RFCthis |
KiB | kibibyte | B | 1024 | 0 | RFCthis |
mV | millivolt | V | 1/1000 | 0 | RFCthis |
mA | milliampere | A | 1/1000 | 0 | RFCthis |
dBm | decibel (milliwatt) | dBW | 1 | -30 | RFCthis |
ug/m3 | micrograms per cubic meter | kg/m3 | 1e-9 | 0 | RFCthis |
mm/h | millimeter per hour | m/s | 1/3600000 | 0 | RFCthis |
ppm | parts per million | / | 1e-6 | 0 | RFCthis |
hPa | hectopascal | Pa | 100 | 0 | RFCthis |
mm | millimeter | m | 1/1000 | 0 | RFCthis |
km | kilometer | km | 1000 | 0 | RFCthis |
km/h | kilometer per hour | m/s | 1/3.6 | 0 | RFCthis |
Example: the value of a quantity given as 100 ms is first multiplied by 1/1000, yielding the number 0.1, and then the offset 0 is added, yielding the number 0.1 again, leading to a quantity of 0.1 s. The value of a quantity given as 10 dBm is first multiplied by 1, yielding the number 10, and then the offset -30 is added, yielding the number -20, leading to a quantity of -20 dBW.
New entries can be added to the registration by Expert Review as defined in [RFC8126]. Experts should exercise their own good judgment, with the same guidelines as used for SenML units (Section 12.1 of [RFC8428]), but without applying the rules 4 and 5. Guidelines to the difference between units (which can go into the registry) and quantities are widely available, see for instance [RS] and [BIPM].
SenML packs MAY, but SHOULD NOT, use secondary units in place of SenML units, where the exception of the “SHOULD NOT” lies in the context of specific existing data models that are based on these secondary units.
The security considerations of [RFC8428] apply. The introduction of new measurement units poses no additional security considerations except from a possible potential for additional confusion about the proper unit to use.
Ari Keranen pointed out the need for additional units in SenML. Comments provided by him as well as by Thomas Fossati, Joaquin Prado, and Jaime Jimenez helped improve the document.
[BIPM] | Bureau International des Poids es Mesures, "The International System of Units (SI), 9th edition", 2019. |
[RS] | Rohde&Schwarz, "Standard-compliant usage of quantities, units and equations", version 4.0, November 2016. |