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/11/28 12:43:15 UTC
[incubator-plc4x] branch develop updated: - Extended the size of
the byte-offset to allow 5 digit offsets.
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/incubator-plc4x.git
The following commit(s) were added to refs/heads/develop by this push:
new 6e78786 - Extended the size of the byte-offset to allow 5 digit offsets.
6e78786 is described below
commit 6e787863898098230f14fbbcbda696e16670bad6
Author: Christofer Dutz <ch...@c-ware.de>
AuthorDate: Wed Nov 28 13:43:06 2018 +0100
- Extended the size of the byte-offset to allow 5 digit offsets.
---
.../s7/src/main/java/org/apache/plc4x/java/s7/model/S7Field.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/plc4j/protocols/s7/src/main/java/org/apache/plc4x/java/s7/model/S7Field.java b/plc4j/protocols/s7/src/main/java/org/apache/plc4x/java/s7/model/S7Field.java
index c82ba2a..e3c0fa9 100644
--- a/plc4j/protocols/s7/src/main/java/org/apache/plc4x/java/s7/model/S7Field.java
+++ b/plc4j/protocols/s7/src/main/java/org/apache/plc4x/java/s7/model/S7Field.java
@@ -29,9 +29,9 @@ import java.util.regex.Pattern;
public class S7Field implements PlcField {
private static final Pattern ADDRESS_PATTERN =
- Pattern.compile("^%(?<memoryArea>.)(?<transferSizeCode>[XBWD]?)(?<byteOffset>\\d{1,4})(.(?<bitOffset>[0-7]))?:(?<dataType>[a-zA-Z_]+)(\\[(?<numElements>\\d+)])?");
+ Pattern.compile("^%(?<memoryArea>.)(?<transferSizeCode>[XBWD]?)(?<byteOffset>\\d{1,5})(.(?<bitOffset>[0-7]))?:(?<dataType>[a-zA-Z_]+)(\\[(?<numElements>\\d+)])?");
private static final Pattern DATA_BLOCK_ADDRESS_PATTERN =
- Pattern.compile("^%DB(?<blockNumber>\\d{1,4}).DB(?<transferSizeCode>[XBWD]?)(?<byteOffset>\\d{1,4})(.(?<bitOffset>[0-7]))?:(?<dataType>[a-zA-Z_]+)(\\[(?<numElements>\\d+)])?");
+ Pattern.compile("^%DB(?<blockNumber>\\d{1,4}).DB(?<transferSizeCode>[XBWD]?)(?<byteOffset>\\d{1,5})(.(?<bitOffset>[0-7]))?:(?<dataType>[a-zA-Z_]+)(\\[(?<numElements>\\d+)])?");
private static final String DATA_TYPE = "dataType";
private static final String TRANSFER_SIZE_CODE = "transferSizeCode";