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 2023/02/10 17:27:53 UTC
[plc4x] branch fix/cdutz/reenable-golang-driver-testsuites updated: refactor(plc4j): Commented in the stuff I commented out for testing.
This is an automated email from the ASF dual-hosted git repository.
cdutz pushed a commit to branch fix/cdutz/reenable-golang-driver-testsuites
in repository https://gitbox.apache.org/repos/asf/plc4x.git
The following commit(s) were added to refs/heads/fix/cdutz/reenable-golang-driver-testsuites by this push:
new ec3092533f refactor(plc4j): Commented in the stuff I commented out for testing.
ec3092533f is described below
commit ec3092533fcc575807cbf141470c2de71177e3e5
Author: Christofer Dutz <ch...@c-ware.de>
AuthorDate: Fri Feb 10 18:27:46 2023 +0100
refactor(plc4j): Commented in the stuff I commented out for testing.
---
.../java/eip/readwrite/protocol/EipProtocolLogic.java | 19 +++++++++----------
1 file changed, 9 insertions(+), 10 deletions(-)
diff --git a/plc4j/drivers/eip/src/main/java/org/apache/plc4x/java/eip/readwrite/protocol/EipProtocolLogic.java b/plc4j/drivers/eip/src/main/java/org/apache/plc4x/java/eip/readwrite/protocol/EipProtocolLogic.java
index d980541ab1..94d1d85b67 100644
--- a/plc4j/drivers/eip/src/main/java/org/apache/plc4x/java/eip/readwrite/protocol/EipProtocolLogic.java
+++ b/plc4j/drivers/eip/src/main/java/org/apache/plc4x/java/eip/readwrite/protocol/EipProtocolLogic.java
@@ -77,8 +77,8 @@ public class EipProtocolLogic extends Plc4xProtocolBase<EipPacket> implements Ha
new EipConnectionRequest(0L, 0L, emptySenderContext, 0L);
context.sendRequest(connectionRequest)
.expectResponse(EipPacket.class, REQUEST_TIMEOUT)
-// .check(p -> p instanceof EipConnectionRequest)
-// .unwrap(p -> (EipConnectionRequest) p)
+ .check(p -> p instanceof EipConnectionRequest)
+ .unwrap(p -> (EipConnectionRequest) p)
.handle(p -> {
if (p.getStatus() == 0L) {
sessionHandle = p.getSessionHandle();
@@ -249,16 +249,15 @@ public class EipProtocolLogic extends Plc4xProtocolBase<EipPacket> implements Ha
.expectResponse(EipPacket.class, REQUEST_TIMEOUT)
.onTimeout(future::completeExceptionally)
.onError((p, e) -> future.completeExceptionally(e))
- //.check(p -> p instanceof CipRRData)
- //.check(p -> p.getSessionHandle() == sessionHandle)
+ .check(p -> p instanceof CipRRData)
+ .check(p -> p.getSessionHandle() == sessionHandle)
//.check(p -> p.getSenderContext() == senderContext)
- //.unwrap(p -> (CipRRData) p)
- //.unwrap(p -> p.getExchange().getService())
- //.check(p -> p instanceof CipReadResponse)
- //.unwrap(p -> (CipReadResponse) p)
+ .unwrap(p -> (CipRRData) p)
+ .unwrap(p -> p.getExchange().getService())
+ .check(p -> p instanceof CipReadResponse)
+ .unwrap(p -> (CipReadResponse) p)
.handle(p -> {
- System.out.println(p);
-// future.complete(p);
+ future.complete(p);
// Finish the request-transaction.
transaction.endRequest();
}));