You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@plc4x.apache.org by sr...@apache.org on 2021/03/18 18:11:25 UTC
[plc4x] branch develop updated: plc4go: Removed obsolete interface
delegates + added a readable test goal to Makefile + added Todos for
DriverTestRunner.go
This is an automated email from the ASF dual-hosted git repository.
sruehl pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/plc4x.git
The following commit(s) were added to refs/heads/develop by this push:
new 0549216 plc4go: Removed obsolete interface delegates + added a readable test goal to Makefile + added Todos for DriverTestRunner.go
0549216 is described below
commit 054921628229a1d29dd283063efbb7bf3de868c0
Author: Sebastian Rühl <sr...@apache.org>
AuthorDate: Thu Mar 18 19:11:11 2021 +0100
plc4go: Removed obsolete interface delegates
+ added a readable test goal to Makefile
+ added Todos for DriverTestRunner.go
---
plc4go/Makefile | 4 +
.../knxnetip/readwrite/model/KnxDatapointType.go | 2 +-
.../knxnetip/readwrite/model/KnxManufacturer.go | 114 ++++++++++++++++++---
plc4go/internal/plc4go/modbus/Connection.go | 5 +-
plc4go/internal/plc4go/modbus/FieldHandler.go | 2 -
.../plc4go/spi/testutils/DriverTestRunner.go | 2 +
6 files changed, 113 insertions(+), 16 deletions(-)
diff --git a/plc4go/Makefile b/plc4go/Makefile
index f2bc1ff..5010731 100644
--- a/plc4go/Makefile
+++ b/plc4go/Makefile
@@ -57,6 +57,10 @@ compile:
test: compile
$(MVNBIN) test
+## test: Runs gotestsum.
+test-readable: compile
+ @GOPATH=$(GOPATH) GOBIN=$(GOBIN) gotestsum ./...
+
## exec: Run given command, wrapped with custom GOPATH. e.g; make exec run="go test ./..."
exec:
@GOPATH=$(GOPATH) GOBIN=$(GOBIN) $(run)
diff --git a/plc4go/internal/plc4go/knxnetip/readwrite/model/KnxDatapointType.go b/plc4go/internal/plc4go/knxnetip/readwrite/model/KnxDatapointType.go
index fd1e095..fa64b39 100644
--- a/plc4go/internal/plc4go/knxnetip/readwrite/model/KnxDatapointType.go
+++ b/plc4go/internal/plc4go/knxnetip/readwrite/model/KnxDatapointType.go
@@ -1853,7 +1853,7 @@ func (e KnxDatapointType) Name() string {
}
case 112:
{ /* '112' */
- return "power denisity (W/m²)"
+ return "power density (W/m²)"
}
case 113:
{ /* '113' */
diff --git a/plc4go/internal/plc4go/knxnetip/readwrite/model/KnxManufacturer.go b/plc4go/internal/plc4go/knxnetip/readwrite/model/KnxManufacturer.go
index d798e43..90c694a 100644
--- a/plc4go/internal/plc4go/knxnetip/readwrite/model/KnxManufacturer.go
+++ b/plc4go/internal/plc4go/knxnetip/readwrite/model/KnxManufacturer.go
@@ -569,8 +569,14 @@ const (
KnxManufacturer_M_NIETIAN KnxManufacturer = 533
KnxManufacturer_M_SUMSIR KnxManufacturer = 534
KnxManufacturer_M_ORBIS_TECNOLOGIA_ELECTRICA_SA KnxManufacturer = 535
- KnxManufacturer_M_ABB___RESERVED KnxManufacturer = 536
- KnxManufacturer_M_BUSCH_JAEGER_ELEKTRO___RESERVED KnxManufacturer = 537
+ KnxManufacturer_M_NANJING_ZHONGYI_IOT_TECHNOLOGY_CO___LTD_ KnxManufacturer = 536
+ KnxManufacturer_M_ANLIPS KnxManufacturer = 537
+ KnxManufacturer_M_GUANGDONG_PAK_CORPORATION_CO___LTD KnxManufacturer = 538
+ KnxManufacturer_M_BVK_TECHNOLOGY KnxManufacturer = 539
+ KnxManufacturer_M_SOLOMIO_SRL KnxManufacturer = 540
+ KnxManufacturer_M_DOMOTICA_LABS KnxManufacturer = 541
+ KnxManufacturer_M_ABB___RESERVED KnxManufacturer = 542
+ KnxManufacturer_M_BUSCH_JAEGER_ELEKTRO___RESERVED KnxManufacturer = 543
)
func (e KnxManufacturer) Number() uint16 {
@@ -2521,16 +2527,40 @@ func (e KnxManufacturer) Number() uint16 {
}
case 536:
{ /* '536' */
- return 43954
+ return 593
}
case 537:
{ /* '537' */
- return 43959
+ return 594
+ }
+ case 538:
+ { /* '538' */
+ return 595
+ }
+ case 539:
+ { /* '539' */
+ return 596
}
case 54:
{ /* '54' */
return 92
}
+ case 540:
+ { /* '540' */
+ return 597
+ }
+ case 541:
+ { /* '541' */
+ return 598
+ }
+ case 542:
+ { /* '542' */
+ return 43954
+ }
+ case 543:
+ { /* '543' */
+ return 43959
+ }
case 55:
{ /* '55' */
return 93
@@ -4682,16 +4712,40 @@ func (e KnxManufacturer) Name() string {
}
case 536:
{ /* '536' */
- return "ABB - reserved"
+ return "Nanjing Zhongyi IoT Technology Co., Ltd."
}
case 537:
{ /* '537' */
- return "Busch-Jaeger Elektro - reserved"
+ return "Anlips"
+ }
+ case 538:
+ { /* '538' */
+ return "GUANGDONG PAK CORPORATION CO., LTD"
+ }
+ case 539:
+ { /* '539' */
+ return "BVK Technology"
}
case 54:
{ /* '54' */
return "DORMA GmbH + Co. KG"
}
+ case 540:
+ { /* '540' */
+ return "Solomio srl"
+ }
+ case 541:
+ { /* '541' */
+ return "Domotica Labs"
+ }
+ case 542:
+ { /* '542' */
+ return "ABB - reserved"
+ }
+ case 543:
+ { /* '543' */
+ return "Busch-Jaeger Elektro - reserved"
+ }
case 55:
{ /* '55' */
return "WindowMaster A/S"
@@ -5869,11 +5923,23 @@ func KnxManufacturerByValue(value uint16) KnxManufacturer {
case 535:
return KnxManufacturer_M_ORBIS_TECNOLOGIA_ELECTRICA_SA
case 536:
- return KnxManufacturer_M_ABB___RESERVED
+ return KnxManufacturer_M_NANJING_ZHONGYI_IOT_TECHNOLOGY_CO___LTD_
case 537:
- return KnxManufacturer_M_BUSCH_JAEGER_ELEKTRO___RESERVED
+ return KnxManufacturer_M_ANLIPS
+ case 538:
+ return KnxManufacturer_M_GUANGDONG_PAK_CORPORATION_CO___LTD
+ case 539:
+ return KnxManufacturer_M_BVK_TECHNOLOGY
case 54:
return KnxManufacturer_M_DORMA_GMBH_Plus_CO__KG
+ case 540:
+ return KnxManufacturer_M_SOLOMIO_SRL
+ case 541:
+ return KnxManufacturer_M_DOMOTICA_LABS
+ case 542:
+ return KnxManufacturer_M_ABB___RESERVED
+ case 543:
+ return KnxManufacturer_M_BUSCH_JAEGER_ELEKTRO___RESERVED
case 55:
return KnxManufacturer_M_WINDOWMASTER_AS
case 56:
@@ -6950,12 +7016,24 @@ func KnxManufacturerByName(value string) KnxManufacturer {
return KnxManufacturer_M_SUMSIR
case "M_ORBIS_TECNOLOGIA_ELECTRICA_SA":
return KnxManufacturer_M_ORBIS_TECNOLOGIA_ELECTRICA_SA
+ case "M_NANJING_ZHONGYI_IOT_TECHNOLOGY_CO___LTD_":
+ return KnxManufacturer_M_NANJING_ZHONGYI_IOT_TECHNOLOGY_CO___LTD_
+ case "M_ANLIPS":
+ return KnxManufacturer_M_ANLIPS
+ case "M_GUANGDONG_PAK_CORPORATION_CO___LTD":
+ return KnxManufacturer_M_GUANGDONG_PAK_CORPORATION_CO___LTD
+ case "M_BVK_TECHNOLOGY":
+ return KnxManufacturer_M_BVK_TECHNOLOGY
+ case "M_DORMA_GMBH_Plus_CO__KG":
+ return KnxManufacturer_M_DORMA_GMBH_Plus_CO__KG
+ case "M_SOLOMIO_SRL":
+ return KnxManufacturer_M_SOLOMIO_SRL
+ case "M_DOMOTICA_LABS":
+ return KnxManufacturer_M_DOMOTICA_LABS
case "M_ABB___RESERVED":
return KnxManufacturer_M_ABB___RESERVED
case "M_BUSCH_JAEGER_ELEKTRO___RESERVED":
return KnxManufacturer_M_BUSCH_JAEGER_ELEKTRO___RESERVED
- case "M_DORMA_GMBH_Plus_CO__KG":
- return KnxManufacturer_M_DORMA_GMBH_Plus_CO__KG
case "M_WINDOWMASTER_AS":
return KnxManufacturer_M_WINDOWMASTER_AS
case "M_WALTHER_WERKE":
@@ -8063,12 +8141,24 @@ func (e KnxManufacturer) String() string {
return "M_SUMSIR"
case KnxManufacturer_M_ORBIS_TECNOLOGIA_ELECTRICA_SA:
return "M_ORBIS_TECNOLOGIA_ELECTRICA_SA"
+ case KnxManufacturer_M_NANJING_ZHONGYI_IOT_TECHNOLOGY_CO___LTD_:
+ return "M_NANJING_ZHONGYI_IOT_TECHNOLOGY_CO___LTD_"
+ case KnxManufacturer_M_ANLIPS:
+ return "M_ANLIPS"
+ case KnxManufacturer_M_GUANGDONG_PAK_CORPORATION_CO___LTD:
+ return "M_GUANGDONG_PAK_CORPORATION_CO___LTD"
+ case KnxManufacturer_M_BVK_TECHNOLOGY:
+ return "M_BVK_TECHNOLOGY"
+ case KnxManufacturer_M_DORMA_GMBH_Plus_CO__KG:
+ return "M_DORMA_GMBH_Plus_CO__KG"
+ case KnxManufacturer_M_SOLOMIO_SRL:
+ return "M_SOLOMIO_SRL"
+ case KnxManufacturer_M_DOMOTICA_LABS:
+ return "M_DOMOTICA_LABS"
case KnxManufacturer_M_ABB___RESERVED:
return "M_ABB___RESERVED"
case KnxManufacturer_M_BUSCH_JAEGER_ELEKTRO___RESERVED:
return "M_BUSCH_JAEGER_ELEKTRO___RESERVED"
- case KnxManufacturer_M_DORMA_GMBH_Plus_CO__KG:
- return "M_DORMA_GMBH_Plus_CO__KG"
case KnxManufacturer_M_WINDOWMASTER_AS:
return "M_WINDOWMASTER_AS"
case KnxManufacturer_M_WALTHER_WERKE:
diff --git a/plc4go/internal/plc4go/modbus/Connection.go b/plc4go/internal/plc4go/modbus/Connection.go
index 468dd7a..92f4ec3 100644
--- a/plc4go/internal/plc4go/modbus/Connection.go
+++ b/plc4go/internal/plc4go/modbus/Connection.go
@@ -61,7 +61,6 @@ type Connection struct {
fieldHandler spi.PlcFieldHandler
valueHandler spi.PlcValueHandler
requestInterceptor internalModel.RequestInterceptor
- plc4go.PlcConnection
}
func NewConnection(unitIdentifier uint8, messageCodec spi.MessageCodec, options map[string][]string, fieldHandler spi.PlcFieldHandler) Connection {
@@ -164,6 +163,10 @@ func (m Connection) UnsubscriptionRequestBuilder() apiModel.PlcUnsubscriptionReq
panic("implement me")
}
+func (m Connection) BrowseRequestBuilder() apiModel.PlcBrowseRequestBuilder {
+ panic("implement me")
+}
+
func (m Connection) GetTransportInstance() transports.TransportInstance {
if mc, ok := m.messageCodec.(spi.TransportInstanceExposer); ok {
return mc.GetTransportInstance()
diff --git a/plc4go/internal/plc4go/modbus/FieldHandler.go b/plc4go/internal/plc4go/modbus/FieldHandler.go
index c1b88d6..74db78c 100644
--- a/plc4go/internal/plc4go/modbus/FieldHandler.go
+++ b/plc4go/internal/plc4go/modbus/FieldHandler.go
@@ -21,7 +21,6 @@ package modbus
import (
"errors"
model2 "github.com/apache/plc4x/plc4go/internal/plc4go/modbus/readwrite/model"
- "github.com/apache/plc4x/plc4go/internal/plc4go/spi"
"github.com/apache/plc4x/plc4go/internal/plc4go/spi/utils"
"github.com/apache/plc4x/plc4go/pkg/plc4go/model"
"regexp"
@@ -64,7 +63,6 @@ type FieldHandler struct {
numericHoldingRegisterPattern *regexp.Regexp
plc4xExtendedRegisterPattern *regexp.Regexp
numericExtendedRegisterPattern *regexp.Regexp
- spi.PlcFieldHandler
}
func NewFieldHandler() FieldHandler {
diff --git a/plc4go/internal/plc4go/spi/testutils/DriverTestRunner.go b/plc4go/internal/plc4go/spi/testutils/DriverTestRunner.go
index f48028d..061f551 100644
--- a/plc4go/internal/plc4go/spi/testutils/DriverTestRunner.go
+++ b/plc4go/internal/plc4go/spi/testutils/DriverTestRunner.go
@@ -225,6 +225,7 @@ func (m DriverTestsuite) ExecuteStep(connection plc4go.PlcConnection, testcase *
// Compare the bytes read with the ones we expect
for i := range expectedRawOutput {
if expectedRawOutput[i] != rawOutput[i] {
+ // TODO: render diff
return errors.New("actual output doesn't match expected output")
}
}
@@ -242,6 +243,7 @@ func (m DriverTestsuite) ExecuteStep(connection plc4go.PlcConnection, testcase *
// Compare the bytes read with the ones we expect
for i := range expectedRawInput {
+ // TODO: render diff
if expectedRawInput[i] != rawInput[i] {
return errors.New("actual output doesn't match expected output")
}