idnits 2.17.1 draft-ietf-core-senml-more-units-05.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- No issues found here. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (February 19, 2020) is 1528 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) -- Possible downref: Non-RFC (?) normative reference: ref. 'IEC-80000-13' -- Possible downref: Non-RFC (?) normative reference: ref. 'IEC-80000-6' -- Possible downref: Non-RFC (?) normative reference: ref. 'IEEE-1459' == Outdated reference: A later version (-01) exists of draft-bormann-core-senml-versions-00 Summary: 0 errors (**), 0 flaws (~~), 2 warnings (==), 4 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Network Working Group C. Bormann 3 Internet-Draft Universitaet Bremen TZI 4 Intended status: Standards Track February 19, 2020 5 Expires: August 22, 2020 7 Additional Units for SenML 8 draft-ietf-core-senml-more-units-05 10 Abstract 12 The Sensor Measurement Lists (SenML) media type supports the 13 indication of units for a quantity represented. This short document 14 registers a number of additional unit names in the IANA registry for 15 Units in SenML. It also defines a registry for secondary units that 16 cannot be in SenML's main registry as they are derived by linear 17 transformation from units already in that registry. 19 Status of This Memo 21 This Internet-Draft is submitted in full conformance with the 22 provisions of BCP 78 and BCP 79. 24 Internet-Drafts are working documents of the Internet Engineering 25 Task Force (IETF). Note that other groups may also distribute 26 working documents as Internet-Drafts. The list of current Internet- 27 Drafts is at https://datatracker.ietf.org/drafts/current/. 29 Internet-Drafts are draft documents valid for a maximum of six months 30 and may be updated, replaced, or obsoleted by other documents at any 31 time. It is inappropriate to use Internet-Drafts as reference 32 material or to cite them other than as "work in progress." 34 This Internet-Draft will expire on August 22, 2020. 36 Copyright Notice 38 Copyright (c) 2020 IETF Trust and the persons identified as the 39 document authors. All rights reserved. 41 This document is subject to BCP 78 and the IETF Trust's Legal 42 Provisions Relating to IETF Documents 43 (https://trustee.ietf.org/license-info) in effect on the date of 44 publication of this document. Please review these documents 45 carefully, as they describe your rights and restrictions with respect 46 to this document. Code Components extracted from this document must 47 include Simplified BSD License text as described in Section 4.e of 48 the Trust Legal Provisions and are provided without warranty as 49 described in the Simplified BSD License. 51 Table of Contents 53 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 54 2. New Primary Units . . . . . . . . . . . . . . . . . . . . . . 3 55 2.1. Rationale . . . . . . . . . . . . . . . . . . . . . . . . 3 56 3. New Registry for Secondary Units . . . . . . . . . . . . . . 4 57 4. Operational Considerations . . . . . . . . . . . . . . . . . 6 58 5. Security Considerations . . . . . . . . . . . . . . . . . . . 7 59 6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 7 60 7. References . . . . . . . . . . . . . . . . . . . . . . . . . 7 61 7.1. Normative References . . . . . . . . . . . . . . . . . . 7 62 7.2. Informative References . . . . . . . . . . . . . . . . . 8 63 Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . . 8 64 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 9 66 1. Introduction 68 The Sensor Measurement Lists (SenML, [RFC8428]) media type supports 69 the indication of a unit, using the SenML field "u", for the quantity 70 given as a data value in a SenML record. For this purpose, SenML 71 defines an IANA registry of defined Unit names and their meanings; in 72 the present document, we call the Unit names registered there 73 "primary Unit names". 75 This short document registers a number of additional units in the 76 IANA registry for Units in SenML that appear to be necessary for 77 further adopting SenML in other Standards Development Organizations 78 (SDOs). 80 The document also defines a registry for secondary Unit names that 81 cannot be in SenML's main registry as they are derived by linear 82 transformation from units already in that registry. Although SenML 83 version 10 [RFC8428] does not provide for the direct use of these 84 secondary units, they are planned to be supported via the use of 85 SenML extension mechanisms, one of which is proposed in 86 [I-D.bormann-core-senml-versions]. 88 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 89 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 90 "OPTIONAL" in this document are to be interpreted as described in 91 BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all 92 capitals, as shown here. 94 2. New Primary Units 96 IANA is requested to assign new units in the "SenML Units" 97 subregistry of the SenML registry [IANA.senml] (as defined in 98 [RFC8428]): 100 +--------+--------------------------------------+-------+-----------+ 101 | Symbol | Description | Type | Reference | 102 +--------+--------------------------------------+-------+-----------+ 103 | B | Byte (information content) | float | RFCthis | 104 | VA | volt-ampere (Apparent Power) | float | RFCthis | 105 | VAs | volt-ampere second (Apparent Energy) | float | RFCthis | 106 | var | volt-ampere reactive (Reactive | float | RFCthis | 107 | | Power) | | | 108 | vars | volt-ampere reactive second | float | RFCthis | 109 | | (Reactive Energy) | | | 110 | J/m | joule per meter (Energy per | float | RFCthis | 111 | | distance) | | | 112 | kg/m3 | kilogram per cubic meter (mass | float | RFCthis | 113 | | density, mass concentration) | | | 114 | deg | degree (angle)* | float | RFCthis | 115 +--------+--------------------------------------+-------+-----------+ 117 Table 1: New units registered for SenML 119 2.1. Rationale 121 SenML [RFC8428] takes the position that unscaled SI units should 122 always be used. However, SenML makes one exception: The degree 123 Celsius (as Cel) is allowed as an alternative to the K (Kelvin). 125 This document takes the position that the same should apply to a 126 small number of alternative units in wide use: 128 o The Byte. [IEC-80000-13] defines both the bit (item 13-9.b) and 129 the byte (item 13-9.c, also called octet) as alternative names for 130 the coherent unit one for the purpose of giving storage capacity 131 and related quantities. While the name octet is associated with 132 the symbol o, this is in wide use only in French-speaking 133 countries. Globally more wide-spread is the symbol B for byte, 134 even though B is already taken in SI for bel. [RFC8428] therefore 135 registers dB as the SenML unit for logarithmic relative power, 136 leaving B free for the usage proposed here. While this is 137 potentially confusing, the situation is widely understood in 138 engineering circles and is unlikely to cause actual problems. 140 o The Volt-Ampere. [IEC-80000-6]} item 6-57.a defines the VA (volt 141 ampere) as a unit for apparent power; items 6-59.a, 6-60.a and 142 6-61.a also use the unit for complex, reactive, and non-active 143 power. 145 o The Volt-Ampere-reactive. [IEC-80000-6] item 6-60.b defines the 146 var (volt ampere reactive) as an alternative (and fully 147 equivalent) unit to VA specifically for reactive power (with the 148 primary unit VA); it has become clear that there is strong 149 interest in using this unit specifically for the imaginary content 150 of complex power, i.e., reactive power [IEEE-1459]. 152 The unit "degrees" is in wide use in practice for plane angles (as in 153 heading, bearing, etc.). It is marked with an asterisk because the 154 preferred coherent SI unit is radian ("rad"). 156 The Joule per meter is not a traditional electromagnetic unit. It 157 and its scaled derivatives (in particular Wh/km) are used to describe 158 the energy expended for achieving motion over a given distance, e.g., 159 as an equivalent for electrical cars of the inverse of "mileage". 161 3. New Registry for Secondary Units 163 IANA is requested to create a "secondary units" subregistry in the 164 SenML registry [IANA.senml] defined in [RFC8428]. 166 The registry has six columns: 168 o secondary unit: a newly registered name allocated within the same 169 namespace as SenML units 171 o description: short description (usually just expansion of 172 abbreviation) 174 o SenML unit: an existing SenML unit from the SenML units registry 176 o scale, offset: two rational numbers, expressed in decimal 177 (optionally, with a decimal exponent given) or as a fraction 178 divided by a "/" character. 180 o Reference: where does the entry come from. 182 Quantities expressed in the secondary unit can be converted into the 183 SenML unit by first multiplying their value with the scale number and 184 then adding the offset, yielding the value in the given SenML unit. 186 The initial content of the secondary units registry is provided in 187 Table 2: 189 +-----------+-------------------+-------+-----------+-----+---------+ 190 | secondary | description | SenML | scale | off | refer- | 191 | unit | | unit | | set | ence | 192 +-----------+-------------------+-------+-----------+-----+---------+ 193 | ms | millisecond | s | 1/1000 | 0 | RFCthis | 194 | min | minute | s | 60 | 0 | RFCthis | 195 | h | hour | s | 3600 | 0 | RFCthis | 196 | kW | kilowatt | W | 1000 | 0 | RFCthis | 197 | kVA | kilovolt-ampere | VA | 1000 | 0 | RFCthis | 198 | kvar | kilovar | var | 1000 | 0 | RFCthis | 199 | Ah | ampere-hour | C | 3600 | 0 | RFCthis | 200 | Wh | watt-hour | J | 3600 | 0 | RFCthis | 201 | kWh | kilowatt-hour | J | 3600000 | 0 | RFCthis | 202 | varh | var-hour | vars | 3600 | 0 | RFCthis | 203 | kvarh | kilovar-hour | vars | 3600000 | 0 | RFCthis | 204 | kVAh | kilovolt-ampere- | VAs | 3600000 | 0 | RFCthis | 205 | | hour | | | | | 206 | Wh/km | watt-hour per | J/m | 3.6 | 0 | RFCthis | 207 | | kilometer | | | | | 208 | KiB | kibibyte | B | 1024 | 0 | RFCthis | 209 | GB | gigabyte | B | 1e9 | 0 | RFCthis | 210 | Mbit/s | megabit per | bit/s | 1000000 | 0 | RFCthis | 211 | | second | | | | | 212 | MB/s | megabyte per | bit/s | 8000000 | 0 | RFCthis | 213 | | second | | | | | 214 | mV | millivolt | V | 1/1000 | 0 | RFCthis | 215 | mA | milliampere | A | 1/1000 | 0 | RFCthis | 216 | dBm | decibel | dBW | 1 | -30 | RFCthis | 217 | | (milliwatt) | | | | | 218 | ug/m3 | microgram per | kg/m3 | 1e-9 | 0 | RFCthis | 219 | | cubic meter | | | | | 220 | mm/h | millimeter per | m/s | 1/3600000 | 0 | RFCthis | 221 | | hour | | | | | 222 | m/h | meter per hour | m/s | 1/3600 | 0 | RFCthis | 223 | ppm | parts per million | / | 1e-6 | 0 | RFCthis | 224 | /100 | percent (Note 1) | / | 1/100 | 0 | RFCthis | 225 | /1000 | permille | / | 1/1000 | 0 | RFCthis | 226 | hPa | hectopascal | Pa | 100 | 0 | RFCthis | 227 | mm | millimeter | m | 1/1000 | 0 | RFCthis | 228 | cm | centimeter | m | 1/100 | 0 | RFCthis | 229 | km | kilometer | m | 1000 | 0 | RFCthis | 230 | km/h | kilometer per | m/s | 1/3.6 | 0 | RFCthis | 231 | | hour | | | | | 232 +-----------+-------------------+-------+-----------+-----+---------+ 234 Table 2: Secondary units registered for SenML 236 Note 1: This registration does not use the obvious name "%" because 237 this name has been taken in [RFC8428] already, where it is a NOT 238 RECOMMENDED synonym for "/" (unity) for legacy reasons. Note that 239 the presence of both "%" and "/100" with different meanings is likely 240 to create confusion, so the present document adds some weight to the 241 recommendation against using the counterintuitive unit name "%". 243 Example: the value of a quantity given as 100 ms is first multiplied 244 by 1/1000, yielding the number 0.1, and then the offset 0 is added, 245 yielding the number 0.1 again, leading to a quantity of 0.1 s. The 246 value of a quantity given as 10 dBm is first multiplied by 1, 247 yielding the number 10, and then the offset -30 is added, yielding 248 the number -20, leading to a quantity of -20 dBW. 250 New entries can be added to the registration by Expert Review as 251 defined in [RFC8126]. Experts should exercise their own good 252 judgment, with the same guidelines as used for SenML units 253 (Section 12.1 of [RFC8428]), but without applying the rules 4, 5, and 254 8. Note that rule 7 limits the use of what could be understood as 255 prefixes on their own, not the use of prefixes inside secondary unit 256 names. Guidelines to the difference between units (which can go into 257 the registry) and quantities (which cannot) are widely available, see 258 for instance [RS] and [BIPM]. 260 As of SenML version 10 [RFC8428], SenML packs are limited to using 261 primary units in "u" fields. The use of primary units enables direct 262 comparison of measurements from different sources. Also, it 263 facilitates implementations that trigger on the presence of a 264 quantity in a certain unit, without the need to track any additional 265 secondary units that may be registered for this quantity. 267 Where the benefits of directly using a secondary unit in a SenML pack 268 outweigh the above considerations, the use of secondary units in "u" 269 fields MAY be enabled by indicating a new SenML version that 270 specifically allows this and/or by using a field with a label name 271 that ends with the "_" character ("must-understand" field) whose 272 definition specifically allows this. The definition of these 273 versions and fields is outside the scope of the present 274 specification; one such definition is proposed in 275 [I-D.bormann-core-senml-versions]. 277 4. Operational Considerations 279 The secondary unit registry is expected to grow at a faster pace than 280 the registry of primary unit names. It also is amenable to automatic 281 interpretation, by making use of the scale and offset columns. 283 Implementers may be tempted to equip each instance of their systems 284 with code to download new versions of the registry from IANA 285 frequently, in order to be able to make use of newly defined 286 secondary unit names. This can create high load at IANA and a 287 potential single point of failure. Instead of pulling the registry 288 in each individual instance of the code, the software update 289 mechanism (or a similar mechanism visiting IANA less frequently) 290 SHOULD be used to disseminate updated units registries obtained from 291 IANA towards the instances via common repositories. 293 5. Security Considerations 295 The security considerations of [RFC8428] apply. 297 The introduction of new measurement units poses no additional 298 security considerations except from a possible potential for 299 additional confusion about the proper unit to use, and from the risk 300 that an implementation based on the assumption described in the 301 penultimate paragraph of Section 3 no longer works properly. 302 However, an implementation processing a pack while making use of 303 secondary units is guaranteed to have been developed with an 304 awareness of the risks of having multiple units available for the 305 same logical type. In any case, the existing risk of an existing 306 SenML implementation not understanding a unit that was not in the 307 initial registry content provided in [RFC8428], is unchanged, and 308 implementations are warned properly about the potential use of 309 secondary units by the need for a must-understand field or an updated 310 version field. 312 6. IANA Considerations 314 See Section 2 and Section 3. 316 7. References 318 7.1. Normative References 320 [IANA.senml] 321 IANA, "Sensor Measurement Lists (SenML)", 322 . 324 [IEC-80000-13] 325 "Quantities and units - Part 13: Information science and 326 technology", IEC 80000-13, Edition 1.0, March 2008. 328 [IEC-80000-6] 329 "Quantities and units - Part 6: Electromagnetism", 330 IEC 80000-6, Edition 1.0, March 2008. 332 [IEEE-1459] 333 "IEEE Standard Definitions for the Measurement of Electric 334 Power Quantities Under Sinusoidal, Nonsinusoidal, 335 Balanced, or Unbalanced Conditions", IEEE Std 1459-2010, 336 March 2010. 338 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 339 Requirement Levels", BCP 14, RFC 2119, 340 DOI 10.17487/RFC2119, March 1997, 341 . 343 [RFC8126] Cotton, M., Leiba, B., and T. Narten, "Guidelines for 344 Writing an IANA Considerations Section in RFCs", BCP 26, 345 RFC 8126, DOI 10.17487/RFC8126, June 2017, 346 . 348 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 349 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 350 May 2017, . 352 [RFC8428] Jennings, C., Shelby, Z., Arkko, J., Keranen, A., and C. 353 Bormann, "Sensor Measurement Lists (SenML)", RFC 8428, 354 DOI 10.17487/RFC8428, August 2018, 355 . 357 7.2. Informative References 359 [BIPM] Bureau International des Poids es Mesures, "The 360 International System of Units (SI), 9th edition", 2019, 361 . 364 [I-D.bormann-core-senml-versions] 365 Bormann, C., "SenML: Features and Versions", draft- 366 bormann-core-senml-versions-00 (work in progress), 367 February 2020. 369 [RS] Rohde&Schwarz, "Standard-compliant usage of quantities, 370 units and equations", version 4.0, November 2016, 371 . 375 Acknowledgements 377 Ari Keranen pointed out the need for additional units in SenML. 378 Comments provided by him as well as by Thomas Fossati, Joaquin Prado, 379 Jaime Jimenez, Benjamin Kaduk, and Rob Wilton helped improve the 380 document. 382 Author's Address 384 Carsten Bormann 385 Universitaet Bremen TZI 386 Postfach 330440 387 Bremen D-28359 388 Germany 390 Phone: +49-421-218-63921 391 Email: cabo@tzi.org