You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@plc4x.apache.org by sr...@apache.org on 2018/03/08 10:51:31 UTC

[incubator-plc4x] 02/08: added more javadoc for ams net id and port

This is an automated email from the ASF dual-hosted git repository.

sruehl pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-plc4x.git

commit 3cb1ea6b860296a8321b34bc8bbd5419514038dc
Author: Sebastian Rühl <sr...@apache.org>
AuthorDate: Thu Mar 8 09:19:47 2018 +0100

    added more javadoc for ams net id and port
---
 .../plc4x/java/ads/api/generic/types/AMSNetId.java | 17 +++++++++++++---
 .../plc4x/java/ads/api/generic/types/AMSPort.java  | 23 ++++++++++++++++++++++
 2 files changed, 37 insertions(+), 3 deletions(-)

diff --git a/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/api/generic/types/AMSNetId.java b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/api/generic/types/AMSNetId.java
index 14df2e4..c2171b0 100644
--- a/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/api/generic/types/AMSNetId.java
+++ b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/api/generic/types/AMSNetId.java
@@ -26,15 +26,26 @@ import java.util.regex.Pattern;
 import java.util.stream.Stream;
 
 /**
- * The AMSNetId consists of 6 bytes and addresses the transmitter or receiver. One possible AMSNetId would be e.g. "172.16.17.10.1.1". The storage arrangement in this example is as follows:
+ * It is not only possible to exchange data between TwinCAT modules on one PC, it is even possible to do so by ADS
+ * methods between multiple TwinCAT PC's on the network.
+ * <p>
+ * <img src="https://infosys.beckhoff.com/content/1033/tcadscommon/images/TcMultiplePC.gif"/>
+ * <p>
+ * Every PC on the network can be uniquely identified by a TCP/IP address, such as "172.1.2.16". The AdsAmsNetId is an
+ * extension of the TCP/IP address and identifies a TwinCAT message router, e.g. "172.1.2.16.1.1". TwinCAT message
+ * routers exist on every TwinCAT PC, and on every Beckhoff BCxxxx bus controller (e.g. BC3100, BC8100, BC9000, ...).
+ * <p>
+ * The AMSNetId consists of 6 bytes and addresses the transmitter or receiver. One possible AMSNetId would be e.g.
+ * "172.16.17.10.1.1". The storage arrangement in this example is as follows:
  * <p>
  * _____0     1     2     3     4     5
  * __+-----------------------------------+
  * 0 | 127 |  16 |  17 |  10 |   1 |   1 |
  * __+-----------------------------------+
  * <p>
- * <p>
- * The AMSNetId is purely logical and has usually no relation to the IP address. The AMSNetId is configured at the target system. At the PC for this the TwinCAT System Control is used. If you use other hardware, see the considering documentation for notes about settings of the AMS NetId.
+ * The AMSNetId is purely logical and has usually no relation to the IP address. The AMSNetId is configured at the
+ * target system. At the PC for this the TwinCAT System Control is used. If you use other hardware, see the considering
+ * documentation for notes about settings of the AMS NetId.
  */
 public class AMSNetId extends ByteValue {
 
diff --git a/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/api/generic/types/AMSPort.java b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/api/generic/types/AMSPort.java
index 8fd3327..dc19fbf 100644
--- a/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/api/generic/types/AMSPort.java
+++ b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/api/generic/types/AMSPort.java
@@ -24,6 +24,29 @@ import org.apache.plc4x.java.ads.api.util.ByteValue;
 import java.nio.ByteBuffer;
 import java.util.regex.Pattern;
 
+/**
+ * The ADS devices in a TwinCAT message router are uniquely identified by a number referred to as the ADS-PortNr. For ADS devices this has a fixed specification, whereas pure ADS client applications (e.g. a visualisation system) are allocated a variable ADS port number when they first access the message router.
+ * <p>
+ * The following ADS port numbers are already assigned:
+ * <table border="1">
+ * <th><td>ADS-PortNr</td><td>ADS device description</td></th>
+ * <tr><td>100<tr><td>Logger (only NT-Log)</td></tr>
+ * <tr><td>110<tr><td>Eventlogger</td></tr>
+ * <tr><td>300<tr><td>IO</td></tr>
+ * <tr><td>301<tr><td>additional Task 1</td></tr>
+ * <tr><td>302<tr><td>additional Task 2</td></tr>
+ * <tr><td><tr><td></td></tr>
+ * <tr><td>500<tr><td>NC</td></tr>
+ * <tr><td>801<tr><td>PLC RuntimeSystem 1</td></tr>
+ * <tr><td>811<tr><td>PLC RuntimeSystem 2</td></tr>
+ * <tr><td>821<tr><td>PLC RuntimeSystem 3</td></tr>
+ * <tr><td>831<tr><td>PLC RuntimeSystem 4</td></tr>
+ * <tr><td><tr><td></td></tr>
+ * <tr><td>900<tr><td>Camshaft controller</td></tr>
+ * <tr><td>10000<tr><td>System Service</td></tr>
+ * <tr><td>14000<tr><td>Scope</td></tr>
+ * </table>
+ */
 public class AMSPort extends ByteValue {
 
     public static final Pattern AMS_PORT_PATTERN = Pattern.compile("\\d+");

-- 
To stop receiving notification emails like this one, please contact
sruehl@apache.org.