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/02/07 14:10:01 UTC
[incubator-plc4x] branch feature/Beckhoff_ADS_protocol updated: fix
build
This is an automated email from the ASF dual-hosted git repository.
sruehl pushed a commit to branch feature/Beckhoff_ADS_protocol
in repository https://gitbox.apache.org/repos/asf/incubator-plc4x.git
The following commit(s) were added to refs/heads/feature/Beckhoff_ADS_protocol by this push:
new b4f5570 fix build
b4f5570 is described below
commit b4f5570f15535db9dd3210a0afd42028f154e66d
Author: Sebastian Rühl <sr...@apache.org>
AuthorDate: Wed Feb 7 15:09:58 2018 +0100
fix build
---
.../ads/src/test/java/org/apache/plc4x/java/ads/ADSDumper.java | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/plc4j/protocols/ads/src/test/java/org/apache/plc4x/java/ads/ADSDumper.java b/plc4j/protocols/ads/src/test/java/org/apache/plc4x/java/ads/ADSDumper.java
index c0da0f4..49037f3 100644
--- a/plc4j/protocols/ads/src/test/java/org/apache/plc4x/java/ads/ADSDumper.java
+++ b/plc4j/protocols/ads/src/test/java/org/apache/plc4x/java/ads/ADSDumper.java
@@ -18,14 +18,15 @@
*/
package org.apache.plc4x.java.ads;
+import org.apache.commons.lang3.RandomStringUtils;
import org.apache.plc4x.java.ads.api.commands.ADSWriteRequest;
import org.apache.plc4x.java.ads.api.commands.types.Data;
import org.apache.plc4x.java.ads.api.commands.types.IndexGroup;
import org.apache.plc4x.java.ads.api.commands.types.IndexOffset;
+import org.apache.plc4x.java.ads.api.commands.types.Length;
import org.apache.plc4x.java.ads.api.generic.types.AMSNetId;
import org.apache.plc4x.java.ads.api.generic.types.AMSPort;
import org.apache.plc4x.java.ads.api.generic.types.Invoke;
-import org.apache.plc4x.java.ads.api.generic.types.Length;
import org.apache.plc4x.java.ads.util.TcpHexDumper;
import org.pcap4j.core.PcapDumper;
import org.pcap4j.core.PcapHandle;
@@ -53,7 +54,7 @@ public class ADSDumper {
try (PcapHandle handle = Pcaps.openDead(DataLinkType.EN10MB, 65536);
PcapDumper dumper = handle.dumpOpen(dumpFile.toAbsolutePath().toString())) {
- String crhit= "Hallo Christoph das ist eine NachrichtHallo Christoph das ist eine NachrichtHallo Christoph das ist eine NachrichtHallo Christoph das ist eine NachrichtHallo Christoph das ist eine NachrichtHallo Christoph das ist eine NachrichtHallo Christoph das ist eine NachrichtHallo Christoph das ist eine NachrichtHallo Christoph das ist eine Nachricht";
+ String randomString = RandomStringUtils.randomAscii(1024);
ADSWriteRequest adsWriteRequest = new ADSWriteRequest(
AMSNetId.of("192.168.0.70.1.2"),
@@ -63,8 +64,8 @@ public class ADSDumper {
Invoke.of((byte) 0, (byte) 0, (byte) 0, (byte) 0),
IndexGroup.of((byte) 0, (byte) 0, (byte) 0, (byte) 0),
IndexOffset.of((byte) 0, (byte) 0, (byte) 0, (byte) 0),
- Length.of(crhit.getBytes().length),
- Data.of(crhit.getBytes())
+ Length.of(randomString.getBytes().length),
+ Data.of(randomString.getBytes())
);
try (TcpHexDumper tcpHexDumper = TcpHexDumper.runOn(55862); Socket localhost = new Socket("localhost", tcpHexDumper.getPort())) {
--
To stop receiving notification emails like this one, please contact
sruehl@apache.org.