This is an automated email from the ASF dual-hosted git repository.
git-site-role pushed a commit to branch asf-site
in repository https://gitbox.apache.org/repos/asf/plc4x-website.git
The following commit(s) were added to refs/heads/asf-site by this push:
new 25bccea63 Site checkin for project PLC4X: Jenkins Tools
25bccea63 is described below
commit 25bccea6346406cbb6331a8e3836845db14d5437
Author: jenkins <[email protected]>
AuthorDate: Wed Nov 23 02:18:42 2022 +0000
Site checkin for project PLC4X: Jenkins Tools
---
dependency-management.html | 10 ++--
users/getting-started/general-concepts.html | 2 +-
users/getting-started/plc4go.html | 54 ++++++++++++++++-
users/getting-started/plc4j.html | 90 +++++++++++++++++++++++++++--
users/getting-started/virtual-modbus.html | 44 +++++++++++---
5 files changed, 178 insertions(+), 22 deletions(-)
diff --git a/dependency-management.html b/dependency-management.html
index e42801f7f..eccf620ad 100644
--- a/dependency-management.html
+++ b/dependency-management.html
@@ -136,35 +136,35 @@
<tr class="b">
<td align="left">com.fasterxml.jackson.core</td>
<td><a class="externalLink"
href="https://github.com/FasterXML/jackson">jackson-annotations</a></td>
-<td>2.14.0</td>
+<td>2.14.1</td>
<td>-</td>
<td>jar</td>
<td><a class="externalLink"
href="https://www.apache.org/licenses/LICENSE-2.0.txt">The Apache Software
License, Version 2.0</a></td></tr>
<tr class="a">
<td align="left">com.fasterxml.jackson.core</td>
<td><a class="externalLink"
href="https://github.com/FasterXML/jackson-core">jackson-core</a></td>
-<td>2.14.0</td>
+<td>2.14.1</td>
<td>-</td>
<td>jar</td>
<td><a class="externalLink"
href="https://www.apache.org/licenses/LICENSE-2.0.txt">The Apache Software
License, Version 2.0</a></td></tr>
<tr class="b">
<td align="left">com.fasterxml.jackson.core</td>
<td><a class="externalLink"
href="https://github.com/FasterXML/jackson">jackson-databind</a></td>
-<td>2.14.0</td>
+<td>2.14.1</td>
<td>-</td>
<td>jar</td>
<td><a class="externalLink"
href="https://www.apache.org/licenses/LICENSE-2.0.txt">The Apache Software
License, Version 2.0</a></td></tr>
<tr class="a">
<td align="left">com.fasterxml.jackson.dataformat</td>
<td><a class="externalLink"
href="https://github.com/FasterXML/jackson-dataformat-xml">jackson-dataformat-xml</a></td>
-<td>2.14.0</td>
+<td>2.14.1</td>
<td>-</td>
<td>jar</td>
<td><a class="externalLink"
href="http://www.apache.org/licenses/LICENSE-2.0.txt">The Apache Software
License, Version 2.0</a></td></tr>
<tr class="b">
<td align="left">com.fasterxml.jackson.dataformat</td>
<td><a class="externalLink"
href="https://github.com/FasterXML/jackson-dataformats-text">jackson-dataformat-yaml</a></td>
-<td>2.14.0</td>
+<td>2.14.1</td>
<td>-</td>
<td>jar</td>
<td><a class="externalLink"
href="https://www.apache.org/licenses/LICENSE-2.0.txt">The Apache Software
License, Version 2.0</a></td></tr>
diff --git a/users/getting-started/general-concepts.html
b/users/getting-started/general-concepts.html
index 36b36e83e..2cd83fcf0 100644
--- a/users/getting-started/general-concepts.html
+++ b/users/getting-started/general-concepts.html
@@ -429,7 +429,7 @@ This allows them to not only be used in passive-mode
drivers for simply reading
<div class="sect2">
<h3 id="individual_resource_addresses">Individual Resource Addresses</h3>
<div class="paragraph">
-<p>Addresses for individual fields on a PLC are extremely dependent on the
used protocol.
+<p>Addresses for individual tags on a PLC are extremely dependent on the used
protocol.
As we usually decided to stick to the address formats that are used in those
particular environments.</p>
</div>
<div class="paragraph">
diff --git a/users/getting-started/plc4go.html
b/users/getting-started/plc4go.html
index 70e5e1941..696958032 100644
--- a/users/getting-started/plc4go.html
+++ b/users/getting-started/plc4go.html
@@ -486,6 +486,7 @@ This is done by a <code>PlcReadRequest</code>.</p>
<p>In order to create and run such a <code>PlcReadRequest</code>, please add
the following code:</p>
</div>
<div class="listingblock">
+<div class="title">Up to version 0.10.0</div>
<div class="content">
<pre> // Prepare a read-request
readRequest, err := connection.ReadRequestBuilder().
@@ -499,6 +500,21 @@ This is done by a <code>PlcReadRequest</code>.</p>
}</pre>
</div>
</div>
+<div class="listingblock">
+<div class="title">SNAPSHOT version</div>
+<div class="content">
+<pre> // Prepare a read-request
+ readRequest, err := connection.ReadRequestBuilder().
+ AddTagAddress("tag1", "holding-register:1:REAL").
+ AddTagAddress("tag2", "holding-register:3:REAL").
+ Build()
+ if err != nil {
+ t.Errorf("error preparing read-request: %s",
connectionResult.Err.Error())
+ t.Fail()
+ return
+ }</pre>
+</div>
+</div>
<div class="paragraph">
<p>If you have any errors in the addresses or whatever, you will get an
<code>err</code> instead of a <code>readRequest</code>.</p>
</div>
@@ -588,7 +604,7 @@ Not implemented yet
<p>Now we’ll create the subscription request.</p>
</div>
<div class="paragraph">
-<p>The main difference is that while reading there is only one form how you
could read, with subscriptions there are different forms of subscriptons:</p>
+<p>The main difference is that while reading there is only one form how you
could read, with subscriptions there are different forms of subscriptions:</p>
</div>
<div class="ulist">
<ul>
@@ -607,6 +623,7 @@ Not implemented yet
<p>Therefore instead of using a normal <code>AddItem</code>, there are tree
different functions as you can see in the following examples.</p>
</div>
<div class="listingblock">
+<div class="title">Up to version 0.10.0</div>
<div class="content">
<pre> // Prepare a subscription-request
subscriptionRequest, err := connection.SubscriptionRequestBuilder().
@@ -621,10 +638,27 @@ Not implemented yet
}</pre>
</div>
</div>
+<div class="listingblock">
+<div class="title">SNAPSHOT version</div>
+<div class="content">
+<pre> // Prepare a subscription-request
+ subscriptionRequest, err := connection.SubscriptionRequestBuilder().
+ AddChangeOfStateTagAddress("heating-actual-temperature",
"*/*/10:DPT_Value_Temp").
+ AddChangeOfStateTagAddress("heating-target-temperature",
"*/*/11:DPT_Value_Temp").
+ AddCyclicTagAddress("heating-valve-open", "*/*/12:DPT_OpenClose", 500
* time.Millisecond).
+ AddItemHandler(knxEventHandler).
+ Build()
+ if err != nil {
+ fmt.Printf("Error preparing subscription-request: %s",
connectionResult.Err.Error())
+ return
+ }</pre>
+</div>
+</div>
<div class="paragraph">
<p>The <code>Event hadnler</code> for intercepting incoming events could look
like this:</p>
</div>
<div class="listingblock">
+<div class="title">Up to version 0.10.0</div>
<div class="content">
<pre>func knxEventHandler(event apiModel.PlcSubscriptionEvent) {
for _, fieldName := range event.GetFieldNames() {
@@ -637,6 +671,20 @@ Not implemented yet
}</pre>
</div>
</div>
+<div class="listingblock">
+<div class="title">SNAPSHOT version</div>
+<div class="content">
+<pre>func knxEventHandler(event apiModel.PlcSubscriptionEvent) {
+ for _, tagName := range event.GetTagNames() {
+ if event.GetResponseCode(tagName) == apiModel.PlcResponseCode_OK {
+ groupAddress := event.GetTag(tagName).GetAddressString()
+ fmt.Printf("Got update for tag %s with address %s. Value changed
to: %s\n",
+ tagName, groupAddress, event.GetValue(tagName).GetString())
+ }
+ }
+}</pre>
+</div>
+</div>
<div class="admonitionblock note">
<table>
<tr>
@@ -644,7 +692,7 @@ Not implemented yet
<div class="title">Note</div>
</td>
<td class="content">
-The <code>AddCyclicField</code> method requires a third parameter
<code>duration</code> which specifies the interval, in which a given value is
sent (even if it has not changed).
+The <code>AddCyclicField</code>/<code>AddCyclicTagAddress</code> method
requires a third parameter <code>duration</code> which specifies the interval,
in which a given value is sent (even if it has not changed).
</td>
</tr>
</table>
@@ -656,7 +704,7 @@ The <code>AddCyclicField</code> method requires a third
parameter <code>duration
<div class="title">Note</div>
</td>
<td class="content">
-Here the API differs slightly form the Java version, as in the request-builder
itself you specify the reference to the callback handler which should be
notified on incoming data. Howerver, we will be alliging all API variants as
much as possible in the near future.
+Here the API differs slightly form the Java version, as in the request-builder
itself you specify the reference to the callback handler which should be
notified on incoming data. However, we will be aligning all API variants as
much as possible in the near future.
</td>
</tr>
</table>
diff --git a/users/getting-started/plc4j.html b/users/getting-started/plc4j.html
index ff4263571..acae95035 100644
--- a/users/getting-started/plc4j.html
+++ b/users/getting-started/plc4j.html
@@ -438,7 +438,7 @@ asyncResponse.whenComplete((response, throwable) -> {
So as soon as the request is fully processed, the callback gets called and
will contain a <code>readResponse</code>, if everything went right or a
<code>throwable</code> if there were problems.</p>
</div>
<div class="paragraph">
-<p>However if you want to write your code in a more synchronous fashion, the
following alternative will provide this:</p>
+<p>However, if you want to write your code in a more synchronous fashion, the
following alternative will provide this:</p>
</div>
<div class="listingblock">
<div class="content">
@@ -450,6 +450,7 @@ So as soon as the request is fully processed, the callback
gets called and will
The following example will demonstrate some of the options you have:</p>
</div>
<div class="listingblock">
+<div class="title">Up to version 0.10.0</div>
<div class="content">
<pre>for (String fieldName : response.getFieldNames()) {
if(response.getResponseCode(fieldName) == PlcResponseCode.OK) {
@@ -473,6 +474,31 @@ The following example will demonstrate some of the options
you have:</p>
}</pre>
</div>
</div>
+<div class="listingblock">
+<div class="title">SNAPSHOT version</div>
+<div class="content">
+<pre>for (String tagName : response.getTagNames()) {
+ if(response.getResponseCode(tagName) == PlcResponseCode.OK) {
+ int numValues = response.getNumberOfValues(tagName);
+ // If it's just one element, output just one single line.
+ if(numValues == 1) {
+ logger.info("Value[" + tagName + "]: " +
response.getObject(tagName));
+ }
+ // If it's more than one element, output each in a single row.
+ else {
+ logger.info("Value[" + tagName + "]:");
+ for(int i = 0; i < numValues; i++) {
+ logger.info(" - " + response.getObject(tagName, i));
+ }
+ }
+ }
+ // Something went wrong, to output an error message instead.
+ else {
+ logger.error("Error[" + tagName + "]: " +
response.getResponseCode(tagName).name());
+ }
+}</pre>
+</div>
+</div>
<div class="paragraph">
<p>In the for loop, we are demonstrating how the user can iterate over the
address aliases in the response.
In case of an ordinary read request, this will be predefined by the items in
the request, however in case of a subscription response, the response might
only contain some of the items that were subscribed.</p>
@@ -526,7 +552,7 @@ For convenience the response object has single-argument
methods for accessing th
</div>
<div class="paragraph">
<p>PLC4X provides getters and setters for a wide variety of Java types and
automatically handles the type conversion.
-However when for example trying to get a long-value as a byte and the
long-value exceeds the range supported by the smaller type, a
<code>RuntimeException</code> of type
<code>PlcIncompatibleDatatypeException</code>.
+However, when for example trying to get a long-value as a byte and the
long-value exceeds the range supported by the smaller type, a
<code>RuntimeException</code> of type
<code>PlcIncompatibleDatatypeException</code>.
In order to avoid causing this exception to be thrown, however there are
<code>isValid{TypeName}</code> methods that you can use to check if the value
is compatible.</p>
</div>
</div>
@@ -551,6 +577,7 @@ if (!plcConnection.getMetadata().canWrite()) {
<p>As soon as we are sure that we can write, we create a new
<code>PlcWriteRequest.Builder</code>:</p>
</div>
<div class="listingblock">
+<div class="title">Up to version 0.10.0</div>
<div class="content">
<pre>// Create a new write request:
// - Give the single item requested an alias name
@@ -562,6 +589,19 @@ builder.addItem("value-4", "%DB.DB1.4:INT[3]", 7, 23, 42);
PlcWriteRequest writeRequest = builder.build();</pre>
</div>
</div>
+<div class="listingblock">
+<div class="title">SNAPSHOT version</div>
+<div class="content">
+<pre>// Create a new write request:
+// - Give the single item requested an alias name
+// - Pass in the data you want to write (for arrays, pass in one value for
every element)
+PlcWriteRequest.Builder builder = plcConnection.writeRequestBuilder();
+builder.addTagAddress("value-1", "%Q0.4:BOOL", true);
+builder.addTagAddress("value-2", "%Q0:BYTE", (byte) 0xFF);
+builder.addTagAddress("value-4", "%DB.DB1.4:INT[3]", 7, 23, 42);
+PlcWriteRequest writeRequest = builder.build();</pre>
+</div>
+</div>
<div class="paragraph">
<p>The same way read requests are sent to the PLC by issuing the
<code>execute</code> method on the request object:</p>
</div>
@@ -585,6 +625,7 @@ asyncResponse.whenComplete((response, throwable) -> {
<p>As we don’t have to process the data itself, for the write request,
it’s enough to simply check the return code for each field.</p>
</div>
<div class="listingblock">
+<div class="title">Up to version 0.10.0</div>
<div class="content">
<pre>for (String fieldName : response.getFieldNames()) {
if(response.getResponseCode(fieldName) == PlcResponseCode.OK) {
@@ -597,6 +638,20 @@ asyncResponse.whenComplete((response, throwable) -> {
}</pre>
</div>
</div>
+<div class="listingblock">
+<div class="title">SNAPSHOT version</div>
+<div class="content">
+<pre>for (String tagName : response.getTagNames()) {
+ if(response.getResponseCode(tagName) == PlcResponseCode.OK) {
+ logger.info("Value[" + tagName + "]: updated");
+ }
+ // Something went wrong, to output an error message instead.
+ else {
+ logger.error("Error[" + tagName + "]: " +
response.getResponseCode(tagName).name());
+ }
+}</pre>
+</div>
+</div>
</div>
<div class="sect3">
<h4 id="subscribing_to_data">Subscribing to Data</h4>
@@ -619,7 +674,7 @@ if (!plcConnection.getMetadata().canSubscribe()) {
<p>Now we’ll create the subscription request.</p>
</div>
<div class="paragraph">
-<p>The main difference is that while reading there is only one form how you
could read, with subscriptions there are different forms of subscriptons:</p>
+<p>The main difference is that while reading there is only one form how you
could read, with subscriptions there are different forms of subscriptions:</p>
</div>
<div class="ulist">
<ul>
@@ -638,6 +693,7 @@ if (!plcConnection.getMetadata().canSubscribe()) {
<p>Therefore instead of using a normal <code>addItem</code>, there are tree
different methods as you can see in the following examples.</p>
</div>
<div class="listingblock">
+<div class="title">Up to version 0.10.0</div>
<div class="content">
<pre>// Create a new subscription request:
// - Give the single item requested an alias name
@@ -648,6 +704,18 @@ builder.addEventField("value-3", "{some alarm address}");
PlcSubscriptionRequest subscriptionRequest = builder.build();</pre>
</div>
</div>
+<div class="listingblock">
+<div class="title">SNAPSHOT version</div>
+<div class="content">
+<pre>// Create a new subscription request:
+// - Give the single tag requested an alias name
+PlcSubscriptionRequest.Builder builder =
plcConnection.subscriptionRequestBuilder();
+builder.addChangeOfStateTagAddress("value-1", "{some address}");
+builder.addCyclicTagAddress("value-2", "{some address}",
Duration.ofMillis(1000));
+builder.addEventTagAddress("value-3", "{some alarm address}");
+PlcSubscriptionRequest subscriptionRequest = builder.build();</pre>
+</div>
+</div>
<div class="admonitionblock note">
<table>
<tr>
@@ -655,7 +723,7 @@ PlcSubscriptionRequest subscriptionRequest =
builder.build();</pre>
<div class="title">Note</div>
</td>
<td class="content">
-The <code>addCyclicField</code> method requires a third parameter
<code>duration</code>.
+The <code>addCyclicField</code>/<code>addCyclicTagAddress</code> method
requires a third parameter <code>duration</code>.
</td>
</tr>
</table>
@@ -675,6 +743,7 @@ The <code>addCyclicField</code> method requires a third
parameter <code>duration
<p>In general you can’t say how many of your subscribed fields will be
available in every callback so it is double important to check or iterate over
the field names.</p>
</div>
<div class="listingblock">
+<div class="title">Up to version 0.10.0</div>
<div class="content">
<pre>for (String subscriptionName : response.getFieldNames()) {
final PlcSubscriptionHandle subscriptionHandle =
response.getSubscriptionHandle(subscriptionName);
@@ -686,6 +755,19 @@ The <code>addCyclicField</code> method requires a third
parameter <code>duration
}</pre>
</div>
</div>
+<div class="listingblock">
+<div class="title">SNAPSHOT version</div>
+<div class="content">
+<pre>for (String subscriptionName : response.getFieldNames()) {
+ final PlcSubscriptionHandle subscriptionHandle =
response.getSubscriptionHandle(subscriptionName);
+ subscriptionHandle.register(plcSubscriptionEvent -> {
+ for (String tagName : plcSubscriptionEvent.getTagNames()) {
+ System.out.println(plcSubscriptionEvent.getPlcValue(tagName));
+ }
+ });
+}</pre>
+</div>
+</div>
<div class="admonitionblock note">
<table>
<tr>
diff --git a/users/getting-started/virtual-modbus.html
b/users/getting-started/virtual-modbus.html
index ed7bf939e..a94e34e80 100644
--- a/users/getting-started/virtual-modbus.html
+++ b/users/getting-started/virtual-modbus.html
@@ -451,7 +451,7 @@ When I use ths tool some times I have to click the
<code>Add</code> button more
<p>Coils are always simple <code>bits</code> or <code>boolean</code> values
and Registers are always <code>16 bit short values</code>.</p>
</div>
<div class="paragraph">
-<p>However there are different types of these and they have different
names:</p>
+<p>However, there are different types of these and they have different
names:</p>
</div>
<div class="ulist">
<ul>
@@ -533,7 +533,7 @@ These are only required if the connection requires some
non-default settings.</p
</ul>
</div>
<div class="paragraph">
-<p>If we have setup ModbusPal as described above and are running this on the
same computer, the connection string to connect to this should be:</p>
+<p>If we have set up ModbusPal as described above and are running this on the
same computer, the connection string to connect to this should be:</p>
</div>
<div class="literalblock">
<div class="content">
@@ -571,7 +571,7 @@ When using Maven, all you need to do is add this
dependency:</p>
</div>
<div class="paragraph">
<p>This will allow you to write a valid application, that compiles fine.
-However in order to actually connect to a device using a given protocol, you
need to add this protocol implementation to the classpath.</p>
+However, in order to actually connect to a device using a given protocol, you
need to add this protocol implementation to the classpath.</p>
</div>
<div class="paragraph">
<p>For example in order to communicate using the <code>Modbus</code> protocol,
you would need to add the following dependency:</p>
@@ -629,8 +629,8 @@ try (PlcConnection plcConnection = new
PlcDriverManager().getConnection(connecti
</ul>
</div>
<div class="paragraph">
-<p>In general we will try to offer as many features as possible.
-So if a protocol doesn’t support subscription based communication it is
our goal to simulate this by polling in the background so it is transparent for
the users.</p>
+<p>In general, we will try to offer as many features as possible.
+So if a protocol doesn’t support subscription based communication it is
our goal to simulate this by polling in the background, so it is transparent
for the users.</p>
</div>
<div class="paragraph">
<p>But there are some cases in which we can’t simulate or features are
simply disabled intentionally:</p>
@@ -646,7 +646,7 @@ So if a protocol doesn’t support subscription based
communication it is ou
</ul>
</div>
<div class="paragraph">
-<p>Therefore we use metadata to check programmatically, if a given feature is
available:</p>
+<p>Therefore, we use metadata to check programmatically, if a given feature is
available:</p>
</div>
</div>
<div class="sect2">
@@ -700,7 +700,7 @@ asyncResponse.whenComplete((response, throwable) -> {
So as soon as the request is fully processed, the callback gets called and
will contain a <code>readResponse</code>, if everything went right or a
<code>throwable</code> if there were problems.</p>
</div>
<div class="paragraph">
-<p>However if you want to write your code in a more synchronous fashion, the
following alternative will provide this:</p>
+<p>However, if you want to write your code in a more synchronous fashion, the
following alternative will provide this:</p>
</div>
<div class="listingblock">
<div class="content">
@@ -712,6 +712,7 @@ So as soon as the request is fully processed, the callback
gets called and will
The following example will demonstrate some of the options you have:</p>
</div>
<div class="listingblock">
+<div class="title">Up to version 0.10.0</div>
<div class="content">
<pre>for (String fieldName : response.getFieldNames()) {
if(response.getResponseCode(fieldName) == PlcResponseCode.OK) {
@@ -735,6 +736,31 @@ The following example will demonstrate some of the options
you have:</p>
}</pre>
</div>
</div>
+<div class="listingblock">
+<div class="title">SNAPSHOT version</div>
+<div class="content">
+<pre>for (String tagName : response.getTagNames()) {
+ if(response.getResponseCode(tagName) == PlcResponseCode.OK) {
+ int numValues = response.getNumberOfValues(tagName);
+ // If it's just one element, output just one single line.
+ if(numValues == 1) {
+ logger.info("Value[" + tagName + "]: " +
response.getObject(tagName));
+ }
+ // If it's more than one element, output each in a single row.
+ else {
+ logger.info("Value[" + tagName + "]:");
+ for(int i = 0; i < numValues; i++) {
+ logger.info(" - " + response.getObject(tagName, i));
+ }
+ }
+ }
+ // Something went wrong, to output an error message instead.
+ else {
+ logger.error("Error[" + tagName + "]: " +
response.getResponseCode(tagName).name());
+ }
+}</pre>
+</div>
+</div>
<div class="paragraph">
<p>In the for loop, we are demonstrating how the user can iterate over the
address aliases in the response.
In case of an ordinary read request, this will be predefined by the items in
the request, however in case of a subscription response, the response might
only contain some of the items that were subscribed.</p>
@@ -788,7 +814,7 @@ For convenience the response object has single-argument
methods for accessing th
</div>
<div class="paragraph">
<p>PLC4X provides getters and setters for a wide variety of Java types and
automatically handles the type conversion.
-However when for example trying to get a long-value as a byte and the
long-value exceeds the range supported by the smaller type, a
<code>RuntimeException</code> of type
<code>PlcIncompatibleDatatypeException</code>.
+However, when for example trying to get a long-value as a byte and the
long-value exceeds the range supported by the smaller type, a
<code>RuntimeException</code> of type
<code>PlcIncompatibleDatatypeException</code>.
In order to avoid causing this exception to be thrown, however there are
<code>isValid{TypeName}</code> methods that you can use to check if the value
is compatible.</p>
</div>
</div>
@@ -798,7 +824,7 @@ In order to avoid causing this exception to be thrown,
however there are <code>i
<p>The code for writing is very similar to the code for reading, however when
creating the write request, we have to pass in the data alongside the field
definitions.</p>
</div>
<div class="paragraph">
-<p>While all of the 4 field types support reading from, only the
<code>coil</code> and <code>holding-register</code> field types support writing
to.
+<p>While all 4 field types support reading from, only the <code>coil</code>
and <code>holding-register</code> field types support writing to.
If you attempt to write to these, this will result in errors.</p>
</div>
<div class="paragraph">