Skip to content

Commit

Permalink
add editor and fix unit id optionality meaning
Browse files Browse the repository at this point in the history
  • Loading branch information
egekorkan committed Apr 9, 2024
1 parent 803acb5 commit bdf9ec0
Show file tree
Hide file tree
Showing 3 changed files with 640 additions and 636 deletions.
56 changes: 28 additions & 28 deletions bindings/protocols/modbus/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,8 @@ <h3>URL terms</h3>


<tr>
<td><code>modv:address</code></td>
<td>Specifies the starting address of the Modbus operations</td>
<td><code>modv:unitID</code></td>
<td>The Unit ID is technically not needed for ModbusTCP, since the IP-address works as unique identifier, but for compatibility reasons it MUST be included</td>
<td>required</td>
<td><a href="http://www.w3.org/2001/XMLSchema#integer">integer</a></td>

Expand All @@ -168,8 +168,8 @@ <h3>URL terms</h3>


<tr>
<td><code>modv:unitID</code></td>
<td>The Unit ID is usually not needed for ModbusTCP, since the IP-address works as unique identifier, but for compatibility reasons still often included</td>
<td><code>modv:address</code></td>
<td>Specifies the starting address of the Modbus operations</td>
<td>required</td>
<td><a href="http://www.w3.org/2001/XMLSchema#integer">integer</a></td>

Expand Down Expand Up @@ -203,37 +203,37 @@ <h3>Form terms</h3>
<!-- Generate forms terms from the ontology-->

<tr>
<td><code>modv:mostSignificantByte</code></td>
<td>When <code>true</code>, it describes that the byte order of the data in the Modbus message is the most significant byte first (i.e., Big-Endian). When <code>false</code>, it describes the least significant byte first (i.e., Little-Endian).</td>
<td><code>modv:pollingTime</code></td>
<td>Modbus TCP maximum polling rate. The Modbus specification does not define a maximum or minimum allowed polling rate, however specific implementations might introduce such limits. Defined as integer of milliseconds.</td>
<td>optional</td>
<td><a href="http://www.w3.org/2001/XMLSchema#boolean">boolean</a></td>
<td><a href="http://www.w3.org/2001/XMLSchema#integer">integer</a></td>

<tr>


<tr>
<td><code>modv:mostSignificantWord</code></td>
<td>When <code>true</code>, it describes that the word order of the data in the Modbus message is the most significant word first (i.e., no word swapping). When <code>false</code>, it describes the least significant word first (i.e. word swapping)</td>
<td><code>modv:timeout</code></td>
<td>Modbus response maximum waiting time. Defines how much time the runtime should wait until it receives a reply from the device.</td>
<td>optional</td>
<td><a href="http://www.w3.org/2001/XMLSchema#boolean">boolean</a></td>
<td><a href="http://www.w3.org/2001/XMLSchema#integer">integer</a></td>

<tr>


<tr>
<td><code>modv:pollingTime</code></td>
<td>Modbus TCP maximum polling rate. The Modbus specification does not define a maximum or minimum allowed polling rate, however specific implementations might introduce such limits. Defined as integer of milliseconds.</td>
<td><code>modv:mostSignificantByte</code></td>
<td>When <code>true</code>, it describes that the byte order of the data in the Modbus message is the most significant byte first (i.e., Big-Endian). When <code>false</code>, it describes the least significant byte first (i.e., Little-Endian).</td>
<td>optional</td>
<td><a href="http://www.w3.org/2001/XMLSchema#integer">integer</a></td>
<td><a href="http://www.w3.org/2001/XMLSchema#boolean">boolean</a></td>

<tr>


<tr>
<td><code>modv:timeout</code></td>
<td>Modbus response maximum waiting time. Defines how much time the runtime should wait until it receives a reply from the device.</td>
<td><code>modv:mostSignificantWord</code></td>
<td>When <code>true</code>, it describes that the word order of the data in the Modbus message is the most significant word first (i.e., no word swapping). When <code>false</code>, it describes the least significant word first (i.e. word swapping)</td>
<td>optional</td>
<td><a href="http://www.w3.org/2001/XMLSchema#integer">integer</a></td>
<td><a href="http://www.w3.org/2001/XMLSchema#boolean">boolean</a></td>

