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

feat(modbus): introduce modbus type and byte/word order #331

Merged
merged 5 commits into from
Dec 12, 2023

Conversation

relu91
Copy link
Member

@relu91 relu91 commented Dec 3, 2023

After the discussion in #293 this PR introduces three new terms to the modbus binding template:

  • modv:type
  • modv:mostSignificantByte
  • modv:mostSignificantWord

I did my best to explain the rationale behind the three new terms and provide a short example. About modv:type instead of introducing a new set of terms I decided to reuse XML Schema DataType but I tried to narrow them down to the list of this comment (let me know if I left something). I am not 100% sure about the design I chose for introducing this new property in the ontology, @mahdanoura if you can double-check it would be great. The rationale was that I needed a way to say that the modv:type points to a valid XML Schema Data type among the ones we like. Not finding a class that covered all of them I created one and used a restriction. Let me know if it makes sense.

Copy link

netlify bot commented Dec 3, 2023

Deploy Preview for wot-binding-templates ready!

Name Link
🔨 Latest commit e201b0d
🔍 Latest deploy log https://app.netlify.com/sites/wot-binding-templates/deploys/657866a4d95e480008bc2e32
😎 Deploy Preview https://deploy-preview-331--wot-binding-templates.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@egekorkan egekorkan added the modbus related to modbus protocol binding label Dec 3, 2023
Copy link
Contributor

@egekorkan egekorkan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mostly small changes, thanks @relu91 !

bindings/protocols/modbus/ontology.ttl Outdated Show resolved Hide resolved
bindings/protocols/modbus/ontology.ttl Outdated Show resolved Hide resolved
bindings/protocols/modbus/index.template.html Outdated Show resolved Hide resolved
bindings/protocols/modbus/index.template.html Outdated Show resolved Hide resolved
@egekorkan
Copy link
Contributor

egekorkan commented Dec 4, 2023

Looks good thanks! The rendering is broken somehow? Also, can you add https://www.w3.org/TR/2012/REC-xmlschema11-2-20120405/#hexBinary to express bit arrays?

Also in another PR, we should explain the mapping of the xsd types to what Modbus libraries would understand, i.e. saying that xsd:int is signed integer 32 bit.

Also, we should have another PR where we explain how the Data Schema maps to the types in the form (and vice versa), i.e. having type:string above in Data Schema requires xsd:string in modv:type value. We should do this at least for simple types

bindings/protocols/modbus/ontology.ttl Outdated Show resolved Hide resolved
bindings/protocols/modbus/ontology.ttl Outdated Show resolved Hide resolved
bindings/protocols/modbus/mapping.ttl Outdated Show resolved Hide resolved
bindings/protocols/modbus/ontology.ttl Outdated Show resolved Hide resolved
Copy link
Contributor

@egekorkan egekorkan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed in the call of 06.12, merging

@egekorkan
Copy link
Contributor

@relu91 will regenerate the ontology file to resolve conflicts and can just merge asynchronously.

@relu91
Copy link
Member Author

relu91 commented Dec 12, 2023

talked with @egekorkan we can merge it now.

@relu91 relu91 merged commit 294120e into w3c:main Dec 12, 2023
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
modbus related to modbus protocol binding
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants