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 2019/09/25 15:13:04 UTC
[plc4x] branch develop updated (f351ed5 -> f53cde9)
This is an automated email from the ASF dual-hosted git repository.
cdutz pushed a change to branch develop
in repository https://gitbox.apache.org/repos/asf/plc4x.git.
from f351ed5 [fixed] OPC UA Subscription item name is null
new 5477d26 - Added an option to disable the throttling of the pcap input - Did some benchmark on the decoding of BACnet packets
new 774d457 - Fixed a strange build error that just popped up today.
new f53cde9 - Added enum support to the code generation.
The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.../language/java/JavaLanguageTemplateHelper.java | 28 ++++++++++++++++++----
.../main/resources/templates/java/io-template.ftlh | 14 ++++++++++-
.../resources/templates/java/pojo-template.ftlh | 2 ++
.../plugins/codegenerator/language/mspec/MSpec.g4 | 7 +++++-
...faultSimpleField.java => DefaultEnumField.java} | 6 ++---
.../mspec/parser/MessageFormatListener.java | 14 ++++++++++-
.../utils/pcapsockets/netty/PcapSocketChannel.java | 13 ++++++----
.../pcapsockets/netty/PcapSocketChannelConfig.java | 2 ++
.../resources/protocols/bacnetip/bacnetip.mspec | 2 +-
.../java/bacnetip/protocol/HelloWorldProtocol.java | 15 ++++++++++--
.../java/bacnetip/PassiveBacNetIpDriverManual.java | 4 +++-
tools/logstash/pom.xml | 2 +-
12 files changed, 89 insertions(+), 20 deletions(-)
copy build-utils/protocol-base-mspec/src/main/java/org/apache/plc4x/plugins/codegenerator/language/mspec/model/fields/{DefaultSimpleField.java => DefaultEnumField.java} (84%)
[plc4x] 03/03: - Added enum support to the code generation.
Posted by cd...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
cdutz pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/plc4x.git
commit f53cde9923121b03aeac637dfe9b609f6d88737e
Author: Christofer Dutz <ch...@c-ware.de>
AuthorDate: Wed Sep 25 17:04:55 2019 +0200
- Added enum support to the code generation.
---
.../language/java/JavaLanguageTemplateHelper.java | 28 ++++++++++--
.../main/resources/templates/java/io-template.ftlh | 14 +++++-
.../resources/templates/java/pojo-template.ftlh | 2 +
.../plugins/codegenerator/language/mspec/MSpec.g4 | 7 ++-
.../mspec/model/fields/DefaultEnumField.java | 51 ++++++++++++++++++++++
.../mspec/parser/MessageFormatListener.java | 14 +++++-
.../resources/protocols/bacnetip/bacnetip.mspec | 2 +-
7 files changed, 110 insertions(+), 8 deletions(-)
diff --git a/build-utils/language-java/src/main/java/org/apache/plc4x/language/java/JavaLanguageTemplateHelper.java b/build-utils/language-java/src/main/java/org/apache/plc4x/language/java/JavaLanguageTemplateHelper.java
index c873e78..d4fe026 100644
--- a/build-utils/language-java/src/main/java/org/apache/plc4x/language/java/JavaLanguageTemplateHelper.java
+++ b/build-utils/language-java/src/main/java/org/apache/plc4x/language/java/JavaLanguageTemplateHelper.java
@@ -22,10 +22,7 @@ package org.apache.plc4x.language.java;
import org.apache.commons.lang3.math.NumberUtils;
import org.apache.commons.text.WordUtils;
import org.apache.plc4x.plugins.codegenerator.protocol.freemarker.FreemarkerLanguageTemplateHelper;
-import org.apache.plc4x.plugins.codegenerator.types.definitions.Argument;
-import org.apache.plc4x.plugins.codegenerator.types.definitions.ComplexTypeDefinition;
-import org.apache.plc4x.plugins.codegenerator.types.definitions.DiscriminatedComplexTypeDefinition;
-import org.apache.plc4x.plugins.codegenerator.types.definitions.TypeDefinition;
+import org.apache.plc4x.plugins.codegenerator.types.definitions.*;
import org.apache.plc4x.plugins.codegenerator.types.fields.*;
import org.apache.plc4x.plugins.codegenerator.types.references.ComplexTypeReference;
import org.apache.plc4x.plugins.codegenerator.types.references.SimpleTypeReference;
@@ -323,6 +320,20 @@ public class JavaLanguageTemplateHelper implements FreemarkerLanguageTemplateHel
return types.values();
}
+ public Collection<ComplexTypeReference> getEnumTypes(ComplexTypeDefinition complexTypeDefinition) {
+ Map<String, ComplexTypeReference> types = new HashMap<>();
+ for (Field field : complexTypeDefinition.getFields()) {
+ if(field instanceof EnumField) {
+ EnumField enumField = (EnumField) field;
+ if(enumField.getType() instanceof ComplexTypeReference) {
+ ComplexTypeReference complexTypeReference = (ComplexTypeReference) enumField.getType();
+ types.put(complexTypeReference.getName(), complexTypeReference);
+ }
+ }
+ }
+ return types.values();
+ }
+
public boolean isSimpleType(TypeReference typeReference) {
return typeReference instanceof SimpleTypeReference;
}
@@ -613,4 +624,13 @@ public class JavaLanguageTemplateHelper implements FreemarkerLanguageTemplateHel
return valueString;
}
+ public SimpleTypeReference getEnumBaseType(TypeReference enumType) {
+ if(!(enumType instanceof ComplexTypeReference)) {
+ throw new RuntimeException("type reference for enum types must be of type complex type");
+ }
+ ComplexTypeReference complexType = (ComplexTypeReference) enumType;
+ EnumTypeDefinition enumTypeDefinition = (EnumTypeDefinition) types.get(complexType.getName());
+ return (SimpleTypeReference) enumTypeDefinition.getType();
+ }
+
}
diff --git a/build-utils/language-java/src/main/resources/templates/java/io-template.ftlh b/build-utils/language-java/src/main/resources/templates/java/io-template.ftlh
index 4f548a3..ad6abc3 100644
--- a/build-utils/language-java/src/main/resources/templates/java/io-template.ftlh
+++ b/build-utils/language-java/src/main/resources/templates/java/io-template.ftlh
@@ -40,6 +40,7 @@ package ${helper.packageName(protocolName, languageName, outputFlavor)}.io;
import ${helper.packageName(protocolName, languageName, outputFlavor)}.*;
<#if helper.getComplexTypes(type)?has_content>import ${helper.packageName(protocolName, languageName, outputFlavor)}.io.*;</#if>
+<#if helper.getEnumTypes(type)?has_content>import ${helper.packageName(protocolName, languageName, outputFlavor)}.types.*;</#if>
import org.apache.plc4x.java.utils.*;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -132,11 +133,16 @@ public class ${typeName}IO {
throw new ParseException("Expected constant value " + ${typeName}.${field.name?upper_case} + " but got " + ${field.name});
}
<#break>
+ <#case "enum">
+
+ // Enum field (${field.name})
+ ${helper.getLanguageTypeNameForField(field)} ${field.name} = ${helper.getLanguageTypeNameForField(field)}.valueOf(io.${helper.getReadMethodName(helper.getEnumBaseType(field.type))}(${helper.getEnumBaseType(field.type).size}));
+ <#break>
<#case "discriminator">
// Discriminator Field (${field.name}) (Used as input to a switch field)
${helper.getLanguageTypeNameForField(field)} ${field.name} = io.${helper.getReadMethodName(field.type)}(${field.type.size});
- <#break>
+ <#break>
<#case "implicit">
// Implicit Field (${field.name}) (Used for parsing, but it's value is not stored as it's implicitly given by the objects content)
@@ -300,6 +306,12 @@ public class ${typeName}IO {
${helper.getLanguageTypeNameForField(field)} ${field.name} = (${helper.getLanguageTypeNameForField(field)}) value.getDiscriminatorValues()[0];
io.${helper.getWriteBufferReadMethodCall(field.type, "(" + field.name + ")")};
<#break>
+ <#case "enum">
+
+ // Enum field (${field.name})
+ ${helper.getLanguageTypeNameForField(field)} ${field.name} = (${helper.getLanguageTypeNameForField(field)}) value.get${field.name?cap_first}();
+ io.${helper.getWriteBufferReadMethodCall(helper.getEnumBaseType(field.type), "(" + field.name + ".getValue())")};
+ <#break>
<#case "implicit">
// Implicit Field (${field.name}) (Used for parsing, but it's value is not stored as it's implicitly given by the objects content)
diff --git a/build-utils/language-java/src/main/resources/templates/java/pojo-template.ftlh b/build-utils/language-java/src/main/resources/templates/java/pojo-template.ftlh
index 094a9ea..45b4545 100644
--- a/build-utils/language-java/src/main/resources/templates/java/pojo-template.ftlh
+++ b/build-utils/language-java/src/main/resources/templates/java/pojo-template.ftlh
@@ -38,6 +38,8 @@ ${helper.packageName(protocolName, languageName, outputFlavor)?replace(".", "/")
package ${helper.packageName(protocolName, languageName, outputFlavor)};
+<#if helper.getEnumTypes(type)?has_content>import ${helper.packageName(protocolName, languageName, outputFlavor)}.types.*;</#if>
+
import com.fasterxml.jackson.annotation.*;
import org.apache.plc4x.java.utils.Message;
diff --git a/build-utils/protocol-base-mspec/src/main/antlr4/org/apache/plc4x/plugins/codegenerator/language/mspec/MSpec.g4 b/build-utils/protocol-base-mspec/src/main/antlr4/org/apache/plc4x/plugins/codegenerator/language/mspec/MSpec.g4
index 642afd4..8d058ca 100644
--- a/build-utils/protocol-base-mspec/src/main/antlr4/org/apache/plc4x/plugins/codegenerator/language/mspec/MSpec.g4
+++ b/build-utils/protocol-base-mspec/src/main/antlr4/org/apache/plc4x/plugins/codegenerator/language/mspec/MSpec.g4
@@ -43,6 +43,7 @@ field
| checksumField
| constField
| discriminatorField
+ | enumField
| implicitField
| manualArrayField
| manualField
@@ -70,6 +71,10 @@ discriminatorField
: 'discriminator' type=dataType name=idExpression
;
+enumField
+ : 'enum' type=typeReference name=idExpression
+ ;
+
implicitField
: 'implicit' type=dataType name=idExpression serializationExpression=expression
;
@@ -103,7 +108,7 @@ typeSwitchField
;
virtualField
- : 'virtual' type=dataType name=idExpression valueExpression=expression
+ : 'virtual' type=typeReference name=idExpression valueExpression=expression
;
enumValueDefinition
diff --git a/build-utils/protocol-base-mspec/src/main/java/org/apache/plc4x/plugins/codegenerator/language/mspec/model/fields/DefaultEnumField.java b/build-utils/protocol-base-mspec/src/main/java/org/apache/plc4x/plugins/codegenerator/language/mspec/model/fields/DefaultEnumField.java
new file mode 100644
index 0000000..97c7912
--- /dev/null
+++ b/build-utils/protocol-base-mspec/src/main/java/org/apache/plc4x/plugins/codegenerator/language/mspec/model/fields/DefaultEnumField.java
@@ -0,0 +1,51 @@
+/*
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+ */
+
+package org.apache.plc4x.plugins.codegenerator.language.mspec.model.fields;
+
+import org.apache.plc4x.plugins.codegenerator.types.fields.EnumField;
+import org.apache.plc4x.plugins.codegenerator.types.references.TypeReference;
+import org.apache.plc4x.plugins.codegenerator.types.terms.Term;
+
+public class DefaultEnumField extends DefaultTaggedField implements EnumField {
+
+ private final TypeReference type;
+ private final String name;
+ private final Term[] params;
+
+ public DefaultEnumField(String[] tags, TypeReference type, String name, Term[] params) {
+ super(tags);
+ this.type = type;
+ this.name = name;
+ this.params = params;
+ }
+
+ public TypeReference getType() {
+ return type;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public Term[] getParams() {
+ return params;
+ }
+
+}
diff --git a/build-utils/protocol-base-mspec/src/main/java/org/apache/plc4x/plugins/codegenerator/language/mspec/parser/MessageFormatListener.java b/build-utils/protocol-base-mspec/src/main/java/org/apache/plc4x/plugins/codegenerator/language/mspec/parser/MessageFormatListener.java
index d457bc1..188c6f0 100644
--- a/build-utils/protocol-base-mspec/src/main/java/org/apache/plc4x/plugins/codegenerator/language/mspec/parser/MessageFormatListener.java
+++ b/build-utils/protocol-base-mspec/src/main/java/org/apache/plc4x/plugins/codegenerator/language/mspec/parser/MessageFormatListener.java
@@ -38,6 +38,7 @@ import org.apache.plc4x.plugins.codegenerator.types.fields.ArrayField;
import org.apache.plc4x.plugins.codegenerator.types.fields.Field;
import org.apache.plc4x.plugins.codegenerator.types.fields.ManualArrayField;
import org.apache.plc4x.plugins.codegenerator.types.fields.SwitchField;
+import org.apache.plc4x.plugins.codegenerator.types.references.ComplexTypeReference;
import org.apache.plc4x.plugins.codegenerator.types.references.SimpleTypeReference;
import org.apache.plc4x.plugins.codegenerator.types.references.TypeReference;
import org.apache.plc4x.plugins.codegenerator.types.terms.Term;
@@ -159,6 +160,17 @@ public class MessageFormatListener extends MSpecBaseListener {
}
@Override
+ public void enterEnumField(MSpecParser.EnumFieldContext ctx) {
+ ComplexTypeReference type = new DefaultComplexTypeReference(ctx.type.complexTypeReference.getText());
+ String name = ctx.name.id.getText();
+ Term[] params = getFieldParams((MSpecParser.FieldDefinitionContext) ctx.parent.parent);
+ Field field = new DefaultEnumField(null, type, name, params);
+ if(parserContexts.peek() != null) {
+ parserContexts.peek().add(field);
+ }
+ }
+
+ @Override
public void enterImplicitField(MSpecParser.ImplicitFieldContext ctx) {
SimpleTypeReference type = getSimpleTypeReference(ctx.type);
String name = ctx.name.id.getText();
@@ -274,7 +286,7 @@ public class MessageFormatListener extends MSpecBaseListener {
@Override
public void enterVirtualField(MSpecParser.VirtualFieldContext ctx) {
- SimpleTypeReference type = getSimpleTypeReference(ctx.type);
+ TypeReference type = getTypeReference(ctx.type);
String name = ctx.name.id.getText();
String valueExpressionString = ctx.valueExpression.expr.getText();
Term valueExpression = getExpressionTerm(valueExpressionString);
diff --git a/protocols/bacnetip/src/main/resources/protocols/bacnetip/bacnetip.mspec b/protocols/bacnetip/src/main/resources/protocols/bacnetip/bacnetip.mspec
index 6e99211..c5f5e74 100644
--- a/protocols/bacnetip/src/main/resources/protocols/bacnetip/bacnetip.mspec
+++ b/protocols/bacnetip/src/main/resources/protocols/bacnetip/bacnetip.mspec
@@ -546,7 +546,7 @@
]
]
-[enum uint 4 'ApplicationTags'
+[enum int 4 'ApplicationTag'
['0x0' NULL]
['0x1' BOOLEAN]
['0x2' UNSIGNED_INTEGER]
[plc4x] 02/03: - Fixed a strange build error that just popped up
today.
Posted by cd...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
cdutz pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/plc4x.git
commit 774d457fa62241a9ea70600099208bd9555bf5f6
Author: Christofer Dutz <ch...@c-ware.de>
AuthorDate: Wed Sep 25 17:03:54 2019 +0200
- Fixed a strange build error that just popped up today.
---
tools/logstash/pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/logstash/pom.xml b/tools/logstash/pom.xml
index e8468d5..a78de4e 100644
--- a/tools/logstash/pom.xml
+++ b/tools/logstash/pom.xml
@@ -69,7 +69,7 @@
<configuration>
<executable>${gradlew.executable}</executable>
<arguments>
- <argument>:logstash-core:assemble</argument>
+ <argument>:logstash-core:jar</argument>
</arguments>
<workingDirectory>${project.build.directory}/logstash-${logstash.version}</workingDirectory>
</configuration>
[plc4x] 01/03: - Added an option to disable the throttling of the
pcap input - Did some benchmark on the decoding of BACnet packets
Posted by cd...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
cdutz pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/plc4x.git
commit 5477d26f5c17b1c10025f3177af12331432490fe
Author: Christofer Dutz <ch...@c-ware.de>
AuthorDate: Wed Sep 25 13:45:34 2019 +0200
- Added an option to disable the throttling of the pcap input
- Did some benchmark on the decoding of BACnet packets
---
.../java/utils/pcapsockets/netty/PcapSocketChannel.java | 13 ++++++++-----
.../utils/pcapsockets/netty/PcapSocketChannelConfig.java | 2 ++
.../plc4x/java/bacnetip/protocol/HelloWorldProtocol.java | 15 +++++++++++++--
.../plc4x/java/bacnetip/PassiveBacNetIpDriverManual.java | 4 +++-
4 files changed, 26 insertions(+), 8 deletions(-)
diff --git a/plc4j/utils/pcap-sockets/src/main/java/org/apache/plc4x/java/utils/pcapsockets/netty/PcapSocketChannel.java b/plc4j/utils/pcap-sockets/src/main/java/org/apache/plc4x/java/utils/pcapsockets/netty/PcapSocketChannel.java
index dca632b..2233f0f 100644
--- a/plc4j/utils/pcap-sockets/src/main/java/org/apache/plc4x/java/utils/pcapsockets/netty/PcapSocketChannel.java
+++ b/plc4j/utils/pcap-sockets/src/main/java/org/apache/plc4x/java/utils/pcapsockets/netty/PcapSocketChannel.java
@@ -118,11 +118,14 @@ public class PcapSocketChannel extends OioByteStreamChannel {
public void gotPacket(Packet packet) {
Timestamp curPacketTime = handle.getTimestamp();
- // If last-time is not null, wait for the given number of nano-seconds.
- if(lastPacketTime != null) {
- int numMicrosecondsSleep = (int)
- ((curPacketTime.getNanos() - lastPacketTime.getNanos()) / config.getSpeedFactor());
- nanoSecondSleep(numMicrosecondsSleep);
+ // Only enable the throttling if it is not disabled.
+ if(config.getSpeedFactor() != PcapSocketChannelConfig.NO_THROTTLING) {
+ // If last-time is not null, wait for the given number of nano-seconds.
+ if (lastPacketTime != null) {
+ int numMicrosecondsSleep = (int)
+ ((curPacketTime.getNanos() - lastPacketTime.getNanos()) / config.getSpeedFactor());
+ nanoSecondSleep(numMicrosecondsSleep);
+ }
}
// Send the bytes to the netty pipeline.
diff --git a/plc4j/utils/pcap-sockets/src/main/java/org/apache/plc4x/java/utils/pcapsockets/netty/PcapSocketChannelConfig.java b/plc4j/utils/pcap-sockets/src/main/java/org/apache/plc4x/java/utils/pcapsockets/netty/PcapSocketChannelConfig.java
index 7ac5d64..e4f0b9e 100644
--- a/plc4j/utils/pcap-sockets/src/main/java/org/apache/plc4x/java/utils/pcapsockets/netty/PcapSocketChannelConfig.java
+++ b/plc4j/utils/pcap-sockets/src/main/java/org/apache/plc4x/java/utils/pcapsockets/netty/PcapSocketChannelConfig.java
@@ -28,6 +28,8 @@ import java.util.Map;
public class PcapSocketChannelConfig extends DefaultChannelConfig implements ChannelConfig {
+ public static float NO_THROTTLING = -1;
+
private PacketHandler packetHandler;
private float speedFactor;
diff --git a/sandbox/test-java-bacnetip-driver/src/main/java/org/apache/plc4x/java/bacnetip/protocol/HelloWorldProtocol.java b/sandbox/test-java-bacnetip-driver/src/main/java/org/apache/plc4x/java/bacnetip/protocol/HelloWorldProtocol.java
index c8b8e8f..50d4e1e 100644
--- a/sandbox/test-java-bacnetip-driver/src/main/java/org/apache/plc4x/java/bacnetip/protocol/HelloWorldProtocol.java
+++ b/sandbox/test-java-bacnetip-driver/src/main/java/org/apache/plc4x/java/bacnetip/protocol/HelloWorldProtocol.java
@@ -27,6 +27,9 @@ import java.util.List;
public class HelloWorldProtocol extends PlcMessageToMessageCodec<BVLC, PlcRequestContainer> {
+ private int packetCount = 0;
+ private long startTime = -1;
+
@Override
protected void encode(ChannelHandlerContext channelHandlerContext, PlcRequestContainer plcRequestContainer, List<Object> list) throws Exception {
System.out.println(plcRequestContainer);
@@ -34,7 +37,15 @@ public class HelloWorldProtocol extends PlcMessageToMessageCodec<BVLC, PlcReques
@Override
protected void decode(ChannelHandlerContext channelHandlerContext, BVLC packet, List<Object> list) throws Exception {
- if(packet instanceof BVLCOriginalUnicastNPDU) {
+ if(startTime == -1) {
+ startTime = System.currentTimeMillis();
+ }
+ packetCount++;
+ if(packetCount % 10000 == 0) {
+ long curTime = System.currentTimeMillis();
+ System.out.println("Read " + packetCount + " packets in " + (curTime - startTime) + "ms");
+ }
+/* if(packet instanceof BVLCOriginalUnicastNPDU) {
final NPDU npdu = ((BVLCOriginalUnicastNPDU) packet).getNpdu();
final APDU apdu = npdu.getApdu();
if(apdu instanceof APDUSimpleAck) {
@@ -55,7 +66,7 @@ public class HelloWorldProtocol extends PlcMessageToMessageCodec<BVLC, PlcReques
}
} else {
System.out.println("Other");
- }
+ }*/
}
}
diff --git a/sandbox/test-java-bacnetip-driver/src/test/java/org/apache/plc4x/java/bacnetip/PassiveBacNetIpDriverManual.java b/sandbox/test-java-bacnetip-driver/src/test/java/org/apache/plc4x/java/bacnetip/PassiveBacNetIpDriverManual.java
index 5903221..68f29a6 100644
--- a/sandbox/test-java-bacnetip-driver/src/test/java/org/apache/plc4x/java/bacnetip/PassiveBacNetIpDriverManual.java
+++ b/sandbox/test-java-bacnetip-driver/src/test/java/org/apache/plc4x/java/bacnetip/PassiveBacNetIpDriverManual.java
@@ -22,6 +22,7 @@ import org.apache.plc4x.java.bacnetip.connection.PassiveBacNetIpPlcConnection;
import org.apache.plc4x.java.base.connection.NettyPlcConnection;
import org.apache.plc4x.java.base.connection.PcapChannelFactory;
import org.apache.plc4x.java.utils.pcapsockets.netty.PcapSocketAddress;
+import org.apache.plc4x.java.utils.pcapsockets.netty.PcapSocketChannelConfig;
import org.apache.plc4x.java.utils.pcapsockets.netty.UdpIpPacketHandler;
import java.io.File;
@@ -32,7 +33,8 @@ public class PassiveBacNetIpDriverManual {
NettyPlcConnection connection = new PassiveBacNetIpPlcConnection(new PcapChannelFactory(
//new File("/Users/christofer.dutz/Projects/Apache/PLC4X-Documents/BacNET/Captures/Merck/BACnetWhoIsRouterToNetwork.pcapng"), null,
new File("/Users/christofer.dutz/Downloads/20190906_udp.pcapng"), null,
- PassiveBacNetIpDriver.BACNET_IP_PORT, PcapSocketAddress.ALL_PROTOCOLS, 1.5f, new UdpIpPacketHandler()), "");
+ PassiveBacNetIpDriver.BACNET_IP_PORT, PcapSocketAddress.ALL_PROTOCOLS,
+ PcapSocketChannelConfig.NO_THROTTLING, new UdpIpPacketHandler()), "");
connection.connect();
}