Draft: draft-ietf-core-senml

Commentary: Added information & IANA considerations on how to define extensions  text to " base " and " regular " attributes Unified terminology Editorial fixes 
 I really like the reduction in repetitive boilerplate text that you have achieved here .
This is a string that is prepended to the names found in the
entries.  This attribute is optional.  This applies to the entries
in all Records.  A Base Name can only be included in the first
Record of the array.
A base time that is added to the time found in an entry.  This
attribute is optional.  This applies to the entries in all
Records.  A Base Time can only be included in the first Record of
the array.
A base unit that is assumed for all entries, unless otherwise
indicated.  This attribute is optional.  If a record does not
contain a unit value, then the base unit is used.  Otherwise the
value of found in the Unit is used.  This applies to the entries
in all Records.  A Base Unit can only be included in the first
object of the array.
A base value is added to the value found in an entry, similar to
Base Time.  This attribute is optional.  This applies to the
entries in all Records.  A Base Value can only be included in the
first Record of the array.
Version number of media type format.  This attribute is an
optional positive integer and defaults to 5 if not present.  A
Version can only be included in the first object of the array.
Note to RFC Editor.  Change the default value from to 100 when
this specification is published as an RFC and remove this note.
Each SenML Pack carries a single array that represents a set of
measurements and/or parameters.  This array contains a series of
SenML Records with several attributes described below.  There are two
kind of attributes: base and regular.  The base attributes can only
be included in the first SenML Record and they apply to the entries
in all Records.  All base attributes are optional.  Regular
attributes can be included in any SenML Record and apply only to that
Record.
This is a string that is prepended to the names found in the
entries.
A base time that is added to the time found in an entry.
A base unit that is assumed for all entries, unless otherwise
indicated.  If a record does not contain a unit value, then the
base unit is used.  Otherwise the value of found in the Unit is
used.
A base value is added to the value found in an entry, similar to
Base Time.
Version number of media type format.  This attribute is an
optional positive integer and defaults to 5 if not present.  Note
to RFC Editor.  Change the default value to 100 when this
specification is published as an RFC and remove this note.
Value of the entry.  Optional if a Sum value is present, otherwise
required.  Values are represented using three basic data types,
Floating point numbers ("v" field for "Value"), Booleans ("vb" for
"Boolean Value"), Strings ("vs" for "String Value") and Data ("vd"
for "Binary Data Value") .  Exactly one of these three fields MUST
appear unless there is Sum field in which case it is allowed to
have no Value field or to have "v" field.
Value of the entry.  Optional if a Sum value is present, otherwise
required.  Values are represented using three basic data types,
Floating point numbers ("v" field for "Value"), Booleans ("vb" for
"Boolean Value"), Strings ("vs" for "String Value") and Binary
Data ("vd" for "Data Value") .  Exactly one of these four fields
MUST appear unless there is Sum field in which case it is allowed
to have no Value field or to have "v" field.
The SenML format can be extended with further custom attributes.
TODO - describe what extensions are possible and how to do them.
The SenML format can be extended with further custom attributes.
Both new base and regular attributes are allowed.  See iana-senml-
label-registry for details.  Implementations MUST ignore attributes
they don't recognize.
The SenML labels (JSON object member names) shown in tbl-json-labels
are used in JSON SenML Record attributes.
Note that in some usage scenarios of SenML the implementations MAY
store or transmit SenML in a stream-like fashion, where data is
collected over time and continuously added to the object.  This mode
of operation is optional, but systems or protocols using SenML in
this fashion MUST specify that they are doing this.  SenML defines a
separate mime type (TODO) to indicate Sensor Streaming Markup
Language (SensML) for this usage.  In this situation the SensML
stream can be sent and received in a partial fashion, i.e., a
measurement entry can be read as soon as the SenML Record is received
and not have to wait for the full SensML Stream to be complete.
Note that in some usage scenarios of SenML the implementations MAY
store or transmit SenML in a stream-like fashion, where data is
collected over time and continuously added to the object.  This mode
of operation is optional, but systems or protocols using SenML in
this fashion MUST specify that they are doing this.  SenML defines a
separate media type to indicate Sensor Streaming Markup Language
(SensML) for this usage (see sec-senml-json).  In this situation the
SensML stream can be sent and received in a partial fashion, i.e., a
measurement entry can be read as soon as the SenML Record is received
and not have to wait for the full SensML Stream to be complete.
The SenML Stream is represented as a sensml tag that contains a
series of senml tags for each SenML Record.  The SenML Fields are
represents as XML attributes.  The following table shows the mapping
the SenML Field names to the attribute used in the XML senml tag.
The SenML Stream is represented as a sensml tag that contains a
series of senml tags for each SenML Record.  The SenML Fields are
represents as XML attributes.  The following table shows the mapping
of the SenML labels to the attribute names and types used in the XML
senml tags.
IANA will create a registry for SenML labels.  The initial content of
the registry are shown in TODO.
IANA will create a new registry for SenML labels.  The initial
content of the registry are shown in tbl-json-labels and tbl-xml-
labels.
All new SenML labels that have "base" semantics (see senml-base) must
start with character 'b'.  Regular labels must not start with that
character.
All new entries must define the Label Name, Label, JSON Type, and XML
Type.