You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@plc4x.apache.org by cd...@apache.org on 2018/10/15 11:27:20 UTC
[incubator-plc4x] 01/02: - Added some system out printline to show
that it's doing something.
This is an automated email from the ASF dual-hosted git repository.
cdutz pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-plc4x.git
commit 2c50ed1072620875165aa48d048a28557d94675c
Author: Christofer Dutz <ch...@c-ware.de>
AuthorDate: Mon Oct 15 13:26:30 2018 +0200
- Added some system out printline to show that it's doing something.
---
.../src/test/java/org/apache/plc4x/java/deltav/PoCInflux.java | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/plc4j/protocols/delta-v/src/test/java/org/apache/plc4x/java/deltav/PoCInflux.java b/plc4j/protocols/delta-v/src/test/java/org/apache/plc4x/java/deltav/PoCInflux.java
index 767dbfb..663ad8e 100644
--- a/plc4j/protocols/delta-v/src/test/java/org/apache/plc4x/java/deltav/PoCInflux.java
+++ b/plc4j/protocols/delta-v/src/test/java/org/apache/plc4x/java/deltav/PoCInflux.java
@@ -76,6 +76,8 @@ public class PoCInflux {
// Setup receiving of packets and redirecting them to the corresponding listeners.
// Filter packets to contain only the ip protocol number of the current protocol.
receiveHandle = nif.openLive(SNAPLEN, PcapNetworkInterface.PromiscuousMode.PROMISCUOUS, READ_TIMEOUT);
+
+ System.out.println("Running in Network-Mode with device: " + nif.getName());
} else {
File input = new File(inputPath);
if(!input.exists() || !input.isFile()) {
@@ -83,6 +85,8 @@ public class PoCInflux {
}
receiveHandle = Pcaps.openOffline(input.getAbsolutePath(), PcapHandle.TimestampPrecision.NANO);
+
+ System.out.println("Running in Simulated-Mode using PCAPNG file: " + inputPath);
}
// Set the filter.
@@ -115,6 +119,10 @@ public class PoCInflux {
// We're only interested in type 2 messages.
if(messageType == 0x0002) {
short payloadType = buf.readShort();
+
+ System.out.println("Got DeltaV packet : " +
+ Hex.encodeHexString(new byte[]{(byte)(payloadType >> 8), (byte)(payloadType & 0xFF)}));
+
switch(payloadType) {
case 0x0201: {
// Notes: