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 2020/10/26 17:39:06 UTC
[plc4x] branch feature/plc4go updated: - Updated things pulled in
after merging in latest changes from develop
This is an automated email from the ASF dual-hosted git repository.
cdutz pushed a commit to branch feature/plc4go
in repository https://gitbox.apache.org/repos/asf/plc4x.git
The following commit(s) were added to refs/heads/feature/plc4go by this push:
new 2926f76 - Updated things pulled in after merging in latest changes from develop
2926f76 is described below
commit 2926f761d8d8750a6b661059d059c9c357f50320
Author: Christofer Dutz <ch...@c-ware.de>
AuthorDate: Mon Oct 26 18:37:56 2020 +0100
- Updated things pulled in after merging in latest changes from develop
---
.../plc4x/protocol/ads/AdsDiscoverySerializerParserTest.java | 2 +-
sandbox/plc4go/assets/testing/protocols/s7/DriverTestsuite.xml | 6 ++----
sandbox/plc4go/cmd/main/drivers/modbus_test.go | 8 ++------
3 files changed, 5 insertions(+), 11 deletions(-)
diff --git a/plc4j/drivers/ads/src/test/java/org/apache/plc4x/protocol/ads/AdsDiscoverySerializerParserTest.java b/plc4j/drivers/ads/src/test/java/org/apache/plc4x/protocol/ads/AdsDiscoverySerializerParserTest.java
index 9cba6a2..49ac659 100644
--- a/plc4j/drivers/ads/src/test/java/org/apache/plc4x/protocol/ads/AdsDiscoverySerializerParserTest.java
+++ b/plc4j/drivers/ads/src/test/java/org/apache/plc4x/protocol/ads/AdsDiscoverySerializerParserTest.java
@@ -24,7 +24,7 @@ import org.apache.plc4x.test.parserserializer.ParserSerializerTestsuiteRunner;
public class AdsDiscoverySerializerParserTest extends ParserSerializerTestsuiteRunner {
public AdsDiscoverySerializerParserTest() {
- super("/testsuite/AdsDiscoverySerializerTest.xml");
+ super("/protocols/ads/AdsDiscoverySerializerTest.xml");
}
}
diff --git a/sandbox/plc4go/assets/testing/protocols/s7/DriverTestsuite.xml b/sandbox/plc4go/assets/testing/protocols/s7/DriverTestsuite.xml
index baa2eb0..bb36ff5 100644
--- a/sandbox/plc4go/assets/testing/protocols/s7/DriverTestsuite.xml
+++ b/sandbox/plc4go/assets/testing/protocols/s7/DriverTestsuite.xml
@@ -291,7 +291,6 @@
<blockNumber>0</blockNumber>
<byteOffset>0</byteOffset>
<bitOffset>0</bitOffset>
- <numElements>1</numElements>
</hurz>
</request>
<hurz>
@@ -367,8 +366,7 @@
<memoryArea>OUTPUTS</memoryArea>
<blockNumber>0</blockNumber>
<byteOffset>0</byteOffset>
- <bitOffset>0</bitOffset>
- <numElements>1</numElements>
+ <bitOffset>0</bitOffset>
</hurz>
</request>
<hurz>
@@ -380,4 +378,4 @@
</steps>
</testcase>
-</test:driver-testsuite>
\ No newline at end of file
+</test:driver-testsuite>
diff --git a/sandbox/plc4go/cmd/main/drivers/modbus_test.go b/sandbox/plc4go/cmd/main/drivers/modbus_test.go
index 139e472..905b4b6 100644
--- a/sandbox/plc4go/cmd/main/drivers/modbus_test.go
+++ b/sandbox/plc4go/cmd/main/drivers/modbus_test.go
@@ -26,7 +26,6 @@ import (
"os"
"plc4x.apache.org/plc4go-modbus-driver/v0/internal/plc4go/modbus"
"plc4x.apache.org/plc4go-modbus-driver/v0/internal/plc4go/modbus/readwrite/model"
- "plc4x.apache.org/plc4go-modbus-driver/v0/internal/plc4go/testutils"
"plc4x.apache.org/plc4go-modbus-driver/v0/internal/plc4go/transports/tcp"
"plc4x.apache.org/plc4go-modbus-driver/v0/internal/plc4go/utils"
"plc4x.apache.org/plc4go-modbus-driver/v0/pkg/plc4go"
@@ -35,9 +34,6 @@ import (
)
func TestModbus(t *testing.T) {
-
- testutils.RunParserSerializerTestsuite("")
-
test(t, "000000000006ff0408d20002", false)
test(t, "7cfe000000c9ff04c600000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000004000000000000000000000000000001db000001d600004a380000000000000000000000000000000000000000000000000000000000006461696d006e0000000000000000000000000000303100300000000000000000000000000000000000000000000000000000000000000000000000000000", true)
test(t, "000a0000001101140e060003270e000206000400000008", false)
@@ -155,7 +151,7 @@ func TestPlc4goDriver(t *testing.T) {
// Prepare a read-request
rrb := connection.ReadRequestBuilder()
- rrb.AddItem("field", "holding-register:0:REAL[2]")
+ rrb.AddItem("field", "holding-register:0:REAL")
readRequest, err := rrb.Build()
if err != nil {
t.Errorf("error preparing read-request: %s", connectionResult.Err.Error())
@@ -175,5 +171,5 @@ func TestPlc4goDriver(t *testing.T) {
// Do something with the response
value := rrr.Response.GetValue("field")
- fmt.Printf("\n\nResult: %d\n", value.GetInt32())
+ fmt.Printf("\n\nResult: %f\n", value.GetFloat32())
}