<tr>

Expand Down Expand Up @@ -506,18 +506,6 @@ <h3>Default mappings</h3>
<tbody>
<!-- Generate mappings from the mapping ontology -->

<tr>
<td><code>writeallproperties</code></td>
<td><code>"modv:function": "writeMultipleHoldingRegisters"</code></td>
<tr>


<tr>
<td><code>writemultipleproperties</code></td>
<td><code>"modv:function": "writeMultipleHoldingRegisters"</code></td>
<tr>


<tr>
<td><code>writeproperty</code></td>
<td><code>"modv:function": "writeSingleCoil"</code></td>
Expand All @@ -541,6 +529,18 @@ <h3>Default mappings</h3>
<td><code>"modv:function": "readHoldingRegisters"</code></td>
<tr>


<tr>
<td><code>writeallproperties</code></td>
<td><code>"modv:function": "writeMultipleHoldingRegisters"</code></td>
<tr>


<tr>
<td><code>writemultipleproperties</code></td>
<td><code>"modv:function": "writeMultipleHoldingRegisters"</code></td>
<tr>

</tbody>
</table>
The next table defines default values for other terms, regardless of their use in combination with one of the operations listed in the table above.
Expand Down
14 changes: 7 additions & 7 deletions bindings/protocols/modbus/ontology.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<script class='remove'>
var respecConfig = {
specStatus: "ED",
editors: [],
editors: [{name:"Cristiano Aguzzi",company:"Invited Expert",companyURL:"https://github.com/relu91"}],
group: "wg/wot",
edDraftURI: "https://www.w3.org/2019/wot/modbus",
shortName: "wot-binding-templates"
Expand All @@ -32,18 +32,18 @@ <h2>Introduction</h2>
</p>
</section>

<section><h2>Axiomatization</h2><section><h3>Classes</h3><section><h4>Data request</h4><p>IRI: <code>https://www.w3.org/2019/wot/modbus#DataRequest</code></p><span>Data request contains additional information sent from a client to server that the server uses to take the action defined by the function code.
This can include items like register address, the quantity of items to be handled, and the count of actual data bytes in the field.

<section><h2>Axiomatization</h2><section><h3>Classes</h3><section><h4>Data request</h4><p>IRI: <code>https://www.w3.org/2019/wot/modbus#DataRequest</code></p><span>Data request contains additional information sent from a client to server that the server uses to take the action defined by the function code.
This can include items like register address, the quantity of items to be handled, and the count of actual data bytes in the field.

The data request field may be nonexistent (zero length) in certain kind of requests, in this case the server does not require any additional information. The function code alone specifies the action.</span><table class="def"><tbody><tr><td>Sub-class of</td><td><code><a href="#data-field">Data Field</a></code></td></tr></tbody></table></section>
<section><h4>Data response</h4><p>IRI: <code>https://www.w3.org/2019/wot/modbus#DataResponse</code></p><span>Data response contains the information requested by the client to the server.</span><table class="def"><tbody><tr><td>Sub-class of</td><td><code><a href="#data-field">Data Field</a></code></td></tr></tbody></table></section>
<section><h4>Data Field</h4><p>IRI: <code>https://www.w3.org/2019/wot/modbus#Data_Field</code></p><span>The Data Field of a Modbus messages can contain different kind of information: additional information that the server uses to take the action defined by the function code (data request), information regarding the performed action requested by the client (data response), information about the reason of the error (exception code).</span><table class="def"><tbody><tr><td>Sub-class of</td><td><code><a href="#payload">Payload</a></code></td></tr><tr><td>Super-class of</td><td><code><a href="#data-request">Data request</a></code><br><code><a href="#data-response">Data response</a></code><br><code><a href="#exception-code">Exception code</a></code></td></tr></tbody></table></section>
<section><h4>Entity</h4><p>IRI: <code>https://www.w3.org/2019/wot/modbus#Entity</code></p><span>A Modbus registry type</span><table class="def"><tbody><tr><td>Enumeration members</td><td><code><a href="#coil">Coil</a></code><br><code><a href="#discrete-input">Discrete Input</a></code><br><code><a href="#holding-register">Holding Register</a></code><br><code><a href="#input-register">Input Register</a></code></td></tr></tbody></table></section>
<section><h4>Exception function</h4><p>IRI: <code>https://www.w3.org/2019/wot/modbus#ExceptionFunction</code></p><span>In case of error, the server replaces the normal function code with an exception function code (or error code) corresponding to the request function code +0x80.</span><table class="def"><tbody><tr><td>Sub-class of</td><td><code><a href="#function-field">Function Field</a></code></td></tr></tbody></table></section>
<section><h4>Exception response</h4><p>IRI: <code>https://www.w3.org/2019/wot/modbus#ExceptionResponse</code></p><span>Response sent by server to client when error occurs.</span><table class="def"><tbody><tr><td>Sub-class of</td><td><code><a href="#response">Response</a></code></td></tr></tbody></table></section>
<section><h4>Function</h4><p>IRI: <code>https://www.w3.org/2019/wot/modbus#Function</code></p><span>Function code identifies the operation requested by client, indicates to the server what kind of action to perform. For a normal response, the server simply echoes to the request the original function code.</span><table class="def"><tbody><tr><td>Sub-class of</td><td><code><a href="#function-field">Function Field</a></code></td></tr><tr><td>Enumeration members</td><td><code><a href="#read-single-coil">Read Single Coil</a></code><br><code><a href="#read-device-identification">Read Device Identification</a></code><br><code><a href="#read-discrete-inputs">Read Discrete Inputs</a></code><br><code><a href="#read-multiple-holding-registers">Read Multiple Holding Registers</a></code><br><code><a href="#read-multiple-input-registers">Read Multiple Input Registers</a></code><br><code><a href="#write-multiple-coils">Write Multiple Coils</a></code><br><code><a href="#write-multiple-holding-registers">Write Multiple Holding Registers</a></code><br><code><a href="#write-single-coil">Write Single Coil</a></code><br><code><a href="#write-single-holding-register">Write Single Holding Register</a></code></td></tr></tbody></table></section>
<section><h4>Function Field</h4><p>IRI: <code>https://www.w3.org/2019/wot/modbus#Function_Field</code></p><span>Function Field class represents the value of the function in a Modbus frame. Each operation identified with a human readable name have a corresponding code.
The response function code corresponds exactly to the request function code sent by the client when no error occurs.
<section><h4>Function Field</h4><p>IRI: <code>https://www.w3.org/2019/wot/modbus#Function_Field</code></p><span>Function Field class represents the value of the function in a Modbus frame. Each operation identified with a human readable name have a corresponding code.
The response function code corresponds exactly to the request function code sent by the client when no error occurs.
On the contrary, the response operation is identified with an error code or exception function code corresponding to the request function code + 0x80.</span><table class="def"><tbody><tr><td>Sub-class of</td><td><code><a href="#payload">Payload</a></code></td></tr><tr><td>Super-class of</td><td><code><a href="#exception-function">Exception function</a></code><br><code><a href="#function">Function</a></code></td></tr></tbody></table></section>
<section><h4>A Modbus Message</h4><p>IRI: <code>https://www.w3.org/2019/wot/modbus#Message</code></p><span>A Modbus Message class represents the communication between client and server</span><table class="def"><tbody><tr><td>Super-class of</td><td><code><a href="#request">Request</a></code><br><code><a href="#response">Response</a></code></td></tr></tbody></table></section>
<section><h4>Normal response</h4><p>IRI: <code>https://www.w3.org/2019/wot/modbus#NormalResponse</code></p><span>Response sent by server to client when no error occurs.</span><table class="def"><tbody><tr><td>Sub-class of</td><td><code><a href="#response">Response</a></code></td></tr></tbody></table></section>
Expand All @@ -60,7 +60,7 @@ <h2>Introduction</h2>
<section><h4>hasPollingTime</h4><p>IRI: <code>https://www.w3.org/2019/wot/modbus#hasPollingTime</code></p><span>Modbus TCP maximum polling rate. The Modbus specification does not define a maximum or minimum allowed polling rate, however specific implementations might introduce such limits. Defined as integer of milliseconds.</span><table class="def"><tbody><tr><td>Domain</td><td><code><a href="#request">Request</a></code></td></tr><tr><td>Range</td><td><code><a href="http://www.w3.org/2001/XMLSchema#integer">integer</a></code></td></tr></tbody></table></section>
<section><h4>hasQuantity</h4><p>IRI: <code>https://www.w3.org/2019/wot/modbus#hasQuantity</code></p><span>Specifies the amount of either registers or coils to be read or written to</span><table class="def"><tbody><tr><td>Domain</td><td><code><a href="#request">Request</a></code></td></tr><tr><td>Range</td><td><code><a href="http://www.w3.org/2001/XMLSchema#integer">integer</a></code></td></tr></tbody></table></section>
<section><h4>hasTimeout</h4><p>IRI: <code>https://www.w3.org/2019/wot/modbus#hasTimeout</code></p><span>Modbus response maximum waiting time. Defines how much time the runtime should wait until it receives a reply from the device.</span><table class="def"><tbody><tr><td>Domain</td><td><code><a href="#request">Request</a></code></td></tr><tr><td>Range</td><td><code><a href="http://www.w3.org/2001/XMLSchema#integer">integer</a></code></td></tr></tbody></table></section>
<section><h4>hasUnitID</h4><p>IRI: <code>https://www.w3.org/2019/wot/modbus#hasUnitID</code></p><span>The Unit ID is usually not needed for ModbusTCP, since the IP-address works as unique identifier, but for compatibility reasons still often included</span><table class="def"><tbody><tr><td>Domain</td><td><code><a href="#request">Request</a></code></td></tr><tr><td>Range</td><td><code><a href="http://www.w3.org/2001/XMLSchema#integer">integer</a></code></td></tr></tbody></table></section>
<section><h4>hasUnitID</h4><p>IRI: <code>https://www.w3.org/2019/wot/modbus#hasUnitID</code></p><span>The Unit ID is technically not needed for ModbusTCP, since the IP-address works as unique identifier, but for compatibility reasons it MUST be included</span><table class="def"><tbody><tr><td>Domain</td><td><code><a href="#request">Request</a></code></td></tr><tr><td>Range</td><td><code><a href="http://www.w3.org/2001/XMLSchema#integer">integer</a></code></td></tr></tbody></table></section>
<section><h4>hasZeroBasedAddressingFlag</h4><p>IRI: <code>https://www.w3.org/2019/wot/modbus#hasZeroBasedAddressingFlag</code></p><span>Modbus implementations can differ in the way addressing works, as the first coil/register can be either referred to as <code>true</code> or <code>false</code>.</span><table class="def"><tbody><tr><td>Domain</td><td><code><a href="#request">Request</a></code></td></tr><tr><td>Range</td><td><code><a href="http://www.w3.org/2001/XMLSchema#boolean">boolean</a></code></td></tr></tbody></table></section></section><section><h3>Named Individuals</h3><section><h4>Coil</h4><p>IRI: <code>https://www.w3.org/2019/wot/modbus#Coil</code></p><span>Represent a modbus coil register. These entities can be read or written</span><table class="def"><tbody><tr><td>Instance of</td><td><code><a href="#entity">Entity</a></code></td></tr></tbody></table></section>
<section><h4>Discrete Input</h4><p>IRI: <code>https://www.w3.org/2019/wot/modbus#DiscreteInput</code></p><span>Represent a modbus discrete input. These entities can only be read</span><table class="def"><tbody><tr><td>Instance of</td><td><code><a href="#entity">Entity</a></code></td></tr></tbody></table></section>
<section><h4>Holding Register</h4><p>IRI: <code>https://www.w3.org/2019/wot/modbus#HoldingRegister</code></p><span>Represent a modbus holding register. These entities can be read or written</span><table class="def"><tbody><tr><td>Instance of</td><td><code><a href="#entity">Entity</a></code></td></tr></tbody></table></section>
Expand Down
Loading

0 comments on commit bdf9ec0

Please sign in to comment.