draft-ietf-core-interfaces-11.txt | draft-ietf-core-interfaces-12.txt | |||
---|---|---|---|---|
CoRE Working Group Z. Shelby | CoRE Working Group Z. Shelby | |||
Internet-Draft ARM | Internet-Draft ARM | |||
Intended status: Informational M. Vial | Intended status: Informational M. Koster | |||
Expires: September 6, 2018 Schneider-Electric | Expires: December 29, 2018 SmartThings | |||
M. Koster | ||||
SmartThings | ||||
C. Groves | C. Groves | |||
J. Zhu | J. Zhu | |||
Huawei | Huawei | |||
B. Silverajan, Ed. | B. Silverajan, Ed. | |||
Tampere University of Technology | Tampere University of Technology | |||
March 05, 2018 | June 27, 2018 | |||
Reusable Interface Definitions for Constrained RESTful Environments | Reusable Interface Definitions for Constrained RESTful Environments | |||
draft-ietf-core-interfaces-11 | draft-ietf-core-interfaces-12 | |||
Abstract | Abstract | |||
This document defines a set of Constrained RESTful Environments | This document defines a set of Constrained RESTful Environments | |||
(CoRE) Link Format Interface Descriptions [RFC6690] applicable for | (CoRE) Link Format Interface Descriptions [RFC6690] applicable for | |||
use in constrained environments. These include the: Actuator, | use in constrained environments. These include the: Actuator, | |||
Parameter, Read-only parameter, Sensor, Batch, Linked Batch and Link | Parameter, Read-only parameter, Sensor, Batch, Linked Batch and Link | |||
List interfaces. | List interfaces. | |||
The Batch, Linked Batch and Link List interfaces make use of resource | The Batch, Linked Batch and Link List interfaces make use of resource | |||
collections. This document further describes how collections relate | collections. This document further describes how collections relate | |||
to interfaces. | to interfaces. | |||
Many applications require a set of interface descriptions in order | Many applications require a set of interface descriptions in order | |||
provide the required functionality. This document defines an | provide the required functionality. This document defines an | |||
Interface Description atribute value to describe resources conforming | Interface Description attribute value to describe resources | |||
to a particular interface. | conforming to a particular interface. | |||
Editor's notes: | Editor's notes: | |||
o The git repository for the draft is found at https://github.com/ | o The git repository for the draft is found at https://github.com/ | |||
core-wg/interfaces | core-wg/interfaces | |||
Status of This Memo | Status of This Memo | |||
This Internet-Draft is submitted in full conformance with the | This Internet-Draft is submitted in full conformance with the | |||
provisions of BCP 78 and BCP 79. | provisions of BCP 78 and BCP 79. | |||
skipping to change at page 2, line 12 ¶ | skipping to change at page 2, line 10 ¶ | |||
Internet-Drafts are working documents of the Internet Engineering | Internet-Drafts are working documents of the Internet Engineering | |||
Task Force (IETF). Note that other groups may also distribute | Task Force (IETF). Note that other groups may also distribute | |||
working documents as Internet-Drafts. The list of current Internet- | working documents as Internet-Drafts. The list of current Internet- | |||
Drafts is at https://datatracker.ietf.org/drafts/current/. | Drafts is at https://datatracker.ietf.org/drafts/current/. | |||
Internet-Drafts are draft documents valid for a maximum of six months | Internet-Drafts are draft documents valid for a maximum of six months | |||
and may be updated, replaced, or obsoleted by other documents at any | and may be updated, replaced, or obsoleted by other documents at any | |||
time. It is inappropriate to use Internet-Drafts as reference | time. It is inappropriate to use Internet-Drafts as reference | |||
material or to cite them other than as "work in progress." | material or to cite them other than as "work in progress." | |||
This Internet-Draft will expire on September 6, 2018. | This Internet-Draft will expire on December 29, 2018. | |||
Copyright Notice | Copyright Notice | |||
Copyright (c) 2018 IETF Trust and the persons identified as the | Copyright (c) 2018 IETF Trust and the persons identified as the | |||
document authors. All rights reserved. | document authors. All rights reserved. | |||
This document is subject to BCP 78 and the IETF Trust's Legal | This document is subject to BCP 78 and the IETF Trust's Legal | |||
Provisions Relating to IETF Documents | Provisions Relating to IETF Documents | |||
(https://trustee.ietf.org/license-info) in effect on the date of | (https://trustee.ietf.org/license-info) in effect on the date of | |||
publication of this document. Please review these documents | publication of this document. Please review these documents | |||
carefully, as they describe your rights and restrictions with respect | carefully, as they describe your rights and restrictions with respect | |||
to this document. Code Components extracted from this document must | to this document. Code Components extracted from this document must | |||
include Simplified BSD License text as described in Section 4.e of | include Simplified BSD License text as described in Section 4.e of | |||
the Trust Legal Provisions and are provided without warranty as | the Trust Legal Provisions and are provided without warranty as | |||
described in the Simplified BSD License. | described in the Simplified BSD License. | |||
Table of Contents | Table of Contents | |||
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 | 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 | |||
2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 4 | 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 4 | |||
3. Collections . . . . . . . . . . . . . . . . . . . . . . . . . 5 | 3. Collections . . . . . . . . . . . . . . . . . . . . . . . . . 4 | |||
3.1. Introduction to Collections . . . . . . . . . . . . . . . 5 | 3.1. Introduction to Collections . . . . . . . . . . . . . . . 5 | |||
3.2. Use Cases for Collections . . . . . . . . . . . . . . . . 5 | 3.2. Use Cases for Collections . . . . . . . . . . . . . . . . 5 | |||
3.3. Content-Formats for Collections . . . . . . . . . . . . . 6 | 3.3. Collection Types . . . . . . . . . . . . . . . . . . . . 6 | |||
3.4. Link Embedding . . . . . . . . . . . . . . . . . . . . . 6 | 3.4. Content-Formats for Collections . . . . . . . . . . . . . 6 | |||
3.5. Links and Items in Collections . . . . . . . . . . . . . 7 | 3.5. Link Embedding . . . . . . . . . . . . . . . . . . . . . 7 | |||
3.6. Queries on Collections . . . . . . . . . . . . . . . . . 8 | 3.6. Links and Items in Collections . . . . . . . . . . . . . 7 | |||
3.7. Observing Collections . . . . . . . . . . . . . . . . . . 8 | 3.7. Queries on Collections . . . . . . . . . . . . . . . . . 8 | |||
3.8. Collection Types . . . . . . . . . . . . . . . . . . . . 8 | 3.8. Observing Collections . . . . . . . . . . . . . . . . . . 8 | |||
4. Interface Descriptions . . . . . . . . . . . . . . . . . . . 9 | 4. Interface Descriptions . . . . . . . . . . . . . . . . . . . 9 | |||
4.1. Link List . . . . . . . . . . . . . . . . . . . . . . . . 11 | 4.1. Link List . . . . . . . . . . . . . . . . . . . . . . . . 11 | |||
4.2. Batch . . . . . . . . . . . . . . . . . . . . . . . . . . 11 | 4.2. Batch . . . . . . . . . . . . . . . . . . . . . . . . . . 11 | |||
4.3. Linked Batch . . . . . . . . . . . . . . . . . . . . . . 12 | 4.3. Linked Batch . . . . . . . . . . . . . . . . . . . . . . 12 | |||
4.4. Sensor . . . . . . . . . . . . . . . . . . . . . . . . . 13 | 4.4. Sensor . . . . . . . . . . . . . . . . . . . . . . . . . 13 | |||
4.5. Parameter . . . . . . . . . . . . . . . . . . . . . . . . 14 | 4.5. Parameter . . . . . . . . . . . . . . . . . . . . . . . . 14 | |||
4.6. Read-only Parameter . . . . . . . . . . . . . . . . . . . 14 | 4.6. Read-only Parameter . . . . . . . . . . . . . . . . . . . 14 | |||
4.7. Actuator . . . . . . . . . . . . . . . . . . . . . . . . 14 | 4.7. Actuator . . . . . . . . . . . . . . . . . . . . . . . . 14 | |||
5. Security Considerations . . . . . . . . . . . . . . . . . . . 15 | 5. Security Considerations . . . . . . . . . . . . . . . . . . . 15 | |||
6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 15 | 6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 15 | |||
6.1. Link List . . . . . . . . . . . . . . . . . . . . . . . . 15 | 6.1. Link List . . . . . . . . . . . . . . . . . . . . . . . . 15 | |||
6.2. Batch . . . . . . . . . . . . . . . . . . . . . . . . . . 16 | 6.2. Batch . . . . . . . . . . . . . . . . . . . . . . . . . . 16 | |||
6.3. Linked Batch . . . . . . . . . . . . . . . . . . . . . . 16 | 6.3. Linked Batch . . . . . . . . . . . . . . . . . . . . . . 16 | |||
6.4. Sensor . . . . . . . . . . . . . . . . . . . . . . . . . 16 | 6.4. Sensor . . . . . . . . . . . . . . . . . . . . . . . . . 16 | |||
6.5. Parameter . . . . . . . . . . . . . . . . . . . . . . . . 16 | 6.5. Parameter . . . . . . . . . . . . . . . . . . . . . . . . 16 | |||
6.6. Read-only parameter . . . . . . . . . . . . . . . . . . . 17 | 6.6. Read-only parameter . . . . . . . . . . . . . . . . . . . 17 | |||
6.7. Actuator . . . . . . . . . . . . . . . . . . . . . . . . 17 | 6.7. Actuator . . . . . . . . . . . . . . . . . . . . . . . . 17 | |||
7. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 17 | 7. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 17 | |||
8. Changelog . . . . . . . . . . . . . . . . . . . . . . . . . . 18 | 8. Contributors . . . . . . . . . . . . . . . . . . . . . . . . 18 | |||
9. References . . . . . . . . . . . . . . . . . . . . . . . . . 21 | 9. Changelog . . . . . . . . . . . . . . . . . . . . . . . . . . 18 | |||
9.1. Normative References . . . . . . . . . . . . . . . . . . 21 | 10. References . . . . . . . . . . . . . . . . . . . . . . . . . 21 | |||
9.2. Informative References . . . . . . . . . . . . . . . . . 21 | 10.1. Normative References . . . . . . . . . . . . . . . . . . 21 | |||
Appendix A. Current Usage of Interfaces and Function Sets . . . 23 | 10.2. Informative References . . . . . . . . . . . . . . . . . 22 | |||
Appendix A. Current Usage of Interfaces . . . . . . . . . . . . 23 | ||||
A.1. Constrained RESTful Environments (CoRE) Link Format | A.1. Constrained RESTful Environments (CoRE) Link Format | |||
(IETF) . . . . . . . . . . . . . . . . . . . . . . . . . 23 | (IETF) . . . . . . . . . . . . . . . . . . . . . . . . . 23 | |||
A.2. CoRE Resource Directory (IETF) . . . . . . . . . . . . . 23 | A.2. Open Connectivity Foundation (OCF) . . . . . . . . . . . 23 | |||
A.3. Open Connectivity Foundation (OCF) . . . . . . . . . . . 23 | Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 24 | |||
A.4. oneM2M . . . . . . . . . . . . . . . . . . . . . . . . . 24 | ||||
A.5. OMA LWM2M . . . . . . . . . . . . . . . . . . . . . . . . 25 | ||||
Appendix B. Resource Profile example . . . . . . . . . . . . . . 25 | ||||
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 26 | ||||
1. Introduction | 1. Introduction | |||
IETF Standards for machine to machine communication in constrained | IETF Standards for machine to machine communication in constrained | |||
environments describe a REST protocol and a set of related | environments describe a REST protocol and a set of related | |||
information standards that may be used to represent machine data and | information standards that may be used to represent machine data and | |||
machine metadata in REST interfaces. CoRE Link-format is a standard | machine metadata in REST interfaces. CoRE Link-format is a standard | |||
for doing Web Linking [RFC8288] in constrained environments. SenML | for doing Web Linking [RFC8288] in constrained environments. SenML | |||
[I-D.ietf-core-senml] is a simple data model and representation | [I-D.ietf-core-senml] is a simple data model and representation | |||
format for composite and complex structured resources. CoRE Link- | format for composite and complex structured resources. CoRE Link- | |||
skipping to change at page 5, line 28 ¶ | skipping to change at page 5, line 25 ¶ | |||
This document uses the concept of "collection" and applies it to | This document uses the concept of "collection" and applies it to | |||
interface descriptions. A collection interface description consists | interface descriptions. A collection interface description consists | |||
of a set of links and a set of items pointed to by the links which | of a set of links and a set of items pointed to by the links which | |||
may be sub-resources of the collection resource. The collection | may be sub-resources of the collection resource. The collection | |||
interface descriptions described in this document are Link List, | interface descriptions described in this document are Link List, | |||
Batch and Linked Batch. | Batch and Linked Batch. | |||
The links in a collection are represented in CoRE Link-Format | The links in a collection are represented in CoRE Link-Format | |||
Content-Formats including JSON and CBOR variants, and the items in | Content-Formats including JSON and CBOR variants, and the items in | |||
the collection may be represented by senml, including JSON and CBOR | the collection may be represented by SenML, including JSON and CBOR | |||
variants. In general, a collection may support items of any | variants. In general, a collection may support items of any | |||
available Content-Format. | available Content-Format. | |||
A particular resource item may be a member of more than one | A particular resource item may be a member of more than one | |||
collection at a time by being linked to, but may only be a | collection at a time by being linked to, but may only be a | |||
subresource of one collection. | subresource of one collection. | |||
Some collections may have pre-configured items and links, and some | Some collections may have pre-configured items and links, and some | |||
collections may support dynamic creation and removal of items and | collections may support dynamic creation and removal of items and | |||
links. Likewise, modification of items in some collections may be | links. Likewise, modification of items in some collections may be | |||
skipping to change at page 6, line 16 ¶ | skipping to change at page 6, line 16 ¶ | |||
state update or actuation. For example, the brightness control | state update or actuation. For example, the brightness control | |||
resources of a number of luminaries may be grouped by linking to them | resources of a number of luminaries may be grouped by linking to them | |||
in a collection. The collection type may support receiving a single | in a collection. The collection type may support receiving a single | |||
update from a client and sending that update to each resource item in | update from a client and sending that update to each resource item in | |||
the collection. | the collection. | |||
Items may be sub-resources of the collection resource. This enables | Items may be sub-resources of the collection resource. This enables | |||
updates to multiple items in the collection to be processed together | updates to multiple items in the collection to be processed together | |||
within the context of the collection resource. | within the context of the collection resource. | |||
3.3. Content-Formats for Collections | 3.3. Collection Types | |||
The collection interfaces by default use CoRE Link-Format for the | There are three collection types defined in this document: | |||
link representations and SenML or text/plain for representations of | ||||
items. The examples given are for collections that expose resources | +-----------------+---------+ | |||
and links in these formats. In addition, a new "collection" Content- | | Collection Type | if= | | |||
Format is defined based on the SenML framework which represents both | +-----------------+---------+ | |||
links and items in the collection. | | Link List | core.ll | | |||
| | | | ||||
| Batch | core.b | | ||||
| | | | ||||
| Linked Batch | core.lb | | ||||
+-----------------+---------+ | ||||
Table 1: Collection Type Summary | ||||
The interface description defined in this document offer a deeper | ||||
explanation of the methods that may be applied to the three | ||||
collections. | ||||
3.4. Content-Formats for Collections | ||||
The collection interfaces can use the CoRE Link-Format for the link | ||||
representations and SenML or text/plain for representations of items. | ||||
The examples given are for collections that expose resources and | ||||
links in these formats. | ||||
The choice of whether to return a representation of the links or of | The choice of whether to return a representation of the links or of | |||
the items or of the collection format is determined by the Accept | the items or of the collection format is determined by the Accept | |||
header option in the request. Likewise, the choice of updating link | header option in the request. Likewise, the choice of updating link | |||
metadata or item data or the collection resource itself is determined | metadata or item data or the collection resource itself is determined | |||
by the Content-Format option in the header of the update request | by the Content-Format option in the header of the update request | |||
operation. | operation. | |||
The default Content-Formats for collection types described in this | The default Content-Formats for collection types described in this | |||
document are: | document are: | |||
Links: application/link-format, application/link-format+json | Links: application/link-format, application/link-format+json | |||
Items: application/senml+json, text/plain | Items: application/senml+json, text/plain | |||
3.4. Link Embedding | 3.5. Link Embedding | |||
Collections may provide resource encapsulation by supporting link | Collections may provide resource encapsulation by supporting link | |||
embedding. Link embedding may be used to provide a single resource | embedding. Link embedding may be used to provide a single resource | |||
with which a client may interact to obtain a set of related resource | with which a client may interact to obtain a set of related resource | |||
values. This is analogous to an image tag (link) causing the image | values. This is analogous to an image tag (link) causing the image | |||
to display inline in a browser window. Link embedding enables the | to display inline in a browser window. Link embedding enables the | |||
bulk processing of items in the collection using a single operation | bulk processing of items in the collection using a single operation | |||
targeting the collection resource. Performing a GET on a collection | targeting the collection resource. Performing a GET on a collection | |||
resource may return a single representation containing all of the | resource may return a single representation containing all of the | |||
embedded linked resources. For example, a collection for | embedded linked resources. For example, a collection for | |||
manufacturer parameters may consist of manufacturer name, date of | manufacturer parameters may consist of manufacturer name, date of | |||
manufacture, location of manufacture, and serial number resources | manufacture, location of manufacture, and serial number resources | |||
which can be read as a single senml data object. | which can be read as a single SenML data object. | |||
A subset of resources in the collection may be selected for operation | A subset of resources in the collection may be selected for operation | |||
using Query Filtering. Bulk Read operations using GET return a SenML | using Query Filtering. Bulk Read operations using GET return a SenML | |||
representation of all selected resources. Bulk item Update | representation of all selected resources. Bulk item Update | |||
operations using PUT or POST apply the payload document to all | operations using PUT or POST apply the payload document to all | |||
selected resource items in the collection, using either a Batch or | selected resource items in the collection. A Batch update is | |||
Group update policy. A Batch update is performed by applying the | performed by applying the resource values in the payload document to | |||
resource values in the payload document to all resources in the | all resources in the collection that match any resource name in the | |||
collection that match any resource name in the payload document. | payload document. | |||
Group updates are performed by applying the payload document to each | ||||
item in the collection. Group updates are indicated by the link | ||||
relation type rel="grp" in the link. | ||||
3.5. Links and Items in Collections | 3.6. Links and Items in Collections | |||
Links use CoRE Link-Format representation by default and may point to | Links use CoRE Link-Format representation by default and may point to | |||
any resource reachable from the context of the collection. This | any resource reachable from the context of the collection. This | |||
includes links to resources with absolute paths as well as links that | includes links to resources with absolute paths as well as links that | |||
point to other network locations, if the context of the collection | point to other network locations, if the context of the collection | |||
allows. Links to sub-resources in the collection MUST have a path- | allows. Links to sub-resources in the collection MUST have a path- | |||
element starting with the resource name, as per [RFC3986]. Links to | element starting with the resource name, as per [RFC3986]. Links to | |||
resources in the global context MUST start with a root path | resources in the global context MUST start with a root path | |||
identifier [RFC8288]. Links to other collections are formed per | identifier [RFC8288]. Links to other collections are formed per | |||
[RFC3986]. | [RFC3986]. | |||
Examples of links: | Examples of links: | |||
</sen/>;if="core.lb": Link to the /sen/ collection describing it as | </sen/>;if="core.lb": Link to the /sen/ collection describing it as | |||
a core.lb type collection (Linked Batch) | a core.lb type collection (Linked Batch) | |||
</sen/>;rel="grp": Link to the /sen/ collection indicating that | ||||
/sen/ is a member of a group in the collection in which the link | ||||
appears. | ||||
</sen/temp>;rt="temperature": A link to the temp resource with an | </sen/temp>;rt="temperature": A link to the temp resource with an | |||
absolute path. | absolute path. | |||
<temp>;rt="temperature": Link to the temp subresource of the | <temp>;rt="temperature": Link to the temp subresource of the | |||
collection in which this link appears. | collection in which this link appears. | |||
<temp>;anchor="/sen/": A link to the temp subresource of the | <temp>;anchor="/sen/": A link to the temp subresource of the | |||
collection /sen/ which is assumed not to be a subresource of the | collection /sen/ which is assumed not to be a subresource of the | |||
collection in which the link appears, but is expected to be | collection in which the link appears, but is expected to be | |||
identified in the collection by resource name. | identified in the collection by resource name. | |||
skipping to change at page 8, line 17 ¶ | skipping to change at page 8, line 29 ¶ | |||
filtering to select links for updating. The PATCH method on links | filtering to select links for updating. The PATCH method on links | |||
MUST use the JSON Merge-Patch Content-Format (application/merge- | MUST use the JSON Merge-Patch Content-Format (application/merge- | |||
patch+json) specified in [RFC7396]. | patch+json) specified in [RFC7396]. | |||
Items in the collection SHOULD be represented using the SenML | Items in the collection SHOULD be represented using the SenML | |||
(application/senml+json) or plain text (text/plain) Content-Formats, | (application/senml+json) or plain text (text/plain) Content-Formats, | |||
depending on whether the representation is of a single data point or | depending on whether the representation is of a single data point or | |||
multiple data points. Items MAY be represented using any supported | multiple data points. Items MAY be represented using any supported | |||
Content-Format. | Content-Format. | |||
3.6. Queries on Collections | 3.7. Queries on Collections | |||
Collections MAY support query filtering as defined in CoRE Link- | Collections MAY support query filtering as defined in CoRE Link- | |||
Format [RFC6690]. Operations targeting either the links or the items | Format [RFC6690]. Operations targeting either the links or the items | |||
MAY select a subset of links and items in the collection by using | MAY select a subset of links and items in the collection by using | |||
query filtering. The Content-Format specified in the request header | query filtering. The Content-Format specified in the request header | |||
selects whether links or items are targeted by the operation. | selects whether links or items are targeted by the operation. | |||
3.7. Observing Collections | 3.8. Observing Collections | |||
Resource Observation via [I-D.ietf-core-dynlink] using CoAP [RFC7252] | Resource Observation via [I-D.ietf-core-dynlink] using CoAP [RFC7252] | |||
MAY be supported on items in a collection. A subset of the | MAY be supported on items in a collection. A subset of the | |||
conditional observe parameters MAY be specified to apply. In most | conditional observe parameters MAY be specified to apply. In most | |||
cases pmin and pmax are useful. Resource observation on a | cases pmin and pmax are useful. Resource observation on a | |||
collection's resource returns the collection representation. | collection's resource returns the collection representation. | |||
Observation Responses, or notifications, SHOULD provide the | Observation Responses, or notifications, SHOULD provide the | |||
collection representations in SenML Content-Format. Notifications | collection representations in SenML Content-Format. Notifications | |||
MAY include multiple observations of the collection resource, with | MAY include multiple observations of the collection resource, with | |||
SenML time stamps indicating the observation times. | SenML time stamps indicating the observation times. | |||
3.8. Collection Types | ||||
There are three collection types defined in this document: | ||||
+-----------------+---------+--------------------+ | ||||
| Collection Type | if= | Content-Format | | ||||
+-----------------+---------+--------------------+ | ||||
| Link List | core.ll | link-format | | ||||
| | | | | ||||
| Batch | core.b | link-format, senml | | ||||
| | | | | ||||
| Linked Batch | core.lb | link-format, senml | | ||||
+-----------------+---------+--------------------+ | ||||
Table 1: Collection Type Summary | ||||
The interface description defined in this document offer a deeper | ||||
explanation of the methods and functions that may be applied to the | ||||
three collections. | ||||
4. Interface Descriptions | 4. Interface Descriptions | |||
This section defines REST interfaces for Sensor, Parameter, Read-Only | This section defines REST interfaces for Sensor, Parameter, Read-Only | |||
Paramter and Actuator resource types, in addition to the Link List, | Paramter and Actuator resource types, in addition to the Link List, | |||
Batch and Linked Batch collection types. Each type is described | Batch and Linked Batch collection types. Each type is described | |||
along with its Interface Description attribute value, valid methods | along with its Interface Description attribute value, valid methods | |||
and content formats. These are shown for each interface in the table | and content formats. These are shown for each interface in the table | |||
below. | below. | |||
The if= column defines the Interface Description (if=) attribute | The if= column defines the Interface Description (if=) attribute | |||
skipping to change at page 10, line 10 ¶ | skipping to change at page 10, line 10 ¶ | |||
definition. | definition. | |||
The Methods column defines the methods supported by that interface, | The Methods column defines the methods supported by that interface, | |||
which are described in more detail below. | which are described in more detail below. | |||
+--------------+---------+-----------------+--------------------+ | +--------------+---------+-----------------+--------------------+ | |||
| Interface | if= | Methods | Content-Formats | | | Interface | if= | Methods | Content-Formats | | |||
+--------------+---------+-----------------+--------------------+ | +--------------+---------+-----------------+--------------------+ | |||
| Link List | core.ll | GET | link-format | | | Link List | core.ll | GET | link-format | | |||
| | | | | | | | | | | | |||
| Batch | core.b | GET, PUT, POST | link-format, senml | | | Batch | core.b | GET, PUT, POST | senml | | |||
| | | | | | | | | | | | |||
| Linked Batch | core.lb | GET, PUT, POST, | link-format, senml | | | Linked Batch | core.lb | GET, PUT, POST, | link-format, senml | | |||
| | | | | | | | | | | | |||
| | | DELETE | | | | | | DELETE | | | |||
| | | | | | | | | | | | |||
| Sensor | core.s | GET | link-format, | | | Sensor | core.s | GET | senml, | | |||
| | | | | | | | | | | | |||
| | | | text/plain | | | | | | text/plain | | |||
| | | | | | | | | | | | |||
| Parameter | core.p | GET, PUT | link-format, | | | Parameter | core.p | GET, PUT | senml, | | |||
| | | | | | | | | | | | |||
| | | | text/plain | | | | | | text/plain | | |||
| | | | | | | | | | | | |||
| Read-only | core.rp | GET | link-format, | | | Read-only | core.rp | GET | senml, | | |||
| | | | | | | | | | | | |||
| Parameter | | | text/plain | | | Parameter | | | text/plain | | |||
| | | | | | | | | | | | |||
| Actuator | core.a | GET, PUT, POST | link-format, | | | Actuator | core.a | GET, PUT, POST | senml, | | |||
| | | | | | | | | | | | |||
| | | | text/plain | | | | | | text/plain | | |||
+--------------+---------+-----------------+--------------------+ | +--------------+---------+-----------------+--------------------+ | |||
Table 2: Interface Description Summary | Table 2: Interface Description Summary | |||
The following is an example of links in the CoRE Link Format using | The following is an example of links in the CoRE Link Format using | |||
these interface descriptions. The resource hierarchy is based on a | these interface descriptions. | |||
simple resource profile defined in Appendix B. These links are used | ||||
in the subsequent examples below. | ||||
Req: GET /.well-known/core | Req: GET /.well-known/core | |||
Res: 2.05 Content (application/link-format) | Res: 2.05 Content (application/link-format) | |||
</s/>;rt="simple.sen";if="core.b", | </s/>;rt="simple.sen";if="core.b", | |||
</s/light>;rt="simple.sen.lt";if="core.s", | </s/light>;rt="simple.sen.lt";if="core.s", | |||
</s/temp>;rt="simple.sen.tmp";if="core.s";obs, | </s/temp>;rt="simple.sen.tmp";if="core.s";obs, | |||
</s/humidity>;rt="simple.sen.hum";if="core.s", | </s/humidity>;rt="simple.sen.hum";if="core.s", | |||
</a/>;rt="simple.act";if="core.b", | </a/>;rt="simple.act";if="core.b", | |||
</a/1/led>;rt="simple.act.led";if="core.a", | </a/1/led>;rt="simple.act.led";if="core.a", | |||
</a/2/led>;rt="simple.act.led";if="core.a", | </a/2/led>;rt="simple.act.led";if="core.a", | |||
</d/>;rt="simple.dev";if="core.ll", | </d/>;rt="simple.dev";if="core.ll", | |||
</l/>;if="core.lb", | </l/>;if="core.lb" | |||
Figure 1: Binding Interface Example | Figure 1: Binding Interface Example | |||
4.1. Link List | 4.1. Link List | |||
The Link List interface is used to retrieve (GET) a list of resources | Link List is the base interface to provide gradual reveal of | |||
on an origin server. The GET request SHOULD contain an Accept option | resources on a CoRE origin server. It is used to retrieve (GET) a | |||
with the application/link-format content format. However if the | list of resources on an origin server. The GET request SHOULD | |||
resource does not support any other form of content-format the Accept | contain an Accept option with the application/link-format content | |||
option MAY be elided. | format. However if the resource does not support any other form of | |||
content-format the Accept option MAY be elided. | ||||
Note: The use of an Accept option with application/link-format is | Note: The use of an Accept option with application/link-format is | |||
recommended even though it is not strictly needed for the link list | recommended even though it is not strictly needed for the Link List | |||
interface because this interface is extended by the batch and linked | interface because this interface is extended by the batch and linked | |||
batch interfaces where different content-formats are possible. | batch interfaces where different content-formats are possible. | |||
The request returns a list of URI references with absolute paths to | The request returns a list of URI references with absolute paths to | |||
the resources as defined in CoRE Link Format. This interface is | the resources as defined in CoRE Link Format. This interface is | |||
typically used with a parent resource to enumerate sub-resources but | typically used with a parent resource to enumerate sub-resources but | |||
may be used to reference any resource on an origin server. | may be used to reference any resource on an origin server. | |||
Link List is the base interface to provide gradual reveal of | ||||
resources on a CoRE origin server. Hence the root resource of a | ||||
Function Set SHOULD implement this interface or an extension of this | ||||
interface. | ||||
The following example interacts with a Link List /d containing | The following example interacts with a Link List /d containing | |||
Parameter sub-resources /d/name, /d/model. | Parameter sub-resources /d/name, /d/model. | |||
Req: GET /d/ (Accept:application/link-format) | Req: GET /d/ (Accept:application/link-format) | |||
Res: 2.05 Content (application/link-format) | Res: 2.05 Content (application/link-format) | |||
</d/name>;rt="simple.dev.n";if="core.p", | </d/name>;rt="simple.dev.n";if="core.p", | |||
</d/model>;rt="simple.dev.mdl";if="core.rp" | </d/model>;rt="simple.dev.mdl";if="core.rp" | |||
4.2. Batch | 4.2. Batch | |||
skipping to change at page 11, line 49 ¶ | skipping to change at page 11, line 45 ¶ | |||
resources at the same time. The Batch interface description supports | resources at the same time. The Batch interface description supports | |||
the same methods as its sub-resources, and can be used to read (GET), | the same methods as its sub-resources, and can be used to read (GET), | |||
update (PUT) or apply (POST) the values of those sub-resource with a | update (PUT) or apply (POST) the values of those sub-resource with a | |||
single resource representation. The sub-resources of a Batch MAY be | single resource representation. The sub-resources of a Batch MAY be | |||
heterogeneous. Hence, a method used on the Batch only applies to | heterogeneous. Hence, a method used on the Batch only applies to | |||
sub-resources that support it. For example Sensor interfaces do not | sub-resources that support it. For example Sensor interfaces do not | |||
support PUT, and thus a PUT request to a Sensor member of that Batch | support PUT, and thus a PUT request to a Sensor member of that Batch | |||
would be ignored. A batch requires the use of SenML Media types in | would be ignored. A batch requires the use of SenML Media types in | |||
order to support multiple sub-resources. | order to support multiple sub-resources. | |||
In addition, the Batch interface is an extension of the Link List | ||||
interface and in consequence MUST support the same methods. For | ||||
example, a GET with an Accept:application/link-format on a resource | ||||
utilizing the batch interface will return the sub-resource links. | ||||
The following example interacts with a Batch /s/ with Sensor sub- | The following example interacts with a Batch /s/ with Sensor sub- | |||
resources /s/light, /s/temp and /s/humidity. | resources /s/light, /s/temp and /s/humidity. | |||
Req: GET /s/ | Req: GET /s/ | |||
Res: 2.05 Content (application/senml+json) | Res: 2.05 Content (application/senml+json) | |||
{"e":[ | [ | |||
{ "n": "light", "v": 123, "u": "lx" }, | { "n": "light", "v": 123, "u": "lx" }, | |||
{ "n": "temp", "v": 27.2, "u": "degC" }, | { "n": "temp", "v": 27.2, "u": "Cel" }, | |||
{ "n": "humidity", "v": 80, "u": "%RH" }], | { "n": "humidity", "v": 80, "u": "%RH" } | |||
} | ] | |||
4.3. Linked Batch | 4.3. Linked Batch | |||
The Linked Batch interface is an extension of the Batch interface. | The Linked Batch interface is an extension of the Batch interface. | |||
Contrary to the basic Batch which is a collection statically defined | Contrary to the basic Batch which is a collection statically defined | |||
by the origin server, a Linked Batch is dynamically controlled by a | by the origin server, a Linked Batch is dynamically controlled by a | |||
client. A Linked Batch resource has no sub-resources. Instead the | client. A Linked Batch resource has no sub-resources. Instead the | |||
resources forming the batch are referenced using Web Linking | resources forming the batch are referenced using Web Linking | |||
[RFC8288] and the CoRE Link Format [RFC6690]. A request with a POST | [RFC8288] and the CoRE Link Format [RFC6690]. A request with a POST | |||
method and a content format of application/link-format simply appends | method and a content format of application/link-format simply appends | |||
skipping to change at page 13, line 11 ¶ | skipping to change at page 13, line 11 ¶ | |||
The following example interacts with a Linked Batch /l/ and creates a | The following example interacts with a Linked Batch /l/ and creates a | |||
collection containing /s/light, /s/temp and /s/humidity in 2 steps. | collection containing /s/light, /s/temp and /s/humidity in 2 steps. | |||
Req: POST /l/ (Content-Format: application/link-format) | Req: POST /l/ (Content-Format: application/link-format) | |||
</s/light>,</s/temp> | </s/light>,</s/temp> | |||
Res: 2.04 Changed | Res: 2.04 Changed | |||
Req: GET /l/ | Req: GET /l/ | |||
Res: 2.05 Content (application/senml+json) | Res: 2.05 Content (application/senml+json) | |||
{"e":[ | [ | |||
{ "n": "/s/light", "v": 123, "u": "lx" }, | { "n": "/s/light", "v": 123, "u": "lx" }, | |||
{ "n": "/s/temp", "v": 27.2, "u": "degC" }, | { "n": "/s/temp", "v": 27.2, "u": "Cel" } | |||
} | ] | |||
Req: POST /l/ (Content-Format: application/link-format) | Req: POST /l/ (Content-Format: application/link-format) | |||
</s/humidity> | </s/humidity> | |||
Res: 2.04 Changed | Res: 2.04 Changed | |||
Req: GET /l/ (Accept: application/link-format) | Req: GET /l/ (Accept: application/link-format) | |||
Res: 2.05 Content (application/link-format) | Res: 2.05 Content (application/link-format) | |||
</s/light>,</s/temp>,</s/humidity> | </s/light>,</s/temp>,</s/humidity> | |||
Req: GET /l/ | Req: GET /l/ | |||
Res: 2.05 Content (application/senml+json) | Res: 2.05 Content (application/senml+json) | |||
{"e":[ | [ | |||
{ "n": "/s/light", "v": 123, "u": "lx" }, | { "n": "/s/light", "v": 123, "u": "lx" }, | |||
{ "n": "/s/temp", "v": 27.2, "u": "degC" }, | { "n": "/s/temp", "v": 27.2, "u": "Cel" }, | |||
{ "n": "/s/humidity", "v": 80, "u": "%RH" }], | { "n": "/s/humidity", "v": 80, "u": "%RH" } | |||
} | ] | |||
Req: DELETE /l/ | Req: DELETE /l/ | |||
Res: 2.02 Deleted | Res: 2.02 Deleted | |||
4.4. Sensor | 4.4. Sensor | |||
The Sensor interface allows the value of a sensor resource to be read | The Sensor interface allows the value of a sensor resource to be read | |||
(GET). The Media type of the resource can be either plain text or | (GET). The Media type of the resource can be either plain text or | |||
SenML. Plain text MAY be used for a single measurement that does not | SenML. Plain text MAY be used for a single measurement that does not | |||
require meta-data. For a measurement with meta-data such as a unit | require meta-data. For a measurement with meta-data such as a unit | |||
skipping to change at page 14, line 11 ¶ | skipping to change at page 14, line 11 ¶ | |||
The following are examples of Sensor interface requests in both text/ | The following are examples of Sensor interface requests in both text/ | |||
plain and application/senml+json. | plain and application/senml+json. | |||
Req: GET /s/humidity (Accept: text/plain) | Req: GET /s/humidity (Accept: text/plain) | |||
Res: 2.05 Content (text/plain) | Res: 2.05 Content (text/plain) | |||
80 | 80 | |||
Req: GET /s/humidity (Accept: application/senml+json) | Req: GET /s/humidity (Accept: application/senml+json) | |||
Res: 2.05 Content (application/senml+json) | Res: 2.05 Content (application/senml+json) | |||
{"e":[ | [ | |||
{ "n": "humidity", "v": 80, "u": "%RH" }], | { "n": "humidity", "v": 80, "u": "%RH" } | |||
} | ] | |||
4.5. Parameter | 4.5. Parameter | |||
The Parameter interface allows configurable parameters and other | The Parameter interface allows configurable parameters and other | |||
information to be modeled as a resource. The value of the parameter | information to be modeled as a resource. The value of the parameter | |||
can be read (GET) or update (PUT). Plain text or SenML Media types | can be read (GET) or update (PUT). Plain text or SenML Media types | |||
MAY be returned from this type of interface. | MAY be returned from this type of interface. | |||
The following example shows request for reading and updating a | The following example shows request for reading and updating a | |||
parameter. | parameter. | |||
skipping to change at page 17, line 31 ¶ | skipping to change at page 17, line 31 ¶ | |||
appropriate RFC reference. | appropriate RFC reference. | |||
Notes: None | Notes: None | |||
6.7. Actuator | 6.7. Actuator | |||
Attribute Value: core.a | Attribute Value: core.a | |||
Description: The Actuator interface is used by resources that model | Description: The Actuator interface is used by resources that model | |||
different kinds of actuators (changing its value has an effect on | different kinds of actuators (changing its value has an effect on | |||
its environment). Examples of actuators include for example LEDs, | its environment). Examples of actuators include LEDs, relays, | |||
relays, motor controllers and light dimmers. The current value of | motor controllers and light dimmers. The current value of the | |||
the actuator can be read or the actuator value can be updated. In | actuator can be read or the actuator value can be updated. In | |||
addition, this interface allows the use of POST to change the | addition, this interface allows the use of POST to change the | |||
state of an actuator, for example to toggle between its possible | state of an actuator, for example to toggle between its possible | |||
values. | values. | |||
Reference: This document. Note to RFC Editor - please insert the | Reference: This document. Note to RFC Editor - please insert the | |||
appropriate RFC reference. | appropriate RFC reference. | |||
Notes: None | Notes: None | |||
7. Acknowledgements | 7. Acknowledgements | |||
Acknowledgement is given to colleagues from the SENSEI project who | Acknowledgement is given to colleagues from the SENSEI project who | |||
were critical in the initial development of the well-known REST | were critical in the initial development of the well-known REST | |||
interface concept, to members of the IPSO Alliance where further | interface concept, to members of the IPSO Alliance where further | |||
requirements for interface descriptions have been discussed, and to | requirements for interface descriptions have been discussed, and to | |||
Szymon Sasin, Cedric Chauvenet, Daniel Gavelle and Carsten Bormann | Szymon Sasin, Cedric Chauvenet, Daniel Gavelle and Carsten Bormann | |||
who have provided useful discussion and input to the concepts in this | who have provided useful discussion and input to the concepts in this | |||
document. | document. Ari Keraenen provided updated SenML examples. | |||
8. Changelog | 8. Contributors | |||
Changes from -10 to 11: | Matthieu Vial | |||
Schneider-Electric | ||||
Grenoble | ||||
France | ||||
o New Section 3.4 on Link Embedding | Phone: +33 (0)47657 6522 | |||
EMail: matthieu.vial@schneider-electric.com | ||||
o Removed disused "Service discovery" terminology | 9. Changelog | |||
o Removed wording referring to discontinued function set concept | Changes from -11 to -12: | |||
o Removed all text referring to function sets/profiles | ||||
o Clarified list collections | ||||
o Content-formats for collections and items rectified | ||||
o Simplified Appendix A and removed Appendix B | ||||
Changes from -10 to -11: | ||||
o Added a new Section 3.4 for Link Embedding | ||||
o Updated examples in Section 3.5 | ||||
o Removed "Service Discovery" from Terminologies | ||||
o Removed discussion of function sets | ||||
Changes from -09 to -10: | Changes from -09 to -10: | |||
o Section 1: Amendments to remove discussing properties. | o Section 1: Amendments to remove discussing properties. * | |||
o New author and editor added. | o New author and editor added. | |||
Changes from -08 to -09: | Changes from -08 to -09: | |||
o Section 3.6: Modified to indicate that the entire collection | o Section 3.6: Modified to indicate that the entire collection | |||
resource is returned. | resource is returned. | |||
o General: Added editor's note with open issues. | o General: Added editor's note with open issues. | |||
skipping to change at page 21, line 14 ¶ | skipping to change at page 21, line 34 ¶ | |||
o Defined a Function Set and its guidelines. | o Defined a Function Set and its guidelines. | |||
o Added the Link List interface. | o Added the Link List interface. | |||
o Added the Linked Batch interface. | o Added the Linked Batch interface. | |||
o Improved the WADL interface definition. | o Improved the WADL interface definition. | |||
o Added a simple profile example. | o Added a simple profile example. | |||
9. References | 10. References | |||
9.1. Normative References | 10.1. Normative References | |||
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate | [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate | |||
Requirement Levels", BCP 14, RFC 2119, | Requirement Levels", BCP 14, RFC 2119, | |||
DOI 10.17487/RFC2119, March 1997, | DOI 10.17487/RFC2119, March 1997, | |||
<https://www.rfc-editor.org/info/rfc2119>. | <https://www.rfc-editor.org/info/rfc2119>. | |||
[RFC6690] Shelby, Z., "Constrained RESTful Environments (CoRE) Link | [RFC6690] Shelby, Z., "Constrained RESTful Environments (CoRE) Link | |||
Format", RFC 6690, DOI 10.17487/RFC6690, August 2012, | Format", RFC 6690, DOI 10.17487/RFC6690, August 2012, | |||
<https://www.rfc-editor.org/info/rfc6690>. | <https://www.rfc-editor.org/info/rfc6690>. | |||
[RFC8288] Nottingham, M., "Web Linking", RFC 8288, | [RFC8288] Nottingham, M., "Web Linking", RFC 8288, | |||
DOI 10.17487/RFC8288, October 2017, | DOI 10.17487/RFC8288, October 2017, | |||
<https://www.rfc-editor.org/info/rfc8288>. | <https://www.rfc-editor.org/info/rfc8288>. | |||
9.2. Informative References | 10.2. Informative References | |||
[I-D.ietf-core-dynlink] | [I-D.ietf-core-dynlink] | |||
Shelby, Z., Koster, M., Groves, C., Zhu, J., and B. | Shelby, Z., Vial, M., Koster, M., Groves, C., Zhu, J., and | |||
Silverajan, "Dynamic Resource Linking for Constrained | B. Silverajan, "Dynamic Resource Linking for Constrained | |||
RESTful Environments", draft-ietf-core-dynlink-04 (work in | RESTful Environments", draft-ietf-core-dynlink-05 (work in | |||
progress), September 2017. | progress), March 2018. | |||
[I-D.ietf-core-resource-directory] | [I-D.ietf-core-resource-directory] | |||
Shelby, Z., Koster, M., Bormann, C., Stok, P., and C. | Shelby, Z., Koster, M., Bormann, C., Stok, P., and C. | |||
Amsuess, "CoRE Resource Directory", draft-ietf-core- | Amsuess, "CoRE Resource Directory", draft-ietf-core- | |||
resource-directory-13 (work in progress), March 2018. | resource-directory-13 (work in progress), March 2018. | |||
[I-D.ietf-core-senml] | [I-D.ietf-core-senml] | |||
Jennings, C., Shelby, Z., Arkko, J., Keranen, A., and C. | Jennings, C., Shelby, Z., Arkko, J., Keranen, A., and C. | |||
Bormann, "Media Types for Sensor Measurement Lists | Bormann, "Sensor Measurement Lists (SenML)", draft-ietf- | |||
(SenML)", draft-ietf-core-senml-13 (work in progress), | core-senml-16 (work in progress), May 2018. | |||
March 2018. | ||||
[OIC-Core] | [OIC-Core] | |||
"OIC Resource Type Specification v1.1.0", 2016, | "OIC Resource Type Specification v1.1.0", 2016, | |||
<https://openconnectivity.org/resources/specifications>. | <https://openconnectivity.org/resources/specifications>. | |||
[OIC-SmartHome] | [OIC-SmartHome] | |||
"OIC Smart Home Device Specification v1.1.0", 2016, | "OIC Smart Home Device Specification v1.1.0", 2016, | |||
<https://openconnectivity.org/resources/specifications>. | <https://openconnectivity.org/resources/specifications>. | |||
[OMA-TS-LWM2M] | [OMA-TS-LWM2M] | |||
skipping to change at page 23, line 5 ¶ | skipping to change at page 23, line 23 ¶ | |||
[RFC7252] Shelby, Z., Hartke, K., and C. Bormann, "The Constrained | [RFC7252] Shelby, Z., Hartke, K., and C. Bormann, "The Constrained | |||
Application Protocol (CoAP)", RFC 7252, | Application Protocol (CoAP)", RFC 7252, | |||
DOI 10.17487/RFC7252, June 2014, | DOI 10.17487/RFC7252, June 2014, | |||
<https://www.rfc-editor.org/info/rfc7252>. | <https://www.rfc-editor.org/info/rfc7252>. | |||
[RFC7396] Hoffman, P. and J. Snell, "JSON Merge Patch", RFC 7396, | [RFC7396] Hoffman, P. and J. Snell, "JSON Merge Patch", RFC 7396, | |||
DOI 10.17487/RFC7396, October 2014, | DOI 10.17487/RFC7396, October 2014, | |||
<https://www.rfc-editor.org/info/rfc7396>. | <https://www.rfc-editor.org/info/rfc7396>. | |||
Appendix A. Current Usage of Interfaces and Function Sets | Appendix A. Current Usage of Interfaces | |||
Editor's note: This appendix will be removed. It is only included | Editor's note: This appendix will be removed. It is only included | |||
for information. | for information. | |||
This appendix analyses the current landscape with regards the | This appendix analyses the current landscape with regards the | |||
definition and use of collections, interfaces and function sets/ | definition and use of collections and interfaces. This should be | |||
profiles. This should be considered when considering the scope of | considered when considering the scope of this document. | |||
this document. | ||||
In summary it can be seen that there is a lack of consistency of the | ||||
definition and usage of interface description and function sets. | ||||
A.1. Constrained RESTful Environments (CoRE) Link Format (IETF) | A.1. Constrained RESTful Environments (CoRE) Link Format (IETF) | |||
[RFC6690] assumes that different deployments or application domains | [RFC6690] assumes that different deployments or application domains | |||
will define the appropriate REST Interface Descriptions along with | will define the appropriate REST Interface Descriptions along with | |||
Resource Types to make discovery meaningful. It highlights that | Resource Types to make discovery meaningful. It highlights that | |||
collections are often used for these interfaces. | collections are often used for these interfaces. | |||
Whilst 3.2/[RFC6690] defines a new Interface Description 'if' | Whilst 3.2/[RFC6690] defines a new Interface Description 'if' | |||
attribute the procedures around it are about the naming of the | attribute the procedures around it are about the naming of the | |||
interface not what information should be included in the | interface not what information should be included in the | |||
documentation about the interface. | documentation about the interface. | |||
Function sets are not discussed. | A.2. Open Connectivity Foundation (OCF) | |||
A.2. CoRE Resource Directory (IETF) | ||||
[I-D.ietf-core-resource-directory] uses the concepts of collections, | ||||
interfaces and function sets. | ||||
If defines a number of interfaces: discovery, registration, | ||||
registration update, registration removal, read endpoint links, | ||||
update endpoint links, registration request interface, removal | ||||
request interface and lookup interface. However it does not assign | ||||
an interface description identifier (if=) to these interfaces. | ||||
It does define a resource directory function set which specifies | ||||
relevant content formats and interfaces to be used between a resource | ||||
directory and endpoints. However it does not follow the format | ||||
proposed by this document. | ||||
A.3. Open Connectivity Foundation (OCF) | ||||
The OIC Core Specification [OIC-Core] most closely aligns with the | The OIC Core Specification [OIC-Core] most closely aligns with the | |||
work in this specification. It makes use of interface descriptions | work in this specification. It makes use of interface descriptions | |||
as per [RFC6690] and has registered several interface identifiers | as per [RFC6690] and has registered several interface identifiers | |||
(https://www.iana.org/assignments/core-parameters/core- | (https://www.iana.org/assignments/core-parameters/core- | |||
parameters.xhtml#if-link-target-att-value). These interface | parameters.xhtml#if-link-target-att-value). These interface | |||
descriptors are similar to those defined in this specification. From | descriptors are similar to those defined in this specification. From | |||
a high level perspective: | a high level perspective: | |||
links list: OCF (oic.if.ll) -> IETF (core.ll) | links list: OCF (oic.if.ll) -> IETF (core.ll) | |||
skipping to change at page 24, line 28 ¶ | skipping to change at page 24, line 24 ¶ | |||
Some of the OCF interfaces make use of collections. | Some of the OCF interfaces make use of collections. | |||
The OIC Core specification does not use the concept of function sets. | The OIC Core specification does not use the concept of function sets. | |||
It does however discuss the concept of profiles. The OCF defines two | It does however discuss the concept of profiles. The OCF defines two | |||
sets of documents. The core specification documents such as | sets of documents. The core specification documents such as | |||
[OIC-Core] and vertical profile specification documents which provide | [OIC-Core] and vertical profile specification documents which provide | |||
specific information for specific applications. The OIC Smart Home | specific information for specific applications. The OIC Smart Home | |||
Device Specification [OIC-SmartHome] is one such specification. It | Device Specification [OIC-SmartHome] is one such specification. It | |||
provides information on the resource model, discovery and data types. | provides information on the resource model, discovery and data types. | |||
A.4. oneM2M | ||||
OneM2M describes a technology independent functional architecture | ||||
[oneM2MTS0023]. In this archictecture the reference points between | ||||
functional entities are called "interfaces". This usage does not | ||||
match the [RFC6690] concept of interfaces. A more direct comparison | ||||
is that of 10.2/[oneM2MTS0023] that defines basic procedures and | ||||
resource type-specific procedures utilising REST type create, | ||||
retrieve, update, delete, notify actions. | ||||
[oneM2MTS0023] does not refer to resource collections however does | ||||
define "Group Management Procedures" in 10.2.7/[oneM2MTS0023]. It | ||||
does allow bulk management of member resources. | ||||
[oneM2MTS0023] does not use the term "function set". [oneM2MTS0008] | ||||
describes the binding with the CoAP protocol. In some respects this | ||||
document provides a profile of the CoAP protocol in terms of the | ||||
protocol elements that need to be supported. However it does not | ||||
define any interface descriptions nor collections. | ||||
A.5. OMA LWM2M | ||||
[OMA-TS-LWM2M] utilises the concept of interfaces. It defines the | ||||
following interfaces: Bootstrap, Client Registration, Device | ||||
Management and Service Enablement and Information Reporting. It | ||||
defines that these have a particular direction (Uplink/Downlink) and | ||||
indicates the operations that may be applied to the interface (i.e. | ||||
Request Bootstrap, Write, Delete, Register, Update, De-Register, | ||||
Create, Read, Write, Delete, Execute, Write Attributes, Discover, | ||||
Observe, Cancel Observation, Notify). It then further defines which | ||||
objects may occur over the interface. In 6/[OMA-TS-LWM2M] resource | ||||
model, identifier and data formats are described. | ||||
Whilst it does not formally describe the use of "collections" the use | ||||
of a multiple resource TLV allows a hierarchy of resource/sub- | ||||
resource. | ||||
It does not identify the interfaces through an Interface Description | ||||
(if=) attribute. | ||||
It does not use the term function set. Informally the specification | ||||
could be considered as a function set. | ||||
Note: It refers to draft-ietf-core-interfaces-00. It also makes use | ||||
of the binding/observation attributes from draft-ietf-dynlink-00 but | ||||
does not refer to that document. | ||||
Appendix B. Resource Profile example | ||||
The following is a short definition of simple device resource | ||||
profile. This simplistic profile is for use in the examples of this | ||||
document. | ||||
+--------------------+-----------+------------+---------+ | ||||
| Functions | Root Path | RT | IF | | ||||
+--------------------+-----------+------------+---------+ | ||||
| Device Description | /d | simple.dev | core.ll | | ||||
| | | | | | ||||
| Sensors | /s | simple.sen | core.b | | ||||
| | | | | | ||||
| Actuators | /a | simple.act | core.b | | ||||
+--------------------+-----------+------------+---------+ | ||||
Table 3: Functional list of resources | ||||
+-------+----------+----------------+---------+------------+ | ||||
| Type | Path | RT | IF | Data Type | | ||||
+-------+----------+----------------+---------+------------+ | ||||
| Name | /d/name | simple.dev.n | core.p | xsd:string | | ||||
| | | | | | | ||||
| Model | /d/model | simple.dev.mdl | core.rp | xsd:string | | ||||
+-------+----------+----------------+---------+------------+ | ||||
Table 4: Device Description Resources | ||||
+-------------+-------------+----------------+--------+-------------+ | ||||
| Type | Path | RT | IF | Data Type | | ||||
+-------------+-------------+----------------+--------+-------------+ | ||||
| Light | /s/light | simple.sen.lt | core.s | xsd:decimal | | ||||
| | | | | | | ||||
| | | | | (lux) | | ||||
| | | | | | | ||||
| Humidity | /s/humidity | simple.sen.hum | core.s | xsd:decimal | | ||||
| | | | | | | ||||
| | | | | (%RH) | | ||||
| | | | | | | ||||
| Temperature | /s/temp | simple.sen.tmp | core.s | xsd:decimal | | ||||
| | | | | | | ||||
| | | | | (degC) | | ||||
+-------------+-------------+----------------+--------+-------------+ | ||||
Table 5: Sensor Resources | ||||
+------+------------+----------------+--------+-------------+ | ||||
| Type | Path | RT | IF | Data Type | | ||||
+------+------------+----------------+--------+-------------+ | ||||
| LED | /a/{#}/led | simple.act.led | core.a | xsd:boolean | | ||||
+------+------------+----------------+--------+-------------+ | ||||
Table 6: Actuator Resources | ||||
Authors' Addresses | Authors' Addresses | |||
Zach Shelby | Zach Shelby | |||
ARM | ARM | |||
150 Rose Orchard | Kidekuja 2 | |||
San Jose 95134 | Vuokatti 88600 | |||
FINLAND | FINLAND | |||
Phone: +1-408-203-9434 | Phone: +358407796297 | |||
Email: zach.shelby@arm.com | Email: zach.shelby@arm.com | |||
Matthieu Vial | ||||
Schneider-Electric | ||||
Grenoble | ||||
FRANCE | ||||
Phone: +33 (0)47657 6522 | ||||
Email: matthieu.vial@schneider-electric.com | ||||
Michael Koster | Michael Koster | |||
SmartThings | SmartThings | |||
665 Clyde Avenue | 665 Clyde Avenue | |||
Mountain View 94043 | Mountain View 94043 | |||
USA | USA | |||
Email: michael.koster@smartthings.com | Email: michael.koster@smartthings.com | |||
Christian Groves | Christian Groves | |||
Australia | Australia | |||
Email: cngroves.std@gmail.com | Email: cngroves.std@gmail.com | |||
Jintao Zhu | ||||
Julian Zhu | ||||
Huawei | Huawei | |||
No.127 Jinye Road, Huawei Base, High-Tech Development District | No.127 Jinye Road, Huawei Base, High-Tech Development District | |||
Xi'an, Shaanxi Province | Xi'an, Shaanxi Province | |||
China | China | |||
Email: jintao.zhu@huawei.com | Email: jintao.zhu@huawei.com | |||
Bilhanan Silverajan (editor) | Bilhanan Silverajan (editor) | |||
Tampere University of Technology | Tampere University of Technology | |||
Korkeakoulunkatu 10 | Korkeakoulunkatu 10 | |||
End of changes. 59 change blocks. | ||||
269 lines changed or deleted | 134 lines changed or added | |||
This html diff was produced by rfcdiff 1.47. The latest version is available from http://tools.ietf.org/tools/rfcdiff/ |