One document matched: draft-groves-core-senml-bto-00.xml
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="rfc2629.xslt" ?>
<!-- generated by https://github.com/cabo/kramdown-rfc2629 version 1.0.36 -->
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
]>
<?rfc toc="yes"?>
<?rfc sortrefs="yes"?>
<?rfc symrefs="yes"?>
<rfc ipr="trust200902" docName="draft-groves-core-senml-bto-00" category="std">
<front>
<title abbrev="SenML BTO">SenML Base Time Offset Attribute</title>
<author initials="C." surname="Groves" fullname="Christian Groves">
<organization>Huawei</organization>
<address>
<postal>
<street></street>
<city></city>
<code></code>
<country>Australia</country>
</postal>
<email>Christian.Groves@nteczone.com</email>
</address>
</author>
<author initials="W." surname="Yang" fullname="Weiwei Yang">
<organization>Huawei</organization>
<address>
<postal>
<street></street>
<city></city>
<code></code>
<country>P.R.China</country>
</postal>
<email>tommy@huawei.com</email>
</address>
</author>
<date year="2016" month="October" day="17"/>
<area>art</area>
<workgroup>CoRE Working Group</workgroup>
<keyword>Internet-Draft</keyword>
<abstract>
<t>SenML <xref target="I-D.ietf-core-senml"/> defines a base time attribute and time value
which is used to determine the time when a value is recorded. In
some applications a SenML package will contain a series of records
related to a constant sample time interval, e.g. once every 60 seconds.
This means that the time attribute will be required for each record.
This document defines a new “time offset” base attribute that allows a
sender to include the time for the sample interval between records. If the “time offset” base attribute is used the sender will not send the time attribute for each record, minimising message and storage size.</t>
</abstract>
</front>
<middle>
<section anchor="introduction" title="Introduction">
<t>SenML currently defines the base time “bt” and time “t” attributes to indicate the time that each value in a SenML record is recorded. This means that for each record (value “v”) that a “t” attribute is required. The example from section 5.1.2/<xref target="I-D.ietf-core-senml"/> is copied below to illustrate a SenML package with multiple records.</t>
<figure title="SenML Package with multiple records" anchor="figmul"><artwork><![CDATA[
[ {"bn": "urn:dev:ow:10e2073a01080063",
"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>
<t>As can be seen in the example above there is a fixed offset between the data points of 10 seconds.</t>
<t>This document proposes a base time offset “bto” attribute that is used to indicate the offset between datapoints when a fixed offset is used. This negates the need to include the “t” attribute for each data point. The example below takes the above example and applies the base time offset to it.</t>
<figure title="SenML Package with multiple records using base time offset" anchor="figmulbto"><artwork><![CDATA[
[ {"bn": "urn:dev:ow:10e2073a01080063",
"bt": 1320067464,
“bto”: 10,
"bu": "%RH",
"v": 21.2},
{ "v": 21.3},
{ "v": 21.4},
{ "v": 21.4},
{ "v": 21.5},
{ "v": 21.5},
{ "v": 21.5},
{ "v": 21.6},
{ "v": 21.7},
{ "v": 21.5},
...
]]></artwork></figure>
<t>It can be seen that it results in a record and overall pack size reduction. The receiver of the record would use the base time “bt” for the initial data point, e.g. “v”: 21.2 would have a timestamp of 1320067464. Each subsequent record would have a time stamp equal to the previous record plus the base time offset “bto”, e.g. “v”: 21.3 would have a timestamp of 1320067474, “v”: 21.4 would have a timestamp of 1320067484, and so on.</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"></xref>.</t>
<t>See <xref target="I-D.ietf-core-senml"/> for further definitions.</t>
</section>
<section anchor="structure" title="SenML Structure and Semantics">
<section anchor="base-attributes" title="Base Attributes">
<t>This document adds an additional “base time offset” attribute.</t>
<t>Base Time Offset: The base time offset represents a fixed time offset between each record in a SenML pack. The first record represents time zero (or the base time if provided) and the offset is then applied to each subsequent record. Either a positive or negative base time offset is allowed.</t>
</section>
<section anchor="regular-attributes" title="Regular Attributes">
<t>This document modifies the behaviour of the time attribute.</t>
<t>Time: If the base time offset attribute is used in a SenML pack then the time attribute shall not be used in the individual records.</t>
<t><spanx style="emph">Editor’s note: One theoretical use case may be to include the time attribute if the entry’s time deviates from the regular offset. It is not seen that such a corner case warrants the extra complexity.</spanx></t>
</section>
<section anchor="considerations" title="Considerations">
<t>To simplify implementation, the use of base time offset is limited to:</t>
<t><list style="symbols">
<t>Fixed time increasing or decreasing records from the time stamp associated with the first record in the SenML pack. This means that usages such as described by the 2nd example in 5.1.2/<xref target="I-D.ietf-core-senml"/> where negative time offset from time zero being provided by the last record in a SenML pack are not possible.</t>
</list></t>
<t><spanx style="emph">Editor’s note: It could be possible to facilitate this use case by allowing a t=0 to be set on the last record with the use of a negative base time offset value. However again it’s not seen that such a corner case warrants the extra complexity in having to store values and calculate offsets at the end of transmission/reception.</spanx></t>
<t><list style="symbols">
<t>It is not possible to for two records in the SenML pack to have the same time. For example the inclusion of a record for a voltage measurement followed by a current measurement would result in the records having times with a difference of the time offset.</t>
</list></t>
</section>
</section>
<section anchor="senmljson" title="JSON Representation (application/senml+json)">
<t>This document defines an additional SenML label (JSON object member name) as shown in <xref target="jsonlabels"/> below.</t>
<texttable title="JSON SenML Labels" anchor="jsonlabels">
<ttcol align='left'>Name</ttcol>
<ttcol align='left'>label</ttcol>
<ttcol align='left'>Type</ttcol>
<c>Base Time Offset</c>
<c>bto</c>
<c>Numer</c>
</texttable>
</section>
<section anchor="senmlcbor" title="CBOR Representation (application/senml+cbor)">
<t>As per section 6/<xref target="I-D.ietf-core-senml"/>, for CBOR the string map key “bto” shall be used to indicate the use of the base time offset.</t>
</section>
<section anchor="senmlxml" title="XML representation (application/senml+xml)">
<t>This document defines an addition XML attribute as shown in <xref target="xmllabels"/> below.</t>
<texttable title="XML SenML Labels" anchor="xmllabels">
<ttcol align='left'>Name</ttcol>
<ttcol align='left'>XML</ttcol>
<ttcol align='left'>Type</ttcol>
<c>Base Time Offset</c>
<c>bto</c>
<c>double</c>
</texttable>
<t>The RelaxNG schema for the XML is:</t>
<figure><artwork><![CDATA[
senml = element senml {
attribute bn { xsd:string }?,
attribute bt { xsd:double }?,
attribute bv { xsd:double }?,
attribute bs { xsd:double }?,
attribute bu { xsd:string }?,
attribute bver { xsd:int }?,
attribute bto { xsd:double }?,
attribute l { xsd:string }?,
attribute n { xsd:string }?,
attribute s { xsd:double }?,
attribute t { xsd:double }?,
attribute u { xsd:string }?,
attribute ut { xsd:double }?,
attribute v { xsd:double }?,
attribute vb { xsd:boolean }?,
attribute vs { xsd:string }?,
attribute vd { xsd:string }?
}
sensml =
element sensml {
senml+
}
start = sensml
]]></artwork></figure>
</section>
<section anchor="senmlexi" title="EXI Representation (application/senml-exi)">
<t>As per clause 8/<xref target="I-D.ietf-core-senml"/> extensions are indicated through the use of an EXI schemaID options. The EXI schemaID options MUST be set to the value of “b” indicating the scheme provided in this specification.</t>
<t>The following is the XSD Schema to be used for strict schema guided EXI processing.</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:double" />
<xs:attribute name="bv" type="xs:double" />
<xs:attribute name="bu" type="xs:string" />
<xs:attribute name="bver" type="xs:int" />
<xs:attribute name="bto" type="xs:double" />
<xs:attribute name="l" type="xs:string" />
<xs:attribute name="n" type="xs:string" />
<xs:attribute name="s" type="xs:double" />
<xs:attribute name="t" type="xs:double" />
<xs:attribute name="u" type="xs:string" />
<xs:attribute name="ut" type="xs:double" />
<xs:attribute name="v" type="xs:double" />
<xs:attribute name="vb" type="xs:boolean" />
<xs:attribute name="vs" type="xs:string" />
<xs:attribute name="vd" type="xs:string" />
</xs:complexType>
</xs:element>
<xs:element name="sensml">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" ref="ns1:senml" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
]]></artwork></figure>
</section>
<section anchor="security-considerations" title="Security Considerations">
<t>No extra security issues are seen beyond those described in <xref target="I-D.ietf-core-senml"/>.</t>
</section>
<section anchor="iana-considerations" title="IANA Considerations">
<t>This document proposes one new entry in the IANA SenML label reegistry.</t>
<t>Label Name: Base Time Offset</t>
<t>Label: bto</t>
<t>CBOR: -</t>
<t>XML Type: Double</t>
<t>ID: b</t>
<t>Reference: This specification.</t>
</section>
<section anchor="acknowledgements" title="Acknowledgements">
<t>TBD</t>
</section>
</middle>
<back>
<references title='Normative References'>
<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='I-D.ietf-core-senml'>
<front>
<title>Media Types for Sensor Markup Language (SenML)</title>
<author initials='C' surname='Jennings' fullname='Cullen Jennings'>
<organization />
</author>
<author initials='Z' surname='Shelby' fullname='Zach Shelby'>
<organization />
</author>
<author initials='J' surname='Arkko' fullname='Jari Arkko'>
<organization />
</author>
<author initials='A' surname='Keranen' fullname='Ari Keranen'>
<organization />
</author>
<author initials='C' surname='Bormann' fullname='Carsten Bormann'>
<organization />
</author>
<date month='October' day='7' year='2016' />
<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>
<seriesInfo name='Internet-Draft' value='draft-ietf-core-senml-03' />
<format type='TXT'
target='http://www.ietf.org/internet-drafts/draft-ietf-core-senml-03.txt' />
</reference>
</references>
</back>
</rfc>
| PAFTECH AB 2003-2026 | 2026-04-24 07:15:38 |