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

Refining Modbus protocol binding #109

Merged
merged 35 commits into from Jul 14, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
174828d
Added Modbus Vocabulary and examples
Jul 9, 2020
e4bbf48
fixed camelCasing, some attribute names, and address ranges
Jul 22, 2020
0a0306b
Merge branch 'modbus_branch' into modbus
relu91 Feb 3, 2021
31b15f4
fix modbus individuals uri
relu91 Feb 3, 2021
565b5ba
Add function names and entities
relu91 Feb 3, 2021
a2dfed4
introduce modbus timeout
relu91 Feb 3, 2021
1cb1eb6
add modbus offset
relu91 Feb 3, 2021
4c1481f
fix modbus example
relu91 Feb 3, 2021
2d7897d
fix renderer
relu91 Feb 17, 2021
d5236c6
improve modbus document generation
relu91 Feb 17, 2021
6628b02
chore: move modbus spec to its own file
relu91 Mar 8, 2021
0bf926e
feat(modbus): improve example section
relu91 May 5, 2021
87b36c2
chore: ignore protegè catalogs
relu91 May 5, 2021
ddbbddd
feat(modbus): add assignment column
relu91 May 5, 2021
fd07a6b
fix(modbus): assigment query
relu91 May 5, 2021
a408a04
feat(modbus): improve default mappings
relu91 May 5, 2021
86f7714
refactor(modbus): move assignment to mapping onto
relu91 May 5, 2021
93dd7f3
feat(modbus): introduce descriptions for each class
relu91 May 5, 2021
7a72491
refactor(modbus): use shacl in mapping ontology
relu91 Jun 29, 2021
2913d4a
fix(modbus): respec errors
relu91 Jun 29, 2021
586cc35
chore(modbus): generate index file
relu91 Jun 29, 2021
1ba6219
chore: adding dev utility for live building documentation
relu91 Jun 29, 2021
9700b11
feat(modbus): introducing jsonld context
relu91 Jun 29, 2021
999ea97
fix(modbus): changing default prefix from modv to modbus
relu91 Jun 29, 2021
6d2dbfc
chore: fix watch configuration
relu91 Jun 29, 2021
f49fe1c
Introduce possible mappings section and introduction
relu91 Jul 7, 2021
af65023
Rename master/slave to client/server in modbus ontology
relu91 Jul 7, 2021
5279fe8
Add modbus section in the main document
relu91 Jul 7, 2021
8381ccd
Add small description for mapping section in modbus
relu91 Jul 7, 2021
043d7ae
Add root level readme to describe the new binding folder structure
relu91 Jul 7, 2021
206fa36
Add a proposal for modbus jsonschema validation
relu91 Jul 7, 2021
ff3ef1b
Improve modbus json schema
relu91 Jul 8, 2021
c48ccd3
Fix modbus context file to handle correctly entity and function values
relu91 Jul 8, 2021
083d79b
feat: add an introduction draft
relu91 Jul 14, 2021
3bfe9b9
fix(modbus): typo in the introduction
relu91 Jul 14, 2021
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
122 changes: 122 additions & 0 deletions .gitignore
@@ -0,0 +1,122 @@

# Created by https://www.toptal.com/developers/gitignore/api/node
# Edit at https://www.toptal.com/developers/gitignore?templates=node

### Node ###
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage
*.lcov

# nyc test coverage
.nyc_output

# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# TypeScript v1 declaration files
typings/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional stylelint cache
.stylelintcache

# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env
.env.test
.env*.local

# parcel-bundler cache (https://parceljs.org/)
.cache
.parcel-cache

# Next.js build output
.next

# Nuxt.js build / generate output
.nuxt
dist

# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and not Next.js
# https://nextjs.org/blog/next-9-1#public-directory-support
# public

# vuepress build output
.vuepress/dist

# Serverless directories
.serverless/

# FuseBox cache
.fusebox/

# DynamoDB Local files
.dynamodb/

# TernJS port file
.tern-port

# Stores VSCode versions used for testing VSCode extensions
.vscode-test

# End of https://www.toptal.com/developers/gitignore/api/node

# ignore protegè catalogs
catalog-*.xml
7 changes: 7 additions & 0 deletions bindings/README.md
@@ -0,0 +1,7 @@
# Binding description
This folder contains the documentation about different Protocol Binding Templates. The folder is organized in sub-folders that contains
binding template specific documentation. Each sub-folder must provide:
- index.html based on [index.template.html](/index.template.html)
- shacl file that describes which ontology terms can be used and how
- context.jsonld file containing the related jsonld `@context` definition

