You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@plc4x.apache.org by hu...@apache.org on 2022/06/08 20:34:02 UTC
[plc4x] branch logix_develop updated: Started to clean it up a bit.
This is an automated email from the ASF dual-hosted git repository.
hutcheb pushed a commit to branch logix_develop
in repository https://gitbox.apache.org/repos/asf/plc4x.git
The following commit(s) were added to refs/heads/logix_develop by this push:
new abd36ab034 Started to clean it up a bit.
abd36ab034 is described below
commit abd36ab03491d18366dd46199159715ebe506d39
Author: Ben Hutcheson <be...@gmail.com>
AuthorDate: Thu Jun 9 06:33:19 2022 +1000
Started to clean it up a bit.
---
.../readwrite/protocol/LogixProtocolLogic.java | 24 +---------------------
1 file changed, 1 insertion(+), 23 deletions(-)
diff --git a/plc4j/drivers/logix/src/main/java/org/apache/plc4x/java/logix/readwrite/protocol/LogixProtocolLogic.java b/plc4j/drivers/logix/src/main/java/org/apache/plc4x/java/logix/readwrite/protocol/LogixProtocolLogic.java
index 8c088b8913..2634090536 100644
--- a/plc4j/drivers/logix/src/main/java/org/apache/plc4x/java/logix/readwrite/protocol/LogixProtocolLogic.java
+++ b/plc4j/drivers/logix/src/main/java/org/apache/plc4x/java/logix/readwrite/protocol/LogixProtocolLogic.java
@@ -296,7 +296,7 @@ public class LogixProtocolLogic extends Plc4xProtocolBase<EipPacket> implements
SendUnitData pkt = new SendUnitData(
sessionHandle,
- 0L,
+ CIPStatus.Success.getValue(),
DEFAULT_SENDER_CONTEXT,
0L,
0,
@@ -324,28 +324,6 @@ public class LogixProtocolLogic extends Plc4xProtocolBase<EipPacket> implements
return future;
}
- private short getRequestSize(String tag) {
- //We need the size of the request in words (0x91, tagLength, ... tag + possible pad)
- // Taking half to get word size
- boolean isArray = false;
- boolean isStruct = false;
- String tagIsolated = tag;
- if (tag.contains("[")) {
- isArray = true;
- tagIsolated = tag.substring(0, tag.indexOf("["));
- }
-
- if (tag.contains(".")) {
- isStruct = true;
- tagIsolated = tagIsolated.replace(".", "");
- }
- int dataLength = (tagIsolated.length() + 2)
- + (tagIsolated.length() % 2)
- + (isArray ? 2 : 0)
- + (isStruct ? 2 : 0);
- return (short) (dataLength / 2);
- }
-
/*
Takes a Tag name e.g. ZZZ_ZZZ.XXX and returns a buffer containing an array of ANSI Extended Symbol Seqments
*/