Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate CoAP vocabulary from RDF #246

Merged
merged 3 commits into from Mar 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
36 changes: 36 additions & 0 deletions bindings/protocols/coap/context.jsonld
@@ -0,0 +1,36 @@
{
"@context": {
"xsd": "http://www.w3.org/2001/XMLSchema#",
"cov": "https://www.w3.org/2019/wot/coap#",
"method": {
"@id": "cov:method",
"@type": "xsd:string"
},
"blockwise": {
"@id": "cov:blockwise"
},
"qblockwise": {
"@id": "cov:qblockwise"
},
"block2Size": {
"@id": "cov:block2Size",
"@type": "xsd:unsignedShort"
},
"block1Size": {
"@id": "cov:block1Size",
"@type": "xsd:unsignedShort"
},
"accept": {
"@id": "cov:accept",
"@type": "xsd:unsignedShort"
},
"contentFormat": {
"@id": "cov:contentFormat",
"@type": "xsd:unsignedShort"
},
"hopLimit": {
"@id": "cov:hopLimit",
"@type": "xsd:unsignedByte"
}
}
}
125 changes: 72 additions & 53 deletions bindings/protocols/coap/index.html
Expand Up @@ -8,12 +8,20 @@
var respecConfig = {
specStatus: "ED",
group: "wg/wot",
editors: [{
name: "Klaus Hartke",
w3cid: "107859",
company: "Siemens AG",
companyURL: "https://www.siemens.com/"
}],
editors: [
{
name: "Klaus Hartke",
w3cid: "107859",
company: "Siemens AG",
companyURL: "https://www.siemens.com/"
},
{
name: "Jan Romann",
w3cid: "129690",
company: "Invited Expert",
companyURL: "https://github.com/JKRhb"
},
],
edDraftURI: "https://w3c.github.io/wot-binding-templates/bindings/protocols/coap/",
shortName: "wot-coap-binding",
github: "https://github.com/w3c/wot-binding-templates",
Expand All @@ -36,15 +44,15 @@
}
]
},
// {
// key: "Ontology",
// data: [
// {
// value: "CoAP in RDF",
// href: "../../../ontology/coap.html"
// }
// ]
// }
{
key: "Ontology",
data: [
{
value: "CoAP Vocabulary for the Web of Things",
href: "../../../ontology/coap.html"
}
]
}
]
};
</script>
Expand All @@ -54,16 +62,16 @@
<body>
<section id='abstract'>
<p>
In the context of the Web of Things (WoT), a Binding Template is a blueprint that gives guidance on how to
In the context of the Web of Things (WoT), a Binding Template is a blueprint that gives guidance on how to
implement a specific IoT protocol, data format or IoT platform.
The Core Binding Templates specification explains the overall mechanism and requirements for any binding to follow.
This document gives implementation guidelines regarding the Constrained Application Protocol (CoAP), which
This document gives implementation guidelines regarding the Constrained Application Protocol (CoAP), which
is a specialized web transfer protocol for use with constrained nodes and constrained (e.g., low-power, lossy) networks.
</p>
<p>
More specifically, this document defines a set of vocabulary terms that can be used inside a Thing Description document,
More specifically, this document defines a set of vocabulary terms that can be used inside a Thing Description document,
and associated rules which allow to describe WoT operations using CoAP over the network.
Additionally, relevant examples are provided to showcase different vocabulary terms and the associated behavior.
Additionally, relevant examples are provided to showcase different vocabulary terms and the associated behavior.
</p>
</section>
<section id='introduction'>
Expand Down Expand Up @@ -470,57 +478,65 @@ <h3>Form terms</h3>
</tr>
</thead>
<tbody>
<!-- Form terms from the ontology-->
<tr>
<td><code>cov:method</code></td>
<td>Indicates the CoAP method to be used in the request</td>
<td>
Indicates the CoAP method to be used in the request.
</td>
<td>optional</td>
<td>
<a href="https://www.w3.org/TR/2012/REC-xmlschema11-2-20120405/#string"><code>string</code></a>
<p>
(see the
<a href="https://www.iana.org/assignments/core-parameters/#method-codes">CoAP Method Codes</a>
registry for the set of possible values)
</p>
<a href="http://www.w3.org/2001/XMLSchema#string">string</a> (e.g., <code>GET</code>, <code>PUT</code>, <code>POST</code>, <code>DELETE</code>, <code>FETCH</code>, <code>iPATCH</code>, or <code>PATCH</code>)<p>(See the <a href="https://www.iana.org/assignments/core-parameters/#method-codes">CoAP Method Codes</a> registry for the set of possible values.)</p>
</td>
</tr>
<tr>
<td><code>cov:blockwise</code></td>
<td>Indicates that a block-wise transfer [[RFC7959]] is supported</td>
<td>
Indicates that block-wise transfer [[RFC7959]] is supported.
</td>
<td>optional</td>
<td><a href="#BlockWiseTransferParameters">BlockWiseTransferParameters</a></td>
<td>
<a href="#blockwisetransferparameters">BlockWiseTransferParameters</a>
</td>
</tr>
<tr>
<td><code>cov:qblockwise</code></td>
<td>Indicates that a quick block-wise transfer [[RFC9177]] is supported</td>
<td>
Indicates that quick block-wise transfer [[RFC9177]] is supported.
</td>
<td>optional</td>
<td><a href="#BlockWiseTransferParameters">BlockWiseTransferParameters</a></td>
<td>
<a href="#blockwisetransferparameters">BlockWiseTransferParameters</a>
</td>
</tr>
<tr>
<td><code>cov:hopLimit</code></td>
<td>Indicates that a CoAP Hop-Limit option [[RFC8768]] be included in the request</td>
<td>
Indicates that a CoAP Hop-Limit option [[RFC8768]] should be included in the request.
</td>
<td>optional</td>
<td>
<a href="https://www.w3.org/TR/2012/REC-xmlschema11-2-20120405/#unsignedByte"><code>unsignedByte</code></a>
<a href="http://www.w3.org/2001/XMLSchema#unsignedByte">unsignedByte</a>
</td>
</tr>
<tr>
<td><code>cov:contentFormat</code></td>
<td>
Indicates a numeric CoAP Content-Format [[RFC7252]] as a combination of Media Type and Content Coding.
Must match the given <code>contentType</code> and <code>contentCoding</code> members.
Indicates a numeric CoAP Content-Format [[RFC7252]] as a combination of Media Type and Content Coding. Must match the given <code>contentType</code> and <code>contentCoding</code> members.
</td>
<td>optional</td>
<td>
<a href="https://www.w3.org/TR/2012/REC-xmlschema11-2-20120405/#unsignedShort"><code>unsignedShort</code></a>
<a href="http://www.w3.org/2001/XMLSchema#unsignedShort">unsignedShort</a>
</td>
</tr>
<tr>
<td><code>cov:accept</code></td>
<td>Indicates that a Consumer must include an Accept option [[RFC7252]] with the given value when requesting the resource associated with this Form.
<td>
Indicates that a Consumer must include an Accept option [[RFC7252]] with the given value when requesting the resource associated with this Form.
</td>
<td>optional</td>
<td>
<a href="https://www.w3.org/TR/2012/REC-xmlschema11-2-20120405/#unsignedShort"><code>unsignedShort</code></a>
<a href="http://www.w3.org/2001/XMLSchema#unsignedShort">unsignedShort</a>
</td>
</tr>
</tbody>
Expand All @@ -541,27 +557,23 @@ <h3>Response terms</h3>
</tr>
</thead>
<tbody>
<!-- Response terms from the ontology-->
<tr>
<td><code>cov:contentFormat</code></td>
<td>
Indicates a numeric CoAP Content-Format [[RFC7252]] as a combination of Media Type and Content Coding.
Must match the given <code>contentType</code> member.
<!--
Note: contentCoding is not defined for ExpectedResponse/AdditionalExpectedResponse: https://github.com/w3c/wot-thing-description/issues/1741
Shall we mention it regardless?
-->
Indicates a numeric CoAP Content-Format [[RFC7252]] as a combination of Media Type and Content Coding. Must match the given <code>contentType</code> and <code>contentCoding</code> members.
</td>
<td>optional</td>
<td>
<a href="https://www.w3.org/TR/2012/REC-xmlschema11-2-20120405/#unsignedShort"><code>unsignedShort</code></a>
<a href="http://www.w3.org/2001/XMLSchema#unsignedShort">unsignedShort</a>
</td>
</tr>
</tbody>
</table>
</section>
<section id="BlockWiseTransferParameters">
<h3>BlockWiseTransferParameters</h3>
<table class="def">
<table class="def" id="blockwisetransferparameters">
<thead>
<tr>
<th>Vocabulary term</th>
Expand All @@ -571,22 +583,29 @@ <h3>BlockWiseTransferParameters</h3>
</tr>
</thead>
<tbody>
<!-- Blockwise terms from the ontology-->
<tr>
<td><code>cov:block2Size</code></td>
<td>Indicates the largest block size that may be used in a Block2 or Q-Block2 Option</td>
<td>
<code>cov:block2Size</code>
</td>
<td>
Indicates the largest block size that may be used in a Block2 or Q-Block2 Option
</td>
<td>optional</td>
<td>
<a href="https://www.w3.org/TR/2012/REC-xmlschema11-2-20120405/#unsignedShort"><code>unsignedShort</code></a>
<p>(one of <code>16</code>, <code>32</code>, <code>64</code>, <code>128</code>, <code>256</code>, <code>512</code>, <code>1024</code>)</p>
<a href="http://www.w3.org/2001/XMLSchema#unsignedShort">unsignedShort</a> (one of <code>16</code>, <code>32</code>, <code>64</code>, <code>128</code>, <code>256</code>, <code>512</code>, or <code>1024</code>)
</td>
</tr>
<tr>
<td><code>cov:block1Size</code></td>
<td>Indicates the largest block size that may be used in a Block1 or Q-Block1 Option</td>
<td>
<code>cov:block1Size</code>
</td>
<td>
Indicates the largest block size that may be used in a Block1 or Q-Block1 Option
</td>
<td>optional</td>
<td>
<a href="https://www.w3.org/TR/2012/REC-xmlschema11-2-20120405/#unsignedShort"><code>unsignedShort</code></a>
<p>(one of <code>16</code>, <code>32</code>, <code>64</code>, <code>128</code>, <code>256</code>, <code>512</code>, <code>1024</code>)</p>
<a href="http://www.w3.org/2001/XMLSchema#unsignedShort">unsignedShort</a> (one of <code>16</code>, <code>32</code>, <code>64</code>, <code>128</code>, <code>256</code>, <code>512</code>, or <code>1024</code>)
</td>
</tr>
</tbody>
Expand Down