108 changes: 108 additions & 0 deletions bindings/index.template.html
@@ -0,0 +1,108 @@
<!DOCTYPE html>
<html>

<head>
<meta charset='utf-8'>
<script src='https://www.w3.org/Tools/respec/respec-w3c' class='remove'></script>
<script class='remove'>
var respecConfig = {
specStatus: "ED",
editors: [
{
name: "EDITOR NAME",
// w3cid: "1232",
}
],
edDraftURI: "https://w3c.github.io/wot-binding-templates/BINDINGNAME",
shortName: "BINDINGNAME-template",
};
</script>
<title>BINDINGNAME binding template</title>
</head>

<body>
<section id='abstract'>
<p class="ednote">TODO: Provide a short overview of the document and the protocol binding features.</p>
</section>
<section id='introduction'>
<h2>Introduction</h2>
<p class="ednote">TODO: Introduce the protocol binding and its peculiarities within the Web of Things. </p>
</section>
<section id='sotd'>
<p>
<em>This document is a work in progress</em>
</p>
</section>
<section id="url">
<h2>URL format</h2>
<p class="ednote">TODO: Describe the URL format of the protocol binding. Provide syntax and examples. </p>
</section>
<section id="vocabulary">
<h2>BINDING NAME Vocabulary</h2>
<p class="ednote">TODO: Introduce briefly the vocabulary</p>
<section>
<h3>Form terms</h3>
<p class="ednote">TODO: Describe the allowed terms in a form that use this binding. Provide the terms using the table structure</p>
<table class="def">
<thead>
<tr>
<th>Vocabulary term</th>
<th>Description</th>
<th>Assignment</th>
<th>Type</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</section>
<section id="additional">
<h3>Additional terms</h3>
<p class="ednote"> Bindings may introduce domain specific concepts or data types. Add a dedicated section for each
domain specific term. If the term can have a finite set of values fill the table below to describe the possibilities.
</p>

<table class="def" title="Entity values">
<thead>
<tr>
<th>Value</th>
<th>Description</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</section>

</section>
<section id="mapppings">
<h2>Mappings</h2>
This section describes the strategies and default values to use protocol specific concepts within the <a>WoT Interaction model</a>.

<section id="defautl-mappings">
<h3>Default mappings</h3>
<p class="ednote"> Map WoT Interaction model verbs to default values if any </p>
<table class="def">
<thead>
<tr>
<th>Operation</th>
<th>Default Biding</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</section>
<section id="possible-mappings">
<h3>Possible mappings</h3>
<p class="ednote">TODO: This section should describe other mappings that can be used by TD designers. It is
meant to be informative but it provides guidelines for implementers.</p>
</section>
</section>
<section>
<h2>Examples</h2>
<p class="ednote">TODO: Provide a compressive list of examples about how this binding template can be used within forms or Thing Descriptions </p>
</section>
</body>

</html>
47 changes: 47 additions & 0 deletions bindings/modbus/context.jsonld
@@ -0,0 +1,47 @@
{
"@context": {
"xsd": "http://www.w3.org/2001/XMLSchema#",
"modbus":"https://www.w3.org/2019/wot/modbus#",
"offset": {
"@id": "modbus:offset",
"@type": "xsd:integer"
},
"timeout" : {
"@id": "modbus:timeout",
"@type": "xsd:integer"
},
"zeroBasedAddressing" : {
"@id": "modbus:zeroBasedAddressing",
"@type": "xsd:integer"
},
"length" : {
"@id": "modbus:length",
"@type": "xsd:integer"
},
"pollingTime" : {
"@id": "modbus:pollingTime",
"@type": "xsd:integer"
},
"entity" : {
"@id": "modbus:entity",
"@type": "@vocab"
},
"function" : {
"@id": "modbus:function",
"@type": "@vocab"
},
"Coil": "modbus:Coil",
"DiscreteInput" : "modbus:DiscreteInput",
"HoldingRegister": "modbus:HoldingRegister",
"InputRegister": "modbus:InputRegister",
"readCoil": "modbus:readCoil",
"readDiscreteInput": "modbus:readDiscreteInput",
"readHoldingRegister" : "modbus:readHoldingRegister",
"readInputRegister": "modbus:readInputRegister",
"writeSingleCoil": "modbus:writeSingleCoil",
"writeMultipleCoils": "modbus:writeMultipleCoils",
"writeMultipleHoldingRegister": "modbus:writeMultipleHoldingRegister",
"writeSingleHoldingRegister" : "modbus:writeSingleHoldingRegister"

}
}