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 2021/01/24 16:45:09 UTC
[plc4x] 06/07: - Updated generated Go code
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/plc4x.git
commit 5e874e50ec254e7c85e63404981807a245395a0f
Author: Christofer Dutz <ch...@c-ware.de>
AuthorDate: Sun Jan 24 12:58:09 2021 +0100
- Updated generated Go code
---
plc4go/cmd/main/drivers/knxnetip_test.go | 2 -
.../plc4go/bacnetip/readwrite/ParserHelper.go | 2 +-
.../plc4go/bacnetip/readwrite/XmlParserHelper.go | 2 +-
.../plc4go/knxnetip/KnxNetIpActiveReader.go | 67 +
plc4go/internal/plc4go/knxnetip/KnxNetIpBrowser.go | 10 +-
.../internal/plc4go/knxnetip/KnxNetIpConnection.go | 1042 +-
plc4go/internal/plc4go/knxnetip/KnxNetIpField.go | 16 +-
.../plc4go/knxnetip/KnxNetIpFieldHandler.go | 16 +-
.../plc4go/knxnetip/KnxNetIpMessageCodec.go | 3 +-
plc4go/internal/plc4go/knxnetip/KnxNetIpReader.go | 125 +-
.../internal/plc4go/knxnetip/KnxNetIpSubscriber.go | 55 +-
.../plc4go/knxnetip/readwrite/ParserHelper.go | 142 +-
.../plc4go/knxnetip/readwrite/XmlParserHelper.go | 378 +-
.../plc4go/knxnetip/readwrite/model/APCI.go | 193 -
.../plc4go/knxnetip/readwrite/model/Apdu.go | 286 +
.../plc4go/knxnetip/readwrite/model/ApduControl.go | 236 +
.../model/{LDataFrameAck.go => ApduControlAck.go} | 68 +-
.../{LDataFrameAck.go => ApduControlConnect.go} | 68 +-
.../readwrite/model/ApduControlContainer.go | 166 +
.../{LDataFrameAck.go => ApduControlDisconnect.go} | 68 +-
.../model/{LDataFrameAck.go => ApduControlNack.go} | 68 +-
.../plc4go/knxnetip/readwrite/model/ApduData.go | 404 +
.../model/{LDataFrameAck.go => ApduDataAdcRead.go} | 68 +-
.../{LDataFrameAck.go => ApduDataAdcResponse.go} | 68 +-
.../knxnetip/readwrite/model/ApduDataContainer.go | 166 +
...FrameAck.go => ApduDataDeviceDescriptorRead.go} | 68 +-
...eAck.go => ApduDataDeviceDescriptorResponse.go} | 68 +-
.../plc4go/knxnetip/readwrite/model/ApduDataExt.go | 754 ++
...aFrameAck.go => ApduDataExtAuthorizeRequest.go} | 68 +-
...FrameAck.go => ApduDataExtAuthorizeResponse.go} | 68 +-
...FrameAck.go => ApduDataExtDomainAddressRead.go} | 68 +-
...eAck.go => ApduDataExtDomainAddressResponse.go} | 68 +-
...go => ApduDataExtDomainAddressSelectiveRead.go} | 68 +-
...=> ApduDataExtDomainAddressSerialNumberRead.go} | 68 +-
...pduDataExtDomainAddressSerialNumberResponse.go} | 68 +-
...> ApduDataExtDomainAddressSerialNumberWrite.go} | 68 +-
...rameAck.go => ApduDataExtDomainAddressWrite.go} | 68 +-
...meAck.go => ApduDataExtFileStreamInfoReport.go} | 68 +-
... => ApduDataExtGroupPropertyValueInfoReport.go} | 68 +-
...Ack.go => ApduDataExtGroupPropertyValueRead.go} | 68 +-
...go => ApduDataExtGroupPropertyValueResponse.go} | 68 +-
...ck.go => ApduDataExtGroupPropertyValueWrite.go} | 68 +-
...pduDataExtIndividualAddressSerialNumberRead.go} | 68 +-
...ataExtIndividualAddressSerialNumberResponse.go} | 68 +-
...duDataExtIndividualAddressSerialNumberWrite.go} | 68 +-
...{LDataFrameAck.go => ApduDataExtKeyResponse.go} | 68 +-
.../{LDataFrameAck.go => ApduDataExtKeyWrite.go} | 68 +-
.../{LDataFrameAck.go => ApduDataExtLinkRead.go} | 68 +-
...LDataFrameAck.go => ApduDataExtLinkResponse.go} | 68 +-
.../{LDataFrameAck.go => ApduDataExtLinkWrite.go} | 68 +-
...ataFrameAck.go => ApduDataExtMemoryBitWrite.go} | 68 +-
...meAck.go => ApduDataExtNetworkParameterRead.go} | 68 +-
...k.go => ApduDataExtNetworkParameterResponse.go} | 68 +-
...eAck.go => ApduDataExtNetworkParameterWrite.go} | 68 +-
...ck.go => ApduDataExtOpenRoutingTableRequest.go} | 68 +-
...ck.go => ApduDataExtPropertyDescriptionRead.go} | 68 +-
...o => ApduDataExtPropertyDescriptionResponse.go} | 68 +-
.../model/ApduDataExtPropertyValueRead.go | 248 +
.../model/ApduDataExtPropertyValueResponse.go | 292 +
...rameAck.go => ApduDataExtPropertyValueWrite.go} | 68 +-
...ck.go => ApduDataExtReadRouterMemoryRequest.go} | 68 +-
...k.go => ApduDataExtReadRouterMemoryResponse.go} | 68 +-
...ck.go => ApduDataExtReadRouterStatusRequest.go} | 68 +-
...k.go => ApduDataExtReadRouterStatusResponse.go} | 68 +-
...ck.go => ApduDataExtReadRoutingTableRequest.go} | 68 +-
...k.go => ApduDataExtReadRoutingTableResponse.go} | 68 +-
...k.go => ApduDataExtWriteRouterMemoryRequest.go} | 68 +-
...k.go => ApduDataExtWriteRouterStatusRequest.go} | 68 +-
...k.go => ApduDataExtWriteRoutingTableRequest.go} | 68 +-
...{LDataFrameAck.go => ApduDataGroupValueRead.go} | 68 +-
...taFrameAck.go => ApduDataGroupValueResponse.go} | 68 +-
.../readwrite/model/ApduDataGroupValueWrite.go | 210 +
...rameAck.go => ApduDataIndividualAddressRead.go} | 68 +-
...Ack.go => ApduDataIndividualAddressResponse.go} | 68 +-
...ameAck.go => ApduDataIndividualAddressWrite.go} | 68 +-
.../{LDataFrameAck.go => ApduDataMemoryRead.go} | 68 +-
...{LDataFrameAck.go => ApduDataMemoryResponse.go} | 68 +-
.../{LDataFrameAck.go => ApduDataMemoryWrite.go} | 68 +-
.../knxnetip/readwrite/model/ApduDataOther.go | 163 +
.../model/{LDataFrameAck.go => ApduDataRestart.go} | 68 +-
.../{LDataFrameAck.go => ApduDataUserMessage.go} | 68 +-
.../knxnetip/readwrite/model/ChannelInformation.go | 167 +
.../plc4go/knxnetip/readwrite/model/ControlType.go | 109 -
.../readwrite/model/DeviceDescriptorMediumType.go | 123 +
.../readwrite/model/DeviceDescriptorType0.go | 476 +
.../readwrite/model/DeviceDescriptorType2.go | 371 +
.../knxnetip/readwrite/model/ExtendedAPCI.go | 368 -
.../knxnetip/readwrite/model/FirmwareType.go | 220 +
.../knxnetip/readwrite/model/KnxDatapoint.go | 11725 +++++++++++++------
.../knxnetip/readwrite/model/KnxDatapointType.go | 5530 ++++++++-
.../plc4go/knxnetip/readwrite/model/LBusmonInd.go | 39 +-
.../plc4go/knxnetip/readwrite/model/LDataFrame.go | 63 +-
.../knxnetip/readwrite/model/LDataFrameData.go | 325 +-
.../knxnetip/readwrite/model/LDataFrameDataExt.go | 325 +-
.../readwrite/model/LDataFramePollingData.go | 11 +-
.../plc4go/modbus/readwrite/ParserHelper.go | 2 +-
.../plc4go/modbus/readwrite/XmlParserHelper.go | 2 +-
.../internal/plc4go/s7/readwrite/ParserHelper.go | 2 +-
.../plc4go/s7/readwrite/XmlParserHelper.go | 2 +-
99 files changed, 20191 insertions(+), 8523 deletions(-)
diff --git a/plc4go/cmd/main/drivers/knxnetip_test.go b/plc4go/cmd/main/drivers/knxnetip_test.go
index ee2ee3e..1ac5f96 100644
--- a/plc4go/cmd/main/drivers/knxnetip_test.go
+++ b/plc4go/cmd/main/drivers/knxnetip_test.go
@@ -204,11 +204,9 @@ func TestKnxNetIpPlc4goGroupAddressRead(t *testing.T) {
attributes["GatewayKnxAddress"],
attributes["ClientKnxAddress"])
- // TODO: Find out why a connection-state request breaks everything ...
// Try to ping the remote device
pingResultChannel := connection.Ping()
pingResult := <-pingResultChannel
- fmt.Println("Ping Received")
if pingResult.Err != nil {
t.Errorf("couldn't ping device: %s", pingResult.Err.Error())
t.Fail()
diff --git a/plc4go/internal/plc4go/bacnetip/readwrite/ParserHelper.go b/plc4go/internal/plc4go/bacnetip/readwrite/ParserHelper.go
index 92e2428..4dbaa34 100644
--- a/plc4go/internal/plc4go/bacnetip/readwrite/ParserHelper.go
+++ b/plc4go/internal/plc4go/bacnetip/readwrite/ParserHelper.go
@@ -16,7 +16,7 @@
// specific language governing permissions and limitations
// under the License.
//
-package model
+package readwrite
import (
"errors"
diff --git a/plc4go/internal/plc4go/bacnetip/readwrite/XmlParserHelper.go b/plc4go/internal/plc4go/bacnetip/readwrite/XmlParserHelper.go
index 4a310ea..add8614 100644
--- a/plc4go/internal/plc4go/bacnetip/readwrite/XmlParserHelper.go
+++ b/plc4go/internal/plc4go/bacnetip/readwrite/XmlParserHelper.go
@@ -16,7 +16,7 @@
// specific language governing permissions and limitations
// under the License.
//
-package model
+package readwrite
import (
"encoding/xml"
diff --git a/plc4go/internal/plc4go/knxnetip/KnxNetIpActiveReader.go b/plc4go/internal/plc4go/knxnetip/KnxNetIpActiveReader.go
new file mode 100644
index 0000000..8501cda
--- /dev/null
+++ b/plc4go/internal/plc4go/knxnetip/KnxNetIpActiveReader.go
@@ -0,0 +1,67 @@
+//
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements. See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership. The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied. See the License for the
+// specific language governing permissions and limitations
+// under the License.
+//
+package knxnetip
+
+import (
+ "errors"
+ "fmt"
+ "github.com/apache/plc4x/plc4go/internal/plc4go/spi"
+ "github.com/apache/plc4x/plc4go/pkg/plc4go/model"
+)
+
+type KnxNetIpActiveReader struct {
+ messageCodec spi.MessageCodec
+ spi.PlcWriter
+}
+
+func NewKnxNetIpActiveReader(messageCodec spi.MessageCodec) KnxNetIpActiveReader {
+ return KnxNetIpActiveReader{
+ messageCodec: messageCodec,
+ }
+}
+
+func (m KnxNetIpActiveReader) Read(readRequest model.PlcReadRequest) <-chan model.PlcReadRequestResult {
+ result := make(chan model.PlcReadRequestResult)
+ // If we are requesting only one field, use a
+ if len(readRequest.GetFieldNames()) == 1 {
+ fieldName := readRequest.GetFieldNames()[0]
+
+ // Get the KnxNetIp field instance from the request
+ field := readRequest.GetField(fieldName)
+ knxNetIpField, err := CastToKnxNetIpFieldFromPlcField(field)
+ if err != nil {
+ result <- model.PlcReadRequestResult{
+ Request: readRequest,
+ Response: nil,
+ Err: errors.New("invalid field item type"),
+ }
+ return result
+ }
+ fmt.Printf("%v", knxNetIpField)
+
+ /*knxnetipModel.LDataReq{
+ AdditionalInformationLength: 0,
+ AdditionalInformation: nil,
+ DataFrame: nil ,
+ Parent: nil,
+ ILDataReq: nil,
+ }*/
+ }
+ return result
+}
diff --git a/plc4go/internal/plc4go/knxnetip/KnxNetIpBrowser.go b/plc4go/internal/plc4go/knxnetip/KnxNetIpBrowser.go
index cf22022..9244cc2 100644
--- a/plc4go/internal/plc4go/knxnetip/KnxNetIpBrowser.go
+++ b/plc4go/internal/plc4go/knxnetip/KnxNetIpBrowser.go
@@ -105,16 +105,15 @@ func (b KnxNetIpBrowser) Browse(browseRequest apiModel.PlcBrowseRequest) <-chan
curSequenceCounter := b.sequenceCounter
b.sequenceCounter++
- controlType := driverModel.ControlType_CONNECT
deviceConnectionRequest := driverModel.NewTunnelingRequest(
driverModel.NewTunnelingRequestDataBlock(
b.connection.CommunicationChannelId,
curSequenceCounter),
driverModel.NewLDataReq(0, nil,
driverModel.NewLDataFrameDataExt(false, 6, uint8(0),
- sourceAddress, targetAddress, uint8(0), true, false,
- uint8(0), &controlType, nil, nil, nil, nil,
- true, driverModel.CEMIPriority_SYSTEM, false, false)))
+ sourceAddress, targetAddress,
+ driverModel.NewApduControlContainer(driverModel.NewApduControlConnect(), 0, false, 0),
+ true, true, driverModel.CEMIPriority_SYSTEM, false, false)))
// Send the request
done := make(chan bool)
@@ -123,7 +122,8 @@ func (b KnxNetIpBrowser) Browse(browseRequest apiModel.PlcBrowseRequest) <-chan
// The Gateway is now supposed to send an Ack to this request.
func(message interface{}) bool {
tunnelingRequest := driverModel.CastTunnelingRequest(message)
- if tunnelingRequest == nil || tunnelingRequest.TunnelingRequestDataBlock.CommunicationChannelId != b.connection.CommunicationChannelId {
+ if tunnelingRequest == nil ||
+ tunnelingRequest.TunnelingRequestDataBlock.CommunicationChannelId != b.connection.CommunicationChannelId {
return false
}
lDataCon := driverModel.CastLDataCon(tunnelingRequest.Cemi)
diff --git a/plc4go/internal/plc4go/knxnetip/KnxNetIpConnection.go b/plc4go/internal/plc4go/knxnetip/KnxNetIpConnection.go
index 397337e..0f77842 100644
--- a/plc4go/internal/plc4go/knxnetip/KnxNetIpConnection.go
+++ b/plc4go/internal/plc4go/knxnetip/KnxNetIpConnection.go
@@ -19,624 +19,630 @@
package knxnetip
import (
- "bytes"
- "errors"
- "fmt"
- driverModel "github.com/apache/plc4x/plc4go/internal/plc4go/knxnetip/readwrite/model"
- "github.com/apache/plc4x/plc4go/internal/plc4go/spi"
- "github.com/apache/plc4x/plc4go/internal/plc4go/spi/interceptors"
- internalModel "github.com/apache/plc4x/plc4go/internal/plc4go/spi/model"
- "github.com/apache/plc4x/plc4go/internal/plc4go/spi/transports"
- "github.com/apache/plc4x/plc4go/internal/plc4go/spi/transports/udp"
- "github.com/apache/plc4x/plc4go/internal/plc4go/spi/utils"
- "github.com/apache/plc4x/plc4go/pkg/plc4go"
- apiModel "github.com/apache/plc4x/plc4go/pkg/plc4go/model"
- "math"
- "net"
- "strconv"
- "strings"
- "sync"
- "sync/atomic"
- "time"
+ "bytes"
+ "errors"
+ "fmt"
+ driverModel "github.com/apache/plc4x/plc4go/internal/plc4go/knxnetip/readwrite/model"
+ "github.com/apache/plc4x/plc4go/internal/plc4go/spi"
+ "github.com/apache/plc4x/plc4go/internal/plc4go/spi/interceptors"
+ internalModel "github.com/apache/plc4x/plc4go/internal/plc4go/spi/model"
+ "github.com/apache/plc4x/plc4go/internal/plc4go/spi/transports"
+ "github.com/apache/plc4x/plc4go/internal/plc4go/spi/transports/udp"
+ "github.com/apache/plc4x/plc4go/internal/plc4go/spi/utils"
+ "github.com/apache/plc4x/plc4go/pkg/plc4go"
+ apiModel "github.com/apache/plc4x/plc4go/pkg/plc4go/model"
+ "math"
+ "net"
+ "strconv"
+ "strings"
+ "sync"
+ "sync/atomic"
+ "time"
)
type ConnectionMetadata struct {
- KnxMedium driverModel.KnxMedium
- GatewayName string
- GatewayKnxAddress string
- ClientKnxAddress string
+ KnxMedium driverModel.KnxMedium
+ GatewayName string
+ GatewayKnxAddress string
+ ClientKnxAddress string
- ProjectNumber uint8
- InstallationNumber uint8
- DeviceSerialNumber []int8
- DeviceMulticastAddress []int8
- DeviceMacAddress []int8
- SupportedServices []string
+ ProjectNumber uint8
+ InstallationNumber uint8
+ DeviceSerialNumber []int8
+ DeviceMulticastAddress []int8
+ DeviceMacAddress []int8
+ SupportedServices []string
- apiModel.PlcConnectionMetadata
+ apiModel.PlcConnectionMetadata
}
func (m ConnectionMetadata) GetConnectionAttributes() map[string]string {
- return map[string]string{
- "KnxMedium": m.KnxMedium.String(),
- "GatewayName": m.GatewayName,
- "GatewayKnxAddress": m.GatewayKnxAddress,
- "ClientKnxAddress": m.ClientKnxAddress,
+ return map[string]string{
+ "KnxMedium": m.KnxMedium.String(),
+ "GatewayName": m.GatewayName,
+ "GatewayKnxAddress": m.GatewayKnxAddress,
+ "ClientKnxAddress": m.ClientKnxAddress,
- "ProjectNumber": strconv.Itoa(int(m.ProjectNumber)),
- "InstallationNumber": strconv.Itoa(int(m.InstallationNumber)),
- "DeviceSerialNumber": utils.Int8ArrayToString(m.DeviceSerialNumber, " "),
- "DeviceMulticastAddress": utils.Int8ArrayToString(m.DeviceSerialNumber, "."),
- "DeviceMacAddress": utils.Int8ArrayToString(m.DeviceSerialNumber, ":"),
- "SupportedServices": strings.Join(m.SupportedServices, ", "),
- }
+ "ProjectNumber": strconv.Itoa(int(m.ProjectNumber)),
+ "InstallationNumber": strconv.Itoa(int(m.InstallationNumber)),
+ "DeviceSerialNumber": utils.Int8ArrayToString(m.DeviceSerialNumber, " "),
+ "DeviceMulticastAddress": utils.Int8ArrayToString(m.DeviceSerialNumber, "."),
+ "DeviceMacAddress": utils.Int8ArrayToString(m.DeviceSerialNumber, ":"),
+ "SupportedServices": strings.Join(m.SupportedServices, ", "),
+ }
}
func (m ConnectionMetadata) CanRead() bool {
- return true
+ return true
}
func (m ConnectionMetadata) CanWrite() bool {
- return true
+ return true
}
func (m ConnectionMetadata) CanSubscribe() bool {
- return true
+ return true
}
func (m ConnectionMetadata) CanBrowse() bool {
- return true
+ return true
}
type KnxNetIpConnection struct {
- messageCodec spi.MessageCodec
- options map[string][]string
- fieldHandler spi.PlcFieldHandler
- valueHandler spi.PlcValueHandler
- connectionStateTimer *time.Ticker
- quitConnectionStateTimer chan struct{}
- subscribers []*KnxNetIpSubscriber
- leve3AddressCache map[uint16]*driverModel.KnxGroupAddress3Level
- leve2AddressCache map[uint16]*driverModel.KnxGroupAddress2Level
- leve1AddressCache map[uint16]*driverModel.KnxGroupAddressFreeLevel
-
- valueCache map[uint16][]int8
- valueCacheMutex sync.RWMutex
- metadata *ConnectionMetadata
-
- GatewayKnxAddress *driverModel.KnxAddress
- ClientKnxAddress *driverModel.KnxAddress
- CommunicationChannelId uint8
- SequenceCounter int32
- TunnelingRequestExpectationId int32
-
- requestInterceptor internalModel.RequestInterceptor
- plc4go.PlcConnection
+ messageCodec spi.MessageCodec
+ options map[string][]string
+ fieldHandler spi.PlcFieldHandler
+ valueHandler spi.PlcValueHandler
+ connectionStateTimer *time.Ticker
+ quitConnectionStateTimer chan struct{}
+ subscribers []*KnxNetIpSubscriber
+ leve3AddressCache map[uint16]*driverModel.KnxGroupAddress3Level
+ leve2AddressCache map[uint16]*driverModel.KnxGroupAddress2Level
+ leve1AddressCache map[uint16]*driverModel.KnxGroupAddressFreeLevel
+
+ valueCache map[uint16][]int8
+ valueCacheMutex sync.RWMutex
+ metadata *ConnectionMetadata
+
+ GatewayKnxAddress *driverModel.KnxAddress
+ ClientKnxAddress *driverModel.KnxAddress
+ CommunicationChannelId uint8
+ SequenceCounter int32
+ TunnelingRequestExpectationId int32
+
+ requestInterceptor internalModel.RequestInterceptor
+ plc4go.PlcConnection
}
type InternalKnxNetIpConnection interface {
- Send(request *driverModel.KnxNetIpMessage) error
- SendRequest(request *driverModel.KnxNetIpMessage, expect func(response interface{}) (bool, bool)) (int32, chan interface{})
+ Send(request *driverModel.KnxNetIpMessage) error
+ SendRequest(request *driverModel.KnxNetIpMessage, expect func(response interface{}) (bool, bool)) (int32, chan interface{})
}
func NewKnxNetIpConnection(transportInstance transports.TransportInstance, options map[string][]string, fieldHandler spi.PlcFieldHandler) *KnxNetIpConnection {
- connection := &KnxNetIpConnection{
- options: options,
- fieldHandler: fieldHandler,
- valueHandler: NewValueHandler(),
- requestInterceptor: interceptors.NewSingleItemRequestInterceptor(),
- subscribers: []*KnxNetIpSubscriber{},
- leve3AddressCache: map[uint16]*driverModel.KnxGroupAddress3Level{},
- leve2AddressCache: map[uint16]*driverModel.KnxGroupAddress2Level{},
- leve1AddressCache: map[uint16]*driverModel.KnxGroupAddressFreeLevel{},
- valueCache: map[uint16][]int8{},
- valueCacheMutex: sync.RWMutex{},
- metadata: &ConnectionMetadata{},
- }
- connection.messageCodec = NewKnxNetIpMessageCodec(transportInstance, connection.interceptIncomingMessage)
- return connection
+ connection := &KnxNetIpConnection{
+ options: options,
+ fieldHandler: fieldHandler,
+ valueHandler: NewValueHandler(),
+ requestInterceptor: interceptors.NewSingleItemRequestInterceptor(),
+ subscribers: []*KnxNetIpSubscriber{},
+ leve3AddressCache: map[uint16]*driverModel.KnxGroupAddress3Level{},
+ leve2AddressCache: map[uint16]*driverModel.KnxGroupAddress2Level{},
+ leve1AddressCache: map[uint16]*driverModel.KnxGroupAddressFreeLevel{},
+ valueCache: map[uint16][]int8{},
+ valueCacheMutex: sync.RWMutex{},
+ metadata: &ConnectionMetadata{},
+ }
+ connection.messageCodec = NewKnxNetIpMessageCodec(transportInstance, connection.interceptIncomingMessage)
+ return connection
}
func (m *KnxNetIpConnection) Connect() <-chan plc4go.PlcConnectionConnectResult {
- result := make(chan plc4go.PlcConnectionConnectResult)
- sendResult := func(connection plc4go.PlcConnection, err error) {
- select {
- case result <- plc4go.NewPlcConnectionConnectResult(connection, err):
- default:
- }
- }
-
- go func() {
- err := m.messageCodec.Connect()
- if err != nil {
- sendResult(nil, err)
- return
- }
-
- transportInstanceExposer, ok := m.messageCodec.(spi.TransportInstanceExposer)
- if !ok {
- sendResult(m, errors.New(
- "used transport, is not a TransportInstanceExposer"))
- return
- }
-
- // Prepare a SearchReq
- udpTransportInstance, ok := transportInstanceExposer.GetTransportInstance().(*udp.UdpTransportInstance)
- if !ok {
- sendResult(m, errors.New(
- "used transport, is not a UdpTransportInstance"))
- return
- }
- localAddress := driverModel.NewIPAddress(utils.ByteArrayToInt8Array(udpTransportInstance.LocalAddress.IP))
- discoveryEndpoint := driverModel.NewHPAIDiscoveryEndpoint(
- driverModel.HostProtocolCode_IPV4_UDP, localAddress, uint16(udpTransportInstance.LocalAddress.Port))
- searchRequest := driverModel.NewSearchRequest(discoveryEndpoint)
-
- // Send the SearchReq
- err = m.messageCodec.SendRequest(
- searchRequest,
- func(message interface{}) bool {
- searchResponse := driverModel.CastSearchResponse(message)
- return searchResponse != nil
- },
- func(message interface{}) error {
- searchResponse := driverModel.CastSearchResponse(message)
-
- // Save some important information
- m.metadata.KnxMedium = searchResponse.DibDeviceInfo.KnxMedium
- m.metadata.GatewayName = string(bytes.Trim(utils.Int8ArrayToByteArray(
- searchResponse.DibDeviceInfo.DeviceFriendlyName), "\x00"))
- m.GatewayKnxAddress = searchResponse.DibDeviceInfo.KnxAddress
- m.metadata.GatewayKnxAddress = KnxAddressToString(m.GatewayKnxAddress)
- m.metadata.ProjectNumber = searchResponse.DibDeviceInfo.ProjectInstallationIdentifier.ProjectNumber
- m.metadata.InstallationNumber = searchResponse.DibDeviceInfo.ProjectInstallationIdentifier.InstallationNumber
- m.metadata.DeviceSerialNumber = searchResponse.DibDeviceInfo.KnxNetIpDeviceSerialNumber
- m.metadata.DeviceMulticastAddress = searchResponse.DibDeviceInfo.KnxNetIpDeviceMulticastAddress.Addr
- m.metadata.DeviceMacAddress = searchResponse.DibDeviceInfo.KnxNetIpDeviceMacAddress.Addr
- m.metadata.SupportedServices = []string{}
- supportsTunneling := false
- for _, serviceId := range searchResponse.DibSuppSvcFamilies.ServiceIds {
- m.metadata.SupportedServices = append(m.metadata.SupportedServices, serviceId.Child.GetTypeName())
- // If this is an instance of the "tunneling", service, this connection supports tunneling
- _, ok := serviceId.Child.(*driverModel.KnxNetIpTunneling)
- if ok {
- supportsTunneling = true
- break
- }
- }
-
- // If the current device supports tunneling, create a tunneling connection.
- // Via this connection we then get access to the entire KNX network this Gateway is connected to.
- if supportsTunneling {
- // As soon as we got a successful search-response back, send a connection request.
- localAddress := m.castIpToKnxAddress(udpTransportInstance.LocalAddress.IP)
- connectionRequest := driverModel.NewConnectionRequest(
- driverModel.NewHPAIDiscoveryEndpoint(driverModel.HostProtocolCode_IPV4_UDP,
- localAddress, uint16(udpTransportInstance.LocalAddress.Port)),
- driverModel.NewHPAIDataEndpoint(driverModel.HostProtocolCode_IPV4_UDP,
- localAddress, uint16(udpTransportInstance.LocalAddress.Port)),
- driverModel.NewConnectionRequestInformationTunnelConnection(driverModel.KnxLayer_TUNNEL_LINK_LAYER),
- )
-
- // Send the connection request
- err = m.messageCodec.SendRequest(
- connectionRequest,
- func(message interface{}) bool {
- connectionResponse := driverModel.CastConnectionResponse(message)
- return connectionResponse != nil
- },
- func(message interface{}) error {
- connectionResponse := driverModel.CastConnectionResponse(message)
-
- // Save the communication channel id
- m.CommunicationChannelId = connectionResponse.CommunicationChannelId
-
- // Reset the sequence counter
- m.SequenceCounter = -1
-
- // If the connection was successful, the gateway will now forward any packets
- // on the KNX bus that are broadcast packets to us, so we have to setup things
- // to handle these incoming messages.
- if connectionResponse.Status == driverModel.Status_NO_ERROR {
- go func() {
- defaultIncomingMessageChannel := m.messageCodec.GetDefaultIncomingMessageChannel()
- for {
- incomingMessage := <-defaultIncomingMessageChannel
- tunnelingRequest := driverModel.CastTunnelingRequest(incomingMessage)
- if tunnelingRequest == nil {
- tunnelingResponse := driverModel.CastTunnelingResponse(incomingMessage)
- if tunnelingResponse != nil {
- fmt.Printf("Got an unhandled TunnelingResponse message %v\n", tunnelingResponse)
- } else {
- fmt.Printf("Not a TunnelingRequest message %v\n", incomingMessage)
- }
- } else {
- if tunnelingRequest.TunnelingRequestDataBlock.CommunicationChannelId != m.CommunicationChannelId {
- fmt.Printf("Not for this connection %v\n", tunnelingRequest)
- continue
- }
- lDataInd := driverModel.CastLDataInd(tunnelingRequest.Cemi)
- if lDataInd != nil {
- m.handleIncomingTunnelingRequest(tunnelingRequest)
- }
- }
- }
- }()
-
- // Save the KNX Address the Gateway assigned to us for this connection.
- tunnelConnectionDataBlock :=
- driverModel.CastConnectionResponseDataBlockTunnelConnection(
- connectionResponse.ConnectionResponseDataBlock)
- m.ClientKnxAddress = tunnelConnectionDataBlock.KnxAddress
-
- // Fire the "connected" event
- sendResult(m, nil)
-
- // Start a timer that sends connection-state requests every 60 seconds
- m.connectionStateTimer = time.NewTicker(60 * time.Second)
- m.quitConnectionStateTimer = make(chan struct{})
- go func() {
- for {
- select {
- case <-m.connectionStateTimer.C:
- // We're using the connection-state-request as ping operation ...
- ping := m.Ping()
- select {
- case pingResult := <-ping:
- if pingResult.Err != nil {
- // TODO: Do some error handling here ...
- m.connectionStateTimer.Stop()
- }
- case <-time.After(5 * time.Second):
- // Close the connection
- m.Close()
- }
-
- // If externally a request to stop the timer was issued, stop the timer.
- case <-m.quitConnectionStateTimer:
- // TODO: Do some error handling here ...
- m.connectionStateTimer.Stop()
- return
- }
- }
- }()
- }
- return nil
- },
- time.Second*1)
- } else {
- return errors.New("current device doesn't support tunneling")
- }
- return nil
- },
- time.Second*1)
- if err != nil {
- sendResult(nil, err)
- }
- }()
- return result
+ result := make(chan plc4go.PlcConnectionConnectResult)
+ sendResult := func(connection plc4go.PlcConnection, err error) {
+ select {
+ case result <- plc4go.NewPlcConnectionConnectResult(connection, err):
+ default:
+ }
+ }
+
+ go func() {
+ err := m.messageCodec.Connect()
+ if err != nil {
+ sendResult(nil, err)
+ return
+ }
+
+ transportInstanceExposer, ok := m.messageCodec.(spi.TransportInstanceExposer)
+ if !ok {
+ sendResult(m, errors.New(
+ "used transport, is not a TransportInstanceExposer"))
+ return
+ }
+
+ // Prepare a SearchReq
+ udpTransportInstance, ok := transportInstanceExposer.GetTransportInstance().(*udp.UdpTransportInstance)
+ if !ok {
+ sendResult(m, errors.New(
+ "used transport, is not a UdpTransportInstance"))
+ return
+ }
+ localAddress := driverModel.NewIPAddress(utils.ByteArrayToInt8Array(udpTransportInstance.LocalAddress.IP))
+ discoveryEndpoint := driverModel.NewHPAIDiscoveryEndpoint(
+ driverModel.HostProtocolCode_IPV4_UDP, localAddress, uint16(udpTransportInstance.LocalAddress.Port))
+ searchRequest := driverModel.NewSearchRequest(discoveryEndpoint)
+
+ // Send the SearchReq
+ err = m.messageCodec.SendRequest(
+ searchRequest,
+ func(message interface{}) bool {
+ searchResponse := driverModel.CastSearchResponse(message)
+ return searchResponse != nil
+ },
+ func(message interface{}) error {
+ searchResponse := driverModel.CastSearchResponse(message)
+
+ // Save some important information
+ m.metadata.KnxMedium = searchResponse.DibDeviceInfo.KnxMedium
+ m.metadata.GatewayName = string(bytes.Trim(utils.Int8ArrayToByteArray(
+ searchResponse.DibDeviceInfo.DeviceFriendlyName), "\x00"))
+ m.GatewayKnxAddress = searchResponse.DibDeviceInfo.KnxAddress
+ m.metadata.GatewayKnxAddress = KnxAddressToString(m.GatewayKnxAddress)
+ m.metadata.ProjectNumber = searchResponse.DibDeviceInfo.ProjectInstallationIdentifier.ProjectNumber
+ m.metadata.InstallationNumber = searchResponse.DibDeviceInfo.ProjectInstallationIdentifier.InstallationNumber
+ m.metadata.DeviceSerialNumber = searchResponse.DibDeviceInfo.KnxNetIpDeviceSerialNumber
+ m.metadata.DeviceMulticastAddress = searchResponse.DibDeviceInfo.KnxNetIpDeviceMulticastAddress.Addr
+ m.metadata.DeviceMacAddress = searchResponse.DibDeviceInfo.KnxNetIpDeviceMacAddress.Addr
+ m.metadata.SupportedServices = []string{}
+ supportsTunneling := false
+ for _, serviceId := range searchResponse.DibSuppSvcFamilies.ServiceIds {
+ m.metadata.SupportedServices = append(m.metadata.SupportedServices, serviceId.Child.GetTypeName())
+ // If this is an instance of the "tunneling", service, this connection supports tunneling
+ _, ok := serviceId.Child.(*driverModel.KnxNetIpTunneling)
+ if ok {
+ supportsTunneling = true
+ break
+ }
+ }
+
+ // If the current device supports tunneling, create a tunneling connection.
+ // Via this connection we then get access to the entire KNX network this Gateway is connected to.
+ if supportsTunneling {
+ // As soon as we got a successful search-response back, send a connection request.
+ localAddress := m.castIpToKnxAddress(udpTransportInstance.LocalAddress.IP)
+ connectionRequest := driverModel.NewConnectionRequest(
+ driverModel.NewHPAIDiscoveryEndpoint(driverModel.HostProtocolCode_IPV4_UDP,
+ localAddress, uint16(udpTransportInstance.LocalAddress.Port)),
+ driverModel.NewHPAIDataEndpoint(driverModel.HostProtocolCode_IPV4_UDP,
+ localAddress, uint16(udpTransportInstance.LocalAddress.Port)),
+ driverModel.NewConnectionRequestInformationTunnelConnection(driverModel.KnxLayer_TUNNEL_LINK_LAYER),
+ )
+
+ // Send the connection request
+ err = m.messageCodec.SendRequest(
+ connectionRequest,
+ func(message interface{}) bool {
+ connectionResponse := driverModel.CastConnectionResponse(message)
+ return connectionResponse != nil
+ },
+ func(message interface{}) error {
+ connectionResponse := driverModel.CastConnectionResponse(message)
+
+ // Save the communication channel id
+ m.CommunicationChannelId = connectionResponse.CommunicationChannelId
+
+ // Reset the sequence counter
+ m.SequenceCounter = -1
+
+ // If the connection was successful, the gateway will now forward any packets
+ // on the KNX bus that are broadcast packets to us, so we have to setup things
+ // to handle these incoming messages.
+ if connectionResponse.Status == driverModel.Status_NO_ERROR {
+ go func() {
+ defaultIncomingMessageChannel := m.messageCodec.GetDefaultIncomingMessageChannel()
+ for {
+ incomingMessage := <-defaultIncomingMessageChannel
+ tunnelingRequest := driverModel.CastTunnelingRequest(incomingMessage)
+ if tunnelingRequest == nil {
+ tunnelingResponse := driverModel.CastTunnelingResponse(incomingMessage)
+ if tunnelingResponse != nil {
+ fmt.Printf("Got an unhandled TunnelingResponse message %v\n", tunnelingResponse)
+ } else {
+ fmt.Printf("Not a TunnelingRequest message %v\n", incomingMessage)
+ }
+ } else {
+ if tunnelingRequest.TunnelingRequestDataBlock.CommunicationChannelId != m.CommunicationChannelId {
+ fmt.Printf("Not for this connection %v\n", tunnelingRequest)
+ continue
+ }
+ lDataInd := driverModel.CastLDataInd(tunnelingRequest.Cemi)
+ if lDataInd != nil {
+ m.handleIncomingTunnelingRequest(tunnelingRequest)
+ }
+ }
+ }
+ }()
+
+ // Save the KNX Address the Gateway assigned to us for this connection.
+ tunnelConnectionDataBlock :=
+ driverModel.CastConnectionResponseDataBlockTunnelConnection(
+ connectionResponse.ConnectionResponseDataBlock)
+ m.ClientKnxAddress = tunnelConnectionDataBlock.KnxAddress
+
+ // Fire the "connected" event
+ sendResult(m, nil)
+
+ // Start a timer that sends connection-state requests every 60 seconds
+ m.connectionStateTimer = time.NewTicker(60 * time.Second)
+ m.quitConnectionStateTimer = make(chan struct{})
+ go func() {
+ for {
+ select {
+ case <-m.connectionStateTimer.C:
+ // We're using the connection-state-request as ping operation ...
+ ping := m.Ping()
+ select {
+ case pingResult := <-ping:
+ if pingResult.Err != nil {
+ // TODO: Do some error handling here ...
+ m.connectionStateTimer.Stop()
+ }
+ case <-time.After(5 * time.Second):
+ // Close the connection
+ m.Close()
+ }
+
+ // If externally a request to stop the timer was issued, stop the timer.
+ case <-m.quitConnectionStateTimer:
+ // TODO: Do some error handling here ...
+ m.connectionStateTimer.Stop()
+ return
+ }
+ }
+ }()
+ }
+ return nil
+ },
+ time.Second*1)
+ } else {
+ return errors.New("current device doesn't support tunneling")
+ }
+ return nil
+ },
+ time.Second*1)
+ if err != nil {
+ sendResult(nil, err)
+ }
+ }()
+ return result
}
func (m *KnxNetIpConnection) Close() <-chan plc4go.PlcConnectionCloseResult {
- // TODO: Implement ...
- result := make(chan plc4go.PlcConnectionCloseResult)
- sendResult := func(connection plc4go.PlcConnection, err error) {
- select {
- case result <- plc4go.NewPlcConnectionCloseResult(connection, err):
- default:
- }
- }
-
- go func() {
- // Stop the connection-state checker.
- m.connectionStateTimer.Stop()
-
- transportInstanceExposer, ok := m.messageCodec.(spi.TransportInstanceExposer)
- if !ok {
- sendResult(nil, errors.New(
- "used transport, is not a TransportInstanceExposer"))
- return
- }
-
- // Prepare a SearchReq
- udpTransportInstance, ok := transportInstanceExposer.GetTransportInstance().(*udp.UdpTransportInstance)
- if !ok {
- sendResult(nil, errors.New(
- "used transport, is not a UdpTransportInstance"))
- return
- }
-
- localAddress := m.castIpToKnxAddress(udpTransportInstance.LocalAddress.IP)
-
- disconnectRequest := driverModel.NewDisconnectRequest(
- m.CommunicationChannelId,
- driverModel.NewHPAIControlEndpoint(
- driverModel.HostProtocolCode_IPV4_UDP,
- localAddress,
- uint16(udpTransportInstance.LocalAddress.Port)))
-
- err := m.SendRequest(
- disconnectRequest,
- func(message interface{}) bool {
- disconnectResponse := driverModel.CastDisconnectResponse(message)
- return disconnectResponse != nil
- },
- func(message interface{}) error {
- disconnectResponse := driverModel.CastDisconnectResponse(message)
- if disconnectResponse.Status == driverModel.Status_NO_ERROR {
- sendResult(m, nil)
- } else {
- sendResult(m, errors.New("got an unexpected response for disconnect "+disconnectResponse.Status.String()))
- }
- return nil
- },
- time.Second*5)
-
- if err != nil {
- sendResult(nil, err)
- }
- }()
- return result
+ // TODO: Implement ...
+ result := make(chan plc4go.PlcConnectionCloseResult)
+ sendResult := func(connection plc4go.PlcConnection, err error) {
+ select {
+ case result <- plc4go.NewPlcConnectionCloseResult(connection, err):
+ default:
+ }
+ }
+
+ go func() {
+ // Stop the connection-state checker.
+ m.connectionStateTimer.Stop()
+
+ transportInstanceExposer, ok := m.messageCodec.(spi.TransportInstanceExposer)
+ if !ok {
+ sendResult(nil, errors.New(
+ "used transport, is not a TransportInstanceExposer"))
+ return
+ }
+
+ // Prepare a SearchReq
+ udpTransportInstance, ok := transportInstanceExposer.GetTransportInstance().(*udp.UdpTransportInstance)
+ if !ok {
+ sendResult(nil, errors.New(
+ "used transport, is not a UdpTransportInstance"))
+ return
+ }
+
+ localAddress := m.castIpToKnxAddress(udpTransportInstance.LocalAddress.IP)
+
+ disconnectRequest := driverModel.NewDisconnectRequest(
+ m.CommunicationChannelId,
+ driverModel.NewHPAIControlEndpoint(
+ driverModel.HostProtocolCode_IPV4_UDP,
+ localAddress,
+ uint16(udpTransportInstance.LocalAddress.Port)))
+
+ err := m.SendRequest(
+ disconnectRequest,
+ func(message interface{}) bool {
+ disconnectResponse := driverModel.CastDisconnectResponse(message)
+ return disconnectResponse != nil
+ },
+ func(message interface{}) error {
+ disconnectResponse := driverModel.CastDisconnectResponse(message)
+ if disconnectResponse.Status == driverModel.Status_NO_ERROR {
+ sendResult(m, nil)
+ } else {
+ sendResult(m, errors.New("got an unexpected response for disconnect "+disconnectResponse.Status.String()))
+ }
+ return nil
+ },
+ time.Second*5)
+
+ if err != nil {
+ sendResult(nil, err)
+ }
+ }()
+ return result
}
func (m *KnxNetIpConnection) IsConnected() bool {
- if m.messageCodec != nil {
- pingChannel := m.Ping()
- select {
- case pingResponse := <-pingChannel:
- return pingResponse.Err == nil
- case <-time.After(time.Second * 5):
- return false
- }
- }
- return false
+ if m.messageCodec != nil {
+ pingChannel := m.Ping()
+ select {
+ case pingResponse := <-pingChannel:
+ return pingResponse.Err == nil
+ case <-time.After(time.Second * 5):
+ return false
+ }
+ }
+ return false
}
func (m *KnxNetIpConnection) Ping() <-chan plc4go.PlcConnectionPingResult {
- result := make(chan plc4go.PlcConnectionPingResult)
- sendResult := func(err error) {
- select {
- case result <- plc4go.NewPlcConnectionPingResult(err):
- default:
- }
- }
-
- // diagnosticRequestPdu := driverModel.NewModbusPDUDiagnosticRequest(0, 0x42)
- go func() {
- transportInstanceExposer, ok := m.messageCodec.(spi.TransportInstanceExposer)
- if !ok {
- sendResult(errors.New(
- "used transport, is not a TransportInstanceExposer"))
- return
- }
-
- // Prepare a SearchReq
- udpTransportInstance, ok := transportInstanceExposer.GetTransportInstance().(*udp.UdpTransportInstance)
- if !ok {
- sendResult(errors.New(
- "used transport, is not a UdpTransportInstance"))
- return
- }
-
- localAddress := m.castIpToKnxAddress(udpTransportInstance.LocalAddress.IP)
-
- connectionStateRequest := driverModel.NewConnectionStateRequest(
- m.CommunicationChannelId,
- driverModel.NewHPAIControlEndpoint(
- driverModel.HostProtocolCode_IPV4_UDP,
- localAddress, uint16(udpTransportInstance.LocalAddress.Port)))
-
- // Send the connection state request
- err := m.messageCodec.SendRequest(
- connectionStateRequest,
- func(message interface{}) bool {
- connectionStateResponse := driverModel.CastConnectionStateResponse(message)
- return connectionStateResponse != nil
- },
- func(message interface{}) error {
- connectionStateResponse := driverModel.CastConnectionStateResponse(message)
- if connectionStateResponse.Status != driverModel.Status_NO_ERROR {
- sendResult(errors.New("got a failure response code " + strconv.Itoa(int(connectionStateResponse.Status))))
- } else {
- sendResult(nil)
- }
- return nil
- },
- // According to the KNX spec, the client is required to wait 10 seconds and if this doesn't
- // come in within this time to re-try 3 times (total of 4 times)
- // TODO: Implement the logic to re-try 3 times
- time.Second*10)
- if err != nil {
- sendResult(err)
- }
- return
- }()
- return result
+ result := make(chan plc4go.PlcConnectionPingResult)
+ sendResult := func(err error) {
+ select {
+ case result <- plc4go.NewPlcConnectionPingResult(err):
+ default:
+ }
+ }
+
+ // diagnosticRequestPdu := driverModel.NewModbusPDUDiagnosticRequest(0, 0x42)
+ go func() {
+ transportInstanceExposer, ok := m.messageCodec.(spi.TransportInstanceExposer)
+ if !ok {
+ sendResult(errors.New(
+ "used transport, is not a TransportInstanceExposer"))
+ return
+ }
+
+ // Prepare a SearchReq
+ udpTransportInstance, ok := transportInstanceExposer.GetTransportInstance().(*udp.UdpTransportInstance)
+ if !ok {
+ sendResult(errors.New(
+ "used transport, is not a UdpTransportInstance"))
+ return
+ }
+
+ localAddress := m.castIpToKnxAddress(udpTransportInstance.LocalAddress.IP)
+
+ connectionStateRequest := driverModel.NewConnectionStateRequest(
+ m.CommunicationChannelId,
+ driverModel.NewHPAIControlEndpoint(
+ driverModel.HostProtocolCode_IPV4_UDP,
+ localAddress, uint16(udpTransportInstance.LocalAddress.Port)))
+
+ // Send the connection state request
+ err := m.messageCodec.SendRequest(
+ connectionStateRequest,
+ func(message interface{}) bool {
+ connectionStateResponse := driverModel.CastConnectionStateResponse(message)
+ return connectionStateResponse != nil
+ },
+ func(message interface{}) error {
+ connectionStateResponse := driverModel.CastConnectionStateResponse(message)
+ if connectionStateResponse.Status != driverModel.Status_NO_ERROR {
+ sendResult(errors.New("got a failure response code " + strconv.Itoa(int(connectionStateResponse.Status))))
+ } else {
+ sendResult(nil)
+ }
+ return nil
+ },
+ // According to the KNX spec, the client is required to wait 10 seconds and if this doesn't
+ // come in within this time to re-try 3 times (total of 4 times)
+ // TODO: Implement the logic to re-try 3 times
+ time.Second*10)
+ if err != nil {
+ sendResult(err)
+ }
+ return
+ }()
+ return result
}
func (m *KnxNetIpConnection) GetMetadata() apiModel.PlcConnectionMetadata {
- return m.metadata
+ return m.metadata
}
func (m *KnxNetIpConnection) ReadRequestBuilder() apiModel.PlcReadRequestBuilder {
- return internalModel.NewDefaultPlcReadRequestBuilder(
- m.fieldHandler, NewKnxNetIpReader(m))
+ return internalModel.NewDefaultPlcReadRequestBuilder(
+ m.fieldHandler, NewKnxNetIpReader(m))
}
func (m *KnxNetIpConnection) WriteRequestBuilder() apiModel.PlcWriteRequestBuilder {
- return internalModel.NewDefaultPlcWriteRequestBuilder(
- m.fieldHandler, m.valueHandler, NewKnxNetIpWriter(m.messageCodec))
+ return internalModel.NewDefaultPlcWriteRequestBuilder(
+ m.fieldHandler, m.valueHandler, NewKnxNetIpWriter(m.messageCodec))
}
func (m *KnxNetIpConnection) SubscriptionRequestBuilder() apiModel.PlcSubscriptionRequestBuilder {
- return internalModel.NewDefaultPlcSubscriptionRequestBuilder(
- m.fieldHandler, m.valueHandler, NewKnxNetIpSubscriber(m))
+ return internalModel.NewDefaultPlcSubscriptionRequestBuilder(
+ m.fieldHandler, m.valueHandler, NewKnxNetIpSubscriber(m))
}
func (m *KnxNetIpConnection) BrowseRequestBuilder() apiModel.PlcBrowseRequestBuilder {
- return internalModel.NewDefaultPlcBrowseRequestBuilder(NewKnxNetIpBrowser(m, m.messageCodec))
+ return internalModel.NewDefaultPlcBrowseRequestBuilder(NewKnxNetIpBrowser(m, m.messageCodec))
}
func (m *KnxNetIpConnection) UnsubscriptionRequestBuilder() apiModel.PlcUnsubscriptionRequestBuilder {
- return nil /*internalModel.NewDefaultPlcUnsubscriptionRequestBuilder(
- m.fieldHandler, m.valueHandler, NewKnxNetIpSubscriber(m.messageCodec))*/
+ return nil /*internalModel.NewDefaultPlcUnsubscriptionRequestBuilder(
+ m.fieldHandler, m.valueHandler, NewKnxNetIpSubscriber(m.messageCodec))*/
}
func (m *KnxNetIpConnection) GetTransportInstance() transports.TransportInstance {
- if mc, ok := m.messageCodec.(spi.TransportInstanceExposer); ok {
- return mc.GetTransportInstance()
- }
- return nil
+ if mc, ok := m.messageCodec.(spi.TransportInstanceExposer); ok {
+ return mc.GetTransportInstance()
+ }
+ return nil
}
func (m *KnxNetIpConnection) GetPlcFieldHandler() spi.PlcFieldHandler {
- return m.fieldHandler
+ return m.fieldHandler
}
func (m *KnxNetIpConnection) GetPlcValueHandler() spi.PlcValueHandler {
- return m.valueHandler
+ return m.valueHandler
}
func (m *KnxNetIpConnection) Send(request *driverModel.KnxNetIpMessage) error {
- // If this is a tunneling request, we need to update the communicationChannelId and assign a sequenceCounter
- tunnelingRequest := driverModel.CastTunnelingRequest(request)
- if tunnelingRequest != nil {
- tunnelingRequest.TunnelingRequestDataBlock.CommunicationChannelId = m.CommunicationChannelId
- tunnelingRequest.TunnelingRequestDataBlock.SequenceCounter = m.getNewSequenceCounter()
- }
- return m.messageCodec.Send(request)
+ // If this is a tunneling request, we need to update the communicationChannelId and assign a sequenceCounter
+ tunnelingRequest := driverModel.CastTunnelingRequest(request)
+ if tunnelingRequest != nil {
+ tunnelingRequest.TunnelingRequestDataBlock.CommunicationChannelId = m.CommunicationChannelId
+ tunnelingRequest.TunnelingRequestDataBlock.SequenceCounter = m.getNewSequenceCounter()
+ }
+ return m.messageCodec.Send(request)
}
func (m *KnxNetIpConnection) SendRequest(request *driverModel.KnxNetIpMessage, acceptsMessage spi.AcceptsMessage, handleMessage spi.HandleMessage, ttl time.Duration) error {
- // If this is a tunneling request, we need to update the communicationChannelId and assign a sequenceCounter
- tunnelingRequest := driverModel.CastTunnelingRequest(request)
- if tunnelingRequest != nil {
- tunnelingRequest.TunnelingRequestDataBlock.CommunicationChannelId = m.CommunicationChannelId
- tunnelingRequest.TunnelingRequestDataBlock.SequenceCounter = m.getNewSequenceCounter()
- }
- return m.messageCodec.SendRequest(request, acceptsMessage, handleMessage, ttl)
+ // If this is a tunneling request, we need to update the communicationChannelId and assign a sequenceCounter
+ tunnelingRequest := driverModel.CastTunnelingRequest(request)
+ if tunnelingRequest != nil {
+ tunnelingRequest.TunnelingRequestDataBlock.CommunicationChannelId = m.CommunicationChannelId
+ tunnelingRequest.TunnelingRequestDataBlock.SequenceCounter = m.getNewSequenceCounter()
+ }
+ return m.messageCodec.SendRequest(request, acceptsMessage, handleMessage, ttl)
}
func (m *KnxNetIpConnection) interceptIncomingMessage(interface{}) {
- if m.connectionStateTimer != nil {
- // Reset the timer for sending the ConnectionStateRequest
- m.connectionStateTimer.Reset(60 * time.Second)
- }
+ if m.connectionStateTimer != nil {
+ // Reset the timer for sending the ConnectionStateRequest
+ m.connectionStateTimer.Reset(60 * time.Second)
+ }
}
func (m *KnxNetIpConnection) getNewSequenceCounter() uint8 {
- sequenceCounter := atomic.AddInt32(&m.SequenceCounter, 1)
- if sequenceCounter >= math.MaxUint8 {
- atomic.StoreInt32(&m.SequenceCounter, -1)
- sequenceCounter = -1
- }
- return uint8(sequenceCounter)
+ sequenceCounter := atomic.AddInt32(&m.SequenceCounter, 1)
+ if sequenceCounter >= math.MaxUint8 {
+ atomic.StoreInt32(&m.SequenceCounter, -1)
+ sequenceCounter = -1
+ }
+ return uint8(sequenceCounter)
}
func (m *KnxNetIpConnection) castIpToKnxAddress(ip net.IP) *driverModel.IPAddress {
- return driverModel.NewIPAddress(utils.ByteArrayToInt8Array(ip)[len(ip)-4:])
+ return driverModel.NewIPAddress(utils.ByteArrayToInt8Array(ip)[len(ip)-4:])
}
func (m *KnxNetIpConnection) handleIncomingTunnelingRequest(tunnelingRequest *driverModel.TunnelingRequest) {
- go func() {
- lDataInd := driverModel.CastLDataInd(tunnelingRequest.Cemi.Child)
- if lDataInd != nil {
- var destinationAddress []int8
- var dataFirstByte *int8
- var data []int8
- switch lDataInd.DataFrame.Child.(type) {
- case *driverModel.LDataFrameData:
- dataFrame := driverModel.CastLDataFrameData(lDataInd.DataFrame)
- destinationAddress = dataFrame.DestinationAddress
- dataFirstByte = dataFrame.DataFirstByte
- data = dataFrame.Data
- case *driverModel.LDataFrameDataExt:
- dataFrame := driverModel.CastLDataFrameDataExt(lDataInd.DataFrame)
- destinationAddress = dataFrame.DestinationAddress
- dataFirstByte = dataFrame.DataFirstByte
- data = dataFrame.Data
- }
- if destinationAddress != nil {
- addressData := uint16(destinationAddress[0])<<8 | (uint16(destinationAddress[1]) & 0xFF)
- m.valueCacheMutex.RLock()
- val, ok := m.valueCache[addressData]
- m.valueCacheMutex.RUnlock()
- changed := false
- if dataFirstByte != nil {
- var payload []int8
- payload = append(payload, *dataFirstByte)
- payload = append(payload, data...)
- if !ok || !m.sliceEqual(val, payload) {
- m.valueCacheMutex.Lock()
- m.valueCache[addressData] = payload
- m.valueCacheMutex.Unlock()
- // If this is a new value, we have to also provide the 3 different types of addresses.
- if !ok {
- arb := utils.NewReadBuffer(utils.Int8ArrayToUint8Array(destinationAddress))
- if address, err2 := driverModel.KnxGroupAddressParse(arb, 3); err2 == nil {
- m.leve3AddressCache[addressData] = driverModel.CastKnxGroupAddress3Level(address)
- }
- arb.Reset()
- if address, err2 := driverModel.KnxGroupAddressParse(arb, 2); err2 == nil {
- m.leve2AddressCache[addressData] = driverModel.CastKnxGroupAddress2Level(address)
- }
- arb.Reset()
- if address, err2 := driverModel.KnxGroupAddressParse(arb, 1); err2 == nil {
- m.leve1AddressCache[addressData] = driverModel.CastKnxGroupAddressFreeLevel(address)
- }
- }
- changed = true
- }
- if m.subscribers != nil {
- for _, subscriber := range m.subscribers {
- subscriber.handleValueChange(lDataInd.DataFrame, changed)
- }
- }
- }
- }
- }
- }()
+ go func() {
+ lDataInd := driverModel.CastLDataInd(tunnelingRequest.Cemi.Child)
+ if lDataInd != nil {
+ var destinationAddress []int8
+ var apdu *driverModel.Apdu
+ switch lDataInd.DataFrame.Child.(type) {
+ case *driverModel.LDataFrameData:
+ dataFrame := driverModel.CastLDataFrameData(lDataInd.DataFrame)
+ destinationAddress = dataFrame.DestinationAddress
+ apdu = dataFrame.Apdu
+ case *driverModel.LDataFrameDataExt:
+ dataFrame := driverModel.CastLDataFrameDataExt(lDataInd.DataFrame)
+ destinationAddress = dataFrame.DestinationAddress
+ apdu = dataFrame.Apdu
+ }
+ container := driverModel.CastApduDataContainer(apdu)
+ if container == nil {
+ return
+ }
+ groupValueWrite := driverModel.CastApduDataGroupValueWrite(container.DataApdu)
+ if groupValueWrite == nil {
+ return
+ }
+ if destinationAddress != nil {
+ addressData := uint16(destinationAddress[0])<<8 | (uint16(destinationAddress[1]) & 0xFF)
+ m.valueCacheMutex.RLock()
+ val, ok := m.valueCache[addressData]
+ m.valueCacheMutex.RUnlock()
+ changed := false
+
+ var payload []int8
+ payload = append(payload, groupValueWrite.DataFirstByte)
+ payload = append(payload, groupValueWrite.Data...)
+ if !ok || !m.sliceEqual(val, payload) {
+ m.valueCacheMutex.Lock()
+ m.valueCache[addressData] = payload
+ m.valueCacheMutex.Unlock()
+ // If this is a new value, we have to also provide the 3 different types of addresses.
+ if !ok {
+ arb := utils.NewReadBuffer(utils.Int8ArrayToUint8Array(destinationAddress))
+ if address, err2 := driverModel.KnxGroupAddressParse(arb, 3); err2 == nil {
+ m.leve3AddressCache[addressData] = driverModel.CastKnxGroupAddress3Level(address)
+ } else {
+ fmt.Printf("Error parsing Group Address %s", err2.Error())
+ }
+ arb.Reset()
+ if address, err2 := driverModel.KnxGroupAddressParse(arb, 2); err2 == nil {
+ m.leve2AddressCache[addressData] = driverModel.CastKnxGroupAddress2Level(address)
+ }
+ arb.Reset()
+ if address, err2 := driverModel.KnxGroupAddressParse(arb, 1); err2 == nil {
+ m.leve1AddressCache[addressData] = driverModel.CastKnxGroupAddressFreeLevel(address)
+ }
+ }
+ changed = true
+ }
+ if m.subscribers != nil {
+ for _, subscriber := range m.subscribers {
+ subscriber.handleValueChange(lDataInd.DataFrame, changed)
+ }
+ }
+ }
+ }
+ }()
}
func (m *KnxNetIpConnection) getGroupAddressNumLevels() uint8 {
- if val, ok := m.options["group-address-num-levels"]; ok {
- groupAddressNumLevels, err := strconv.Atoi(val[0])
- if err == nil {
- return uint8(groupAddressNumLevels)
- }
- }
- return 3
+ if val, ok := m.options["group-address-num-levels"]; ok {
+ groupAddressNumLevels, err := strconv.Atoi(val[0])
+ if err == nil {
+ return uint8(groupAddressNumLevels)
+ }
+ }
+ return 3
}
func (m *KnxNetIpConnection) addSubscriber(subscriber *KnxNetIpSubscriber) {
- for _, sub := range m.subscribers {
- if sub == subscriber {
- return
- }
- }
- m.subscribers = append(m.subscribers, subscriber)
+ for _, sub := range m.subscribers {
+ if sub == subscriber {
+ return
+ }
+ }
+ m.subscribers = append(m.subscribers, subscriber)
}
func (m *KnxNetIpConnection) removeSubscriber(subscriber *KnxNetIpSubscriber) {
- for i, sub := range m.subscribers {
- if sub == subscriber {
- m.subscribers = append(m.subscribers[:i], m.subscribers[i+1:]...)
- }
- }
+ for i, sub := range m.subscribers {
+ if sub == subscriber {
+ m.subscribers = append(m.subscribers[:i], m.subscribers[i+1:]...)
+ }
+ }
}
func (m *KnxNetIpConnection) sliceEqual(a, b []int8) bool {
- if len(a) != len(b) {
- return false
- }
- for i, v := range a {
- if v != b[i] {
- return false
- }
- }
- return true
+ if len(a) != len(b) {
+ return false
+ }
+ for i, v := range a {
+ if v != b[i] {
+ return false
+ }
+ }
+ return true
}
func KnxAddressToString(knxAddress *driverModel.KnxAddress) string {
- return strconv.Itoa(int(knxAddress.MainGroup)) + "." + strconv.Itoa(int(knxAddress.MiddleGroup)) + "." + strconv.Itoa(int(knxAddress.SubGroup))
+ return strconv.Itoa(int(knxAddress.MainGroup)) + "." + strconv.Itoa(int(knxAddress.MiddleGroup)) + "." + strconv.Itoa(int(knxAddress.SubGroup))
}
diff --git a/plc4go/internal/plc4go/knxnetip/KnxNetIpField.go b/plc4go/internal/plc4go/knxnetip/KnxNetIpField.go
index 748d20b..1d255c6 100644
--- a/plc4go/internal/plc4go/knxnetip/KnxNetIpField.go
+++ b/plc4go/internal/plc4go/knxnetip/KnxNetIpField.go
@@ -34,7 +34,7 @@ type KnxNetIpField interface {
}
type KnxNetIpGroupAddress3LevelPlcField struct {
- FieldType *driverModel.KnxDatapointType
+ FieldType *driverModel.KnxDatapointSubtype
// 5 Bits: Values 0-31
MainGroup string
// 3 Bits: values 0-7
@@ -44,7 +44,7 @@ type KnxNetIpGroupAddress3LevelPlcField struct {
KnxNetIpField
}
-func NewKnxNetIpGroupAddress3LevelPlcField(fieldType *driverModel.KnxDatapointType, mainGroup string, middleGroup string, subGroup string) KnxNetIpGroupAddress3LevelPlcField {
+func NewKnxNetIpGroupAddress3LevelPlcField(fieldType *driverModel.KnxDatapointSubtype, mainGroup string, middleGroup string, subGroup string) KnxNetIpGroupAddress3LevelPlcField {
return KnxNetIpGroupAddress3LevelPlcField{
FieldType: fieldType,
MainGroup: mainGroup,
@@ -110,7 +110,7 @@ func (k KnxNetIpGroupAddress3LevelPlcField) toGroupAddress() *driverModel.KnxGro
}
type KnxNetIpGroupAddress2LevelPlcField struct {
- FieldType *driverModel.KnxDatapointType
+ FieldType *driverModel.KnxDatapointSubtype
// 5 Bits: Values 0-31
MainGroup string
// 11 Bits
@@ -118,7 +118,7 @@ type KnxNetIpGroupAddress2LevelPlcField struct {
KnxNetIpField
}
-func NewKnxNetIpGroupAddress2LevelPlcField(fieldType *driverModel.KnxDatapointType, mainGroup string, subGroup string) KnxNetIpGroupAddress2LevelPlcField {
+func NewKnxNetIpGroupAddress2LevelPlcField(fieldType *driverModel.KnxDatapointSubtype, mainGroup string, subGroup string) KnxNetIpGroupAddress2LevelPlcField {
return KnxNetIpGroupAddress2LevelPlcField{
FieldType: fieldType,
MainGroup: mainGroup,
@@ -174,13 +174,13 @@ func (k KnxNetIpGroupAddress2LevelPlcField) toGroupAddress() *driverModel.KnxGro
}
type KnxNetIpGroupAddress1LevelPlcField struct {
- FieldType *driverModel.KnxDatapointType
+ FieldType *driverModel.KnxDatapointSubtype
// 16 Bits
MainGroup string
KnxNetIpField
}
-func NewKnxNetIpGroupAddress1LevelPlcField(fieldType *driverModel.KnxDatapointType, mainGroup string) KnxNetIpGroupAddress1LevelPlcField {
+func NewKnxNetIpGroupAddress1LevelPlcField(fieldType *driverModel.KnxDatapointSubtype, mainGroup string) KnxNetIpGroupAddress1LevelPlcField {
return KnxNetIpGroupAddress1LevelPlcField{
FieldType: fieldType,
MainGroup: mainGroup,
@@ -226,7 +226,7 @@ func (k KnxNetIpGroupAddress1LevelPlcField) toGroupAddress() *driverModel.KnxGro
}
type KnxNetIpDevicePropertyAddressPlcField struct {
- FieldType *driverModel.KnxDatapointType
+ FieldType *driverModel.KnxDatapointSubtype
// 5 Bits: Values 0-31
MainGroup string
// 3 Bits: values 0-7
@@ -238,7 +238,7 @@ type KnxNetIpDevicePropertyAddressPlcField struct {
KnxNetIpField
}
-func NewKnxNetIpDevicePropertyAddressPlcField(fieldType *driverModel.KnxDatapointType, mainGroup string, middleGroup string, subGroup string, objectId string, propertyId string) KnxNetIpDevicePropertyAddressPlcField {
+func NewKnxNetIpDevicePropertyAddressPlcField(fieldType *driverModel.KnxDatapointSubtype, mainGroup string, middleGroup string, subGroup string, objectId string, propertyId string) KnxNetIpDevicePropertyAddressPlcField {
return KnxNetIpDevicePropertyAddressPlcField{
FieldType: fieldType,
MainGroup: mainGroup,
diff --git a/plc4go/internal/plc4go/knxnetip/KnxNetIpFieldHandler.go b/plc4go/internal/plc4go/knxnetip/KnxNetIpFieldHandler.go
index 2971763..8490018 100644
--- a/plc4go/internal/plc4go/knxnetip/KnxNetIpFieldHandler.go
+++ b/plc4go/internal/plc4go/knxnetip/KnxNetIpFieldHandler.go
@@ -63,30 +63,30 @@ func NewFieldHandler() FieldHandler {
func (m FieldHandler) ParseQuery(query string) (apiModel.PlcField, error) {
if match := utils.GetSubgroupMatches(m.knxNetIpDeviceQuery, query); match != nil {
fieldTypeName, ok := match["datatype"]
- var fieldType driverModel.KnxDatapointType
+ var fieldType driverModel.KnxDatapointSubtype
if ok {
- fieldType = driverModel.KnxDatapointTypeByName(fieldTypeName)
+ fieldType = driverModel.KnxDatapointSubtypeByName(fieldTypeName)
}
return NewKnxNetIpDevicePropertyAddressPlcField(&fieldType, match["mainGroup"], match["middleGroup"], match["subGroup"], match["objectId"], match["propertyId"]), nil
} else if match := utils.GetSubgroupMatches(m.knxNetIpGroupAddress3Level, query); match != nil {
fieldTypeName, ok := match["datatype"]
- var fieldType driverModel.KnxDatapointType
+ var fieldType driverModel.KnxDatapointSubtype
if ok {
- fieldType = driverModel.KnxDatapointTypeByName(fieldTypeName)
+ fieldType = driverModel.KnxDatapointSubtypeByName(fieldTypeName)
}
return NewKnxNetIpGroupAddress3LevelPlcField(&fieldType, match["mainGroup"], match["middleGroup"], match["subGroup"]), nil
} else if match := utils.GetSubgroupMatches(m.knxNetIpGroupAddress2Level, query); match != nil {
fieldTypeName, ok := match["datatype"]
- var fieldType driverModel.KnxDatapointType
+ var fieldType driverModel.KnxDatapointSubtype
if ok {
- fieldType = driverModel.KnxDatapointTypeByName(fieldTypeName)
+ fieldType = driverModel.KnxDatapointSubtypeByName(fieldTypeName)
}
return NewKnxNetIpGroupAddress2LevelPlcField(&fieldType, match["mainGroup"], match["subGroup"]), nil
} else if match := utils.GetSubgroupMatches(m.knxNetIpGroupAddress1Level, query); match != nil {
fieldTypeName, ok := match["datatype"]
- var fieldType driverModel.KnxDatapointType
+ var fieldType driverModel.KnxDatapointSubtype
if ok {
- fieldType = driverModel.KnxDatapointTypeByName(fieldTypeName)
+ fieldType = driverModel.KnxDatapointSubtypeByName(fieldTypeName)
}
return NewKnxNetIpGroupAddress1LevelPlcField(&fieldType, match["mainGroup"]), nil
}
diff --git a/plc4go/internal/plc4go/knxnetip/KnxNetIpMessageCodec.go b/plc4go/internal/plc4go/knxnetip/KnxNetIpMessageCodec.go
index ffa1226..479d4b6 100644
--- a/plc4go/internal/plc4go/knxnetip/KnxNetIpMessageCodec.go
+++ b/plc4go/internal/plc4go/knxnetip/KnxNetIpMessageCodec.go
@@ -127,6 +127,7 @@ func (m *KnxNetIpMessageCodec) receive() (interface{}, error) {
rb := utils.NewReadBuffer(data)
knxMessage, err := model.KnxNetIpMessageParse(rb)
if err != nil {
+ fmt.Printf("Got error parsing message: %s\n", err.Error())
// TODO: Possibly clean up ...
return nil, nil
}
@@ -155,7 +156,7 @@ func work(m *KnxNetIpMessageCodec) {
continue
}
- // If this is an incoming KNXNet/IP UDP Packet, automatically send an ACK
+ // If this is an incoming KNXNet/IP UDP Packet, automatically send an ACK
tunnelingRequest := model.CastTunnelingRequest(message)
if tunnelingRequest != nil {
response := model.NewTunnelingResponse(
diff --git a/plc4go/internal/plc4go/knxnetip/KnxNetIpReader.go b/plc4go/internal/plc4go/knxnetip/KnxNetIpReader.go
index b69cc5f..d658b5f 100644
--- a/plc4go/internal/plc4go/knxnetip/KnxNetIpReader.go
+++ b/plc4go/internal/plc4go/knxnetip/KnxNetIpReader.go
@@ -127,15 +127,13 @@ func (m KnxNetIpReader) Read(readRequest apiModel.PlcReadRequest) <-chan apiMode
func (m KnxNetIpReader) connectToDevice(targetAddress driverModel.KnxAddress) error {
connectionSuccess := make(chan bool)
- controlType := driverModel.ControlType_CONNECT
deviceConnectionRequest := driverModel.NewTunnelingRequest(
driverModel.NewTunnelingRequestDataBlock(0, 0),
driverModel.NewLDataReq(0, nil,
- driverModel.NewLDataFrameDataExt(false, 6, uint8(0),
+ driverModel.NewLDataFrameDataExt(false, 6, 0,
driverModel.NewKnxAddress(0, 0, 0), KnxAddressToInt8Array(targetAddress),
- uint8(0), true, false, uint8(0), &controlType, nil, nil,
- nil, nil, true, driverModel.CEMIPriority_SYSTEM, false,
- false)))
+ driverModel.NewApduControlContainer(driverModel.NewApduControlConnect(), 0, false, 0),
+ true, true, driverModel.CEMIPriority_SYSTEM, false, false)))
// Send the request
err := m.connection.SendRequest(
@@ -159,16 +157,13 @@ func (m KnxNetIpReader) connectToDevice(targetAddress driverModel.KnxAddress) er
}
// Now for some reason it seems as if we need to implement a Device Descriptor read.
- apciType := driverModel.APCI_DEVICE_DESCRIPTOR_READ_PDU
- dataFirstByte := int8(0)
deviceDescriptorReadRequest := driverModel.NewTunnelingRequest(
driverModel.NewTunnelingRequestDataBlock(0, 0),
driverModel.NewLDataReq(0, nil,
driverModel.NewLDataFrameDataExt(false, 6, uint8(0),
driverModel.NewKnxAddress(0, 0, 0), KnxAddressToInt8Array(targetAddress),
- uint8(1), false, true, uint8(0), nil, &apciType, nil,
- &dataFirstByte, nil, true, driverModel.CEMIPriority_LOW, false,
- false)))
+ driverModel.NewApduDataContainer(driverModel.NewApduDataDeviceDescriptorRead(), 0, false, 0),
+ true, true, driverModel.CEMIPriority_LOW, false, false)))
_ = m.connection.SendRequest(
deviceDescriptorReadRequest,
func(message interface{}) bool {
@@ -185,14 +180,14 @@ func (m KnxNetIpReader) connectToDevice(targetAddress driverModel.KnxAddress) er
if dataFrame == nil {
return false
}
- if dataFrame.Apci == nil {
+ if dataFrame.Apdu == nil {
return false
}
- return *dataFrame.Apci == driverModel.APCI_DEVICE_DESCRIPTOR_RESPONSE_PDU
+ return true
+ //return *dataFrame.Apdu.Apci == driverModel.APCI_DEVICE_DESCRIPTOR_RESPONSE_PDU
// TODO: Do something with the request ...
},
func(message interface{}) error {
- controlType = driverModel.ControlType_ACK
// Send back an ACK
_ = m.connection.Send(
driverModel.NewTunnelingRequest(
@@ -200,9 +195,8 @@ func (m KnxNetIpReader) connectToDevice(targetAddress driverModel.KnxAddress) er
driverModel.NewLDataReq(0, nil,
driverModel.NewLDataFrameDataExt(false, 6, uint8(0),
driverModel.NewKnxAddress(0, 0, 0), KnxAddressToInt8Array(targetAddress),
- uint8(0), true, true, uint8(0), &controlType, nil, nil,
- nil, nil, true, driverModel.CEMIPriority_SYSTEM, false,
- false))))
+ driverModel.NewApduControlContainer(driverModel.NewApduControlAck(), 0, false, 0),
+ true, true, driverModel.CEMIPriority_SYSTEM, false, false))))
// Now we can finally read properties.
connectionSuccess <- true
return nil
@@ -227,14 +221,13 @@ func (m KnxNetIpReader) connectToDevice(targetAddress driverModel.KnxAddress) er
}
func (m KnxNetIpReader) disconnectFromDevice(sourceAddress driverModel.KnxAddress, targetAddress driverModel.KnxAddress) error {
- controlType := driverModel.ControlType_DISCONNECT
deviceConnectionRequest := driverModel.NewTunnelingRequest(
driverModel.NewTunnelingRequestDataBlock(0, 0),
driverModel.NewLDataReq(0, nil,
driverModel.NewLDataFrameDataExt(false, 6, uint8(0),
- &sourceAddress, KnxAddressToInt8Array(targetAddress), uint8(0), true, false,
- uint8(0), &controlType, nil, nil, nil, nil,
- true, driverModel.CEMIPriority_SYSTEM, false, false)))
+ &sourceAddress, KnxAddressToInt8Array(targetAddress),
+ driverModel.NewApduControlContainer(driverModel.NewApduControlDisconnect(), 0, false,0),
+ true, true, driverModel.CEMIPriority_SYSTEM, false, false)))
// Send the request
connectionSuccess := make(chan bool)
@@ -255,15 +248,16 @@ func (m KnxNetIpReader) disconnectFromDevice(sourceAddress driverModel.KnxAddres
if frameDataExt == nil {
return false
}
- return frameDataExt.Control == true && frameDataExt.ControlType == nil
+ return true
+ //return frameDataExt.Control == true && frameDataExt.ControlType == nil
},
func(message interface{}) error {
tunnelingRequest := driverModel.CastTunnelingRequest(message)
lDataCon := driverModel.CastLDataCon(tunnelingRequest.Cemi)
- frameDataExt := driverModel.CastLDataFrameDataExt(lDataCon.DataFrame)
- if *frameDataExt.ControlType == driverModel.ControlType_DISCONNECT {
+ _ = driverModel.CastLDataFrameDataExt(lDataCon.DataFrame)
+ //if *frameDataExt.ControlType == driverModel.ControlType_DISCONNECT {
connectionSuccess <- false
- }
+ //}
return nil
},
time.Second*1)
@@ -303,24 +297,16 @@ func (m KnxNetIpReader) readDeviceProperty(field KnxNetIpDevicePropertyAddressPl
objectId, _ := strconv.Atoi(field.ObjectId)
propertyId, _ := strconv.Atoi(field.PropertyId)
- apci := driverModel.APCI_OTHER_PDU
- extendedApci := driverModel.ExtendedAPCI_PROPERTY_VALUE_READ_PDU
- data := make([]int8, 4)
- // Object Id
- data[0] = int8(objectId)
- // Property Id
- data[1] = int8(propertyId)
- // First 4 bits = count
- data[2] = 16
- // Index (including last 4 bits of previous byte)
- data[3] = 1
request := driverModel.NewTunnelingRequest(
driverModel.NewTunnelingRequestDataBlock(0, 0),
driverModel.NewLDataReq(0, nil,
driverModel.NewLDataFrameDataExt(false, 6, 0,
- driverModel.NewKnxAddress(0, 0, 0), destinationAddressData, 5,
- false, true, counter, nil, &apci, &extendedApci,
- nil, data, true, 3, false, false)))
+ driverModel.NewKnxAddress(0, 0, 0),
+ destinationAddressData,
+ driverModel.NewApduDataContainer(driverModel.NewApduDataOther(
+ // TODO: The counter should be incremented per KNX individual address
+ driverModel.NewApduDataExtPropertyValueRead(uint8(objectId), uint8(propertyId), 1, 1)), 0, true, 1),
+ true, true, driverModel.CEMIPriority_SYSTEM, false, false)))
result := make(chan readPropertyResult)
err = m.connection.SendRequest(
@@ -339,11 +325,14 @@ func (m KnxNetIpReader) readDeviceProperty(field KnxNetIpDevicePropertyAddressPl
return false
}
dataFrameExt := driverModel.CastLDataFrameDataExt(lDataInd.DataFrame)
- if dataFrameExt != nil && dataFrameExt.Apci != nil {
- if *dataFrameExt.Apci != driverModel.APCI_OTHER_PDU {
+ if dataFrameExt != nil && dataFrameExt.Apdu != nil {
+ otherPdu := driverModel.CastApduDataOther(*dataFrameExt.Apdu)
+ if otherPdu == nil {
return false
}
- if *dataFrameExt.ExtendedApci != driverModel.ExtendedAPCI_PROPERTY_VALUE_RESPONSE_PDU {
+
+ propertyValueResponse := driverModel.CastApduDataExtPropertyValueResponse(otherPdu.ExtendedApdu)
+ if propertyValueResponse == nil {
return false
}
if *dataFrameExt.SourceAddress != *destinationAddress {
@@ -352,21 +341,12 @@ func (m KnxNetIpReader) readDeviceProperty(field KnxNetIpDevicePropertyAddressPl
if *Int8ArrayToKnxAddress(dataFrameExt.DestinationAddress) != *m.connection.ClientKnxAddress {
return false
}
- if dataFrameExt.DataLength < 5 {
- return false
- }
- if *dataFrameExt.Apci == driverModel.APCI_OTHER_PDU &&
- *dataFrameExt.ExtendedApci == driverModel.ExtendedAPCI_PROPERTY_VALUE_RESPONSE_PDU &&
- *dataFrameExt.SourceAddress == *destinationAddress &&
- *Int8ArrayToKnxAddress(dataFrameExt.DestinationAddress) == *m.connection.ClientKnxAddress &&
- dataFrameExt.DataLength >= 5 {
- readBuffer := utils.NewReadBuffer(utils.Int8ArrayToUint8Array(dataFrameExt.Data))
- curObjectId, _ := readBuffer.ReadUint8(8)
- curPropertyId, _ := readBuffer.ReadUint8(8)
- if curObjectId == uint8(objectId) && curPropertyId == uint8(propertyId) {
- return true
- }
- }
+ readBuffer := utils.NewReadBuffer(propertyValueResponse.Data)
+ curObjectId, _ := readBuffer.ReadUint8(8)
+ curPropertyId, _ := readBuffer.ReadUint8(8)
+ if curObjectId == uint8(objectId) && curPropertyId == uint8(propertyId) {
+ return true
+ }
}
return false
},
@@ -374,13 +354,15 @@ func (m KnxNetIpReader) readDeviceProperty(field KnxNetIpDevicePropertyAddressPl
tunnelingRequest := driverModel.CastTunnelingRequest(message)
lDataInd := driverModel.CastLDataInd(tunnelingRequest.Cemi)
dataFrameExt := driverModel.CastLDataFrameDataExt(lDataInd.DataFrame)
+ otherPdu := driverModel.CastApduDataOther(*dataFrameExt.Apdu)
+ propertyValueResponse := driverModel.CastApduDataExtPropertyValueResponse(otherPdu.ExtendedApdu)
- readBuffer := utils.NewReadBuffer(utils.Int8ArrayToUint8Array(dataFrameExt.Data))
+ readBuffer := utils.NewReadBuffer(propertyValueResponse.Data)
// Skip the object id and property id as we already checked them
_, _ = readBuffer.ReadUint8(8)
_, _ = readBuffer.ReadUint8(8)
- count, _ := readBuffer.ReadUint8(4)
+ propertyCount, _ := readBuffer.ReadUint8(4)
_ /*index*/, _ = readBuffer.ReadUint16(12)
// If the return is a count of 0, then we can't access this property (Doesn't exist or not allowed to)
@@ -388,14 +370,11 @@ func (m KnxNetIpReader) readDeviceProperty(field KnxNetIpDevicePropertyAddressPl
// as this can be understood as "found no property we have access to"
// ("03_03_07 Application Layer v01.06.02 AS" Page 52)
var propResult readPropertyResult
- if count == 0 {
+ if propertyCount == 0 {
propResult = readPropertyResult{
responseCode: apiModel.PlcResponseCode_NOT_FOUND,
}
} else {
- // Read the data payload.
- dataLength := dataFrameExt.DataLength - 5
-
// Depending on the object id and property id, parse the remaining data accordingly.
property := driverModel.KnxInterfaceObjectProperty_PID_UNKNOWN
for i := driverModel.KnxInterfaceObjectProperty_PID_UNKNOWN; i < driverModel.KnxInterfaceObjectProperty_PID_SUNBLIND_SENSOR_BASIC_ENABLE_TOGGLE_MODE; i++ {
@@ -408,24 +387,22 @@ func (m KnxNetIpReader) readDeviceProperty(field KnxNetIpDevicePropertyAddressPl
// Parse the payload according to the specified datatype
dataType := property.PropertyDataType()
- plcValue := readwrite.ParsePropertyDataType(*readBuffer, dataType, dataLength)
+ plcValue := readwrite.ParsePropertyDataType(*readBuffer, dataType, dataType.SizeInBytes())
propResult = readPropertyResult{
plcValue: plcValue,
responseCode: apiModel.PlcResponseCode_OK,
}
}
- // Send back an ACK
- controlType := driverModel.ControlType_ACK
- _ = m.connection.Send(
- driverModel.NewTunnelingRequest(
- driverModel.NewTunnelingRequestDataBlock(0, 0),
- driverModel.NewLDataReq(0, nil,
- driverModel.NewLDataFrameDataExt(false, 6, uint8(0),
- driverModel.NewKnxAddress(0, 0, 0), destinationAddressData,
- uint8(0), true, true, dataFrameExt.Counter, &controlType, nil,
- nil, nil, nil, true, driverModel.CEMIPriority_SYSTEM,
- false, false))))
+ // Send back an ACK
+ _ = m.connection.Send(
+ driverModel.NewTunnelingRequest(
+ driverModel.NewTunnelingRequestDataBlock(0, 0),
+ driverModel.NewLDataReq(0, nil,
+ driverModel.NewLDataFrameDataExt(false, 6, uint8(0),
+ driverModel.NewKnxAddress(0, 0, 0), destinationAddressData,
+ driverModel.NewApduControlContainer(driverModel.NewApduControlAck(), 0, false, 0),
+ true, true, driverModel.CEMIPriority_SYSTEM, false, false))))
result <- propResult
return nil
diff --git a/plc4go/internal/plc4go/knxnetip/KnxNetIpSubscriber.go b/plc4go/internal/plc4go/knxnetip/KnxNetIpSubscriber.go
index 856a408..0a630f9 100644
--- a/plc4go/internal/plc4go/knxnetip/KnxNetIpSubscriber.go
+++ b/plc4go/internal/plc4go/knxnetip/KnxNetIpSubscriber.go
@@ -79,20 +79,25 @@ func (m *KnxNetIpSubscriber) Unsubscribe(unsubscriptionRequest apiModel.PlcUnsub
*/
func (m *KnxNetIpSubscriber) handleValueChange(lDataFrame *driverModel.LDataFrame, changed bool) {
var destinationAddress []int8
- var dataFirstByte *int8
- var data []int8
+ var apdu *driverModel.Apdu
switch lDataFrame.Child.(type) {
case *driverModel.LDataFrameData:
dataFrame := driverModel.CastLDataFrameData(lDataFrame)
destinationAddress = dataFrame.DestinationAddress
- dataFirstByte = dataFrame.DataFirstByte
- data = dataFrame.Data
+ apdu = dataFrame.Apdu
case *driverModel.LDataFrameDataExt:
dataFrame := driverModel.CastLDataFrameDataExt(lDataFrame)
destinationAddress = dataFrame.DestinationAddress
- dataFirstByte = dataFrame.DataFirstByte
- data = dataFrame.Data
+ apdu = dataFrame.Apdu
}
+ container := driverModel.CastApduDataContainer(apdu)
+ if container == nil {
+ return
+ }
+ groupValueWrite := driverModel.CastApduDataGroupValueWrite(container.DataApdu)
+ if groupValueWrite == nil {
+ return
+ }
if destinationAddress != nil {
// Decode the group-address according to the settings in the driver
@@ -122,27 +127,25 @@ func (m *KnxNetIpSubscriber) handleValueChange(lDataFrame *driverModel.LDataFram
subscriptionType := subscriptionRequest.GetType(fieldName)
// If it matches, take the datatype of each matching field and try to decode the payload
if field.matches(groupAddress) {
- // If this is a CHANGE_OF_STATE field, filter out the events where the value actually hasn't changed.
+ // If this is a CHANGE_OF_STATE field, filter out the events where the value actually hasn't changed.
if subscriptionType == internalModel.SUBSCRIPTION_CHANGE_OF_STATE && changed {
- if dataFirstByte != nil {
- var payload []uint8
- payload = append(payload, uint8(*dataFirstByte))
- payload = append(payload, utils.Int8ArrayToByteArray(data)...)
- rb := utils.NewReadBuffer(payload)
- plcValue, err := driverModel.KnxDatapointParse(rb, field.GetTypeName())
- fields[fieldName] = field
- types[fieldName] = subscriptionRequest.GetType(fieldName)
- intervals[fieldName] = subscriptionRequest.GetInterval(fieldName)
- addresses[fieldName] = destinationAddress
- if err == nil {
- responseCodes[fieldName] = apiModel.PlcResponseCode_OK
- plcValues[fieldName] = plcValue
- } else {
- // TODO: Do a little more here ...
- responseCodes[fieldName] = apiModel.PlcResponseCode_INTERNAL_ERROR
- plcValues[fieldName] = nil
- }
- }
+ var payload []int8
+ payload = append(payload, groupValueWrite.DataFirstByte)
+ payload = append(payload, groupValueWrite.Data...)
+ rb := utils.NewReadBuffer(utils.Int8ArrayToByteArray(payload))
+ plcValue, err := driverModel.KnxDatapointParse(rb, field.GetTypeName())
+ fields[fieldName] = field
+ types[fieldName] = subscriptionRequest.GetType(fieldName)
+ intervals[fieldName] = subscriptionRequest.GetInterval(fieldName)
+ addresses[fieldName] = destinationAddress
+ if err == nil {
+ responseCodes[fieldName] = apiModel.PlcResponseCode_OK
+ plcValues[fieldName] = plcValue
+ } else {
+ // TODO: Do a little more here ...
+ responseCodes[fieldName] = apiModel.PlcResponseCode_INTERNAL_ERROR
+ plcValues[fieldName] = nil
+ }
}
}
}
diff --git a/plc4go/internal/plc4go/knxnetip/readwrite/ParserHelper.go b/plc4go/internal/plc4go/knxnetip/readwrite/ParserHelper.go
index cea565b..d1ddcd9 100644
--- a/plc4go/internal/plc4go/knxnetip/readwrite/ParserHelper.go
+++ b/plc4go/internal/plc4go/knxnetip/readwrite/ParserHelper.go
@@ -19,71 +19,91 @@
package readwrite
import (
- "errors"
- "github.com/apache/plc4x/plc4go/internal/plc4go/knxnetip/readwrite/model"
- "github.com/apache/plc4x/plc4go/internal/plc4go/spi"
- "github.com/apache/plc4x/plc4go/internal/plc4go/spi/utils"
+ "errors"
+ "github.com/apache/plc4x/plc4go/internal/plc4go/knxnetip/readwrite/model"
+ "github.com/apache/plc4x/plc4go/internal/plc4go/spi"
+ "github.com/apache/plc4x/plc4go/internal/plc4go/spi/utils"
)
type KnxnetipParserHelper struct {
}
func (m KnxnetipParserHelper) Parse(typeName string, arguments []string, io *utils.ReadBuffer) (spi.Message, error) {
- switch typeName {
- case "HPAIControlEndpoint":
- return model.HPAIControlEndpointParse(io)
- case "TunnelingResponseDataBlock":
- return model.TunnelingResponseDataBlockParse(io)
- case "DeviceConfigurationAckDataBlock":
- return model.DeviceConfigurationAckDataBlockParse(io)
- case "ConnectionRequestInformation":
- return model.ConnectionRequestInformationParse(io)
- case "HPAIDiscoveryEndpoint":
- return model.HPAIDiscoveryEndpointParse(io)
- case "ProjectInstallationIdentifier":
- return model.ProjectInstallationIdentifierParse(io)
- case "ServiceId":
- return model.ServiceIdParse(io)
- case "HPAIDataEndpoint":
- return model.HPAIDataEndpointParse(io)
- case "RelativeTimestamp":
- return model.RelativeTimestampParse(io)
- case "CEMI":
- size, err := utils.StrToUint8(arguments[0])
- if err != nil {
- return nil, err
- }
- return model.CEMIParse(io, size)
- case "KnxNetIpMessage":
- return model.KnxNetIpMessageParse(io)
- case "DeviceStatus":
- return model.DeviceStatusParse(io)
- case "IPAddress":
- return model.IPAddressParse(io)
- case "CEMIAdditionalInformation":
- return model.CEMIAdditionalInformationParse(io)
- case "KnxAddress":
- return model.KnxAddressParse(io)
- case "ConnectionResponseDataBlock":
- return model.ConnectionResponseDataBlockParse(io)
- case "TunnelingRequestDataBlock":
- return model.TunnelingRequestDataBlockParse(io)
- case "DIBDeviceInfo":
- return model.DIBDeviceInfoParse(io)
- case "DeviceConfigurationRequestDataBlock":
- return model.DeviceConfigurationRequestDataBlockParse(io)
- case "DIBSuppSvcFamilies":
- return model.DIBSuppSvcFamiliesParse(io)
- case "LDataFrame":
- return model.LDataFrameParse(io)
- case "KnxGroupAddress":
- numLevels, err := utils.StrToUint8(arguments[0])
- if err != nil {
- return nil, err
- }
- return model.KnxGroupAddressParse(io, numLevels)
- case "MACAddress":
- return model.MACAddressParse(io)
- }
- return nil, errors.New("Unsupported type " + typeName)
+ switch typeName {
+ case "HPAIControlEndpoint":
+ return model.HPAIControlEndpointParse(io)
+ case "TunnelingResponseDataBlock":
+ return model.TunnelingResponseDataBlockParse(io)
+ case "DeviceDescriptorType2":
+ return model.DeviceDescriptorType2Parse(io)
+ case "ChannelInformation":
+ return model.ChannelInformationParse(io)
+ case "DeviceConfigurationAckDataBlock":
+ return model.DeviceConfigurationAckDataBlockParse(io)
+ case "ConnectionRequestInformation":
+ return model.ConnectionRequestInformationParse(io)
+ case "Apdu":
+ return model.ApduParse(io)
+ case "HPAIDiscoveryEndpoint":
+ return model.HPAIDiscoveryEndpointParse(io)
+ case "ProjectInstallationIdentifier":
+ return model.ProjectInstallationIdentifierParse(io)
+ case "ServiceId":
+ return model.ServiceIdParse(io)
+ case "HPAIDataEndpoint":
+ return model.HPAIDataEndpointParse(io)
+ case "RelativeTimestamp":
+ return model.RelativeTimestampParse(io)
+ case "CEMI":
+ size, err := utils.StrToUint8(arguments[0])
+ if err != nil {
+ return nil, err
+ }
+ return model.CEMIParse(io, size)
+ case "KnxNetIpMessage":
+ return model.KnxNetIpMessageParse(io)
+ case "DeviceStatus":
+ return model.DeviceStatusParse(io)
+ case "IPAddress":
+ return model.IPAddressParse(io)
+ case "CEMIAdditionalInformation":
+ return model.CEMIAdditionalInformationParse(io)
+ case "KnxAddress":
+ return model.KnxAddressParse(io)
+ case "ConnectionResponseDataBlock":
+ return model.ConnectionResponseDataBlockParse(io)
+ case "TunnelingRequestDataBlock":
+ return model.TunnelingRequestDataBlockParse(io)
+ case "DIBDeviceInfo":
+ return model.DIBDeviceInfoParse(io)
+ case "DeviceConfigurationRequestDataBlock":
+ return model.DeviceConfigurationRequestDataBlockParse(io)
+ case "DIBSuppSvcFamilies":
+ return model.DIBSuppSvcFamiliesParse(io)
+ case "LDataFrame":
+ return model.LDataFrameParse(io)
+ case "ApduDataExt":
+ length, err := utils.StrToUint8(arguments[0])
+ if err != nil {
+ return nil, err
+ }
+ return model.ApduDataExtParse(io, length)
+ case "ApduControl":
+ return model.ApduControlParse(io)
+ case "KnxGroupAddress":
+ numLevels, err := utils.StrToUint8(arguments[0])
+ if err != nil {
+ return nil, err
+ }
+ return model.KnxGroupAddressParse(io, numLevels)
+ case "MACAddress":
+ return model.MACAddressParse(io)
+ case "ApduData":
+ dataLength, err := utils.StrToUint8(arguments[0])
+ if err != nil {
+ return nil, err
+ }
+ return model.ApduDataParse(io, dataLength)
+ }
+ return nil, errors.New("Unsupported type " + typeName)
}
diff --git a/plc4go/internal/plc4go/knxnetip/readwrite/XmlParserHelper.go b/plc4go/internal/plc4go/knxnetip/readwrite/XmlParserHelper.go
index 29003ae..95ca62e 100644
--- a/plc4go/internal/plc4go/knxnetip/readwrite/XmlParserHelper.go
+++ b/plc4go/internal/plc4go/knxnetip/readwrite/XmlParserHelper.go
@@ -19,178 +19,220 @@
package readwrite
import (
- "encoding/xml"
- "errors"
- "github.com/apache/plc4x/plc4go/internal/plc4go/knxnetip/readwrite/model"
- "github.com/apache/plc4x/plc4go/internal/plc4go/spi"
+ "encoding/xml"
+ "errors"
+ "github.com/apache/plc4x/plc4go/internal/plc4go/knxnetip/readwrite/model"
+ "github.com/apache/plc4x/plc4go/internal/plc4go/spi"
)
type KnxnetipXmlParserHelper struct {
}
func (m KnxnetipXmlParserHelper) Parse(typeName string, xmlString string) (spi.Message, error) {
- switch typeName {
- case "HPAIControlEndpoint":
- var obj *model.HPAIControlEndpoint
- err := xml.Unmarshal([]byte(xmlString), &obj)
- if err != nil {
- return nil, errors.New("error unmarshalling xml: " + err.Error())
- }
- return obj, nil
- case "TunnelingResponseDataBlock":
- var obj *model.TunnelingResponseDataBlock
- err := xml.Unmarshal([]byte(xmlString), &obj)
- if err != nil {
- return nil, errors.New("error unmarshalling xml: " + err.Error())
- }
- return obj, nil
- case "DeviceConfigurationAckDataBlock":
- var obj *model.DeviceConfigurationAckDataBlock
- err := xml.Unmarshal([]byte(xmlString), &obj)
- if err != nil {
- return nil, errors.New("error unmarshalling xml: " + err.Error())
- }
- return obj, nil
- case "ConnectionRequestInformation":
- var obj *model.ConnectionRequestInformation
- err := xml.Unmarshal([]byte(xmlString), &obj)
- if err != nil {
- return nil, errors.New("error unmarshalling xml: " + err.Error())
- }
- return obj, nil
- case "HPAIDiscoveryEndpoint":
- var obj *model.HPAIDiscoveryEndpoint
- err := xml.Unmarshal([]byte(xmlString), &obj)
- if err != nil {
- return nil, errors.New("error unmarshalling xml: " + err.Error())
- }
- return obj, nil
- case "ProjectInstallationIdentifier":
- var obj *model.ProjectInstallationIdentifier
- err := xml.Unmarshal([]byte(xmlString), &obj)
- if err != nil {
- return nil, errors.New("error unmarshalling xml: " + err.Error())
- }
- return obj, nil
- case "ServiceId":
- var obj *model.ServiceId
- err := xml.Unmarshal([]byte(xmlString), &obj)
- if err != nil {
- return nil, errors.New("error unmarshalling xml: " + err.Error())
- }
- return obj, nil
- case "HPAIDataEndpoint":
- var obj *model.HPAIDataEndpoint
- err := xml.Unmarshal([]byte(xmlString), &obj)
- if err != nil {
- return nil, errors.New("error unmarshalling xml: " + err.Error())
- }
- return obj, nil
- case "RelativeTimestamp":
- var obj *model.RelativeTimestamp
- err := xml.Unmarshal([]byte(xmlString), &obj)
- if err != nil {
- return nil, errors.New("error unmarshalling xml: " + err.Error())
- }
- return obj, nil
- case "CEMI":
- var obj *model.CEMI
- err := xml.Unmarshal([]byte(xmlString), &obj)
- if err != nil {
- return nil, errors.New("error unmarshalling xml: " + err.Error())
- }
- return obj, nil
- case "KnxNetIpMessage":
- var obj *model.KnxNetIpMessage
- err := xml.Unmarshal([]byte(xmlString), &obj)
- if err != nil {
- return nil, errors.New("error unmarshalling xml: " + err.Error())
- }
- return obj, nil
- case "DeviceStatus":
- var obj *model.DeviceStatus
- err := xml.Unmarshal([]byte(xmlString), &obj)
- if err != nil {
- return nil, errors.New("error unmarshalling xml: " + err.Error())
- }
- return obj, nil
- case "IPAddress":
- var obj *model.IPAddress
- err := xml.Unmarshal([]byte(xmlString), &obj)
- if err != nil {
- return nil, errors.New("error unmarshalling xml: " + err.Error())
- }
- return obj, nil
- case "CEMIAdditionalInformation":
- var obj *model.CEMIAdditionalInformation
- err := xml.Unmarshal([]byte(xmlString), &obj)
- if err != nil {
- return nil, errors.New("error unmarshalling xml: " + err.Error())
- }
- return obj, nil
- case "KnxAddress":
- var obj *model.KnxAddress
- err := xml.Unmarshal([]byte(xmlString), &obj)
- if err != nil {
- return nil, errors.New("error unmarshalling xml: " + err.Error())
- }
- return obj, nil
- case "ConnectionResponseDataBlock":
- var obj *model.ConnectionResponseDataBlock
- err := xml.Unmarshal([]byte(xmlString), &obj)
- if err != nil {
- return nil, errors.New("error unmarshalling xml: " + err.Error())
- }
- return obj, nil
- case "TunnelingRequestDataBlock":
- var obj *model.TunnelingRequestDataBlock
- err := xml.Unmarshal([]byte(xmlString), &obj)
- if err != nil {
- return nil, errors.New("error unmarshalling xml: " + err.Error())
- }
- return obj, nil
- case "DIBDeviceInfo":
- var obj *model.DIBDeviceInfo
- err := xml.Unmarshal([]byte(xmlString), &obj)
- if err != nil {
- return nil, errors.New("error unmarshalling xml: " + err.Error())
- }
- return obj, nil
- case "DeviceConfigurationRequestDataBlock":
- var obj *model.DeviceConfigurationRequestDataBlock
- err := xml.Unmarshal([]byte(xmlString), &obj)
- if err != nil {
- return nil, errors.New("error unmarshalling xml: " + err.Error())
- }
- return obj, nil
- case "DIBSuppSvcFamilies":
- var obj *model.DIBSuppSvcFamilies
- err := xml.Unmarshal([]byte(xmlString), &obj)
- if err != nil {
- return nil, errors.New("error unmarshalling xml: " + err.Error())
- }
- return obj, nil
- case "LDataFrame":
- var obj *model.LDataFrame
- err := xml.Unmarshal([]byte(xmlString), &obj)
- if err != nil {
- return nil, errors.New("error unmarshalling xml: " + err.Error())
- }
- return obj, nil
- case "KnxGroupAddress":
- var obj *model.KnxGroupAddress
- err := xml.Unmarshal([]byte(xmlString), &obj)
- if err != nil {
- return nil, errors.New("error unmarshalling xml: " + err.Error())
- }
- return obj, nil
- case "MACAddress":
- var obj *model.MACAddress
- err := xml.Unmarshal([]byte(xmlString), &obj)
- if err != nil {
- return nil, errors.New("error unmarshalling xml: " + err.Error())
- }
- return obj, nil
- }
- return nil, errors.New("Unsupported type " + typeName)
+ switch typeName {
+ case "HPAIControlEndpoint":
+ var obj *model.HPAIControlEndpoint
+ err := xml.Unmarshal([]byte(xmlString), &obj)
+ if err != nil {
+ return nil, errors.New("error unmarshalling xml: " + err.Error())
+ }
+ return obj, nil
+ case "TunnelingResponseDataBlock":
+ var obj *model.TunnelingResponseDataBlock
+ err := xml.Unmarshal([]byte(xmlString), &obj)
+ if err != nil {
+ return nil, errors.New("error unmarshalling xml: " + err.Error())
+ }
+ return obj, nil
+ case "DeviceDescriptorType2":
+ var obj *model.DeviceDescriptorType2
+ err := xml.Unmarshal([]byte(xmlString), &obj)
+ if err != nil {
+ return nil, errors.New("error unmarshalling xml: " + err.Error())
+ }
+ return obj, nil
+ case "ChannelInformation":
+ var obj *model.ChannelInformation
+ err := xml.Unmarshal([]byte(xmlString), &obj)
+ if err != nil {
+ return nil, errors.New("error unmarshalling xml: " + err.Error())
+ }
+ return obj, nil
+ case "DeviceConfigurationAckDataBlock":
+ var obj *model.DeviceConfigurationAckDataBlock
+ err := xml.Unmarshal([]byte(xmlString), &obj)
+ if err != nil {
+ return nil, errors.New("error unmarshalling xml: " + err.Error())
+ }
+ return obj, nil
+ case "ConnectionRequestInformation":
+ var obj *model.ConnectionRequestInformation
+ err := xml.Unmarshal([]byte(xmlString), &obj)
+ if err != nil {
+ return nil, errors.New("error unmarshalling xml: " + err.Error())
+ }
+ return obj, nil
+ case "Apdu":
+ var obj *model.Apdu
+ err := xml.Unmarshal([]byte(xmlString), &obj)
+ if err != nil {
+ return nil, errors.New("error unmarshalling xml: " + err.Error())
+ }
+ return obj, nil
+ case "HPAIDiscoveryEndpoint":
+ var obj *model.HPAIDiscoveryEndpoint
+ err := xml.Unmarshal([]byte(xmlString), &obj)
+ if err != nil {
+ return nil, errors.New("error unmarshalling xml: " + err.Error())
+ }
+ return obj, nil
+ case "ProjectInstallationIdentifier":
+ var obj *model.ProjectInstallationIdentifier
+ err := xml.Unmarshal([]byte(xmlString), &obj)
+ if err != nil {
+ return nil, errors.New("error unmarshalling xml: " + err.Error())
+ }
+ return obj, nil
+ case "ServiceId":
+ var obj *model.ServiceId
+ err := xml.Unmarshal([]byte(xmlString), &obj)
+ if err != nil {
+ return nil, errors.New("error unmarshalling xml: " + err.Error())
+ }
+ return obj, nil
+ case "HPAIDataEndpoint":
+ var obj *model.HPAIDataEndpoint
+ err := xml.Unmarshal([]byte(xmlString), &obj)
+ if err != nil {
+ return nil, errors.New("error unmarshalling xml: " + err.Error())
+ }
+ return obj, nil
+ case "RelativeTimestamp":
+ var obj *model.RelativeTimestamp
+ err := xml.Unmarshal([]byte(xmlString), &obj)
+ if err != nil {
+ return nil, errors.New("error unmarshalling xml: " + err.Error())
+ }
+ return obj, nil
+ case "CEMI":
+ var obj *model.CEMI
+ err := xml.Unmarshal([]byte(xmlString), &obj)
+ if err != nil {
+ return nil, errors.New("error unmarshalling xml: " + err.Error())
+ }
+ return obj, nil
+ case "KnxNetIpMessage":
+ var obj *model.KnxNetIpMessage
+ err := xml.Unmarshal([]byte(xmlString), &obj)
+ if err != nil {
+ return nil, errors.New("error unmarshalling xml: " + err.Error())
+ }
+ return obj, nil
+ case "DeviceStatus":
+ var obj *model.DeviceStatus
+ err := xml.Unmarshal([]byte(xmlString), &obj)
+ if err != nil {
+ return nil, errors.New("error unmarshalling xml: " + err.Error())
+ }
+ return obj, nil
+ case "IPAddress":
+ var obj *model.IPAddress
+ err := xml.Unmarshal([]byte(xmlString), &obj)
+ if err != nil {
+ return nil, errors.New("error unmarshalling xml: " + err.Error())
+ }
+ return obj, nil
+ case "CEMIAdditionalInformation":
+ var obj *model.CEMIAdditionalInformation
+ err := xml.Unmarshal([]byte(xmlString), &obj)
+ if err != nil {
+ return nil, errors.New("error unmarshalling xml: " + err.Error())
+ }
+ return obj, nil
+ case "KnxAddress":
+ var obj *model.KnxAddress
+ err := xml.Unmarshal([]byte(xmlString), &obj)
+ if err != nil {
+ return nil, errors.New("error unmarshalling xml: " + err.Error())
+ }
+ return obj, nil
+ case "ConnectionResponseDataBlock":
+ var obj *model.ConnectionResponseDataBlock
+ err := xml.Unmarshal([]byte(xmlString), &obj)
+ if err != nil {
+ return nil, errors.New("error unmarshalling xml: " + err.Error())
+ }
+ return obj, nil
+ case "TunnelingRequestDataBlock":
+ var obj *model.TunnelingRequestDataBlock
+ err := xml.Unmarshal([]byte(xmlString), &obj)
+ if err != nil {
+ return nil, errors.New("error unmarshalling xml: " + err.Error())
+ }
+ return obj, nil
+ case "DIBDeviceInfo":
+ var obj *model.DIBDeviceInfo
+ err := xml.Unmarshal([]byte(xmlString), &obj)
+ if err != nil {
+ return nil, errors.New("error unmarshalling xml: " + err.Error())
+ }
+ return obj, nil
+ case "DeviceConfigurationRequestDataBlock":
+ var obj *model.DeviceConfigurationRequestDataBlock
+ err := xml.Unmarshal([]byte(xmlString), &obj)
+ if err != nil {
+ return nil, errors.New("error unmarshalling xml: " + err.Error())
+ }
+ return obj, nil
+ case "DIBSuppSvcFamilies":
+ var obj *model.DIBSuppSvcFamilies
+ err := xml.Unmarshal([]byte(xmlString), &obj)
+ if err != nil {
+ return nil, errors.New("error unmarshalling xml: " + err.Error())
+ }
+ return obj, nil
+ case "LDataFrame":
+ var obj *model.LDataFrame
+ err := xml.Unmarshal([]byte(xmlString), &obj)
+ if err != nil {
+ return nil, errors.New("error unmarshalling xml: " + err.Error())
+ }
+ return obj, nil
+ case "ApduDataExt":
+ var obj *model.ApduDataExt
+ err := xml.Unmarshal([]byte(xmlString), &obj)
+ if err != nil {
+ return nil, errors.New("error unmarshalling xml: " + err.Error())
+ }
+ return obj, nil
+ case "ApduControl":
+ var obj *model.ApduControl
+ err := xml.Unmarshal([]byte(xmlString), &obj)
+ if err != nil {
+ return nil, errors.New("error unmarshalling xml: " + err.Error())
+ }
+ return obj, nil
+ case "KnxGroupAddress":
+ var obj *model.KnxGroupAddress
+ err := xml.Unmarshal([]byte(xmlString), &obj)
+ if err != nil {
+ return nil, errors.New("error unmarshalling xml: " + err.Error())
+ }
+ return obj, nil
+ case "MACAddress":
+ var obj *model.MACAddress
+ err := xml.Unmarshal([]byte(xmlString), &obj)
+ if err != nil {
+ return nil, errors.New("error unmarshalling xml: " + err.Error())
+ }
+ return obj, nil
+ case "ApduData":
+ var obj *model.ApduData
+ err := xml.Unmarshal([]byte(xmlString), &obj)
+ if err != nil {
+ return nil, errors.New("error unmarshalling xml: " + err.Error())
+ }
+ return obj, nil
+ }
+ return nil, errors.New("Unsupported type " + typeName)
}
diff --git a/plc4go/internal/plc4go/knxnetip/readwrite/model/APCI.go b/plc4go/internal/plc4go/knxnetip/readwrite/model/APCI.go
deleted file mode 100644
index 4023f52..0000000
--- a/plc4go/internal/plc4go/knxnetip/readwrite/model/APCI.go
+++ /dev/null
@@ -1,193 +0,0 @@
-//
-// Licensed to the Apache Software Foundation (ASF) under one
-// or more contributor license agreements. See the NOTICE file
-// distributed with this work for additional information
-// regarding copyright ownership. The ASF licenses this file
-// to you under the Apache License, Version 2.0 (the
-// "License"); you may not use this file except in compliance
-// with the License. You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing,
-// software distributed under the License is distributed on an
-// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-// KIND, either express or implied. See the License for the
-// specific language governing permissions and limitations
-// under the License.
-//
-package model
-
-import (
- "github.com/apache/plc4x/plc4go/internal/plc4go/spi/utils"
-)
-
-type APCI uint8
-
-type IAPCI interface {
- Serialize(io utils.WriteBuffer) error
-}
-
-const(
- APCI_GROUP_VALUE_READ_PDU APCI = 0x0
- APCI_GROUP_VALUE_RESPONSE_PDU APCI = 0x1
- APCI_GROUP_VALUE_WRITE_PDU APCI = 0x2
- APCI_INDIVIDUAL_ADDRESS_WRITE_PDU APCI = 0x3
- APCI_INDIVIDUAL_ADDRESS_READ_PDU APCI = 0x4
- APCI_INDIVIDUAL_ADDRESS_RESPONSE_PDU APCI = 0x5
- APCI_ADC_READ_PDU APCI = 0x6
- APCI_ADC_RESPONSE_PDU APCI = 0x7
- APCI_MEMORY_READ_PDU APCI = 0x8
- APCI_MEMORY_RESPONSE_PDU APCI = 0x9
- APCI_MEMORY_WRITE_PDU APCI = 0xA
- APCI_USER_MESSAGE_PDU APCI = 0xB
- APCI_DEVICE_DESCRIPTOR_READ_PDU APCI = 0xC
- APCI_DEVICE_DESCRIPTOR_RESPONSE_PDU APCI = 0xD
- APCI_RESTART_PDU APCI = 0xE
- APCI_OTHER_PDU APCI = 0xF
-)
-
-func APCIByValue(value uint8) APCI {
- switch value {
- case 0x0:
- return APCI_GROUP_VALUE_READ_PDU
- case 0x1:
- return APCI_GROUP_VALUE_RESPONSE_PDU
- case 0x2:
- return APCI_GROUP_VALUE_WRITE_PDU
- case 0x3:
- return APCI_INDIVIDUAL_ADDRESS_WRITE_PDU
- case 0x4:
- return APCI_INDIVIDUAL_ADDRESS_READ_PDU
- case 0x5:
- return APCI_INDIVIDUAL_ADDRESS_RESPONSE_PDU
- case 0x6:
- return APCI_ADC_READ_PDU
- case 0x7:
- return APCI_ADC_RESPONSE_PDU
- case 0x8:
- return APCI_MEMORY_READ_PDU
- case 0x9:
- return APCI_MEMORY_RESPONSE_PDU
- case 0xA:
- return APCI_MEMORY_WRITE_PDU
- case 0xB:
- return APCI_USER_MESSAGE_PDU
- case 0xC:
- return APCI_DEVICE_DESCRIPTOR_READ_PDU
- case 0xD:
- return APCI_DEVICE_DESCRIPTOR_RESPONSE_PDU
- case 0xE:
- return APCI_RESTART_PDU
- case 0xF:
- return APCI_OTHER_PDU
- }
- return 0
-}
-
-func APCIByName(value string) APCI {
- switch value {
- case "GROUP_VALUE_READ_PDU":
- return APCI_GROUP_VALUE_READ_PDU
- case "GROUP_VALUE_RESPONSE_PDU":
- return APCI_GROUP_VALUE_RESPONSE_PDU
- case "GROUP_VALUE_WRITE_PDU":
- return APCI_GROUP_VALUE_WRITE_PDU
- case "INDIVIDUAL_ADDRESS_WRITE_PDU":
- return APCI_INDIVIDUAL_ADDRESS_WRITE_PDU
- case "INDIVIDUAL_ADDRESS_READ_PDU":
- return APCI_INDIVIDUAL_ADDRESS_READ_PDU
- case "INDIVIDUAL_ADDRESS_RESPONSE_PDU":
- return APCI_INDIVIDUAL_ADDRESS_RESPONSE_PDU
- case "ADC_READ_PDU":
- return APCI_ADC_READ_PDU
- case "ADC_RESPONSE_PDU":
- return APCI_ADC_RESPONSE_PDU
- case "MEMORY_READ_PDU":
- return APCI_MEMORY_READ_PDU
- case "MEMORY_RESPONSE_PDU":
- return APCI_MEMORY_RESPONSE_PDU
- case "MEMORY_WRITE_PDU":
- return APCI_MEMORY_WRITE_PDU
- case "USER_MESSAGE_PDU":
- return APCI_USER_MESSAGE_PDU
- case "DEVICE_DESCRIPTOR_READ_PDU":
- return APCI_DEVICE_DESCRIPTOR_READ_PDU
- case "DEVICE_DESCRIPTOR_RESPONSE_PDU":
- return APCI_DEVICE_DESCRIPTOR_RESPONSE_PDU
- case "RESTART_PDU":
- return APCI_RESTART_PDU
- case "OTHER_PDU":
- return APCI_OTHER_PDU
- }
- return 0
-}
-
-func CastAPCI(structType interface{}) APCI {
- castFunc := func(typ interface{}) APCI {
- if sAPCI, ok := typ.(APCI); ok {
- return sAPCI
- }
- return 0
- }
- return castFunc(structType)
-}
-
-func (m APCI) LengthInBits() uint16 {
- return 4
-}
-
-func (m APCI) LengthInBytes() uint16 {
- return m.LengthInBits() / 8
-}
-
-func APCIParse(io *utils.ReadBuffer) (APCI, error) {
- val, err := io.ReadUint8(4)
- if err != nil {
- return 0, nil
- }
- return APCIByValue(val), nil
-}
-
-func (e APCI) Serialize(io utils.WriteBuffer) error {
- err := io.WriteUint8(4, uint8(e))
- return err
-}
-
-func (e APCI) String() string {
- switch e {
- case APCI_GROUP_VALUE_READ_PDU:
- return "GROUP_VALUE_READ_PDU"
- case APCI_GROUP_VALUE_RESPONSE_PDU:
- return "GROUP_VALUE_RESPONSE_PDU"
- case APCI_GROUP_VALUE_WRITE_PDU:
- return "GROUP_VALUE_WRITE_PDU"
- case APCI_INDIVIDUAL_ADDRESS_WRITE_PDU:
- return "INDIVIDUAL_ADDRESS_WRITE_PDU"
- case APCI_INDIVIDUAL_ADDRESS_READ_PDU:
- return "INDIVIDUAL_ADDRESS_READ_PDU"
- case APCI_INDIVIDUAL_ADDRESS_RESPONSE_PDU:
- return "INDIVIDUAL_ADDRESS_RESPONSE_PDU"
- case APCI_ADC_READ_PDU:
- return "ADC_READ_PDU"
- case APCI_ADC_RESPONSE_PDU:
- return "ADC_RESPONSE_PDU"
- case APCI_MEMORY_READ_PDU:
- return "MEMORY_READ_PDU"
- case APCI_MEMORY_RESPONSE_PDU:
- return "MEMORY_RESPONSE_PDU"
- case APCI_MEMORY_WRITE_PDU:
- return "MEMORY_WRITE_PDU"
- case APCI_USER_MESSAGE_PDU:
- return "USER_MESSAGE_PDU"
- case APCI_DEVICE_DESCRIPTOR_READ_PDU:
- return "DEVICE_DESCRIPTOR_READ_PDU"
- case APCI_DEVICE_DESCRIPTOR_RESPONSE_PDU:
- return "DEVICE_DESCRIPTOR_RESPONSE_PDU"
- case APCI_RESTART_PDU:
- return "RESTART_PDU"
- case APCI_OTHER_PDU:
- return "OTHER_PDU"
- }
- return ""
-}
diff --git a/plc4go/internal/plc4go/knxnetip/readwrite/model/Apdu.go b/plc4go/internal/plc4go/knxnetip/readwrite/model/Apdu.go
new file mode 100644
index 0000000..9bee363
--- /dev/null
+++ b/plc4go/internal/plc4go/knxnetip/readwrite/model/Apdu.go
@@ -0,0 +1,286 @@
+//
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements. See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership. The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied. See the License for the
+// specific language governing permissions and limitations
+// under the License.
+//
+package model
+
+import (
+ "encoding/xml"
+ "errors"
+ "github.com/apache/plc4x/plc4go/internal/plc4go/spi/utils"
+ "io"
+ "reflect"
+ "strings"
+)
+
+// The data-structure of this message
+type Apdu struct {
+ DataLength uint8
+ Numbered bool
+ Counter uint8
+ Child IApduChild
+ IApdu
+ IApduParent
+}
+
+// The corresponding interface
+type IApdu interface {
+ Control() uint8
+ LengthInBytes() uint16
+ LengthInBits() uint16
+ Serialize(io utils.WriteBuffer) error
+ xml.Marshaler
+}
+
+type IApduParent interface {
+ SerializeParent(io utils.WriteBuffer, child IApdu, serializeChildFunction func() error) error
+ GetTypeName() string
+}
+
+type IApduChild interface {
+ Serialize(io utils.WriteBuffer) error
+ InitializeParent(parent *Apdu, dataLength uint8, numbered bool, counter uint8)
+ GetTypeName() string
+ IApdu
+}
+
+func NewApdu(dataLength uint8, numbered bool, counter uint8) *Apdu {
+ return &Apdu{DataLength: dataLength, Numbered: numbered, Counter: counter}
+}
+
+func CastApdu(structType interface{}) *Apdu {
+ castFunc := func(typ interface{}) *Apdu {
+ if casted, ok := typ.(Apdu); ok {
+ return &casted
+ }
+ if casted, ok := typ.(*Apdu); ok {
+ return casted
+ }
+ return nil
+ }
+ return castFunc(structType)
+}
+
+func (m *Apdu) GetTypeName() string {
+ return "Apdu"
+}
+
+func (m *Apdu) LengthInBits() uint16 {
+ lengthInBits := uint16(0)
+
+ // Simple field (dataLength)
+ lengthInBits += 8
+
+ // Discriminator Field (control)
+ lengthInBits += 1
+
+ // Simple field (numbered)
+ lengthInBits += 1
+
+ // Simple field (counter)
+ lengthInBits += 4
+
+ // Length of sub-type elements will be added by sub-type...
+ lengthInBits += m.Child.LengthInBits()
+
+ return lengthInBits
+}
+
+func (m *Apdu) LengthInBytes() uint16 {
+ return m.LengthInBits() / 8
+}
+
+func ApduParse(io *utils.ReadBuffer) (*Apdu, error) {
+
+ // Simple Field (dataLength)
+ dataLength, _dataLengthErr := io.ReadUint8(8)
+ if _dataLengthErr != nil {
+ return nil, errors.New("Error parsing 'dataLength' field " + _dataLengthErr.Error())
+ }
+
+ // Discriminator Field (control) (Used as input to a switch field)
+ control, _controlErr := io.ReadUint8(1)
+ if _controlErr != nil {
+ return nil, errors.New("Error parsing 'control' field " + _controlErr.Error())
+ }
+
+ // Simple Field (numbered)
+ numbered, _numberedErr := io.ReadBit()
+ if _numberedErr != nil {
+ return nil, errors.New("Error parsing 'numbered' field " + _numberedErr.Error())
+ }
+
+ // Simple Field (counter)
+ counter, _counterErr := io.ReadUint8(4)
+ if _counterErr != nil {
+ return nil, errors.New("Error parsing 'counter' field " + _counterErr.Error())
+ }
+
+ // Switch Field (Depending on the discriminator values, passes the instantiation to a sub-type)
+ var _parent *Apdu
+ var typeSwitchError error
+ switch {
+ case control == 1:
+ _parent, typeSwitchError = ApduControlContainerParse(io)
+ case control == 0:
+ _parent, typeSwitchError = ApduDataContainerParse(io, dataLength)
+ }
+ if typeSwitchError != nil {
+ return nil, errors.New("Error parsing sub-type for type-switch. " + typeSwitchError.Error())
+ }
+
+ // Finish initializing
+ _parent.Child.InitializeParent(_parent, dataLength, numbered, counter)
+ return _parent, nil
+}
+
+func (m *Apdu) Serialize(io utils.WriteBuffer) error {
+ return m.Child.Serialize(io)
+}
+
+func (m *Apdu) SerializeParent(io utils.WriteBuffer, child IApdu, serializeChildFunction func() error) error {
+
+ // Simple Field (dataLength)
+ dataLength := uint8(m.DataLength)
+ _dataLengthErr := io.WriteUint8(8, (dataLength))
+ if _dataLengthErr != nil {
+ return errors.New("Error serializing 'dataLength' field " + _dataLengthErr.Error())
+ }
+
+ // Discriminator Field (control) (Used as input to a switch field)
+ control := uint8(child.Control())
+ _controlErr := io.WriteUint8(1, (control))
+ if _controlErr != nil {
+ return errors.New("Error serializing 'control' field " + _controlErr.Error())
+ }
+
+ // Simple Field (numbered)
+ numbered := bool(m.Numbered)
+ _numberedErr := io.WriteBit((numbered))
+ if _numberedErr != nil {
+ return errors.New("Error serializing 'numbered' field " + _numberedErr.Error())
+ }
+
+ // Simple Field (counter)
+ counter := uint8(m.Counter)
+ _counterErr := io.WriteUint8(4, (counter))
+ if _counterErr != nil {
+ return errors.New("Error serializing 'counter' field " + _counterErr.Error())
+ }
+
+ // Switch field (Depending on the discriminator values, passes the serialization to a sub-type)
+ _typeSwitchErr := serializeChildFunction()
+ if _typeSwitchErr != nil {
+ return errors.New("Error serializing sub-type field " + _typeSwitchErr.Error())
+ }
+
+ return nil
+}
+
+func (m *Apdu) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
+ var token xml.Token
+ var err error
+ for {
+ token, err = d.Token()
+ if err != nil {
+ if err == io.EOF {
+ return nil
+ }
+ return err
+ }
+ switch token.(type) {
+ case xml.StartElement:
+ tok := token.(xml.StartElement)
+ switch tok.Name.Local {
+ case "dataLength":
+ var data uint8
+ if err := d.DecodeElement(&data, &tok); err != nil {
+ return err
+ }
+ m.DataLength = data
+ case "numbered":
+ var data bool
+ if err := d.DecodeElement(&data, &tok); err != nil {
+ return err
+ }
+ m.Numbered = data
+ case "counter":
+ var data uint8
+ if err := d.DecodeElement(&data, &tok); err != nil {
+ return err
+ }
+ m.Counter = data
+ default:
+ switch start.Attr[0].Value {
+ case "org.apache.plc4x.java.knxnetip.readwrite.ApduControlContainer":
+ var dt *ApduControlContainer
+ if m.Child != nil {
+ dt = m.Child.(*ApduControlContainer)
+ }
+ if err := d.DecodeElement(&dt, &tok); err != nil {
+ return err
+ }
+ if m.Child == nil {
+ dt.Parent = m
+ m.Child = dt
+ }
+ case "org.apache.plc4x.java.knxnetip.readwrite.ApduDataContainer":
+ var dt *ApduDataContainer
+ if m.Child != nil {
+ dt = m.Child.(*ApduDataContainer)
+ }
+ if err := d.DecodeElement(&dt, &tok); err != nil {
+ return err
+ }
+ if m.Child == nil {
+ dt.Parent = m
+ m.Child = dt
+ }
+ }
+ }
+ }
+ }
+}
+
+func (m *Apdu) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
+ className := reflect.TypeOf(m.Child).String()
+ className = "org.apache.plc4x.java.knxnetip.readwrite." + className[strings.LastIndex(className, ".") + 1:]
+ if err := e.EncodeToken(xml.StartElement{Name: start.Name, Attr: []xml.Attr{
+ {Name: xml.Name{Local: "className"}, Value: className},
+ }}); err != nil {
+ return err
+ }
+ if err := e.EncodeElement(m.DataLength, xml.StartElement{Name: xml.Name{Local: "dataLength"}}); err != nil {
+ return err
+ }
+ if err := e.EncodeElement(m.Numbered, xml.StartElement{Name: xml.Name{Local: "numbered"}}); err != nil {
+ return err
+ }
+ if err := e.EncodeElement(m.Counter, xml.StartElement{Name: xml.Name{Local: "counter"}}); err != nil {
+ return err
+ }
+ marshaller, ok := m.Child.(xml.Marshaler)
+ if !ok {
+ return errors.New("child is not castable to Marshaler")
+ }
+ marshaller.MarshalXML(e, start)
+ if err := e.EncodeToken(xml.EndElement{Name: start.Name}); err != nil {
+ return err
+ }
+ return nil
+}
+
diff --git a/plc4go/internal/plc4go/knxnetip/readwrite/model/ApduControl.go b/plc4go/internal/plc4go/knxnetip/readwrite/model/ApduControl.go
new file mode 100644
index 0000000..ae4ddc1
--- /dev/null
+++ b/plc4go/internal/plc4go/knxnetip/readwrite/model/ApduControl.go
@@ -0,0 +1,236 @@
+//
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements. See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership. The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied. See the License for the
+// specific language governing permissions and limitations
+// under the License.
+//
+package model
+
+import (
+ "encoding/xml"
+ "errors"
+ "github.com/apache/plc4x/plc4go/internal/plc4go/spi/utils"
+ "io"
+ "reflect"
+ "strings"
+)
+
+// The data-structure of this message
+type ApduControl struct {
+ Child IApduControlChild
+ IApduControl
+ IApduControlParent
+}
+
+// The corresponding interface
+type IApduControl interface {
+ ControlType() uint8
+ LengthInBytes() uint16
+ LengthInBits() uint16
+ Serialize(io utils.WriteBuffer) error
+ xml.Marshaler
+}
+
+type IApduControlParent interface {
+ SerializeParent(io utils.WriteBuffer, child IApduControl, serializeChildFunction func() error) error
+ GetTypeName() string
+}
+
+type IApduControlChild interface {
+ Serialize(io utils.WriteBuffer) error
+ InitializeParent(parent *ApduControl)
+ GetTypeName() string
+ IApduControl
+}
+
+func NewApduControl() *ApduControl {
+ return &ApduControl{}
+}
+
+func CastApduControl(structType interface{}) *ApduControl {
+ castFunc := func(typ interface{}) *ApduControl {
+ if casted, ok := typ.(ApduControl); ok {
+ return &casted
+ }
+ if casted, ok := typ.(*ApduControl); ok {
+ return casted
+ }
+ return nil
+ }
+ return castFunc(structType)
+}
+
+func (m *ApduControl) GetTypeName() string {
+ return "ApduControl"
+}
+
+func (m *ApduControl) LengthInBits() uint16 {
+ lengthInBits := uint16(0)
+
+ // Discriminator Field (controlType)
+ lengthInBits += 2
+
+ // Length of sub-type elements will be added by sub-type...
+ lengthInBits += m.Child.LengthInBits()
+
+ return lengthInBits
+}
+
+func (m *ApduControl) LengthInBytes() uint16 {
+ return m.LengthInBits() / 8
+}
+
+func ApduControlParse(io *utils.ReadBuffer) (*ApduControl, error) {
+
+ // Discriminator Field (controlType) (Used as input to a switch field)
+ controlType, _controlTypeErr := io.ReadUint8(2)
+ if _controlTypeErr != nil {
+ return nil, errors.New("Error parsing 'controlType' field " + _controlTypeErr.Error())
+ }
+
+ // Switch Field (Depending on the discriminator values, passes the instantiation to a sub-type)
+ var _parent *ApduControl
+ var typeSwitchError error
+ switch {
+ case controlType == 0x0:
+ _parent, typeSwitchError = ApduControlConnectParse(io)
+ case controlType == 0x1:
+ _parent, typeSwitchError = ApduControlDisconnectParse(io)
+ case controlType == 0x2:
+ _parent, typeSwitchError = ApduControlAckParse(io)
+ case controlType == 0x3:
+ _parent, typeSwitchError = ApduControlNackParse(io)
+ }
+ if typeSwitchError != nil {
+ return nil, errors.New("Error parsing sub-type for type-switch. " + typeSwitchError.Error())
+ }
+
+ // Finish initializing
+ _parent.Child.InitializeParent(_parent)
+ return _parent, nil
+}
+
+func (m *ApduControl) Serialize(io utils.WriteBuffer) error {
+ return m.Child.Serialize(io)
+}
+
+func (m *ApduControl) SerializeParent(io utils.WriteBuffer, child IApduControl, serializeChildFunction func() error) error {
+
+ // Discriminator Field (controlType) (Used as input to a switch field)
+ controlType := uint8(child.ControlType())
+ _controlTypeErr := io.WriteUint8(2, (controlType))
+ if _controlTypeErr != nil {
+ return errors.New("Error serializing 'controlType' field " + _controlTypeErr.Error())
+ }
+
+ // Switch field (Depending on the discriminator values, passes the serialization to a sub-type)
+ _typeSwitchErr := serializeChildFunction()
+ if _typeSwitchErr != nil {
+ return errors.New("Error serializing sub-type field " + _typeSwitchErr.Error())
+ }
+
+ return nil
+}
+
+func (m *ApduControl) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
+ var token xml.Token
+ var err error
+ for {
+ token, err = d.Token()
+ if err != nil {
+ if err == io.EOF {
+ return nil
+ }
+ return err
+ }
+ switch token.(type) {
+ case xml.StartElement:
+ tok := token.(xml.StartElement)
+ switch tok.Name.Local {
+ default:
+ switch start.Attr[0].Value {
+ case "org.apache.plc4x.java.knxnetip.readwrite.ApduControlConnect":
+ var dt *ApduControlConnect
+ if m.Child != nil {
+ dt = m.Child.(*ApduControlConnect)
+ }
+ if err := d.DecodeElement(&dt, &tok); err != nil {
+ return err
+ }
+ if m.Child == nil {
+ dt.Parent = m
+ m.Child = dt
+ }
+ case "org.apache.plc4x.java.knxnetip.readwrite.ApduControlDisconnect":
+ var dt *ApduControlDisconnect
+ if m.Child != nil {
+ dt = m.Child.(*ApduControlDisconnect)
+ }
+ if err := d.DecodeElement(&dt, &tok); err != nil {
+ return err
+ }
+ if m.Child == nil {
+ dt.Parent = m
+ m.Child = dt
+ }
+ case "org.apache.plc4x.java.knxnetip.readwrite.ApduControlAck":
+ var dt *ApduControlAck
+ if m.Child != nil {
+ dt = m.Child.(*ApduControlAck)
+ }
+ if err := d.DecodeElement(&dt, &tok); err != nil {
+ return err
+ }
+ if m.Child == nil {
+ dt.Parent = m
+ m.Child = dt
+ }
+ case "org.apache.plc4x.java.knxnetip.readwrite.ApduControlNack":
+ var dt *ApduControlNack
+ if m.Child != nil {
+ dt = m.Child.(*ApduControlNack)
+ }
+ if err := d.DecodeElement(&dt, &tok); err != nil {
+ return err
+ }
+ if m.Child == nil {
+ dt.Parent = m
+ m.Child = dt
+ }
+ }
+ }
+ }
+ }
+}
+
+func (m *ApduControl) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
+ className := reflect.TypeOf(m.Child).String()
+ className = "org.apache.plc4x.java.knxnetip.readwrite." + className[strings.LastIndex(className, ".") + 1:]
+ if err := e.EncodeToken(xml.StartElement{Name: start.Name, Attr: []xml.Attr{
+ {Name: xml.Name{Local: "className"}, Value: className},
+ }}); err != nil {
+ return err
+ }
+ marshaller, ok := m.Child.(xml.Marshaler)
+ if !ok {
+ return errors.New("child is not castable to Marshaler")
+ }
+ marshaller.MarshalXML(e, start)
+ if err := e.EncodeToken(xml.EndElement{Name: start.Name}); err != nil {
+ return err
+ }
+ return nil
+}
+
diff --git a/plc4go/internal/plc4go/knxnetip/readwrite/model/LDataFrameAck.go b/plc4go/internal/plc4go/knxnetip/readwrite/model/ApduControlAck.go
similarity index 55%
copy from plc4go/internal/plc4go/knxnetip/readwrite/model/LDataFrameAck.go
copy to plc4go/internal/plc4go/knxnetip/readwrite/model/ApduControlAck.go
index 1bd9767..4050ddd 100644
--- a/plc4go/internal/plc4go/knxnetip/readwrite/model/LDataFrameAck.go
+++ b/plc4go/internal/plc4go/knxnetip/readwrite/model/ApduControlAck.go
@@ -25,13 +25,13 @@ import (
)
// The data-structure of this message
-type LDataFrameAck struct {
- Parent *LDataFrame
- ILDataFrameAck
+type ApduControlAck struct {
+ Parent *ApduControl
+ IApduControlAck
}
// The corresponding interface
-type ILDataFrameAck interface {
+type IApduControlAck interface {
LengthInBytes() uint16
LengthInBits() uint16
Serialize(io utils.WriteBuffer) error
@@ -41,78 +41,66 @@ type ILDataFrameAck interface {
///////////////////////////////////////////////////////////
// Accessors for discriminator values.
///////////////////////////////////////////////////////////
-func (m *LDataFrameAck) NotAckFrame() bool {
- return false
-}
-
-func (m *LDataFrameAck) ExtendedFrame() bool {
- return false
-}
-
-func (m *LDataFrameAck) Polling() bool {
- return false
+func (m *ApduControlAck) ControlType() uint8 {
+ return 0x2
}
-func (m *LDataFrameAck) InitializeParent(parent *LDataFrame, repeated bool, priority CEMIPriority, acknowledgeRequested bool, errorFlag bool) {
- m.Parent.Repeated = repeated
- m.Parent.Priority = priority
- m.Parent.AcknowledgeRequested = acknowledgeRequested
- m.Parent.ErrorFlag = errorFlag
+func (m *ApduControlAck) InitializeParent(parent *ApduControl) {
}
-func NewLDataFrameAck(repeated bool, priority CEMIPriority, acknowledgeRequested bool, errorFlag bool) *LDataFrame {
- child := &LDataFrameAck{
- Parent: NewLDataFrame(repeated, priority, acknowledgeRequested, errorFlag),
+func NewApduControlAck() *ApduControl {
+ child := &ApduControlAck{
+ Parent: NewApduControl(),
}
child.Parent.Child = child
return child.Parent
}
-func CastLDataFrameAck(structType interface{}) *LDataFrameAck {
- castFunc := func(typ interface{}) *LDataFrameAck {
- if casted, ok := typ.(LDataFrameAck); ok {
+func CastApduControlAck(structType interface{}) *ApduControlAck {
+ castFunc := func(typ interface{}) *ApduControlAck {
+ if casted, ok := typ.(ApduControlAck); ok {
return &casted
}
- if casted, ok := typ.(*LDataFrameAck); ok {
+ if casted, ok := typ.(*ApduControlAck); ok {
return casted
}
- if casted, ok := typ.(LDataFrame); ok {
- return CastLDataFrameAck(casted.Child)
+ if casted, ok := typ.(ApduControl); ok {
+ return CastApduControlAck(casted.Child)
}
- if casted, ok := typ.(*LDataFrame); ok {
- return CastLDataFrameAck(casted.Child)
+ if casted, ok := typ.(*ApduControl); ok {
+ return CastApduControlAck(casted.Child)
}
return nil
}
return castFunc(structType)
}
-func (m *LDataFrameAck) GetTypeName() string {
- return "LDataFrameAck"
+func (m *ApduControlAck) GetTypeName() string {
+ return "ApduControlAck"
}
-func (m *LDataFrameAck) LengthInBits() uint16 {
+func (m *ApduControlAck) LengthInBits() uint16 {
lengthInBits := uint16(0)
return lengthInBits
}
-func (m *LDataFrameAck) LengthInBytes() uint16 {
+func (m *ApduControlAck) LengthInBytes() uint16 {
return m.LengthInBits() / 8
}
-func LDataFrameAckParse(io *utils.ReadBuffer) (*LDataFrame, error) {
+func ApduControlAckParse(io *utils.ReadBuffer) (*ApduControl, error) {
// Create a partially initialized instance
- _child := &LDataFrameAck{
- Parent: &LDataFrame{},
+ _child := &ApduControlAck{
+ Parent: &ApduControl{},
}
_child.Parent.Child = _child
return _child.Parent, nil
}
-func (m *LDataFrameAck) Serialize(io utils.WriteBuffer) error {
+func (m *ApduControlAck) Serialize(io utils.WriteBuffer) error {
ser := func() error {
return nil
@@ -120,7 +108,7 @@ func (m *LDataFrameAck) Serialize(io utils.WriteBuffer) error {
return m.Parent.SerializeParent(io, m, ser)
}
-func (m *LDataFrameAck) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
+func (m *ApduControlAck) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
var token xml.Token
var err error
token = start
@@ -141,7 +129,7 @@ func (m *LDataFrameAck) UnmarshalXML(d *xml.Decoder, start xml.StartElement) err
}
}
-func (m *LDataFrameAck) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
+func (m *ApduControlAck) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
return nil
}
diff --git a/plc4go/internal/plc4go/knxnetip/readwrite/model/LDataFrameAck.go b/plc4go/internal/plc4go/knxnetip/readwrite/model/ApduControlConnect.go
similarity index 55%
copy from plc4go/internal/plc4go/knxnetip/readwrite/model/LDataFrameAck.go
copy to plc4go/internal/plc4go/knxnetip/readwrite/model/ApduControlConnect.go
index 1bd9767..ebefe60 100644
--- a/plc4go/internal/plc4go/knxnetip/readwrite/model/LDataFrameAck.go
+++ b/plc4go/internal/plc4go/knxnetip/readwrite/model/ApduControlConnect.go
@@ -25,13 +25,13 @@ import (
)
// The data-structure of this message
-type LDataFrameAck struct {
- Parent *LDataFrame
- ILDataFrameAck
+type ApduControlConnect struct {
+ Parent *ApduControl
+ IApduControlConnect
}
// The corresponding interface
-type ILDataFrameAck interface {
+type IApduControlConnect interface {
LengthInBytes() uint16
LengthInBits() uint16
Serialize(io utils.WriteBuffer) error
@@ -41,78 +41,66 @@ type ILDataFrameAck interface {
///////////////////////////////////////////////////////////
// Accessors for discriminator values.
///////////////////////////////////////////////////////////
-func (m *LDataFrameAck) NotAckFrame() bool {
- return false
-}
-
-func (m *LDataFrameAck) ExtendedFrame() bool {
- return false
-}
-
-func (m *LDataFrameAck) Polling() bool {
- return false
+func (m *ApduControlConnect) ControlType() uint8 {
+ return 0x0
}
-func (m *LDataFrameAck) InitializeParent(parent *LDataFrame, repeated bool, priority CEMIPriority, acknowledgeRequested bool, errorFlag bool) {
- m.Parent.Repeated = repeated
- m.Parent.Priority = priority
- m.Parent.AcknowledgeRequested = acknowledgeRequested
- m.Parent.ErrorFlag = errorFlag
+func (m *ApduControlConnect) InitializeParent(parent *ApduControl) {
}
-func NewLDataFrameAck(repeated bool, priority CEMIPriority, acknowledgeRequested bool, errorFlag bool) *LDataFrame {
- child := &LDataFrameAck{
- Parent: NewLDataFrame(repeated, priority, acknowledgeRequested, errorFlag),
+func NewApduControlConnect() *ApduControl {
+ child := &ApduControlConnect{
+ Parent: NewApduControl(),
}
child.Parent.Child = child
return child.Parent
}
-func CastLDataFrameAck(structType interface{}) *LDataFrameAck {
- castFunc := func(typ interface{}) *LDataFrameAck {
- if casted, ok := typ.(LDataFrameAck); ok {
+func CastApduControlConnect(structType interface{}) *ApduControlConnect {
+ castFunc := func(typ interface{}) *ApduControlConnect {
+ if casted, ok := typ.(ApduControlConnect); ok {
return &casted
}
- if casted, ok := typ.(*LDataFrameAck); ok {
+ if casted, ok := typ.(*ApduControlConnect); ok {
return casted
}
- if casted, ok := typ.(LDataFrame); ok {
- return CastLDataFrameAck(casted.Child)
+ if casted, ok := typ.(ApduControl); ok {
+ return CastApduControlConnect(casted.Child)
}
- if casted, ok := typ.(*LDataFrame); ok {
- return CastLDataFrameAck(casted.Child)
+ if casted, ok := typ.(*ApduControl); ok {
+ return CastApduControlConnect(casted.Child)
}
return nil
}
return castFunc(structType)
}
-func (m *LDataFrameAck) GetTypeName() string {
- return "LDataFrameAck"
+func (m *ApduControlConnect) GetTypeName() string {
+ return "ApduControlConnect"
}
-func (m *LDataFrameAck) LengthInBits() uint16 {
+func (m *ApduControlConnect) LengthInBits() uint16 {
lengthInBits := uint16(0)
return lengthInBits
}
-func (m *LDataFrameAck) LengthInBytes() uint16 {
+func (m *ApduControlConnect) LengthInBytes() uint16 {
return m.LengthInBits() / 8
}
-func LDataFrameAckParse(io *utils.ReadBuffer) (*LDataFrame, error) {
+func ApduControlConnectParse(io *utils.ReadBuffer) (*ApduControl, error) {
// Create a partially initialized instance
- _child := &LDataFrameAck{
- Parent: &LDataFrame{},
+ _child := &ApduControlConnect{
+ Parent: &ApduControl{},
}
_child.Parent.Child = _child
return _child.Parent, nil
}
-func (m *LDataFrameAck) Serialize(io utils.WriteBuffer) error {
+func (m *ApduControlConnect) Serialize(io utils.WriteBuffer) error {
ser := func() error {
return nil
@@ -120,7 +108,7 @@ func (m *LDataFrameAck) Serialize(io utils.WriteBuffer) error {
return m.Parent.SerializeParent(io, m, ser)
}
-func (m *LDataFrameAck) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
+func (m *ApduControlConnect) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
var token xml.Token
var err error
token = start
@@ -141,7 +129,7 @@ func (m *LDataFrameAck) UnmarshalXML(d *xml.Decoder, start xml.StartElement) err
}
}
-func (m *LDataFrameAck) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
+func (m *ApduControlConnect) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
return nil
}
diff --git a/plc4go/internal/plc4go/knxnetip/readwrite/model/ApduControlContainer.go b/plc4go/internal/plc4go/knxnetip/readwrite/model/ApduControlContainer.go
new file mode 100644
index 0000000..008fd70
--- /dev/null
+++ b/plc4go/internal/plc4go/knxnetip/readwrite/model/ApduControlContainer.go
@@ -0,0 +1,166 @@
+//
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements. See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership. The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied. See the License for the
+// specific language governing permissions and limitations
+// under the License.
+//
+package model
+
+import (
+ "encoding/xml"
+ "errors"
+ "github.com/apache/plc4x/plc4go/internal/plc4go/spi/utils"
+ "io"
+)
+
+// The data-structure of this message
+type ApduControlContainer struct {
+ ControlApdu *ApduControl
+ Parent *Apdu
+ IApduControlContainer
+}
+
+// The corresponding interface
+type IApduControlContainer interface {
+ LengthInBytes() uint16
+ LengthInBits() uint16
+ Serialize(io utils.WriteBuffer) error
+ xml.Marshaler
+}
+
+///////////////////////////////////////////////////////////
+// Accessors for discriminator values.
+///////////////////////////////////////////////////////////
+func (m *ApduControlContainer) Control() uint8 {
+ return 1
+}
+
+
+func (m *ApduControlContainer) InitializeParent(parent *Apdu, dataLength uint8, numbered bool, counter uint8) {
+ m.Parent.DataLength = dataLength
+ m.Parent.Numbered = numbered
+ m.Parent.Counter = counter
+}
+
+func NewApduControlContainer(controlApdu *ApduControl, dataLength uint8, numbered bool, counter uint8) *Apdu {
+ child := &ApduControlContainer{
+ ControlApdu: controlApdu,
+ Parent: NewApdu(dataLength, numbered, counter),
+ }
+ child.Parent.Child = child
+ return child.Parent
+}
+
+func CastApduControlContainer(structType interface{}) *ApduControlContainer {
+ castFunc := func(typ interface{}) *ApduControlContainer {
+ if casted, ok := typ.(ApduControlContainer); ok {
+ return &casted
+ }
+ if casted, ok := typ.(*ApduControlContainer); ok {
+ return casted
+ }
+ if casted, ok := typ.(Apdu); ok {
+ return CastApduControlContainer(casted.Child)
+ }
+ if casted, ok := typ.(*Apdu); ok {
+ return CastApduControlContainer(casted.Child)
+ }
+ return nil
+ }
+ return castFunc(structType)
+}
+
+func (m *ApduControlContainer) GetTypeName() string {
+ return "ApduControlContainer"
+}
+
+func (m *ApduControlContainer) LengthInBits() uint16 {
+ lengthInBits := uint16(0)
+
+ // Simple field (controlApdu)
+ lengthInBits += m.ControlApdu.LengthInBits()
+
+ return lengthInBits
+}
+
+func (m *ApduControlContainer) LengthInBytes() uint16 {
+ return m.LengthInBits() / 8
+}
+
+func ApduControlContainerParse(io *utils.ReadBuffer) (*Apdu, error) {
+
+ // Simple Field (controlApdu)
+ controlApdu, _controlApduErr := ApduControlParse(io)
+ if _controlApduErr != nil {
+ return nil, errors.New("Error parsing 'controlApdu' field " + _controlApduErr.Error())
+ }
+
+ // Create a partially initialized instance
+ _child := &ApduControlContainer{
+ ControlApdu: controlApdu,
+ Parent: &Apdu{},
+ }
+ _child.Parent.Child = _child
+ return _child.Parent, nil
+}
+
+func (m *ApduControlContainer) Serialize(io utils.WriteBuffer) error {
+ ser := func() error {
+
+ // Simple Field (controlApdu)
+ _controlApduErr := m.ControlApdu.Serialize(io)
+ if _controlApduErr != nil {
+ return errors.New("Error serializing 'controlApdu' field " + _controlApduErr.Error())
+ }
+
+ return nil
+ }
+ return m.Parent.SerializeParent(io, m, ser)
+}
+
+func (m *ApduControlContainer) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
+ var token xml.Token
+ var err error
+ token = start
+ for {
+ switch token.(type) {
+ case xml.StartElement:
+ tok := token.(xml.StartElement)
+ switch tok.Name.Local {
+ case "controlApdu":
+ var dt *ApduControl
+ if err := d.DecodeElement(&dt, &tok); err != nil {
+ return err
+ }
+ m.ControlApdu = dt
+ }
+ }
+ token, err = d.Token()
+ if err != nil {
+ if err == io.EOF {
+ return nil
+ }
+ return err
+ }
+ }
+}
+
+func (m *ApduControlContainer) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
+ if err := e.EncodeElement(m.ControlApdu, xml.StartElement{Name: xml.Name{Local: "controlApdu"}}); err != nil {
+ return err
+ }
+ return nil
+}
+
diff --git a/plc4go/internal/plc4go/knxnetip/readwrite/model/LDataFrameAck.go b/plc4go/internal/plc4go/knxnetip/readwrite/model/ApduControlDisconnect.go
similarity index 55%
copy from plc4go/internal/plc4go/knxnetip/readwrite/model/LDataFrameAck.go
copy to plc4go/internal/plc4go/knxnetip/readwrite/model/ApduControlDisconnect.go
index 1bd9767..f677940 100644
--- a/plc4go/internal/plc4go/knxnetip/readwrite/model/LDataFrameAck.go
+++ b/plc4go/internal/plc4go/knxnetip/readwrite/model/ApduControlDisconnect.go
@@ -25,13 +25,13 @@ import (
)
// The data-structure of this message
-type LDataFrameAck struct {
- Parent *LDataFrame
- ILDataFrameAck
+type ApduControlDisconnect struct {
+ Parent *ApduControl
+ IApduControlDisconnect
}
// The corresponding interface
-type ILDataFrameAck interface {
+type IApduControlDisconnect interface {
LengthInBytes() uint16
LengthInBits() uint16
Serialize(io utils.WriteBuffer) error
@@ -41,78 +41,66 @@ type ILDataFrameAck interface {
///////////////////////////////////////////////////////////
// Accessors for discriminator values.
///////////////////////////////////////////////////////////
-func (m *LDataFrameAck) NotAckFrame() bool {
- return false
-}
-
-func (m *LDataFrameAck) ExtendedFrame() bool {
- return false
-}
-
-func (m *LDataFrameAck) Polling() bool {
- return false
+func (m *ApduControlDisconnect) ControlType() uint8 {
+ return 0x1
}
-func (m *LDataFrameAck) InitializeParent(parent *LDataFrame, repeated bool, priority CEMIPriority, acknowledgeRequested bool, errorFlag bool) {
- m.Parent.Repeated = repeated
- m.Parent.Priority = priority
- m.Parent.AcknowledgeRequested = acknowledgeRequested
- m.Parent.ErrorFlag = errorFlag
+func (m *ApduControlDisconnect) InitializeParent(parent *ApduControl) {
}
-func NewLDataFrameAck(repeated bool, priority CEMIPriority, acknowledgeRequested bool, errorFlag bool) *LDataFrame {
- child := &LDataFrameAck{
- Parent: NewLDataFrame(repeated, priority, acknowledgeRequested, errorFlag),
+func NewApduControlDisconnect() *ApduControl {
+ child := &ApduControlDisconnect{
+ Parent: NewApduControl(),
}
child.Parent.Child = child
return child.Parent
}
-func CastLDataFrameAck(structType interface{}) *LDataFrameAck {
- castFunc := func(typ interface{}) *LDataFrameAck {
- if casted, ok := typ.(LDataFrameAck); ok {
+func CastApduControlDisconnect(structType interface{}) *ApduControlDisconnect {
+ castFunc := func(typ interface{}) *ApduControlDisconnect {
+ if casted, ok := typ.(ApduControlDisconnect); ok {
return &casted
}
- if casted, ok := typ.(*LDataFrameAck); ok {
+ if casted, ok := typ.(*ApduControlDisconnect); ok {
return casted
}
- if casted, ok := typ.(LDataFrame); ok {
- return CastLDataFrameAck(casted.Child)
+ if casted, ok := typ.(ApduControl); ok {
+ return CastApduControlDisconnect(casted.Child)
}
- if casted, ok := typ.(*LDataFrame); ok {
- return CastLDataFrameAck(casted.Child)
+ if casted, ok := typ.(*ApduControl); ok {
+ return CastApduControlDisconnect(casted.Child)
}
return nil
}
return castFunc(structType)
}
-func (m *LDataFrameAck) GetTypeName() string {
- return "LDataFrameAck"
+func (m *ApduControlDisconnect) GetTypeName() string {
+ return "ApduControlDisconnect"
}
-func (m *LDataFrameAck) LengthInBits() uint16 {
+func (m *ApduControlDisconnect) LengthInBits() uint16 {
lengthInBits := uint16(0)
return lengthInBits
}
-func (m *LDataFrameAck) LengthInBytes() uint16 {
+func (m *ApduControlDisconnect) LengthInBytes() uint16 {
return m.LengthInBits() / 8
}
-func LDataFrameAckParse(io *utils.ReadBuffer) (*LDataFrame, error) {
+func ApduControlDisconnectParse(io *utils.ReadBuffer) (*ApduControl, error) {
// Create a partially initialized instance
- _child := &LDataFrameAck{
- Parent: &LDataFrame{},
+ _child := &ApduControlDisconnect{
+ Parent: &ApduControl{},
}
_child.Parent.Child = _child
return _child.Parent, nil
}
-func (m *LDataFrameAck) Serialize(io utils.WriteBuffer) error {
+func (m *ApduControlDisconnect) Serialize(io utils.WriteBuffer) error {
ser := func() error {
return nil
@@ -120,7 +108,7 @@ func (m *LDataFrameAck) Serialize(io utils.WriteBuffer) error {
return m.Parent.SerializeParent(io, m, ser)
}
-func (m *LDataFrameAck) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
+func (m *ApduControlDisconnect) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
var token xml.Token
var err error
token = start
@@ -141,7 +129,7 @@ func (m *LDataFrameAck) UnmarshalXML(d *xml.Decoder, start xml.StartElement) err
}
}
-func (m *LDataFrameAck) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
+func (m *ApduControlDisconnect) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
return nil
}
diff --git a/plc4go/internal/plc4go/knxnetip/readwrite/model/LDataFrameAck.go b/plc4go/internal/plc4go/knxnetip/readwrite/model/ApduControlNack.go
similarity index 56%
copy from plc4go/internal/plc4go/knxnetip/readwrite/model/LDataFrameAck.go
copy to plc4go/internal/plc4go/knxnetip/readwrite/model/ApduControlNack.go
index 1bd9767..c09c2e6 100644
--- a/plc4go/internal/plc4go/knxnetip/readwrite/model/LDataFrameAck.go
+++ b/plc4go/internal/plc4go/knxnetip/readwrite/model/ApduControlNack.go
@@ -25,13 +25,13 @@ import (
)
// The data-structure of this message
-type LDataFrameAck struct {
- Parent *LDataFrame
- ILDataFrameAck
+type ApduControlNack struct {
+ Parent *ApduControl
+ IApduControlNack
}
// The corresponding interface
-type ILDataFrameAck interface {
+type IApduControlNack interface {
LengthInBytes() uint16
LengthInBits() uint16
Serialize(io utils.WriteBuffer) error
@@ -41,78 +41,66 @@ type ILDataFrameAck interface {
///////////////////////////////////////////////////////////
// Accessors for discriminator values.
///////////////////////////////////////////////////////////
-func (m *LDataFrameAck) NotAckFrame() bool {
- return false
-}
-
-func (m *LDataFrameAck) ExtendedFrame() bool {
- return false
-}
-
-func (m *LDataFrameAck) Polling() bool {
- return false
+func (m *ApduControlNack) ControlType() uint8 {
+ return 0x3
}
-func (m *LDataFrameAck) InitializeParent(parent *LDataFrame, repeated bool, priority CEMIPriority, acknowledgeRequested bool, errorFlag bool) {
- m.Parent.Repeated = repeated
- m.Parent.Priority = priority
- m.Parent.AcknowledgeRequested = acknowledgeRequested
- m.Parent.ErrorFlag = errorFlag
+func (m *ApduControlNack) InitializeParent(parent *ApduControl) {
}
-func NewLDataFrameAck(repeated bool, priority CEMIPriority, acknowledgeRequested bool, errorFlag bool) *LDataFrame {
- child := &LDataFrameAck{
- Parent: NewLDataFrame(repeated, priority, acknowledgeRequested, errorFlag),
+func NewApduControlNack() *ApduControl {
+ child := &ApduControlNack{
+ Parent: NewApduControl(),
}
child.Parent.Child = child
return child.Parent
}
-func CastLDataFrameAck(structType interface{}) *LDataFrameAck {
- castFunc := func(typ interface{}) *LDataFrameAck {
- if casted, ok := typ.(LDataFrameAck); ok {
+func CastApduControlNack(structType interface{}) *ApduControlNack {
+ castFunc := func(typ interface{}) *ApduControlNack {
+ if casted, ok := typ.(ApduControlNack); ok {
return &casted
}
- if casted, ok := typ.(*LDataFrameAck); ok {
+ if casted, ok := typ.(*ApduControlNack); ok {
return casted
}
- if casted, ok := typ.(LDataFrame); ok {
- return CastLDataFrameAck(casted.Child)
+ if casted, ok := typ.(ApduControl); ok {
+ return CastApduControlNack(casted.Child)
}
- if casted, ok := typ.(*LDataFrame); ok {
- return CastLDataFrameAck(casted.Child)
+ if casted, ok := typ.(*ApduControl); ok {
+ return CastApduControlNack(casted.Child)
}
return nil
}
return castFunc(structType)
}
-func (m *LDataFrameAck) GetTypeName() string {
- return "LDataFrameAck"
+func (m *ApduControlNack) GetTypeName() string {
+ return "ApduControlNack"
}
-func (m *LDataFrameAck) LengthInBits() uint16 {
+func (m *ApduControlNack) LengthInBits() uint16 {
lengthInBits := uint16(0)
return lengthInBits
}
-func (m *LDataFrameAck) LengthInBytes() uint16 {
+func (m *ApduControlNack) LengthInBytes() uint16 {
return m.LengthInBits() / 8
}
-func LDataFrameAckParse(io *utils.ReadBuffer) (*LDataFrame, error) {
+func ApduControlNackParse(io *utils.ReadBuffer) (*ApduControl, error) {
// Create a partially initialized instance
- _child := &LDataFrameAck{
- Parent: &LDataFrame{},
+ _child := &ApduControlNack{
+ Parent: &ApduControl{},
}
_child.Parent.Child = _child
return _child.Parent, nil
}
-func (m *LDataFrameAck) Serialize(io utils.WriteBuffer) error {
+func (m *ApduControlNack) Serialize(io utils.WriteBuffer) error {
ser := func() error {
return nil
@@ -120,7 +108,7 @@ func (m *LDataFrameAck) Serialize(io utils.WriteBuffer) error {
return m.Parent.SerializeParent(io, m, ser)
}
-func (m *LDataFrameAck) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
+func (m *ApduControlNack) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
var token xml.Token
var err error
token = start
@@ -141,7 +129,7 @@ func (m *LDataFrameAck) UnmarshalXML(d *xml.Decoder, start xml.StartElement) err
}
}
-func (m *LDataFrameAck) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
+func (m *ApduControlNack) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
return nil
}
diff --git a/plc4go/internal/plc4go/knxnetip/readwrite/model/ApduData.go b/plc4go/internal/plc4go/knxnetip/readwrite/model/ApduData.go
new file mode 100644
index 0000000..c0df68f
--- /dev/null
+++ b/plc4go/internal/plc4go/knxnetip/readwrite/model/ApduData.go
@@ -0,0 +1,404 @@
+//
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements. See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership. The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied. See the License for the
+// specific language governing permissions and limitations
+// under the License.
+//
+package model
+
+import (
+ "encoding/xml"
+ "errors"
+ "github.com/apache/plc4x/plc4go/internal/plc4go/spi/utils"
+ "io"
+ "reflect"
+ "strings"
+)
+
+// The data-structure of this message
+type ApduData struct {
+ Child IApduDataChild
+ IApduData
+ IApduDataParent
+}
+
+// The corresponding interface
+type IApduData interface {
+ ApciType() uint8
+ LengthInBytes() uint16
+ LengthInBits() uint16
+ Serialize(io utils.WriteBuffer) error
+ xml.Marshaler
+}
+
+type IApduDataParent interface {
+ SerializeParent(io utils.WriteBuffer, child IApduData, serializeChildFunction func() error) error
+ GetTypeName() string
+}
+
+type IApduDataChild interface {
+ Serialize(io utils.WriteBuffer) error
+ InitializeParent(parent *ApduData)
+ GetTypeName() string
+ IApduData
+}
+
+func NewApduData() *ApduData {
+ return &ApduData{}
+}
+
+func CastApduData(structType interface{}) *ApduData {
+ castFunc := func(typ interface{}) *ApduData {
+ if casted, ok := typ.(ApduData); ok {
+ return &casted
+ }
+ if casted, ok := typ.(*ApduData); ok {
+ return casted
+ }
+ return nil
+ }
+ return castFunc(structType)
+}
+
+func (m *ApduData) GetTypeName() string {
+ return "ApduData"
+}
+
+func (m *ApduData) LengthInBits() uint16 {
+ lengthInBits := uint16(0)
+
+ // Discriminator Field (apciType)
+ lengthInBits += 4
+
+ // Length of sub-type elements will be added by sub-type...
+ lengthInBits += m.Child.LengthInBits()
+
+ return lengthInBits
+}
+
+func (m *ApduData) LengthInBytes() uint16 {
+ return m.LengthInBits() / 8
+}
+
+func ApduDataParse(io *utils.ReadBuffer, dataLength uint8) (*ApduData, error) {
+
+ // Discriminator Field (apciType) (Used as input to a switch field)
+ apciType, _apciTypeErr := io.ReadUint8(4)
+ if _apciTypeErr != nil {
+ return nil, errors.New("Error parsing 'apciType' field " + _apciTypeErr.Error())
+ }
+
+ // Switch Field (Depending on the discriminator values, passes the instantiation to a sub-type)
+ var _parent *ApduData
+ var typeSwitchError error
+ switch {
+ case apciType == 0x0:
+ _parent, typeSwitchError = ApduDataGroupValueReadParse(io)
+ case apciType == 0x1:
+ _parent, typeSwitchError = ApduDataGroupValueResponseParse(io)
+ case apciType == 0x2:
+ _parent, typeSwitchError = ApduDataGroupValueWriteParse(io, dataLength)
+ case apciType == 0x3:
+ _parent, typeSwitchError = ApduDataIndividualAddressWriteParse(io)
+ case apciType == 0x4:
+ _parent, typeSwitchError = ApduDataIndividualAddressReadParse(io)
+ case apciType == 0x5:
+ _parent, typeSwitchError = ApduDataIndividualAddressResponseParse(io)
+ case apciType == 0x6:
+ _parent, typeSwitchError = ApduDataAdcReadParse(io)
+ case apciType == 0x7:
+ _parent, typeSwitchError = ApduDataAdcResponseParse(io)
+ case apciType == 0x8:
+ _parent, typeSwitchError = ApduDataMemoryReadParse(io)
+ case apciType == 0x9:
+ _parent, typeSwitchError = ApduDataMemoryResponseParse(io)
+ case apciType == 0xA:
+ _parent, typeSwitchError = ApduDataMemoryWriteParse(io)
+ case apciType == 0xB:
+ _parent, typeSwitchError = ApduDataUserMessageParse(io)
+ case apciType == 0xC:
+ _parent, typeSwitchError = ApduDataDeviceDescriptorReadParse(io)
+ case apciType == 0xD:
+ _parent, typeSwitchError = ApduDataDeviceDescriptorResponseParse(io)
+ case apciType == 0xE:
+ _parent, typeSwitchError = ApduDataRestartParse(io)
+ case apciType == 0xF:
+ _parent, typeSwitchError = ApduDataOtherParse(io, dataLength)
+ }
+ if typeSwitchError != nil {
+ return nil, errors.New("Error parsing sub-type for type-switch. " + typeSwitchError.Error())
+ }
+
+ // Finish initializing
+ _parent.Child.InitializeParent(_parent)
+ return _parent, nil
+}
+
+func (m *ApduData) Serialize(io utils.WriteBuffer) error {
+ return m.Child.Serialize(io)
+}
+
+func (m *ApduData) SerializeParent(io utils.WriteBuffer, child IApduData, serializeChildFunction func() error) error {
+
+ // Discriminator Field (apciType) (Used as input to a switch field)
+ apciType := uint8(child.ApciType())
+ _apciTypeErr := io.WriteUint8(4, (apciType))
+ if _apciTypeErr != nil {
+ return errors.New("Error serializing 'apciType' field " + _apciTypeErr.Error())
+ }
+
+ // Switch field (Depending on the discriminator values, passes the serialization to a sub-type)
+ _typeSwitchErr := serializeChildFunction()
+ if _typeSwitchErr != nil {
+ return errors.New("Error serializing sub-type field " + _typeSwitchErr.Error())
+ }
+
+ return nil
+}
+
+func (m *ApduData) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
+ var token xml.Token
+ var err error
+ for {
+ token, err = d.Token()
+ if err != nil {
+ if err == io.EOF {
+ return nil
+ }
+ return err
+ }
+ switch token.(type) {
+ case xml.StartElement:
+ tok := token.(xml.StartElement)
+ switch tok.Name.Local {
+ default:
+ switch start.Attr[0].Value {
+ case "org.apache.plc4x.java.knxnetip.readwrite.ApduDataGroupValueRead":
+ var dt *ApduDataGroupValueRead
+ if m.Child != nil {
+ dt = m.Child.(*ApduDataGroupValueRead)
+ }
+ if err := d.DecodeElement(&dt, &tok); err != nil {
+ return err
+ }
+ if m.Child == nil {
+ dt.Parent = m
+ m.Child = dt
+ }
+ case "org.apache.plc4x.java.knxnetip.readwrite.ApduDataGroupValueResponse":
+ var dt *ApduDataGroupValueResponse
+ if m.Child != nil {
+ dt = m.Child.(*ApduDataGroupValueResponse)
+ }
+ if err := d.DecodeElement(&dt, &tok); err != nil {
+ return err
+ }
+ if m.Child == nil {
+ dt.Parent = m
+ m.Child = dt
+ }
+ case "org.apache.plc4x.java.knxnetip.readwrite.ApduDataGroupValueWrite":
+ var dt *ApduDataGroupValueWrite
+ if m.Child != nil {
+ dt = m.Child.(*ApduDataGroupValueWrite)
+ }
+ if err := d.DecodeElement(&dt, &tok); err != nil {
+ return err
+ }
+ if m.Child == nil {
+ dt.Parent = m
+ m.Child = dt
+ }
+ case "org.apache.plc4x.java.knxnetip.readwrite.ApduDataIndividualAddressWrite":
+ var dt *ApduDataIndividualAddressWrite
+ if m.Child != nil {
+ dt = m.Child.(*ApduDataIndividualAddressWrite)
+ }
+ if err := d.DecodeElement(&dt, &tok); err != nil {
+ return err
+ }
+ if m.Child == nil {
+ dt.Parent = m
+ m.Child = dt
+ }
+ case "org.apache.plc4x.java.knxnetip.readwrite.ApduDataIndividualAddressRead":
+ var dt *ApduDataIndividualAddressRead
+ if m.Child != nil {
+ dt = m.Child.(*ApduDataIndividualAddressRead)
+ }
+ if err := d.DecodeElement(&dt, &tok); err != nil {
+ return err
+ }
+ if m.Child == nil {
+ dt.Parent = m
+ m.Child = dt
+ }
+ case "org.apache.plc4x.java.knxnetip.readwrite.ApduDataIndividualAddressResponse":
+ var dt *ApduDataIndividualAddressResponse
+ if m.Child != nil {
+ dt = m.Child.(*ApduDataIndividualAddressResponse)
+ }
+ if err := d.DecodeElement(&dt, &tok); err != nil {
+ return err
+ }
+ if m.Child == nil {
+ dt.Parent = m
+ m.Child = dt
+ }
+ case "org.apache.plc4x.java.knxnetip.readwrite.ApduDataAdcRead":
+ var dt *ApduDataAdcRead
+ if m.Child != nil {
+ dt = m.Child.(*ApduDataAdcRead)
+ }
+ if err := d.DecodeElement(&dt, &tok); err != nil {
+ return err
+ }
+ if m.Child == nil {
+ dt.Parent = m
+ m.Child = dt
+ }
+ case "org.apache.plc4x.java.knxnetip.readwrite.ApduDataAdcResponse":
+ var dt *ApduDataAdcResponse
+ if m.Child != nil {
+ dt = m.Child.(*ApduDataAdcResponse)
+ }
+ if err := d.DecodeElement(&dt, &tok); err != nil {
+ return err
+ }
+ if m.Child == nil {
+ dt.Parent = m
+ m.Child = dt
+ }
+ case "org.apache.plc4x.java.knxnetip.readwrite.ApduDataMemoryRead":
+ var dt *ApduDataMemoryRead
+ if m.Child != nil {
+ dt = m.Child.(*ApduDataMemoryRead)
+ }
+ if err := d.DecodeElement(&dt, &tok); err != nil {
+ return err
+ }
+ if m.Child == nil {
+ dt.Parent = m
+ m.Child = dt
+ }
+ case "org.apache.plc4x.java.knxnetip.readwrite.ApduDataMemoryResponse":
+ var dt *ApduDataMemoryResponse
+ if m.Child != nil {
+ dt = m.Child.(*ApduDataMemoryResponse)
+ }
+ if err := d.DecodeElement(&dt, &tok); err != nil {
+ return err
+ }
+ if m.Child == nil {
+ dt.Parent = m
+ m.Child = dt
+ }
+ case "org.apache.plc4x.java.knxnetip.readwrite.ApduDataMemoryWrite":
+ var dt *ApduDataMemoryWrite
+ if m.Child != nil {
+ dt = m.Child.(*ApduDataMemoryWrite)
+ }
+ if err := d.DecodeElement(&dt, &tok); err != nil {
+ return err
+ }
+ if m.Child == nil {
+ dt.Parent = m
+ m.Child = dt
+ }
+ case "org.apache.plc4x.java.knxnetip.readwrite.ApduDataUserMessage":
+ var dt *ApduDataUserMessage
+ if m.Child != nil {
+ dt = m.Child.(*ApduDataUserMessage)
+ }
+ if err := d.DecodeElement(&dt, &tok); err != nil {
+ return err
+ }
+ if m.Child == nil {
+ dt.Parent = m
+ m.Child = dt
+ }
+ case "org.apache.plc4x.java.knxnetip.readwrite.ApduDataDeviceDescriptorRead":
+ var dt *ApduDataDeviceDescriptorRead
+ if m.Child != nil {
+ dt = m.Child.(*ApduDataDeviceDescriptorRead)
+ }
+ if err := d.DecodeElement(&dt, &tok); err != nil {
+ return err
+ }
+ if m.Child == nil {
+ dt.Parent = m
+ m.Child = dt
+ }
+ case "org.apache.plc4x.java.knxnetip.readwrite.ApduDataDeviceDescriptorResponse":
+ var dt *ApduDataDeviceDescriptorResponse
+ if m.Child != nil {
+ dt = m.Child.(*ApduDataDeviceDescriptorResponse)
+ }
+ if err := d.DecodeElement(&dt, &tok); err != nil {
+ return err
+ }
+ if m.Child == nil {
+ dt.Parent = m
+ m.Child = dt
+ }
+ case "org.apache.plc4x.java.knxnetip.readwrite.ApduDataRestart":
+ var dt *ApduDataRestart
+ if m.Child != nil {
+ dt = m.Child.(*ApduDataRestart)
+ }
+ if err := d.DecodeElement(&dt, &tok); err != nil {
+ return err
+ }
+ if m.Child == nil {
+ dt.Parent = m
+ m.Child = dt
+ }
+ case "org.apache.plc4x.java.knxnetip.readwrite.ApduDataOther":
+ var dt *ApduDataOther
+ if m.Child != nil {
+ dt = m.Child.(*ApduDataOther)
+ }
+ if err := d.DecodeElement(&dt, &tok); err != nil {
+ return err
+ }
+ if m.Child == nil {
+ dt.Parent = m
+ m.Child = dt
+ }
+ }
+ }
+ }
+ }
+}
+
+func (m *ApduData) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
+ className := reflect.TypeOf(m.Child).String()
+ className = "org.apache.plc4x.java.knxnetip.readwrite." + className[strings.LastIndex(className, ".") + 1:]
+ if err := e.EncodeToken(xml.StartElement{Name: start.Name, Attr: []xml.Attr{
+ {Name: xml.Name{Local: "className"}, Value: className},
+ }}); err != nil {
+ return err
+ }
+ marshaller, ok := m.Child.(xml.Marshaler)
+ if !ok {
+ return errors.New("child is not castable to Marshaler")
+ }
+ marshaller.MarshalXML(e, start)
+ if err := e.EncodeToken(xml.EndElement{Name: start.Name}); err != nil {
+ return err
+ }
+ return nil
+}
+
diff --git a/plc4go/internal/plc4go/knxnetip/readwrite/model/LDataFrameAck.go b/plc4go/internal/plc4go/knxnetip/readwrite/model/ApduDataAdcRead.go
similarity index 56%
copy from plc4go/internal/plc4go/knxnetip/readwrite/model/LDataFrameAck.go
copy to plc4go/internal/plc4go/knxnetip/readwrite/model/ApduDataAdcRead.go
index 1bd9767..1d8a91e 100644
--- a/plc4go/internal/plc4go/knxnetip/readwrite/model/LDataFrameAck.go
+++ b/plc4go/internal/plc4go/knxnetip/readwrite/model/ApduDataAdcRead.go
@@ -25,13 +25,13 @@ import (
)
// The data-structure of this message
-type LDataFrameAck struct {
- Parent *LDataFrame
- ILDataFrameAck
+type ApduDataAdcRead struct {
+ Parent *ApduData
+ IApduDataAdcRead
}
// The corresponding interface
-type ILDataFrameAck interface {
+type IApduDataAdcRead interface {
LengthInBytes() uint16
LengthInBits() uint16
Serialize(io utils.WriteBuffer) error
@@ -41,78 +41,66 @@ type ILDataFrameAck interface {
///////////////////////////////////////////////////////////
// Accessors for discriminator values.
///////////////////////////////////////////////////////////
-func (m *LDataFrameAck) NotAckFrame() bool {
- return false
-}
-
-func (m *LDataFrameAck) ExtendedFrame() bool {
- return false
-}
-
-func (m *LDataFrameAck) Polling() bool {
- return false
+func (m *ApduDataAdcRead) ApciType() uint8 {
+ return 0x6
}
-func (m *LDataFrameAck) InitializeParent(parent *LDataFrame, repeated bool, priority CEMIPriority, acknowledgeRequested bool, errorFlag bool) {
- m.Parent.Repeated = repeated
- m.Parent.Priority = priority
- m.Parent.AcknowledgeRequested = acknowledgeRequested
- m.Parent.ErrorFlag = errorFlag
+func (m *ApduDataAdcRead) InitializeParent(parent *ApduData) {
}
-func NewLDataFrameAck(repeated bool, priority CEMIPriority, acknowledgeRequested bool, errorFlag bool) *LDataFrame {
- child := &LDataFrameAck{
- Parent: NewLDataFrame(repeated, priority, acknowledgeRequested, errorFlag),
+func NewApduDataAdcRead() *ApduData {
+ child := &ApduDataAdcRead{
+ Parent: NewApduData(),
}
child.Parent.Child = child
return child.Parent
}
-func CastLDataFrameAck(structType interface{}) *LDataFrameAck {
- castFunc := func(typ interface{}) *LDataFrameAck {
- if casted, ok := typ.(LDataFrameAck); ok {
+func CastApduDataAdcRead(structType interface{}) *ApduDataAdcRead {
+ castFunc := func(typ interface{}) *ApduDataAdcRead {
+ if casted, ok := typ.(ApduDataAdcRead); ok {
return &casted
}
- if casted, ok := typ.(*LDataFrameAck); ok {
+ if casted, ok := typ.(*ApduDataAdcRead); ok {
return casted
}
- if casted, ok := typ.(LDataFrame); ok {
- return CastLDataFrameAck(casted.Child)
+ if casted, ok := typ.(ApduData); ok {
+ return CastApduDataAdcRead(casted.Child)
}
- if casted, ok := typ.(*LDataFrame); ok {
- return CastLDataFrameAck(casted.Child)
+ if casted, ok := typ.(*ApduData); ok {
+ return CastApduDataAdcRead(casted.Child)
}
return nil
}
return castFunc(structType)
}
-func (m *LDataFrameAck) GetTypeName() string {
- return "LDataFrameAck"
+func (m *ApduDataAdcRead) GetTypeName() string {
+ return "ApduDataAdcRead"
}
-func (m *LDataFrameAck) LengthInBits() uint16 {
+func (m *ApduDataAdcRead) LengthInBits() uint16 {
lengthInBits := uint16(0)
return lengthInBits
}
-func (m *LDataFrameAck) LengthInBytes() uint16 {
+func (m *ApduDataAdcRead) LengthInBytes() uint16 {
return m.LengthInBits() / 8
}
-func LDataFrameAckParse(io *utils.ReadBuffer) (*LDataFrame, error) {
+func ApduDataAdcReadParse(io *utils.ReadBuffer) (*ApduData, error) {
// Create a partially initialized instance
- _child := &LDataFrameAck{
- Parent: &LDataFrame{},
+ _child := &ApduDataAdcRead{
+ Parent: &ApduData{},
}
_child.Parent.Child = _child
return _child.Parent, nil
}
-func (m *LDataFrameAck) Serialize(io utils.WriteBuffer) error {
+func (m *ApduDataAdcRead) Serialize(io utils.WriteBuffer) error {
ser := func() error {
return nil
@@ -120,7 +108,7 @@ func (m *LDataFrameAck) Serialize(io utils.WriteBuffer) error {
return m.Parent.SerializeParent(io, m, ser)
}
-func (m *LDataFrameAck) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
+func (m *ApduDataAdcRead) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
var token xml.Token
var err error
token = start
@@ -141,7 +129,7 @@ func (m *LDataFrameAck) UnmarshalXML(d *xml.Decoder, start xml.StartElement) err
}
}
-func (m *LDataFrameAck) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
+func (m *ApduDataAdcRead) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
return nil
}
diff --git a/plc4go/internal/plc4go/knxnetip/readwrite/model/LDataFrameAck.go b/plc4go/internal/plc4go/knxnetip/readwrite/model/ApduDataAdcResponse.go
similarity index 55%
copy from plc4go/internal/plc4go/knxnetip/readwrite/model/LDataFrameAck.go
copy to plc4go/internal/plc4go/knxnetip/readwrite/model/ApduDataAdcResponse.go
index 1bd9767..4375180 100644
--- a/plc4go/internal/plc4go/knxnetip/readwrite/model/LDataFrameAck.go
+++ b/plc4go/internal/plc4go/knxnetip/readwrite/model/ApduDataAdcResponse.go
@@ -25,13 +25,13 @@ import (
)
// The data-structure of this message
-type LDataFrameAck struct {
- Parent *LDataFrame
- ILDataFrameAck
+type ApduDataAdcResponse struct {
+ Parent *ApduData
+ IApduDataAdcResponse
}
// The corresponding interface
-type ILDataFrameAck interface {
+type IApduDataAdcResponse interface {
LengthInBytes() uint16
LengthInBits() uint16
Serialize(io utils.WriteBuffer) error
@@ -41,78 +41,66 @@ type ILDataFrameAck interface {
///////////////////////////////////////////////////////////
// Accessors for discriminator values.
///////////////////////////////////////////////////////////
-func (m *LDataFrameAck) NotAckFrame() bool {
- return false
-}
-
-func (m *LDataFrameAck) ExtendedFrame() bool {
- return false
-}
-
-func (m *LDataFrameAck) Polling() bool {
- return false
+func (m *ApduDataAdcResponse) ApciType() uint8 {
+ return 0x7
}
-func (m *LDataFrameAck) InitializeParent(parent *LDataFrame, repeated bool, priority CEMIPriority, acknowledgeRequested bool, errorFlag bool) {
- m.Parent.Repeated = repeated
- m.Parent.Priority = priority
- m.Parent.AcknowledgeRequested = acknowledgeRequested
- m.Parent.ErrorFlag = errorFlag
+func (m *ApduDataAdcResponse) InitializeParent(parent *ApduData) {
}
-func NewLDataFrameAck(repeated bool, priority CEMIPriority, acknowledgeRequested bool, errorFlag bool) *LDataFrame {
- child := &LDataFrameAck{
- Parent: NewLDataFrame(repeated, priority, acknowledgeRequested, errorFlag),
+func NewApduDataAdcResponse() *ApduData {
+ child := &ApduDataAdcResponse{
+ Parent: NewApduData(),
}
child.Parent.Child = child
return child.Parent
}
-func CastLDataFrameAck(structType interface{}) *LDataFrameAck {
- castFunc := func(typ interface{}) *LDataFrameAck {
- if casted, ok := typ.(LDataFrameAck); ok {
+func CastApduDataAdcResponse(structType interface{}) *ApduDataAdcResponse {
+ castFunc := func(typ interface{}) *ApduDataAdcResponse {
+ if casted, ok := typ.(ApduDataAdcResponse); ok {
return &casted
}
- if casted, ok := typ.(*LDataFrameAck); ok {
+ if casted, ok := typ.(*ApduDataAdcResponse); ok {
return casted
}
- if casted, ok := typ.(LDataFrame); ok {
- return CastLDataFrameAck(casted.Child)
+ if casted, ok := typ.(ApduData); ok {
+ return CastApduDataAdcResponse(casted.Child)
}
- if casted, ok := typ.(*LDataFrame); ok {
- return CastLDataFrameAck(casted.Child)
+ if casted, ok := typ.(*ApduData); ok {
+ return CastApduDataAdcResponse(casted.Child)
}
return nil
}
return castFunc(structType)
}
-func (m *LDataFrameAck) GetTypeName() string {
- return "LDataFrameAck"
+func (m *ApduDataAdcResponse) GetTypeName() string {
+ return "ApduDataAdcResponse"
}
-func (m *LDataFrameAck) LengthInBits() uint16 {
+func (m *ApduDataAdcResponse) LengthInBits() uint16 {
lengthInBits := uint16(0)
return lengthInBits
}
-func (m *LDataFrameAck) LengthInBytes() uint16 {
+func (m *ApduDataAdcResponse) LengthInBytes() uint16 {
return m.LengthInBits() / 8
}
-func LDataFrameAckParse(io *utils.ReadBuffer) (*LDataFrame, error) {
+func ApduDataAdcResponseParse(io *utils.ReadBuffer) (*ApduData, error) {
// Create a partially initialized instance
- _child := &LDataFrameAck{
- Parent: &LDataFrame{},
+ _child := &ApduDataAdcResponse{
+ Parent: &ApduData{},
}
_child.Parent.Child = _child
return _child.Parent, nil
}
-func (m *LDataFrameAck) Serialize(io utils.WriteBuffer) error {
+func (m *ApduDataAdcResponse) Serialize(io utils.WriteBuffer) error {
ser := func() error {
return nil
@@ -120,7 +108,7 @@ func (m *LDataFrameAck) Serialize(io utils.WriteBuffer) error {
return m.Parent.SerializeParent(io, m, ser)
}
-func (m *LDataFrameAck) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
+func (m *ApduDataAdcResponse) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
var token xml.Token
var err error
token = start
@@ -141,7 +129,7 @@ func (m *LDataFrameAck) UnmarshalXML(d *xml.Decoder, start xml.StartElement) err
}
}
-func (m *LDataFrameAck) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
+func (m *ApduDataAdcResponse) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
return nil
}
diff --git a/plc4go/internal/plc4go/knxnetip/readwrite/model/ApduDataContainer.go b/plc4go/internal/plc4go/knxnetip/readwrite/model/ApduDataContainer.go
new file mode 100644
index 0000000..a866208
--- /dev/null
+++ b/plc4go/internal/plc4go/knxnetip/readwrite/model/ApduDataContainer.go
@@ -0,0 +1,166 @@
+//
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements. See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership. The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied. See the License for the
+// specific language governing permissions and limitations
+// under the License.
+//
+package model
+
+import (
+ "encoding/xml"
+ "errors"
+ "github.com/apache/plc4x/plc4go/internal/plc4go/spi/utils"
+ "io"
+)
+
+// The data-structure of this message
+type ApduDataContainer struct {
+ DataApdu *ApduData
+ Parent *Apdu
+ IApduDataContainer
+}
+
+// The corresponding interface
+type IApduDataContainer interface {
+ LengthInBytes() uint16
+ LengthInBits() uint16
+ Serialize(io utils.WriteBuffer) error
+ xml.Marshaler
+}
+
+///////////////////////////////////////////////////////////
+// Accessors for discriminator values.
+///////////////////////////////////////////////////////////
+func (m *ApduDataContainer) Control() uint8 {
+ return 0
+}
+
+
+func (m *ApduDataContainer) InitializeParent(parent *Apdu, dataLength uint8, numbered bool, counter uint8) {
+ m.Parent.DataLength = dataLength
+ m.Parent.Numbered = numbered
+ m.Parent.Counter = counter
+}
+
+func NewApduDataContainer(dataApdu *ApduData, dataLength uint8, numbered bool, counter uint8) *Apdu {
+ child := &ApduDataContainer{
+ DataApdu: dataApdu,
+ Parent: NewApdu(dataLength, numbered, counter),
+ }
+ child.Parent.Child = child
+ return child.Parent
+}
+
+func CastApduDataContainer(structType interface{}) *ApduDataContainer {
+ castFunc := func(typ interface{}) *ApduDataContainer {
+ if casted, ok := typ.(ApduDataContainer); ok {
+ return &casted
+ }
+ if casted, ok := typ.(*ApduDataContainer); ok {
+ return casted
+ }
+ if casted, ok := typ.(Apdu); ok {
+ return CastApduDataContainer(casted.Child)
+ }
+ if casted, ok := typ.(*Apdu); ok {
+ return CastApduDataContainer(casted.Child)
+ }
+ return nil
+ }
+ return castFunc(structType)
+}
+
+func (m *ApduDataContainer) GetTypeName() string {
+ return "ApduDataContainer"
+}
+
+func (m *ApduDataContainer) LengthInBits() uint16 {
+ lengthInBits := uint16(0)
+
+ // Simple field (dataApdu)
+ lengthInBits += m.DataApdu.LengthInBits()
+
+ return lengthInBits
+}
+
+func (m *ApduDataContainer) LengthInBytes() uint16 {
+ return m.LengthInBits() / 8
+}
+
+func ApduDataContainerParse(io *utils.ReadBuffer, dataLength uint8) (*Apdu, error) {
+
+ // Simple Field (dataApdu)
+ dataApdu, _dataApduErr := ApduDataParse(io, dataLength)
+ if _dataApduErr != nil {
+ return nil, errors.New("Error parsing 'dataApdu' field " + _dataApduErr.Error())
+ }
+
+ // Create a partially initialized instance
+ _child := &ApduDataContainer{
+ DataApdu: dataApdu,
+ Parent: &Apdu{},
+ }
+ _child.Parent.Child = _child
+ return _child.Parent, nil
+}
+
+func (m *ApduDataContainer) Serialize(io utils.WriteBuffer) error {
+ ser := func() error {
+
+ // Simple Field (dataApdu)
+ _dataApduErr := m.DataApdu.Serialize(io)
+ if _dataApduErr != nil {
+ return errors.New("Error serializing 'dataApdu' field " + _dataApduErr.Error())
+ }
+
+ return nil
+ }
+ return m.Parent.SerializeParent(io, m, ser)
+}
+
+func (m *ApduDataContainer) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
+ var token xml.Token
+ var err error
+ token = start
+ for {
+ switch token.(type) {
+ case xml.StartElement:
+ tok := token.(xml.StartElement)
+ switch tok.Name.Local {
+ case "dataApdu":
+ var dt *ApduData
+ if err := d.DecodeElement(&dt, &tok); err != nil {
+ return err
+ }
+ m.DataApdu = dt
+ }
+ }
+ token, err = d.Token()
+ if err != nil {
+ if err == io.EOF {
+ return nil
+ }
+ return err
+ }
+ }
+}
+
+func (m *ApduDataContainer) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
+ if err := e.EncodeElement(m.DataApdu, xml.StartElement{Name: xml.Name{Local: "dataApdu"}}); err != nil {
+ return err
+ }
+ return nil
+}
+
diff --git a/plc4go/internal/plc4go/knxnetip/readwrite/model/LDataFrameAck.go b/plc4go/internal/plc4go/knxnetip/readwrite/model/ApduDataDeviceDescriptorRead.go
similarity index 55%
copy from plc4go/internal/plc4go/knxnetip/readwrite/model/LDataFrameAck.go
copy to plc4go/internal/plc4go/knxnetip/readwrite/model/ApduDataDeviceDescriptorRead.go
index 1bd9767..8fc976e 100644
--- a/plc4go/internal/plc4go/knxnetip/readwrite/model/LDataFrameAck.go
+++ b/plc4go/internal/plc4go/knxnetip/readwrite/model/ApduDataDeviceDescriptorRead.go
@@ -25,13 +25,13 @@ import (
)
// The data-structure of this message
-type LDataFrameAck struct {
- Parent *LDataFrame
- ILDataFrameAck
+type ApduDataDeviceDescriptorRead struct {
+ Parent *ApduData
+ IApduDataDeviceDescriptorRead
}
// The corresponding interface
-type ILDataFrameAck interface {
+type IApduDataDeviceDescriptorRead interface {
LengthInBytes() uint16
LengthInBits() uint16
Serialize(io utils.WriteBuffer) error
@@ -41,78 +41,66 @@ type ILDataFrameAck interface {
///////////////////////////////////////////////////////////
// Accessors for discriminator values.
///////////////////////////////////////////////////////////
-func (m *LDataFrameAck) NotAckFrame() bool {
- return false
-}
-
-func (m *LDataFrameAck) ExtendedFrame() bool {
- return false
-}
-
-func (m *LDataFrameAck) Polling() bool {
- return false
+func (m *ApduDataDeviceDescriptorRead) ApciType() uint8 {
+ return 0xC
}
-func (m *LDataFrameAck) InitializeParent(parent *LDataFrame, repeated bool, priority CEMIPriority, acknowledgeRequested bool, errorFlag bool) {
- m.Parent.Repeated = repeated
- m.Parent.Priority = priority
- m.Parent.AcknowledgeRequested = acknowledgeRequested
- m.Parent.ErrorFlag = errorFlag
+func (m *ApduDataDeviceDescriptorRead) InitializeParent(parent *ApduData) {
}
-func NewLDataFrameAck(repeated bool, priority CEMIPriority, acknowledgeRequested bool, errorFlag bool) *LDataFrame {
- child := &LDataFrameAck{
- Parent: NewLDataFrame(repeated, priority, acknowledgeRequested, errorFlag),
+func NewApduDataDeviceDescriptorRead() *ApduData {
+ child := &ApduDataDeviceDescriptorRead{
+ Parent: NewApduData(),
}
child.Parent.Child = child
return child.Parent
}
-func CastLDataFrameAck(structType interface{}) *LDataFrameAck {
- castFunc := func(typ interface{}) *LDataFrameAck {
- if casted, ok := typ.(LDataFrameAck); ok {
+func CastApduDataDeviceDescriptorRead(structType interface{}) *ApduDataDeviceDescriptorRead {
+ castFunc := func(typ interface{}) *ApduDataDeviceDescriptorRead {
+ if casted, ok := typ.(ApduDataDeviceDescriptorRead); ok {
return &casted
}
- if casted, ok := typ.(*LDataFrameAck); ok {
+ if casted, ok := typ.(*ApduDataDeviceDescriptorRead); ok {
return casted
}
- if casted, ok := typ.(LDataFrame); ok {
- return CastLDataFrameAck(casted.Child)
+ if casted, ok := typ.(ApduData); ok {
+ return CastApduDataDeviceDescriptorRead(casted.Child)
}
- if casted, ok := typ.(*LDataFrame); ok {
- return CastLDataFrameAck(casted.Child)
+ if casted, ok := typ.(*ApduData); ok {
+ return CastApduDataDeviceDescriptorRead(casted.Child)
}
return nil
}
return castFunc(structType)
}
-func (m *LDataFrameAck) GetTypeName() string {
- return "LDataFrameAck"
+func (m *ApduDataDeviceDescriptorRead) GetTypeName() string {
+ return "ApduDataDeviceDescriptorRead"
}
-func (m *LDataFrameAck) LengthInBits() uint16 {
+func (m *ApduDataDeviceDescriptorRead) LengthInBits() uint16 {
lengthInBits := uint16(0)
return lengthInBits
}
-func (m *LDataFrameAck) LengthInBytes() uint16 {
+func (m *ApduDataDeviceDescriptorRead) LengthInBytes() uint16 {
return m.LengthInBits() / 8
}
-func LDataFrameAckParse(io *utils.ReadBuffer) (*LDataFrame, error) {
+func ApduDataDeviceDescriptorReadParse(io *utils.ReadBuffer) (*ApduData, error) {
// Create a partially initialized instance
- _child := &LDataFrameAck{
- Parent: &LDataFrame{},
+ _child := &ApduDataDeviceDescriptorRead{
+ Parent: &ApduData{},
}
_child.Parent.Child = _child
return _child.Parent, nil
}
-func (m *LDataFrameAck) Serialize(io utils.WriteBuffer) error {
+func (m *ApduDataDeviceDescriptorRead) Serialize(io utils.WriteBuffer) error {
ser := func() error {
return nil
@@ -120,7 +108,7 @@ func (m *LDataFrameAck) Serialize(io utils.WriteBuffer) error {
return m.Parent.SerializeParent(io, m, ser)
}
-func (m *LDataFrameAck) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
+func (m *ApduDataDeviceDescriptorRead) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
var token xml.Token
var err error
token = start
@@ -141,7 +129,7 @@ func (m *LDataFrameAck) UnmarshalXML(d *xml.Decoder, start xml.StartElement) err
}
}
-func (m *LDataFrameAck) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
+func (m *ApduDataDeviceDescriptorRead) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
return nil
}
diff --git a/plc4go/internal/plc4go/knxnetip/readwrite/model/LDataFrameAck.go b/plc4go/internal/plc4go/knxnetip/readwrite/model/ApduDataDeviceDescriptorResponse.go
similarity index 55%
copy from plc4go/internal/plc4go/knxnetip/readwrite/model/LDataFrameAck.go
copy to plc4go/internal/plc4go/knxnetip/readwrite/model/ApduDataDeviceDescriptorResponse.go
index 1bd9767..f694429 100644
--- a/plc4go/internal/plc4go/knxnetip/readwrite/model/LDataFrameAck.go
+++ b/plc4go/internal/plc4go/knxnetip/readwrite/model/ApduDataDeviceDescriptorResponse.go
@@ -25,13 +25,13 @@ import (
)
// The data-structure of this message
-type LDataFrameAck struct {
- Parent *LDataFrame
- ILDataFrameAck
+type ApduDataDeviceDescriptorResponse struct {
+ Parent *ApduData
+ IApduDataDeviceDescriptorResponse
}
// The corresponding interface
-type ILDataFrameAck interface {
+type IApduDataDeviceDescriptorResponse interface {
LengthInBytes() uint16
LengthInBits() uint16
Serialize(io utils.WriteBuffer) error
@@ -41,78 +41,66 @@ type ILDataFrameAck interface {
///////////////////////////////////////////////////////////
// Accessors for discriminator values.
///////////////////////////////////////////////////////////
-func (m *LDataFrameAck) NotAckFrame() bool {
- return false
-}
-
-func (m *LDataFrameAck) ExtendedFrame() bool {
- return false
-}
-
-func (m *LDataFrameAck) Polling() bool {
- return false
+func (m *ApduDataDeviceDescriptorResponse) ApciType() uint8 {
+ return 0xD
}
-func (m *LDataFrameAck) InitializeParent(parent *LDataFrame, repeated bool, priority CEMIPriority, acknowledgeRequested bool, errorFlag bool) {
- m.Parent.Repeated = repeated
- m.Parent.Priority = priority
- m.Parent.AcknowledgeRequested = acknowledgeRequested
- m.Parent.ErrorFlag = errorFlag
+func (m *ApduDataDeviceDescriptorResponse) InitializeParent(parent *ApduData) {
}
-func NewLDataFrameAck(repeated bool, priority CEMIPriority, acknowledgeRequested bool, errorFlag bool) *LDataFrame {
- child := &LDataFrameAck{
- Parent: NewLDataFrame(repeated, priority, acknowledgeRequested, errorFlag),
+func NewApduDataDeviceDescriptorResponse() *ApduData {
+ child := &ApduDataDeviceDescriptorResponse{
+ Parent: NewApduData(),
}
child.Parent.Child = child
return child.Parent
}
-func CastLDataFrameAck(structType interface{}) *LDataFrameAck {
- castFunc := func(typ interface{}) *LDataFrameAck {
- if casted, ok := typ.(LDataFrameAck); ok {
+func CastApduDataDeviceDescriptorResponse(structType interface{}) *ApduDataDeviceDescriptorResponse {
+ castFunc := func(typ interface{}) *ApduDataDeviceDescriptorResponse {
+ if casted, ok := typ.(ApduDataDeviceDescriptorResponse); ok {
return &casted
}
- if casted, ok := typ.(*LDataFrameAck); ok {
+ if casted, ok := typ.(*ApduDataDeviceDescriptorResponse); ok {
return casted
}
- if casted, ok := typ.(LDataFrame); ok {
- return CastLDataFrameAck(casted.Child)
+ if casted, ok := typ.(ApduData); ok {
+ return CastApduDataDeviceDescriptorResponse(casted.Child)
}
- if casted, ok := typ.(*LDataFrame); ok {
- return CastLDataFrameAck(casted.Child)
+ if casted, ok := typ.(*ApduData); ok {
+ return CastApduDataDeviceDescriptorResponse(casted.Child)
}
return nil
}
return castFunc(structType)
}
-func (m *LDataFrameAck) GetTypeName() string {
- return "LDataFrameAck"
+func (m *ApduDataDeviceDescriptorResponse) GetTypeName() string {
+ return "ApduDataDeviceDescriptorResponse"
}
-func (m *LDataFrameAck) LengthInBits() uint16 {
+func (m *ApduDataDeviceDescriptorResponse) LengthInBits() uint16 {
lengthInBits := uint16(0)
return lengthInBits
}
-func (m *LDataFrameAck) LengthInBytes() uint16 {
+func (m *ApduDataDeviceDescriptorResponse) LengthInBytes() uint16 {
return m.LengthInBits() / 8
}
-func LDataFrameAckParse(io *utils.ReadBuffer) (*LDataFrame, error) {
+func ApduDataDeviceDescriptorResponseParse(io *utils.ReadBuffer) (*ApduData, error) {
// Create a partially initialized instance
- _child := &LDataFrameAck{
- Parent: &LDataFrame{},
+ _child := &ApduDataDeviceDescriptorResponse{
+ Parent: &ApduData{},
}
_child.Parent.Child = _child
return _child.Parent, nil
}
-func (m *LDataFrameAck) Serialize(io utils.WriteBuffer) error {
+func (m *ApduDataDeviceDescriptorResponse) Serialize(io utils.WriteBuffer) error {
ser := func() error {
return nil
@@ -120,7 +108,7 @@ func (m *LDataFrameAck) Serialize(io utils.WriteBuffer) error {
return m.Parent.SerializeParent(io, m, ser)
}
-func (m *LDataFrameAck) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
+func (m *ApduDataDeviceDescriptorResponse) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
var token xml.Token
var err error
token = start
@@ -141,7 +129,7 @@ func (m *LDataFrameAck) UnmarshalXML(d *xml.Decoder, start xml.StartElement) err
}
}
-func (m *LDataFrameAck) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
+func (m *ApduDataDeviceDescriptorResponse) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
return nil
}
diff --git a/plc4go/internal/plc4go/knxnetip/readwrite/model/ApduDataExt.go b/plc4go/internal/plc4go/knxnetip/readwrite/model/ApduDataExt.go
new file mode 100644
index 0000000..bd3821e
--- /dev/null
+++ b/plc4go/internal/plc4go/knxnetip/readwrite/model/ApduDataExt.go
@@ -0,0 +1,754 @@
+//
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements. See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership. The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied. See the License for the
+// specific language governing permissions and limitations
+// under the License.
+//
+package model
+
+import (
+ "encoding/xml"
+ "errors"
+ "github.com/apache/plc4x/plc4go/internal/plc4go/spi/utils"
+ "io"
+ "reflect"
+ "strings"
+)
+
+// The data-structure of this message
+type ApduDataExt struct {
+ Child IApduDataExtChild
+ IApduDataExt
+ IApduDataExtParent
+}
+
+// The corresponding interface
+type IApduDataExt interface {
+ ExtApciType() uint8
+ LengthInBytes() uint16
+ LengthInBits() uint16
+ Serialize(io utils.WriteBuffer) error
+ xml.Marshaler
+}
+
+type IApduDataExtParent interface {
+ SerializeParent(io utils.WriteBuffer, child IApduDataExt, serializeChildFunction func() error) error
+ GetTypeName() string
+}
+
+type IApduDataExtChild interface {
+ Serialize(io utils.WriteBuffer) error
+ InitializeParent(parent *ApduDataExt)
+ GetTypeName() string
+ IApduDataExt
+}
+
+func NewApduDataExt() *ApduDataExt {
+ return &ApduDataExt{}
+}
+
+func CastApduDataExt(structType interface{}) *ApduDataExt {
+ castFunc := func(typ interface{}) *ApduDataExt {
+ if casted, ok := typ.(ApduDataExt); ok {
+ return &casted
+ }
+ if casted, ok := typ.(*ApduDataExt); ok {
+ return casted
+ }
+ return nil
+ }
+ return castFunc(structType)
+}
+
+func (m *ApduDataExt) GetTypeName() string {
+ return "ApduDataExt"
+}
+
+func (m *ApduDataExt) LengthInBits() uint16 {
+ lengthInBits := uint16(0)
+
+ // Discriminator Field (extApciType)
+ lengthInBits += 8
+
+ // Length of sub-type elements will be added by sub-type...
+ lengthInBits += m.Child.LengthInBits()
+
+ return lengthInBits
+}
+
+func (m *ApduDataExt) LengthInBytes() uint16 {
+ return m.LengthInBits() / 8
+}
+
+func ApduDataExtParse(io *utils.ReadBuffer, length uint8) (*ApduDataExt, error) {
+
+ // Discriminator Field (extApciType) (Used as input to a switch field)
+ extApciType, _extApciTypeErr := io.ReadUint8(8)
+ if _extApciTypeErr != nil {
+ return nil, errors.New("Error parsing 'extApciType' field " + _extApciTypeErr.Error())
+ }
+
+ // Switch Field (Depending on the discriminator values, passes the instantiation to a sub-type)
+ var _parent *ApduDataExt
+ var typeSwitchError error
+ switch {
+ case extApciType == 0x00:
+ _parent, typeSwitchError = ApduDataExtOpenRoutingTableRequestParse(io)
+ case extApciType == 0x01:
+ _parent, typeSwitchError = ApduDataExtReadRoutingTableRequestParse(io)
+ case extApciType == 0x02:
+ _parent, typeSwitchError = ApduDataExtReadRoutingTableResponseParse(io)
+ case extApciType == 0x03:
+ _parent, typeSwitchError = ApduDataExtWriteRoutingTableRequestParse(io)
+ case extApciType == 0x08:
+ _parent, typeSwitchError = ApduDataExtReadRouterMemoryRequestParse(io)
+ case extApciType == 0x09:
+ _parent, typeSwitchError = ApduDataExtReadRouterMemoryResponseParse(io)
+ case extApciType == 0x0A:
+ _parent, typeSwitchError = ApduDataExtWriteRouterMemoryRequestParse(io)
+ case extApciType == 0x0D:
+ _parent, typeSwitchError = ApduDataExtReadRouterStatusRequestParse(io)
+ case extApciType == 0x0E:
+ _parent, typeSwitchError = ApduDataExtReadRouterStatusResponseParse(io)
+ case extApciType == 0x0F:
+ _parent, typeSwitchError = ApduDataExtWriteRouterStatusRequestParse(io)
+ case extApciType == 0x10:
+ _parent, typeSwitchError = ApduDataExtMemoryBitWriteParse(io)
+ case extApciType == 0x11:
+ _parent, typeSwitchError = ApduDataExtAuthorizeRequestParse(io)
+ case extApciType == 0x12:
+ _parent, typeSwitchError = ApduDataExtAuthorizeResponseParse(io)
+ case extApciType == 0x13:
+ _parent, typeSwitchError = ApduDataExtKeyWriteParse(io)
+ case extApciType == 0x14:
+ _parent, typeSwitchError = ApduDataExtKeyResponseParse(io)
+ case extApciType == 0x15:
+ _parent, typeSwitchError = ApduDataExtPropertyValueReadParse(io)
+ case extApciType == 0x16:
+ _parent, typeSwitchError = ApduDataExtPropertyValueResponseParse(io, length)
+ case extApciType == 0x17:
+ _parent, typeSwitchError = ApduDataExtPropertyValueWriteParse(io)
+ case extApciType == 0x18:
+ _parent, typeSwitchError = ApduDataExtPropertyDescriptionReadParse(io)
+ case extApciType == 0x19:
+ _parent, typeSwitchError = ApduDataExtPropertyDescriptionResponseParse(io)
+ case extApciType == 0x1A:
+ _parent, typeSwitchError = ApduDataExtNetworkParameterReadParse(io)
+ case extApciType == 0x1B:
+ _parent, typeSwitchError = ApduDataExtNetworkParameterResponseParse(io)
+ case extApciType == 0x1C:
+ _parent, typeSwitchError = ApduDataExtIndividualAddressSerialNumberReadParse(io)
+ case extApciType == 0x1D:
+ _parent, typeSwitchError = ApduDataExtIndividualAddressSerialNumberResponseParse(io)
+ case extApciType == 0x1E:
+ _parent, typeSwitchError = ApduDataExtIndividualAddressSerialNumberWriteParse(io)
+ case extApciType == 0x20:
+ _parent, typeSwitchError = ApduDataExtDomainAddressWriteParse(io)
+ case extApciType == 0x21:
+ _parent, typeSwitchError = ApduDataExtDomainAddressReadParse(io)
+ case extApciType == 0x22:
+ _parent, typeSwitchError = ApduDataExtDomainAddressResponseParse(io)
+ case extApciType == 0x23:
+ _parent, typeSwitchError = ApduDataExtDomainAddressSelectiveReadParse(io)
+ case extApciType == 0x24:
+ _parent, typeSwitchError = ApduDataExtNetworkParameterWriteParse(io)
+ case extApciType == 0x25:
+ _parent, typeSwitchError = ApduDataExtLinkReadParse(io)
+ case extApciType == 0x26:
+ _parent, typeSwitchError = ApduDataExtLinkResponseParse(io)
+ case extApciType == 0x27:
+ _parent, typeSwitchError = ApduDataExtLinkWriteParse(io)
+ case extApciType == 0x28:
+ _parent, typeSwitchError = ApduDataExtGroupPropertyValueReadParse(io)
+ case extApciType == 0x29:
+ _parent, typeSwitchError = ApduDataExtGroupPropertyValueResponseParse(io)
+ case extApciType == 0x2A:
+ _parent, typeSwitchError = ApduDataExtGroupPropertyValueWriteParse(io)
+ case extApciType == 0x2B:
+ _parent, typeSwitchError = ApduDataExtGroupPropertyValueInfoReportParse(io)
+ case extApciType == 0x2C:
+ _parent, typeSwitchError = ApduDataExtDomainAddressSerialNumberReadParse(io)
+ case extApciType == 0x2D:
+ _parent, typeSwitchError = ApduDataExtDomainAddressSerialNumberResponseParse(io)
+ case extApciType == 0x2E:
+ _parent, typeSwitchError = ApduDataExtDomainAddressSerialNumberWriteParse(io)
+ case extApciType == 0x30:
+ _parent, typeSwitchError = ApduDataExtFileStreamInfoReportParse(io)
+ }
+ if typeSwitchError != nil {
+ return nil, errors.New("Error parsing sub-type for type-switch. " + typeSwitchError.Error())
+ }
+
+ // Finish initializing
+ _parent.Child.InitializeParent(_parent)
+ return _parent, nil
+}
+
+func (m *ApduDataExt) Serialize(io utils.WriteBuffer) error {
+ return m.Child.Serialize(io)
+}
+
+func (m *ApduDataExt) SerializeParent(io utils.WriteBuffer, child IApduDataExt, serializeChildFunction func() error) error {
+
+ // Discriminator Field (extApciType) (Used as input to a switch field)
+ extApciType := uint8(child.ExtApciType())
+ _extApciTypeErr := io.WriteUint8(8, (extApciType))
+ if _extApciTypeErr != nil {
+ return errors.New("Error serializing 'extApciType' field " + _extApciTypeErr.Error())
+ }
+
+ // Switch field (Depending on the discriminator values, passes the serialization to a sub-type)
+ _typeSwitchErr := serializeChildFunction()
+ if _typeSwitchErr != nil {
+ return errors.New("Error serializing sub-type field " + _typeSwitchErr.Error())
+ }
+
+ return nil
+}
+
+func (m *ApduDataExt) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
+ var token xml.Token
+ var err error
+ for {
+ token, err = d.Token()
+ if err != nil {
+ if err == io.EOF {
+ return nil
+ }
+ return err
+ }
+ switch token.(type) {
+ case xml.StartElement:
+ tok := token.(xml.StartElement)
+ switch tok.Name.Local {
+ default:
+ switch start.Attr[0].Value {
+ case "org.apache.plc4x.java.knxnetip.readwrite.ApduDataExtOpenRoutingTableRequest":
+ var dt *ApduDataExtOpenRoutingTableRequest
+ if m.Child != nil {
+ dt = m.Child.(*ApduDataExtOpenRoutingTableRequest)
+ }
+ if err := d.DecodeElement(&dt, &tok); err != nil {
+ return err
+ }
+ if m.Child == nil {
+ dt.Parent = m
+ m.Child = dt
+ }
+ case "org.apache.plc4x.java.knxnetip.readwrite.ApduDataExtReadRoutingTableRequest":
+ var dt *ApduDataExtReadRoutingTableRequest
+ if m.Child != nil {
+ dt = m.Child.(*ApduDataExtReadRoutingTableRequest)
+ }
+ if err := d.DecodeElement(&dt, &tok); err != nil {
+ return err
+ }
+ if m.Child == nil {
+ dt.Parent = m
+ m.Child = dt
+ }
+ case "org.apache.plc4x.java.knxnetip.readwrite.ApduDataExtReadRoutingTableResponse":
+ var dt *ApduDataExtReadRoutingTableResponse
+ if m.Child != nil {
+ dt = m.Child.(*ApduDataExtReadRoutingTableResponse)
+ }
+ if err := d.DecodeElement(&dt, &tok); err != nil {
+ return err
+ }
+ if m.Child == nil {
+ dt.Parent = m
+ m.Child = dt
+ }
+ case "org.apache.plc4x.java.knxnetip.readwrite.ApduDataExtWriteRoutingTableRequest":
+ var dt *ApduDataExtWriteRoutingTableRequest
+ if m.Child != nil {
+ dt = m.Child.(*ApduDataExtWriteRoutingTableRequest)
+ }
+ if err := d.DecodeElement(&dt, &tok); err != nil {
+ return err
+ }
+ if m.Child == nil {
+ dt.Parent = m
+ m.Child = dt
+ }
+ case "org.apache.plc4x.java.knxnetip.readwrite.ApduDataExtReadRouterMemoryRequest":
+ var dt *ApduDataExtReadRouterMemoryRequest
+ if m.Child != nil {
+ dt = m.Child.(*ApduDataExtReadRouterMemoryRequest)
+ }
+ if err := d.DecodeElement(&dt, &tok); err != nil {
+ return err
+ }
+ if m.Child == nil {
+ dt.Parent = m
+ m.Child = dt
+ }
+ case "org.apache.plc4x.java.knxnetip.readwrite.ApduDataExtReadRouterMemoryResponse":
+ var dt *ApduDataExtReadRouterMemoryResponse
+ if m.Child != nil {
+ dt = m.Child.(*ApduDataExtReadRouterMemoryResponse)
+ }
+ if err := d.DecodeElement(&dt, &tok); err != nil {
+ return err
+ }
+ if m.Child == nil {
+ dt.Parent = m
+ m.Child = dt
+ }
+ case "org.apache.plc4x.java.knxnetip.readwrite.ApduDataExtWriteRouterMemoryRequest":
+ var dt *ApduDataExtWriteRouterMemoryRequest
+ if m.Child != nil {
+ dt = m.Child.(*ApduDataExtWriteRouterMemoryRequest)
+ }
+ if err := d.DecodeElement(&dt, &tok); err != nil {
+ return err
+ }
+ if m.Child == nil {
+ dt.Parent = m
+ m.Child = dt
+ }
+ case "org.apache.plc4x.java.knxnetip.readwrite.ApduDataExtReadRouterStatusRequest":
+ var dt *ApduDataExtReadRouterStatusRequest
+ if m.Child != nil {
+ dt = m.Child.(*ApduDataExtReadRouterStatusRequest)
+ }
+ if err := d.DecodeElement(&dt, &tok); err != nil {
+ return err
+ }
+ if m.Child == nil {
+ dt.Parent = m
+ m.Child = dt
+ }
+ case "org.apache.plc4x.java.knxnetip.readwrite.ApduDataExtReadRouterStatusResponse":
+ var dt *ApduDataExtReadRouterStatusResponse
+ if m.Child != nil {
+ dt = m.Child.(*ApduDataExtReadRouterStatusResponse)
+ }
+ if err := d.DecodeElement(&dt, &tok); err != nil {
+ return err
+ }
+ if m.Child == nil {
+ dt.Parent = m
+ m.Child = dt
+ }
+ case "org.apache.plc4x.java.knxnetip.readwrite.ApduDataExtWriteRouterStatusRequest":
+ var dt *ApduDataExtWriteRouterStatusRequest
+ if m.Child != nil {
+ dt = m.Child.(*ApduDataExtWriteRouterStatusRequest)
+ }
+ if err := d.DecodeElement(&dt, &tok); err != nil {
+ return err
+ }
+ if m.Child == nil {
+ dt.Parent = m
+ m.Child = dt
+ }
+ case "org.apache.plc4x.java.knxnetip.readwrite.ApduDataExtMemoryBitWrite":
+ var dt *ApduDataExtMemoryBitWrite
+ if m.Child != nil {
+ dt = m.Child.(*ApduDataExtMemoryBitWrite)
+ }
+ if err := d.DecodeElement(&dt, &tok); err != nil {
+ return err
+ }
+ if m.Child == nil {
+ dt.Parent = m
+ m.Child = dt
+ }
+ case "org.apache.plc4x.java.knxnetip.readwrite.ApduDataExtAuthorizeRequest":
+ var dt *ApduDataExtAuthorizeRequest
+ if m.Child != nil {
+ dt = m.Child.(*ApduDataExtAuthorizeRequest)
+ }
+ if err := d.DecodeElement(&dt, &tok); err != nil {
+ return err
+ }
+ if m.Child == nil {
+ dt.Parent = m
+ m.Child = dt
+ }
+ case "org.apache.plc4x.java.knxnetip.readwrite.ApduDataExtAuthorizeResponse":
+ var dt *ApduDataExtAuthorizeResponse
+ if m.Child != nil {
+ dt = m.Child.(*ApduDataExtAuthorizeResponse)
+ }
+ if err := d.DecodeElement(&dt, &tok); err != nil {
+ return err
+ }
+ if m.Child == nil {
+ dt.Parent = m
+ m.Child = dt
+ }
+ case "org.apache.plc4x.java.knxnetip.readwrite.ApduDataExtKeyWrite":
+ var dt *ApduDataExtKeyWrite
+ if m.Child != nil {
+ dt = m.Child.(*ApduDataExtKeyWrite)
+ }
+ if err := d.DecodeElement(&dt, &tok); err != nil {
+ return err
+ }
+ if m.Child == nil {
+ dt.Parent = m
+ m.Child = dt
+ }
+ case "org.apache.plc4x.java.knxnetip.readwrite.ApduDataExtKeyResponse":
+ var dt *ApduDataExtKeyResponse
+ if m.Child != nil {
+ dt = m.Child.(*ApduDataExtKeyResponse)
+ }
+ if err := d.DecodeElement(&dt, &tok); err != nil {
+ return err
+ }
+ if m.Child == nil {
+ dt.Parent = m
+ m.Child = dt
+ }
+ case "org.apache.plc4x.java.knxnetip.readwrite.ApduDataExtPropertyValueRead":
+ var dt *ApduDataExtPropertyValueRead
+ if m.Child != nil {
+ dt = m.Child.(*ApduDataExtPropertyValueRead)
+ }
+ if err := d.DecodeElement(&dt, &tok); err != nil {
+ return err
+ }
+ if m.Child == nil {
+ dt.Parent = m
+ m.Child = dt
+ }
+ case "org.apache.plc4x.java.knxnetip.readwrite.ApduDataExtPropertyValueResponse":
+ var dt *ApduDataExtPropertyValueResponse
+ if m.Child != nil {
+ dt = m.Child.(*ApduDataExtPropertyValueResponse)
+ }
+ if err := d.DecodeElement(&dt, &tok); err != nil {
+ return err
+ }
+ if m.Child == nil {
+ dt.Parent = m
+ m.Child = dt
+ }
+ case "org.apache.plc4x.java.knxnetip.readwrite.ApduDataExtPropertyValueWrite":
+ var dt *ApduDataExtPropertyValueWrite
+ if m.Child != nil {
+ dt = m.Child.(*ApduDataExtPropertyValueWrite)
+ }
+ if err := d.DecodeElement(&dt, &tok); err != nil {
+ return err
+ }
+ if m.Child == nil {
+ dt.Parent = m
+ m.Child = dt
+ }
+ case "org.apache.plc4x.java.knxnetip.readwrite.ApduDataExtPropertyDescriptionRead":
+ var dt *ApduDataExtPropertyDescriptionRead
+ if m.Child != nil {
+ dt = m.Child.(*ApduDataExtPropertyDescriptionRead)
+ }
+ if err := d.DecodeElement(&dt, &tok); err != nil {
+ return err
+ }
+ if m.Child == nil {
+ dt.Parent = m
+ m.Child = dt
+ }
+ case "org.apache.plc4x.java.knxnetip.readwrite.ApduDataExtPropertyDescriptionResponse":
+ var dt *ApduDataExtPropertyDescriptionResponse
+ if m.Child != nil {
+ dt = m.Child.(*ApduDataExtPropertyDescriptionResponse)
+ }
+ if err := d.DecodeElement(&dt, &tok); err != nil {
+ return err
+ }
+ if m.Child == nil {
+ dt.Parent = m
+ m.Child = dt
+ }
+ case "org.apache.plc4x.java.knxnetip.readwrite.ApduDataExtNetworkParameterRead":
+ var dt *ApduDataExtNetworkParameterRead
+ if m.Child != nil {
+ dt = m.Child.(*ApduDataExtNetworkParameterRead)
+ }
+ if err := d.DecodeElement(&dt, &tok); err != nil {
+ return err
+ }
+ if m.Child == nil {
+ dt.Parent = m
+ m.Child = dt
+ }
+ case "org.apache.plc4x.java.knxnetip.readwrite.ApduDataExtNetworkParameterResponse":
+ var dt *ApduDataExtNetworkParameterResponse
+ if m.Child != nil {
+ dt = m.Child.(*ApduDataExtNetworkParameterResponse)
+ }
+ if err := d.DecodeElement(&dt, &tok); err != nil {
+ return err
+ }
+ if m.Child == nil {
+ dt.Parent = m
+ m.Child = dt
+ }
+ case "org.apache.plc4x.java.knxnetip.readwrite.ApduDataExtIndividualAddressSerialNumberRead":
+ var dt *ApduDataExtIndividualAddressSerialNumberRead
+ if m.Child != nil {
+ dt = m.Child.(*ApduDataExtIndividualAddressSerialNumberRead)
+ }
+ if err := d.DecodeElement(&dt, &tok); err != nil {
+ return err
+ }
+ if m.Child == nil {
+ dt.Parent = m
+ m.Child = dt
+ }
+ case "org.apache.plc4x.java.knxnetip.readwrite.ApduDataExtIndividualAddressSerialNumberResponse":
+ var dt *ApduDataExtIndividualAddressSerialNumberResponse
+ if m.Child != nil {
+ dt = m.Child.(*ApduDataExtIndividualAddressSerialNumberResponse)
+ }
+ if err := d.DecodeElement(&dt, &tok); err != nil {
+ return err
+ }
+ if m.Child == nil {
+ dt.Parent = m
+ m.Child = dt
+ }
+ case "org.apache.plc4x.java.knxnetip.readwrite.ApduDataExtIndividualAddressSerialNumberWrite":
+ var dt *ApduDataExtIndividualAddressSerialNumberWrite
+ if m.Child != nil {
+ dt = m.Child.(*ApduDataExtIndividualAddressSerialNumberWrite)
+ }
+ if err := d.DecodeElement(&dt, &tok); err != nil {
+ return err
+ }
+ if m.Child == nil {
+ dt.Parent = m
+ m.Child = dt
+ }
+ case "org.apache.plc4x.java.knxnetip.readwrite.ApduDataExtDomainAddressWrite":
+ var dt *ApduDataExtDomainAddressWrite
+ if m.Child != nil {
+ dt = m.Child.(*ApduDataExtDomainAddressWrite)
+ }
+ if err := d.DecodeElement(&dt, &tok); err != nil {
+ return err
+ }
+ if m.Child == nil {
+ dt.Parent = m
+ m.Child = dt
+ }
+ case "org.apache.plc4x.java.knxnetip.readwrite.ApduDataExtDomainAddressRead":
+ var dt *ApduDataExtDomainAddressRead
+ if m.Child != nil {
+ dt = m.Child.(*ApduDataExtDomainAddressRead)
+ }
+ if err := d.DecodeElement(&dt, &tok); err != nil {
+ return err
+ }
+ if m.Child == nil {
+ dt.Parent = m
+ m.Child = dt
+ }
+ case "org.apache.plc4x.java.knxnetip.readwrite.ApduDataExtDomainAddressResponse":
+ var dt *ApduDataExtDomainAddressResponse
+ if m.Child != nil {
+ dt = m.Child.(*ApduDataExtDomainAddressResponse)
+ }
+ if err := d.DecodeElement(&dt, &tok); err != nil {
+ return err
+ }
+ if m.Child == nil {
+ dt.Parent = m
+ m.Child = dt
+ }
+ case "org.apache.plc4x.java.knxnetip.readwrite.ApduDataExtDomainAddressSelectiveRead":
+ var dt *ApduDataExtDomainAddressSelectiveRead
+ if m.Child != nil {
+ dt = m.Child.(*ApduDataExtDomainAddressSelectiveRead)
+ }
+ if err := d.DecodeElement(&dt, &tok); err != nil {
+ return err
+ }
+ if m.Child == nil {
+ dt.Parent = m
+ m.Child = dt
+ }
+ case "org.apache.plc4x.java.knxnetip.readwrite.ApduDataExtNetworkParameterWrite":
+ var dt *ApduDataExtNetworkParameterWrite
+ if m.Child != nil {
+ dt = m.Child.(*ApduDataExtNetworkParameterWrite)
+ }
+ if err := d.DecodeElement(&dt, &tok); err != nil {
+ return err
+ }
+ if m.Child == nil {
+ dt.Parent = m
+ m.Child = dt
+ }
+ case "org.apache.plc4x.java.knxnetip.readwrite.ApduDataExtLinkRead":
+ var dt *ApduDataExtLinkRead
+ if m.Child != nil {
+ dt = m.Child.(*ApduDataExtLinkRead)
+ }
+ if err := d.DecodeElement(&dt, &tok); err != nil {
+ return err
+ }
+ if m.Child == nil {
+ dt.Parent = m
+ m.Child = dt
+ }
+ case "org.apache.plc4x.java.knxnetip.readwrite.ApduDataExtLinkResponse":
+ var dt *ApduDataExtLinkResponse
+ if m.Child != nil {
+ dt = m.Child.(*ApduDataExtLinkResponse)
+ }
+ if err := d.DecodeElement(&dt, &tok); err != nil {
+ return err
+ }
+ if m.Child == nil {
+ dt.Parent = m
+ m.Child = dt
+ }
+ case "org.apache.plc4x.java.knxnetip.readwrite.ApduDataExtLinkWrite":
+ var dt *ApduDataExtLinkWrite
+ if m.Child != nil {
+ dt = m.Child.(*ApduDataExtLinkWrite)
+ }
+ if err := d.DecodeElement(&dt, &tok); err != nil {
+ return err
+ }
+ if m.Child == nil {
+ dt.Parent = m
+ m.Child = dt
+ }
+ case "org.apache.plc4x.java.knxnetip.readwrite.ApduDataExtGroupPropertyValueRead":
+ var dt *ApduDataExtGroupPropertyValueRead
+ if m.Child != nil {
+ dt = m.Child.(*ApduDataExtGroupPropertyValueRead)
+ }
+ if err := d.DecodeElement(&dt, &tok); err != nil {
+ return err
+ }
+ if m.Child == nil {
+ dt.Parent = m
+ m.Child = dt
+ }
+ case "org.apache.plc4x.java.knxnetip.readwrite.ApduDataExtGroupPropertyValueResponse":
+ var dt *ApduDataExtGroupPropertyValueResponse
+ if m.Child != nil {
+ dt = m.Child.(*ApduDataExtGroupPropertyValueResponse)
+ }
+ if err := d.DecodeElement(&dt, &tok); err != nil {
+ return err
+ }
+ if m.Child == nil {
+ dt.Parent = m
+ m.Child = dt
+ }
+ case "org.apache.plc4x.java.knxnetip.readwrite.ApduDataExtGroupPropertyValueWrite":
+ var dt *ApduDataExtGroupPropertyValueWrite
+ if m.Child != nil {
+ dt = m.Child.(*ApduDataExtGroupPropertyValueWrite)
+ }
+ if err := d.DecodeElement(&dt, &tok); err != nil {
+ return err
+ }
+ if m.Child == nil {
+ dt.Parent = m
+ m.Child = dt
+ }
+ case "org.apache.plc4x.java.knxnetip.readwrite.ApduDataExtGroupPropertyValueInfoReport":
+ var dt *ApduDataExtGroupPropertyValueInfoReport
+ if m.Child != nil {
+ dt = m.Child.(*ApduDataExtGroupPropertyValueInfoReport)
+ }
+ if err := d.DecodeElement(&dt, &tok); err != nil {
+ return err
+ }
+ if m.Child == nil {
+ dt.Parent = m
+ m.Child = dt
+ }
+ case "org.apache.plc4x.java.knxnetip.readwrite.ApduDataExtDomainAddressSerialNumberRead":
+ var dt *ApduDataExtDomainAddressSerialNumberRead
+ if m.Child != nil {
+ dt = m.Child.(*ApduDataExtDomainAddressSerialNumberRead)
+ }
+ if err := d.DecodeElement(&dt, &tok); err != nil {
+ return err
+ }
+ if m.Child == nil {
+ dt.Parent = m
+ m.Child = dt
+ }
+ case "org.apache.plc4x.java.knxnetip.readwrite.ApduDataExtDomainAddressSerialNumberResponse":
+ var dt *ApduDataExtDomainAddressSerialNumberResponse
+ if m.Child != nil {
+ dt = m.Child.(*ApduDataExtDomainAddressSerialNumberResponse)
+ }
+ if err := d.DecodeElement(&dt, &tok); err != nil {
+ return err
+ }
+ if m.Child == nil {
+ dt.Parent = m
+ m.Child = dt
+ }
+ case "org.apache.plc4x.java.knxnetip.readwrite.ApduDataExtDomainAddressSerialNumberWrite":
+ var dt *ApduDataExtDomainAddressSerialNumberWrite
+ if m.Child != nil {
+ dt = m.Child.(*ApduDataExtDomainAddressSerialNumberWrite)
+ }
+ if err := d.DecodeElement(&dt, &tok); err != nil {
+ return err
+ }
+ if m.Child == nil {
+ dt.Parent = m
+ m.Child = dt
+ }
+ case "org.apache.plc4x.java.knxnetip.readwrite.ApduDataExtFileStreamInfoReport":
+ var dt *ApduDataExtFileStreamInfoReport
+ if m.Child != nil {
+ dt = m.Child.(*ApduDataExtFileStreamInfoReport)
+ }
+ if err := d.DecodeElement(&dt, &tok); err != nil {
+ return err
+ }
+ if m.Child == nil {
+ dt.Parent = m
+ m.Child = dt
+ }
+ }
+ }
+ }
+ }
+}
+
+func (m *ApduDataExt) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
+ className := reflect.TypeOf(m.Child).String()
+ className = "org.apache.plc4x.java.knxnetip.readwrite." + className[strings.LastIndex(className, ".") + 1:]
+ if err := e.EncodeToken(xml.StartElement{Name: start.Name, Attr: []xml.Attr{
+ {Name: xml.Name{Local: "className"}, Value: className},
+ }}); err != nil {
+ return err
+ }
+ marshaller, ok := m.Child.(xml.Marshaler)
+ if !ok {
+ return errors.New("child is not castable to Marshaler")
+ }
+ marshaller.MarshalXML(e, start)
+ if err := e.EncodeToken(xml.EndElement{Name: start.Name}); err != nil {
+ return err
+ }
+ return nil
+}
+
diff --git a/plc4go/internal/plc4go/knxnetip/readwrite/model/LDataFrameAck.go b/plc4go/internal/plc4go/knxnetip/readwrite/model/ApduDataExtAuthorizeRequest.go
similarity index 55%
copy from plc4go/internal/plc4go/knxnetip/readwrite/model/LDataFrameAck.go
copy to plc4go/internal/plc4go/knxnetip/readwrite/model/ApduDataExtAuthorizeRequest.go
index 1bd9767..faef9a0 100644
--- a/plc4go/internal/plc4go/knxnetip/readwrite/model/LDataFrameAck.go
+++ b/plc4go/internal/plc4go/knxnetip/readwrite/model/ApduDataExtAuthorizeRequest.go
@@ -25,13 +25,13 @@ import (
)
// The data-structure of this message
-type LDataFrameAck struct {
- Parent *LDataFrame
- ILDataFrameAck
+type ApduDataExtAuthorizeRequest struct {
+ Parent *ApduDataExt
+ IApduDataExtAuthorizeRequest
}
// The corresponding interface
-type ILDataFrameAck interface {
+type IApduDataExtAuthorizeRequest interface {
LengthInBytes() uint16
LengthInBits() uint16
Serialize(io utils.WriteBuffer) error
@@ -41,78 +41,66 @@ type ILDataFrameAck interface {
///////////////////////////////////////////////////////////
// Accessors for discriminator values.
///////////////////////////////////////////////////////////
-func (m *LDataFrameAck) NotAckFrame() bool {
- return false
-}
-
-func (m *LDataFrameAck) ExtendedFrame() bool {
- return false
-}
-
-func (m *LDataFrameAck) Polling() bool {
- return false
+func (m *ApduDataExtAuthorizeRequest) ExtApciType() uint8 {
+ return 0x11
}
-func (m *LDataFrameAck) InitializeParent(parent *LDataFrame, repeated bool, priority CEMIPriority, acknowledgeRequested bool, errorFlag bool) {
- m.Parent.Repeated = repeated
- m.Parent.Priority = priority
- m.Parent.AcknowledgeRequested = acknowledgeRequested
- m.Parent.ErrorFlag = errorFlag
+func (m *ApduDataExtAuthorizeRequest) InitializeParent(parent *ApduDataExt) {
}
-func NewLDataFrameAck(repeated bool, priority CEMIPriority, acknowledgeRequested bool, errorFlag bool) *LDataFrame {
- child := &LDataFrameAck{
- Parent: NewLDataFrame(repeated, priority, acknowledgeRequested, errorFlag),
+func NewApduDataExtAuthorizeRequest() *ApduDataExt {
+ child := &ApduDataExtAuthorizeRequest{
+ Parent: NewApduDataExt(),
}
child.Parent.Child = child
return child.Parent
}
-func CastLDataFrameAck(structType interface{}) *LDataFrameAck {
- castFunc := func(typ interface{}) *LDataFrameAck {
- if casted, ok := typ.(LDataFrameAck); ok {
+func CastApduDataExtAuthorizeRequest(structType interface{}) *ApduDataExtAuthorizeRequest {
+ castFunc := func(typ interface{}) *ApduDataExtAuthorizeRequest {
+ if casted, ok := typ.(ApduDataExtAuthorizeRequest); ok {
return &casted
}
- if casted, ok := typ.(*LDataFrameAck); ok {
+ if casted, ok := typ.(*ApduDataExtAuthorizeRequest); ok {
return casted
}
- if casted, ok := typ.(LDataFrame); ok {
- return CastLDataFrameAck(casted.Child)
+ if casted, ok := typ.(ApduDataExt); ok {
+ return CastApduDataExtAuthorizeRequest(casted.Child)
}
- if casted, ok := typ.(*LDataFrame); ok {
- return CastLDataFrameAck(casted.Child)
+ if casted, ok := typ.(*ApduDataExt); ok {
+ return CastApduDataExtAuthorizeRequest(casted.Child)
}
return nil
}
return castFunc(structType)
}
-func (m *LDataFrameAck) GetTypeName() string {
- return "LDataFrameAck"
+func (m *ApduDataExtAuthorizeRequest) GetTypeName() string {
+ return "ApduDataExtAuthorizeRequest"
}
-func (m *LDataFrameAck) LengthInBits() uint16 {
+func (m *ApduDataExtAuthorizeRequest) LengthInBits() uint16 {
lengthInBits := uint16(0)
return lengthInBits
}
-func (m *LDataFrameAck) LengthInBytes() uint16 {
+func (m *ApduDataExtAuthorizeRequest) LengthInBytes() uint16 {
return m.LengthInBits() / 8
}
-func LDataFrameAckParse(io *utils.ReadBuffer) (*LDataFrame, error) {
+func ApduDataExtAuthorizeRequestParse(io *utils.ReadBuffer) (*ApduDataExt, error) {
// Create a partially initialized instance
- _child := &LDataFrameAck{
- Parent: &LDataFrame{},
+ _child := &ApduDataExtAuthorizeRequest{
+ Parent: &ApduDataExt{},
}
_child.Parent.Child = _child
return _child.Parent, nil
}
-func (m *LDataFrameAck) Serialize(io utils.WriteBuffer) error {
+func (m *ApduDataExtAuthorizeRequest) Serialize(io utils.WriteBuffer) error {
ser := func() error {
return nil
@@ -120,7 +108,7 @@ func (m *LDataFrameAck) Serialize(io utils.WriteBuffer) error {
return m.Parent.SerializeParent(io, m, ser)
}
-func (m *LDataFrameAck) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
+func (m *ApduDataExtAuthorizeRequest) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
var token xml.Token
var err error
token = start
@@ -141,7 +129,7 @@ func (m *LDataFrameAck) UnmarshalXML(d *xml.Decoder, start xml.StartElement) err
}
}
-func (m *LDataFrameAck) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
+func (m *ApduDataExtAuthorizeRequest) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
return nil
}
diff --git a/plc4go/internal/plc4go/knxnetip/readwrite/model/LDataFrameAck.go b/plc4go/internal/plc4go/knxnetip/readwrite/model/ApduDataExtAuthorizeResponse.go
similarity index 55%
copy from plc4go/internal/plc4go/knxnetip/readwrite/model/LDataFrameAck.go
copy to plc4go/internal/plc4go/knxnetip/readwrite/model/ApduDataExtAuthorizeResponse.go
index 1bd9767..c52de66 100644
--- a/plc4go/internal/plc4go/knxnetip/readwrite/model/LDataFrameAck.go
+++ b/plc4go/internal/plc4go/knxnetip/readwrite/model/ApduDataExtAuthorizeResponse.go
@@ -25,13 +25,13 @@ import (
)
// The data-structure of this message
-type LDataFrameAck struct {
- Parent *LDataFrame
- ILDataFrameAck
+type ApduDataExtAuthorizeResponse struct {
+ Parent *ApduDataExt
+ IApduDataExtAuthorizeResponse
}
// The corresponding interface
-type ILDataFrameAck interface {
+type IApduDataExtAuthorizeResponse interface {
LengthInBytes() uint16
LengthInBits() uint16
Serialize(io utils.WriteBuffer) error
@@ -41,78 +41,66 @@ type ILDataFrameAck interface {
///////////////////////////////////////////////////////////
// Accessors for discriminator values.
///////////////////////////////////////////////////////////
-func (m *LDataFrameAck) NotAckFrame() bool {
- return false
-}
-
-func (m *LDataFrameAck) ExtendedFrame() bool {
- return false
-}
-
-func (m *LDataFrameAck) Polling() bool {
- return false
+func (m *ApduDataExtAuthorizeResponse) ExtApciType() uint8 {
+ return 0x12
}
-func (m *LDataFrameAck) InitializeParent(parent *LDataFrame, repeated bool, priority CEMIPriority, acknowledgeRequested bool, errorFlag bool) {
- m.Parent.Repeated = repeated
- m.Parent.Priority = priority
- m.Parent.AcknowledgeRequested = acknowledgeRequested
- m.Parent.ErrorFlag = errorFlag
+func (m *ApduDataExtAuthorizeResponse) InitializeParent(parent *ApduDataExt) {
}
-func NewLDataFrameAck(repeated bool, priority CEMIPriority, acknowledgeRequested bool, errorFlag bool) *LDataFrame {
- child := &LDataFrameAck{
- Parent: NewLDataFrame(repeated, priority, acknowledgeRequested, errorFlag),
+func NewApduDataExtAuthorizeResponse() *ApduDataExt {
+ child := &ApduDataExtAuthorizeResponse{
+ Parent: NewApduDataExt(),
}
child.Parent.Child = child
return child.Parent
}
-func CastLDataFrameAck(structType interface{}) *LDataFrameAck {
- castFunc := func(typ interface{}) *LDataFrameAck {
- if casted, ok := typ.(LDataFrameAck); ok {
+func CastApduDataExtAuthorizeResponse(structType interface{}) *ApduDataExtAuthorizeResponse {
+ castFunc := func(typ interface{}) *ApduDataExtAuthorizeResponse {
+ if casted, ok := typ.(ApduDataExtAuthorizeResponse); ok {
return &casted
}
- if casted, ok := typ.(*LDataFrameAck); ok {
+ if casted, ok := typ.(*ApduDataExtAuthorizeResponse); ok {
return casted
}
- if casted, ok := typ.(LDataFrame); ok {
- return CastLDataFrameAck(casted.Child)
+ if casted, ok := typ.(ApduDataExt); ok {
+ return CastApduDataExtAuthorizeResponse(casted.Child)
}
- if casted, ok := typ.(*LDataFrame); ok {
- return CastLDataFrameAck(casted.Child)
+ if casted, ok := typ.(*ApduDataExt); ok {
+ return CastApduDataExtAuthorizeResponse(casted.Child)
}
return nil
}
return castFunc(structType)
}
-func (m *LDataFrameAck) GetTypeName() string {
- return "LDataFrameAck"
+func (m *ApduDataExtAuthorizeResponse) GetTypeName() string {
+ return "ApduDataExtAuthorizeResponse"
}
-func (m *LDataFrameAck) LengthInBits() uint16 {
+func (m *ApduDataExtAuthorizeResponse) LengthInBits() uint16 {
lengthInBits := uint16(0)
return lengthInBits
}
-func (m *LDataFrameAck) LengthInBytes() uint16 {
+func (m *ApduDataExtAuthorizeResponse) LengthInBytes() uint16 {
return m.LengthInBits() / 8
}
-func LDataFrameAckParse(io *utils.ReadBuffer) (*LDataFrame, error) {
+func ApduDataExtAuthorizeResponseParse(io *utils.ReadBuffer) (*ApduDataExt, error) {
// Create a partially initialized instance
- _child := &LDataFrameAck{
- Parent: &LDataFrame{},
+ _child := &ApduDataExtAuthorizeResponse{
+ Parent: &ApduDataExt{},
}
_child.Parent.Child = _child
return _child.Parent, nil
}
-func (m *LDataFrameAck) Serialize(io utils.WriteBuffer) error {
+func (m *ApduDataExtAuthorizeResponse) Serialize(io utils.WriteBuffer) error {
ser := func() error {
return nil
@@ -120,7 +108,7 @@ func (m *LDataFrameAck) Serialize(io utils.WriteBuffer) error {
return m.Parent.SerializeParent(io, m, ser)
}
-func (m *LDataFrameAck) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
+func (m *ApduDataExtAuthorizeResponse) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
var token xml.Token
var err error
token = start
@@ -141,7 +129,7 @@ func (m *LDataFrameAck) UnmarshalXML(d *xml.Decoder, start xml.StartElement) err
}
}
-func (m *LDataFrameAck) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
+func (m *ApduDataExtAuthorizeResponse) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
return nil
}
diff --git a/plc4go/internal/plc4go/knxnetip/readwrite/model/LDataFrameAck.go b/plc4go/internal/plc4go/knxnetip/readwrite/model/ApduDataExtDomainAddressRead.go
similarity index 55%
copy from plc4go/internal/plc4go/knxnetip/readwrite/model/LDataFrameAck.go
copy to plc4go/internal/plc4go/knxnetip/readwrite/model/ApduDataExtDomainAddressRead.go
index 1bd9767..f248dcf 100644
--- a/plc4go/internal/plc4go/knxnetip/readwrite/model/LDataFrameAck.go
+++ b/plc4go/internal/plc4go/knxnetip/readwrite/model/ApduDataExtDomainAddressRead.go
@@ -25,13 +25,13 @@ import (
)
// The data-structure of this message
-type LDataFrameAck struct {
- Parent *LDataFrame
- ILDataFrameAck
+type ApduDataExtDomainAddressRead struct {
+ Parent *ApduDataExt
+ IApduDataExtDomainAddressRead
}
// The corresponding interface
-type ILDataFrameAck interface {
+type IApduDataExtDomainAddressRead interface {
LengthInBytes() uint16
LengthInBits() uint16
Serialize(io utils.WriteBuffer) error
@@ -41,78 +41,66 @@ type ILDataFrameAck interface {
///////////////////////////////////////////////////////////
// Accessors for discriminator values.
///////////////////////////////////////////////////////////
-func (m *LDataFrameAck) NotAckFrame() bool {
- return false
-}
-
-func (m *LDataFrameAck) ExtendedFrame() bool {
- return false
-}
-
-func (m *LDataFrameAck) Polling() bool {
- return false
+func (m *ApduDataExtDomainAddressRead) ExtApciType() uint8 {
+ return 0x21
}
-func (m *LDataFrameAck) InitializeParent(parent *LDataFrame, repeated bool, priority CEMIPriority, acknowledgeRequested bool, errorFlag bool) {
- m.Parent.Repeated = repeated
- m.Parent.Priority = priority
- m.Parent.AcknowledgeRequested = acknowledgeRequested
- m.Parent.ErrorFlag = errorFlag
+func (m *ApduDataExtDomainAddressRead) InitializeParent(parent *ApduDataExt) {
}
-func NewLDataFrameAck(repeated bool, priority CEMIPriority, acknowledgeRequested bool, errorFlag bool) *LDataFrame {
- child := &LDataFrameAck{
- Parent: NewLDataFrame(repeated, priority, acknowledgeRequested, errorFlag),
+func NewApduDataExtDomainAddressRead() *ApduDataExt {
+ child := &ApduDataExtDomainAddressRead{
+ Parent: NewApduDataExt(),
}
child.Parent.Child = child
return child.Parent
}
-func CastLDataFrameAck(structType interface{}) *LDataFrameAck {
- castFunc := func(typ interface{}) *LDataFrameAck {
- if casted, ok := typ.(LDataFrameAck); ok {
+func CastApduDataExtDomainAddressRead(structType interface{}) *ApduDataExtDomainAddressRead {
+ castFunc := func(typ interface{}) *ApduDataExtDomainAddressRead {
+ if casted, ok := typ.(ApduDataExtDomainAddressRead); ok {
return &casted
}
- if casted, ok := typ.(*LDataFrameAck); ok {
+ if casted, ok := typ.(*ApduDataExtDomainAddressRead); ok {
return casted
}
- if casted, ok := typ.(LDataFrame); ok {
- return CastLDataFrameAck(casted.Child)
+ if casted, ok := typ.(ApduDataExt); ok {
+ return CastApduDataExtDomainAddressRead(casted.Child)
}
- if casted, ok := typ.(*LDataFrame); ok {
- return CastLDataFrameAck(casted.Child)
+ if casted, ok := typ.(*ApduDataExt); ok {
+ return CastApduDataExtDomainAddressRead(casted.Child)
}
return nil
}
return castFunc(structType)
}
-func (m *LDataFrameAck) GetTypeName() string {
- return "LDataFrameAck"
+func (m *ApduDataExtDomainAddressRead) GetTypeName() string {
+ return "ApduDataExtDomainAddressRead"
}
-func (m *LDataFrameAck) LengthInBits() uint16 {
+func (m *ApduDataExtDomainAddressRead) LengthInBits() uint16 {
lengthInBits := uint16(0)
return lengthInBits
}
-func (m *LDataFrameAck) LengthInBytes() uint16 {
+func (m *ApduDataExtDomainAddressRead) LengthInBytes() uint16 {
return m.LengthInBits() / 8
}
-func LDataFrameAckParse(io *utils.ReadBuffer) (*LDataFrame, error) {
+func ApduDataExtDomainAddressReadParse(io *utils.ReadBuffer) (*ApduDataExt, error) {
// Create a partially initialized instance
- _child := &LDataFrameAck{
- Parent: &LDataFrame{},
+ _child := &ApduDataExtDomainAddressRead{
+ Parent: &ApduDataExt{},
}
_child.Parent.Child = _child
return _child.Parent, nil
}
-func (m *LDataFrameAck) Serialize(io utils.WriteBuffer) error {
+func (m *ApduDataExtDomainAddressRead) Serialize(io utils.WriteBuffer) error {
ser := func() error {
return nil
@@ -120,7 +108,7 @@ func (m *LDataFrameAck) Serialize(io utils.WriteBuffer) error {
return m.Parent.SerializeParent(io, m, ser)
}
-func (m *LDataFrameAck) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
+func (m *ApduDataExtDomainAddressRead) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
var token xml.Token
var err error
token = start
@@ -141,7 +129,7 @@ func (m *LDataFrameAck) UnmarshalXML(d *xml.Decoder, start xml.StartElement) err
}
}
-func (m *LDataFrameAck) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
+func (m *ApduDataExtDomainAddressRead) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
return nil
}
diff --git a/plc4go/internal/plc4go/knxnetip/readwrite/model/LDataFrameAck.go b/plc4go/internal/plc4go/knxnetip/readwrite/model/ApduDataExtDomainAddressResponse.go
similarity index 55%
copy from plc4go/internal/plc4go/knxnetip/readwrite/model/LDataFrameAck.go
copy to plc4go/internal/plc4go/knxnetip/readwrite/model/ApduDataExtDomainAddressResponse.go
index 1bd9767..4357fd8 100644
--- a/plc4go/internal/plc4go/knxnetip/readwrite/model/LDataFrameAck.go
+++ b/plc4go/internal/plc4go/knxnetip/readwrite/model/ApduDataExtDomainAddressResponse.go
@@ -25,13 +25,13 @@ import (
)
// The data-structure of this message
-type LDataFrameAck struct {
- Parent *LDataFrame
- ILDataFrameAck
+type ApduDataExtDomainAddressResponse struct {
+ Parent *ApduDataExt
+ IApduDataExtDomainAddressResponse
}
// The corresponding interface
-type ILDataFrameAck interface {
+type IApduDataExtDomainAddressResponse interface {
LengthInBytes() uint16
LengthInBits() uint16
Serialize(io utils.WriteBuffer) error
@@ -41,78 +41,66 @@ type ILDataFrameAck interface {
///////////////////////////////////////////////////////////
// Accessors for discriminator values.
///////////////////////////////////////////////////////////
-func (m *LDataFrameAck) NotAckFrame() bool {
- return false
-}
-
-func (m *LDataFrameAck) ExtendedFrame() bool {
- return false
-}
-
-func (m *LDataFrameAck) Polling() bool {
- return false
+func (m *ApduDataExtDomainAddressResponse) ExtApciType() uint8 {
+ return 0x22
}
-func (m *LDataFrameAck) InitializeParent(parent *LDataFrame, repeated bool, priority CEMIPriority, acknowledgeRequested bool, errorFlag bool) {
- m.Parent.Repeated = repeated
- m.Parent.Priority = priority
- m.Parent.AcknowledgeRequested = acknowledgeRequested
- m.Parent.ErrorFlag = errorFlag
+func (m *ApduDataExtDomainAddressResponse) InitializeParent(parent *ApduDataExt) {
}
-func NewLDataFrameAck(repeated bool, priority CEMIPriority, acknowledgeRequested bool, errorFlag bool) *LDataFrame {
- child := &LDataFrameAck{
- Parent: NewLDataFrame(repeated, priority, acknowledgeRequested, errorFlag),
+func NewApduDataExtDomainAddressResponse() *ApduDataExt {
+ child := &ApduDataExtDomainAddressResponse{
+ Parent: NewApduDataExt(),
}
child.Parent.Child = child
return child.Parent
}
-func CastLDataFrameAck(structType interface{}) *LDataFrameAck {
- castFunc := func(typ interface{}) *LDataFrameAck {
- if casted, ok := typ.(LDataFrameAck); ok {
+func CastApduDataExtDomainAddressResponse(structType interface{}) *ApduDataExtDomainAddressResponse {
+ castFunc := func(typ interface{}) *ApduDataExtDomainAddressResponse {
+ if casted, ok := typ.(ApduDataExtDomainAddressResponse); ok {
return &casted
}
- if casted, ok := typ.(*LDataFrameAck); ok {
+ if casted, ok := typ.(*ApduDataExtDomainAddressResponse); ok {
return casted
}
- if casted, ok := typ.(LDataFrame); ok {
- return CastLDataFrameAck(casted.Child)
+ if casted, ok := typ.(ApduDataExt); ok {
+ return CastApduDataExtDomainAddressResponse(casted.Child)
}
- if casted, ok := typ.(*LDataFrame); ok {
- return CastLDataFrameAck(casted.Child)
+ if casted, ok := typ.(*ApduDataExt); ok {
+ return CastApduDataExtDomainAddressResponse(casted.Child)
}
return nil
}
return castFunc(structType)
}
-func (m *LDataFrameAck) GetTypeName() string {
- return "LDataFrameAck"
+func (m *ApduDataExtDomainAddressResponse) GetTypeName() string {
+ return "ApduDataExtDomainAddressResponse"
}
-func (m *LDataFrameAck) LengthInBits() uint16 {
+func (m *ApduDataExtDomainAddressResponse) LengthInBits() uint16 {
lengthInBits := uint16(0)
return lengthInBits
}
-func (m *LDataFrameAck) LengthInBytes() uint16 {
+func (m *ApduDataExtDomainAddressResponse) LengthInBytes() uint16 {
return m.LengthInBits() / 8
}
-func LDataFrameAckParse(io *utils.ReadBuffer) (*LDataFrame, error) {
+func ApduDataExtDomainAddressResponseParse(io *utils.ReadBuffer) (*ApduDataExt, error) {
// Create a partially initialized instance
- _child := &LDataFrameAck{
- Parent: &LDataFrame{},
+ _child := &ApduDataExtDomainAddressResponse{
+ Parent: &ApduDataExt{},
}
_child.Parent.Child = _child
return _child.Parent, nil
}
-func (m *LDataFrameAck) Serialize(io utils.WriteBuffer) error {
+func (m *ApduDataExtDomainAddressResponse) Serialize(io utils.WriteBuffer) error {
ser := func() error {
return nil
@@ -120,7 +108,7 @@ func (m *LDataFrameAck) Serialize(io utils.WriteBuffer) error {
return m.Parent.SerializeParent(io, m, ser)
}
-func (m *LDataFrameAck) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
+func (m *ApduDataExtDomainAddressResponse) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
var token xml.Token
var err error
token = start
@@ -141,7 +129,7 @@ func (m *LDataFrameAck) UnmarshalXML(d *xml.Decoder, start xml.StartElement) err
}
}
-func (m *LDataFrameAck) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
+func (m *ApduDataExtDomainAddressResponse) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
return nil
}
diff --git a/plc4go/internal/plc4go/knxnetip/readwrite/model/LDataFrameAck.go b/plc4go/internal/plc4go/knxnetip/readwrite/model/ApduDataExtDomainAddressSelectiveRead.go
similarity index 54%
copy from plc4go/internal/plc4go/knxnetip/readwrite/model/LDataFrameAck.go
copy to plc4go/internal/plc4go/knxnetip/readwrite/model/ApduDataExtDomainAddressSelectiveRead.go
index 1bd9767..5349217 100644
--- a/plc4go/internal/plc4go/knxnetip/readwrite/model/LDataFrameAck.go
+++ b/plc4go/internal/plc4go/knxnetip/readwrite/model/ApduDataExtDomainAddressSelectiveRead.go
@@ -25,13 +25,13 @@ import (
)
// The data-structure of this message
-type LDataFrameAck struct {
- Parent *LDataFrame
- ILDataFrameAck
+type ApduDataExtDomainAddressSelectiveRead struct {
+ Parent *ApduDataExt
+ IApduDataExtDomainAddressSelectiveRead
}
// The corresponding interface
-type ILDataFrameAck interface {
+type IApduDataExtDomainAddressSelectiveRead interface {
LengthInBytes() uint16
LengthInBits() uint16
Serialize(io utils.WriteBuffer) error
@@ -41,78 +41,66 @@ type ILDataFrameAck interface {
///////////////////////////////////////////////////////////
// Accessors for discriminator values.
///////////////////////////////////////////////////////////
-func (m *LDataFrameAck) NotAckFrame() bool {
- return false
-}
-
-func (m *LDataFrameAck) ExtendedFrame() bool {
- return false
-}
-
-func (m *LDataFrameAck) Polling() bool {
- return false
+func (m *ApduDataExtDomainAddressSelectiveRead) ExtApciType() uint8 {
+ return 0x23
}
-func (m *LDataFrameAck) InitializeParent(parent *LDataFrame, repeated bool, priority CEMIPriority, acknowledgeRequested bool, errorFlag bool) {
- m.Parent.Repeated = repeated
- m.Parent.Priority = priority
- m.Parent.AcknowledgeRequested = acknowledgeRequested
- m.Parent.ErrorFlag = errorFlag
+func (m *ApduDataExtDomainAddressSelectiveRead) InitializeParent(parent *ApduDataExt) {
}
-func NewLDataFrameAck(repeated bool, priority CEMIPriority, acknowledgeRequested bool, errorFlag bool) *LDataFrame {
- child := &LDataFrameAck{
- Parent: NewLDataFrame(repeated, priority, acknowledgeRequested, errorFlag),
+func NewApduDataExtDomainAddressSelectiveRead() *ApduDataExt {
+ child := &ApduDataExtDomainAddressSelectiveRead{
+ Parent: NewApduDataExt(),
}
child.Parent.Child = child
return child.Parent
}
-func CastLDataFrameAck(structType interface{}) *LDataFrameAck {
- castFunc := func(typ interface{}) *LDataFrameAck {
- if casted, ok := typ.(LDataFrameAck); ok {
+func CastApduDataExtDomainAddressSelectiveRead(structType interface{}) *ApduDataExtDomainAddressSelectiveRead {
+ castFunc := func(typ interface{}) *ApduDataExtDomainAddressSelectiveRead {
+ if casted, ok := typ.(ApduDataExtDomainAddressSelectiveRead); ok {
return &casted
}
- if casted, ok := typ.(*LDataFrameAck); ok {
+ if casted, ok := typ.(*ApduDataExtDomainAddressSelectiveRead); ok {
return casted
}
- if casted, ok := typ.(LDataFrame); ok {
- return CastLDataFrameAck(casted.Child)
+ if casted, ok := typ.(ApduDataExt); ok {
+ return CastApduDataExtDomainAddressSelectiveRead(casted.Child)
}
- if casted, ok := typ.(*LDataFrame); ok {
- return CastLDataFrameAck(casted.Child)
+ if casted, ok := typ.(*ApduDataExt); ok {
+ return CastApduDataExtDomainAddressSelectiveRead(casted.Child)
}
return nil
}
return castFunc(structType)
}
-func (m *LDataFrameAck) GetTypeName() string {
- return "LDataFrameAck"
+func (m *ApduDataExtDomainAddressSelectiveRead) GetTypeName() string {
+ return "ApduDataExtDomainAddressSelectiveRead"
}
-func (m *LDataFrameAck) LengthInBits() uint16 {
+func (m *ApduDataExtDomainAddressSelectiveRead) LengthInBits() uint16 {
lengthInBits := uint16(0)
return lengthInBits
}
-func (m *LDataFrameAck) LengthInBytes() uint16 {
+func (m *ApduDataExtDomainAddressSelectiveRead) LengthInBytes() uint16 {
return m.LengthInBits() / 8
}
-func LDataFrameAckParse(io *utils.ReadBuffer) (*LDataFrame, error) {
+func ApduDataExtDomainAddressSelectiveReadParse(io *utils.ReadBuffer) (*ApduDataExt, error) {
// Create a partially initialized instance
- _child := &LDataFrameAck{
- Parent: &LDataFrame{},
+ _child := &ApduDataExtDomainAddressSelectiveRead{
+ Parent: &ApduDataExt{},
}
_child.Parent.Child = _child
return _child.Parent, nil
}
-func (m *LDataFrameAck) Serialize(io utils.WriteBuffer) error {
+func (m *ApduDataExtDomainAddressSelectiveRead) Serialize(io utils.WriteBuffer) error {
ser := func() error {
return nil
@@ -120,7 +108,7 @@ func (m *LDataFrameAck) Serialize(io utils.WriteBuffer) error {
return m.Parent.SerializeParent(io, m, ser)
}
-func (m *LDataFrameAck) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
+func (m *ApduDataExtDomainAddressSelectiveRead) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
var token xml.Token
var err error
token = start
@@ -141,7 +129,7 @@ func (m *LDataFrameAck) UnmarshalXML(d *xml.Decoder, start xml.StartElement) err
}
}
-func (m *LDataFrameAck) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
+func (m *ApduDataExtDomainAddressSelectiveRead) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
return nil
}
diff --git a/plc4go/internal/plc4go/knxnetip/readwrite/model/LDataFrameAck.go b/plc4go/internal/plc4go/knxnetip/readwrite/model/ApduDataExtDomainAddressSerialNumberRead.go
similarity index 53%
copy from plc4go/internal/plc4go/knxnetip/readwrite/model/LDataFrameAck.go
copy to plc4go/internal/plc4go/knxnetip/readwrite/model/ApduDataExtDomainAddressSerialNumberRead.go
index 1bd9767..e3e3e8a 100644
--- a/plc4go/internal/plc4go/knxnetip/readwrite/model/LDataFrameAck.go
+++ b/plc4go/internal/plc4go/knxnetip/readwrite/model/ApduDataExtDomainAddressSerialNumberRead.go
@@ -25,13 +25,13 @@ import (
)
// The data-structure of this message
-type LDataFrameAck struct {
- Parent *LDataFrame
- ILDataFrameAck
+type ApduDataExtDomainAddressSerialNumberRead struct {
+ Parent *ApduDataExt
+ IApduDataExtDomainAddressSerialNumberRead
}
// The corresponding interface
-type ILDataFrameAck interface {
+type IApduDataExtDomainAddressSerialNumberRead interface {
LengthInBytes() uint16
LengthInBits() uint16
Serialize(io utils.WriteBuffer) error
@@ -41,78 +41,66 @@ type ILDataFrameAck interface {
///////////////////////////////////////////////////////////
// Accessors for discriminator values.
///////////////////////////////////////////////////////////
-func (m *LDataFrameAck) NotAckFrame() bool {
- return false
-}
-
-func (m *LDataFrameAck) ExtendedFrame() bool {
- return false
-}
-
-func (m *LDataFrameAck) Polling() bool {
- return false
+func (m *ApduDataExtDomainAddressSerialNumberRead) ExtApciType() uint8 {
+ return 0x2C
}
-func (m *LDataFrameAck) InitializeParent(parent *LDataFrame, repeated bool, priority CEMIPriority, acknowledgeRequested bool, errorFlag bool) {
- m.Parent.Repeated = repeated
- m.Parent.Priority = priority
- m.Parent.AcknowledgeRequested = acknowledgeRequested
- m.Parent.ErrorFlag = errorFlag
+func (m *ApduDataExtDomainAddressSerialNumberRead) InitializeParent(parent *ApduDataExt) {
}
-func NewLDataFrameAck(repeated bool, priority CEMIPriority, acknowledgeRequested bool, errorFlag bool) *LDataFrame {
- child := &LDataFrameAck{
- Parent: NewLDataFrame(repeated, priority, acknowledgeRequested, errorFlag),
+func NewApduDataExtDomainAddressSerialNumberRead() *ApduDataExt {
+ child := &ApduDataExtDomainAddressSerialNumberRead{
+ Parent: NewApduDataExt(),
}
child.Parent.Child = child
return child.Parent
}
-func CastLDataFrameAck(structType interface{}) *LDataFrameAck {
- castFunc := func(typ interface{}) *LDataFrameAck {
- if casted, ok := typ.(LDataFrameAck); ok {
+func CastApduDataExtDomainAddressSerialNumberRead(structType interface{}) *ApduDataExtDomainAddressSerialNumberRead {
+ castFunc := func(typ interface{}) *ApduDataExtDomainAddressSerialNumberRead {
+ if casted, ok := typ.(ApduDataExtDomainAddressSerialNumberRead); ok {
return &casted
}
- if casted, ok := typ.(*LDataFrameAck); ok {
+ if casted, ok := typ.(*ApduDataExtDomainAddressSerialNumberRead); ok {
return casted
}
- if casted, ok := typ.(LDataFrame); ok {
- return CastLDataFrameAck(casted.Child)
+ if casted, ok := typ.(ApduDataExt); ok {
+ return CastApduDataExtDomainAddressSerialNumberRead(casted.Child)
}
- if casted, ok := typ.(*LDataFrame); ok {
- return CastLDataFrameAck(casted.Child)
+ if casted, ok := typ.(*ApduDataExt); ok {
+ return CastApduDataExtDomainAddressSerialNumberRead(casted.Child)
}
return nil
}
return castFunc(structType)
}
-func (m *LDataFrameAck) GetTypeName() string {
- return "LDataFrameAck"
+func (m *ApduDataExtDomainAddressSerialNumberRead) GetTypeName() string {
+ return "ApduDataExtDomainAddressSerialNumberRead"
}
-func (m *LDataFrameAck) LengthInBits() uint16 {
+func (m *ApduDataExtDomainAddressSerialNumberRead) LengthInBits() uint16 {
lengthInBits := uint16(0)
return lengthInBits
}
-func (m *LDataFrameAck) LengthInBytes() uint16 {
+func (m *ApduDataExtDomainAddressSerialNumberRead) LengthInBytes() uint16 {
return m.LengthInBits() / 8
}
-func LDataFrameAckParse(io *utils.ReadBuffer) (*LDataFrame, error) {
+func ApduDataExtDomainAddressSerialNumberReadParse(io *utils.ReadBuffer) (*ApduDataExt, error) {
// Create a partially initialized instance
- _child := &LDataFrameAck{
- Parent: &LDataFrame{},
+ _child := &ApduDataExtDomainAddressSerialNumberRead{
+ Parent: &ApduDataExt{},
}
_child.Parent.Child = _child
return _child.Parent, nil
}
-func (m *LDataFrameAck) Serialize(io utils.WriteBuffer) error {
+func (m *ApduDataExtDomainAddressSerialNumberRead) Serialize(io utils.WriteBuffer) error {
ser := func() error {
return nil
@@ -120,7 +108,7 @@ func (m *LDataFrameAck) Serialize(io utils.WriteBuffer) error {
return m.Parent.SerializeParent(io, m, ser)
}
-func (m *LDataFrameAck) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
+func (m *ApduDataExtDomainAddressSerialNumberRead) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
var token xml.Token
var err error
token = start
@@ -141,7 +129,7 @@ func (m *LDataFrameAck) UnmarshalXML(d *xml.Decoder, start xml.StartElement) err
}
}
-func (m *LDataFrameAck) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
+func (m *ApduDataExtDomainAddressSerialNumberRead) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
return nil
}
diff --git a/plc4go/internal/plc4go/knxnetip/readwrite/model/LDataFrameAck.go b/plc4go/internal/plc4go/knxnetip/readwrite/model/ApduDataExtDomainAddressSerialNumberResponse.go
similarity index 52%
copy from plc4go/internal/plc4go/knxnetip/readwrite/model/LDataFrameAck.go
copy to plc4go/internal/plc4go/knxnetip/readwrite/model/ApduDataExtDomainAddressSerialNumberResponse.go
index 1bd9767..b8b14a5 100644
--- a/plc4go/internal/plc4go/knxnetip/readwrite/model/LDataFrameAck.go
+++ b/plc4go/internal/plc4go/knxnetip/readwrite/model/ApduDataExtDomainAddressSerialNumberResponse.go
@@ -25,13 +25,13 @@ import (
)
// The data-structure of this message
-type LDataFrameAck struct {
- Parent *LDataFrame
- ILDataFrameAck
+type ApduDataExtDomainAddressSerialNumberResponse struct {
+ Parent *ApduDataExt
+ IApduDataExtDomainAddressSerialNumberResponse
}
// The corresponding interface
-type ILDataFrameAck interface {
+type IApduDataExtDomainAddressSerialNumberResponse interface {
LengthInBytes() uint16
LengthInBits() uint16
Serialize(io utils.WriteBuffer) error
@@ -41,78 +41,66 @@ type ILDataFrameAck interface {
///////////////////////////////////////////////////////////
// Accessors for discriminator values.
///////////////////////////////////////////////////////////
-func (m *LDataFrameAck) NotAckFrame() bool {
- return false
-}
-
-func (m *LDataFrameAck) ExtendedFrame() bool {
- return false
-}
-
-func (m *LDataFrameAck) Polling() bool {
- return false
+func (m *ApduDataExtDomainAddressSerialNumberResponse) ExtApciType() uint8 {
+ return 0x2D
}
-func (m *LDataFrameAck) InitializeParent(parent *LDataFrame, repeated bool, priority CEMIPriority, acknowledgeRequested bool, errorFlag bool) {
- m.Parent.Repeated = repeated
- m.Parent.Priority = priority
- m.Parent.AcknowledgeRequested = acknowledgeRequested
- m.Parent.ErrorFlag = errorFlag
+func (m *ApduDataExtDomainAddressSerialNumberResponse) InitializeParent(parent *ApduDataExt) {
}
-func NewLDataFrameAck(repeated bool, priority CEMIPriority, acknowledgeRequested bool, errorFlag bool) *LDataFrame {
- child := &LDataFrameAck{
- Parent: NewLDataFrame(repeated, priority, acknowledgeRequested, errorFlag),
+func NewApduDataExtDomainAddressSerialNumberResponse() *ApduDataExt {
+ child := &ApduDataExtDomainAddressSerialNumberResponse{
+ Parent: NewApduDataExt(),
}
child.Parent.Child = child
return child.Parent
}
-func CastLDataFrameAck(structType interface{}) *LDataFrameAck {
- castFunc := func(typ interface{}) *LDataFrameAck {
- if casted, ok := typ.(LDataFrameAck); ok {
+func CastApduDataExtDomainAddressSerialNumberResponse(structType interface{}) *ApduDataExtDomainAddressSerialNumberResponse {
+ castFunc := func(typ interface{}) *ApduDataExtDomainAddressSerialNumberResponse {
+ if casted, ok := typ.(ApduDataExtDomainAddressSerialNumberResponse); ok {
return &casted
}
- if casted, ok := typ.(*LDataFrameAck); ok {
+ if casted, ok := typ.(*ApduDataExtDomainAddressSerialNumberResponse); ok {
return casted
}
- if casted, ok := typ.(LDataFrame); ok {
- return CastLDataFrameAck(casted.Child)
+ if casted, ok := typ.(ApduDataExt); ok {
+ return CastApduDataExtDomainAddressSerialNumberResponse(casted.Child)
}
- if casted, ok := typ.(*LDataFrame); ok {
- return CastLDataFrameAck(casted.Child)
+ if casted, ok := typ.(*ApduDataExt); ok {
+ return CastApduDataExtDomainAddressSerialNumberResponse(casted.Child)
}
return nil
}
return castFunc(structType)
}
-func (m *LDataFrameAck) GetTypeName() string {
- return "LDataFrameAck"
+func (m *ApduDataExtDomainAddressSerialNumberResponse) GetTypeName() string {
+ return "ApduDataExtDomainAddressSerialNumberResponse"
}
-func (m *LDataFrameAck) LengthInBits() uint16 {
+func (m *ApduDataExtDomainAddressSerialNumberResponse) LengthInBits() uint16 {
lengthInBits := uint16(0)
return lengthInBits
}
-func (m *LDataFrameAck) LengthInBytes() uint16 {
+func (m *ApduDataExtDomainAddressSerialNumberResponse) LengthInBytes() uint16 {
return m.LengthInBits() / 8
}
-func LDataFrameAckParse(io *utils.ReadBuffer) (*LDataFrame, error) {
+func ApduDataExtDomainAddressSerialNumberResponseParse(io *utils.ReadBuffer) (*ApduDataExt, error) {
// Create a partially initialized instance
- _child := &LDataFrameAck{
- Parent: &LDataFrame{},
+ _child := &ApduDataExtDomainAddressSerialNumberResponse{
+ Parent: &ApduDataExt{},
}
_child.Parent.Child = _child
return _child.Parent, nil
}
-func (m *LDataFrameAck) Serialize(io utils.WriteBuffer) error {
+func (m *ApduDataExtDomainAddressSerialNumberResponse) Serialize(io utils.WriteBuffer) error {
ser := func() error {
return nil
@@ -120,7 +108,7 @@ func (m *LDataFrameAck) Serialize(io utils.WriteBuffer) error {
return m.Parent.SerializeParent(io, m, ser)
}
-func (m *LDataFrameAck) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
+func (m *ApduDataExtDomainAddressSerialNumberResponse) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
var token xml.Token
var err error
token = start
@@ -141,7 +129,7 @@ func (m *LDataFrameAck) UnmarshalXML(d *xml.Decoder, start xml.StartElement) err
}
}
-func (m *LDataFrameAck) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
+func (m *ApduDataExtDomainAddressSerialNumberResponse) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
return nil
}
diff --git a/plc4go/internal/plc4go/knxnetip/readwrite/model/LDataFrameAck.go b/plc4go/internal/plc4go/knxnetip/readwrite/model/ApduDataExtDomainAddressSerialNumberWrite.go
similarity index 53%
copy from plc4go/internal/plc4go/knxnetip/readwrite/model/LDataFrameAck.go
copy to plc4go/internal/plc4go/knxnetip/readwrite/model/ApduDataExtDomainAddressSerialNumberWrite.go
index 1bd9767..d1eed24 100644
--- a/plc4go/internal/plc4go/knxnetip/readwrite/model/LDataFrameAck.go
+++ b/plc4go/internal/plc4go/knxnetip/readwrite/model/ApduDataExtDomainAddressSerialNumberWrite.go
@@ -25,13 +25,13 @@ import (
)
// The data-structure of this message
-type LDataFrameAck struct {
- Parent *LDataFrame
- ILDataFrameAck
+type ApduDataExtDomainAddressSerialNumberWrite struct {
+ Parent *ApduDataExt
+ IApduDataExtDomainAddressSerialNumberWrite
}
// The corresponding interface
-type ILDataFrameAck interface {
+type IApduDataExtDomainAddressSerialNumberWrite interface {
LengthInBytes() uint16
LengthInBits() uint16
Serialize(io utils.WriteBuffer) error
@@ -41,78 +41,66 @@ type ILDataFrameAck interface {
///////////////////////////////////////////////////////////
// Accessors for discriminator values.
///////////////////////////////////////////////////////////
-func (m *LDataFrameAck) NotAckFrame() bool {
- return false
-}
-
-func (m *LDataFrameAck) ExtendedFrame() bool {
- return false
-}
-
-func (m *LDataFrameAck) Polling() bool {
- return false
+func (m *ApduDataExtDomainAddressSerialNumberWrite) ExtApciType() uint8 {
+ return 0x2E
}
-func (m *LDataFrameAck) InitializeParent(parent *LDataFrame, repeated bool, priority CEMIPriority, acknowledgeRequested bool, errorFlag bool) {
- m.Parent.Repeated = repeated
- m.Parent.Priority = priority
- m.Parent.AcknowledgeRequested = acknowledgeRequested
- m.Parent.ErrorFlag = errorFlag
+func (m *ApduDataExtDomainAddressSerialNumberWrite) InitializeParent(parent *ApduDataExt) {
}
-func NewLDataFrameAck(repeated bool, priority CEMIPriority, acknowledgeRequested bool, errorFlag bool) *LDataFrame {
- child := &LDataFrameAck{
- Parent: NewLDataFrame(repeated, priority, acknowledgeRequested, errorFlag),
+func NewApduDataExtDomainAddressSerialNumberWrite() *ApduDataExt {
+ child := &ApduDataExtDomainAddressSerialNumberWrite{
+ Parent: NewApduDataExt(),
}
child.Parent.Child = child
return child.Parent
}
-func CastLDataFrameAck(structType interface{}) *LDataFrameAck {
- castFunc := func(typ interface{}) *LDataFrameAck {
- if casted, ok := typ.(LDataFrameAck); ok {
+func CastApduDataExtDomainAddressSerialNumberWrite(structType interface{}) *ApduDataExtDomainAddressSerialNumberWrite {
+ castFunc := func(typ interface{}) *ApduDataExtDomainAddressSerialNumberWrite {
+ if casted, ok := typ.(ApduDataExtDomainAddressSerialNumberWrite); ok {
return &casted
}
- if casted, ok := typ.(*LDataFrameAck); ok {
+ if casted, ok := typ.(*ApduDataExtDomainAddressSerialNumberWrite); ok {
return casted
}
- if casted, ok := typ.(LDataFrame); ok {
- return CastLDataFrameAck(casted.Child)
+ if casted, ok := typ.(ApduDataExt); ok {
+ return CastApduDataExtDomainAddressSerialNumberWrite(casted.Child)
}
- if casted, ok := typ.(*LDataFrame); ok {
- return CastLDataFrameAck(casted.Child)
+ if casted, ok := typ.(*ApduDataExt); ok {
+ return CastApduDataExtDomainAddressSerialNumberWrite(casted.Child)
}
return nil
}
return castFunc(structType)
}
-func (m *LDataFrameAck) GetTypeName() string {
- return "LDataFrameAck"
+func (m *ApduDataExtDomainAddressSerialNumberWrite) GetTypeName() string {
+ return "ApduDataExtDomainAddressSerialNumberWrite"
}
-func (m *LDataFrameAck) LengthInBits() uint16 {
+func (m *ApduDataExtDomainAddressSerialNumberWrite) LengthInBits() uint16 {
lengthInBits := uint16(0)
return lengthInBits
}
-func (m *LDataFrameAck) LengthInBytes() uint16 {
+func (m *ApduDataExtDomainAddressSerialNumberWrite) LengthInBytes() uint16 {
return m.LengthInBits() / 8
}
-func LDataFrameAckParse(io *utils.ReadBuffer) (*LDataFrame, error) {
+func ApduDataExtDomainAddressSerialNumberWriteParse(io *utils.ReadBuffer) (*ApduDataExt, error) {
// Create a partially initialized instance
- _child := &LDataFrameAck{
- Parent: &LDataFrame{},
+ _child := &ApduDataExtDomainAddressSerialNumberWrite{
+ Parent: &ApduDataExt{},
}
_child.Parent.Child = _child
return _child.Parent, nil
}
-func (m *LDataFrameAck) Serialize(io utils.WriteBuffer) error {
+func (m *ApduDataExtDomainAddressSerialNumberWrite) Serialize(io utils.WriteBuffer) error {
ser := func() error {
return nil
@@ -120,7 +108,7 @@ func (m *LDataFrameAck) Serialize(io utils.WriteBuffer) error {
return m.Parent.SerializeParent(io, m, ser)
}
-func (m *LDataFrameAck) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
+func (m *ApduDataExtDomainAddressSerialNumberWrite) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
var token xml.Token
var err error
token = start
@@ -141,7 +129,7 @@ func (m *LDataFrameAck) UnmarshalXML(d *xml.Decoder, start xml.StartElement) err
}
}
-func (m *LDataFrameAck) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
+func (m *ApduDataExtDomainAddressSerialNumberWrite) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
return nil
}
diff --git a/plc4go/internal/plc4go/knxnetip/readwrite/model/LDataFrameAck.go b/plc4go/internal/plc4go/knxnetip/readwrite/model/ApduDataExtDomainAddressWrite.go
similarity index 55%
copy from plc4go/internal/plc4go/knxnetip/readwrite/model/LDataFrameAck.go
copy to plc4go/internal/plc4go/knxnetip/readwrite/model/ApduDataExtDomainAddressWrite.go
index 1bd9767..fbdc846 100644
--- a/plc4go/internal/plc4go/knxnetip/readwrite/model/LDataFrameAck.go
+++ b/plc4go/internal/plc4go/knxnetip/readwrite/model/ApduDataExtDomainAddressWrite.go
@@ -25,13 +25,13 @@ import (
)
// The data-structure of this message
-type LDataFrameAck struct {
- Parent *LDataFrame
- ILDataFrameAck
+type ApduDataExtDomainAddressWrite struct {
+ Parent *ApduDataExt
+ IApduDataExtDomainAddressWrite
}
// The corresponding interface
-type ILDataFrameAck interface {
+type IApduDataExtDomainAddressWrite interface {
LengthInBytes() uint16
LengthInBits() uint16
Serialize(io utils.WriteBuffer) error
@@ -41,78 +41,66 @@ type ILDataFrameAck interface {
///////////////////////////////////////////////////////////
// Accessors for discriminator values.
///////////////////////////////////////////////////////////
-func (m *LDataFrameAck) NotAckFrame() bool {
- return false
-}
-
-func (m *LDataFrameAck) ExtendedFrame() bool {
- return false
-}
-
-func (m *LDataFrameAck) Polling() bool {
- return false
+func (m *ApduDataExtDomainAddressWrite) ExtApciType() uint8 {
+ return 0x20
}
-func (m *LDataFrameAck) InitializeParent(parent *LDataFrame, repeated bool, priority CEMIPriority, acknowledgeRequested bool, errorFlag bool) {
- m.Parent.Repeated = repeated
- m.Parent.Priority = priority
- m.Parent.AcknowledgeRequested = acknowledgeRequested
- m.Parent.ErrorFlag = errorFlag
+func (m *ApduDataExtDomainAddressWrite) InitializeParent(parent *ApduDataExt) {
}
-func NewLDataFrameAck(repeated bool, priority CEMIPriority, acknowledgeRequested bool, errorFlag bool) *LDataFrame {
- child := &LDataFrameAck{
- Parent: NewLDataFrame(repeated, priority, acknowledgeRequested, errorFlag),
+func NewApduDataExtDomainAddressWrite() *ApduDataExt {
+ child := &ApduDataExtDomainAddressWrite{
+ Parent: NewApduDataExt(),
}
child.Parent.Child = child
return child.Parent
}
-func CastLDataFrameAck(structType interface{}) *LDataFrameAck {
- castFunc := func(typ interface{}) *LDataFrameAck {
- if casted, ok := typ.(LDataFrameAck); ok {
+func CastApduDataExtDomainAddressWrite(structType interface{}) *ApduDataExtDomainAddressWrite {
+ castFunc := func(typ interface{}) *ApduDataExtDomainAddressWrite {
+ if casted, ok := typ.(ApduDataExtDomainAddressWrite); ok {
return &casted
}
- if casted, ok := typ.(*LDataFrameAck); ok {
+ if casted, ok := typ.(*ApduDataExtDomainAddressWrite); ok {
return casted
}
- if casted, ok := typ.(LDataFrame); ok {
- return CastLDataFrameAck(casted.Child)
+ if casted, ok := typ.(ApduDataExt); ok {
+ return CastApduDataExtDomainAddressWrite(casted.Child)
}
- if casted, ok := typ.(*LDataFrame); ok {
- return CastLDataFrameAck(casted.Child)
+ if casted, ok := typ.(*ApduDataExt); ok {
+ return CastApduDataExtDomainAddressWrite(casted.Child)
}
return nil
}
return castFunc(structType)
}
-func (m *LDataFrameAck) GetTypeName() string {
- return "LDataFrameAck"
+func (m *ApduDataExtDomainAddressWrite) GetTypeName() string {
+ return "ApduDataExtDomainAddressWrite"
}
-func (m *LDataFrameAck) LengthInBits() uint16 {
+func (m *ApduDataExtDomainAddressWrite) LengthInBits() uint16 {
lengthInBits := uint16(0)
return lengthInBits
}
-func (m *LDataFrameAck) LengthInBytes() uint16 {
+func (m *ApduDataExtDomainAddressWrite) LengthInBytes() uint16 {
return m.LengthInBits() / 8
}
-func LDataFrameAckParse(io *utils.ReadBuffer) (*LDataFrame, error) {
+func ApduDataExtDomainAddressWriteParse(io *utils.ReadBuffer) (*ApduDataExt, error) {
// Create a partially initialized instance
- _child := &LDataFrameAck{
- Parent: &LDataFrame{},
+ _child := &ApduDataExtDomainAddressWrite{
+ Parent: &ApduDataExt{},
}
_child.Parent.Child = _child
return _child.Parent, nil
}
-func (m *LDataFrameAck) Serialize(io utils.WriteBuffer) error {
+func (m *ApduDataExtDomainAddressWrite) Serialize(io utils.WriteBuffer) error {
ser := func() error {
return nil
@@ -120,7 +108,7 @@ func (m *LDataFrameAck) Serialize(io utils.WriteBuffer) error {
return m.Parent.SerializeParent(io, m, ser)
}
-func (m *LDataFrameAck) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
+func (m *ApduDataExtDomainAddressWrite) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
var token xml.Token
var err error
token = start
@@ -141,7 +129,7 @@ func (m *LDataFrameAck) UnmarshalXML(d *xml.Decoder, start xml.StartElement) err
}
}
-func (m *LDataFrameAck) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
+func (m *ApduDataExtDomainAddressWrite) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
return nil
}
diff --git a/plc4go/internal/plc4go/knxnetip/readwrite/model/LDataFrameAck.go b/plc4go/internal/plc4go/knxnetip/readwrite/model/ApduDataExtFileStreamInfoReport.go
similarity index 55%
copy from plc4go/internal/plc4go/knxnetip/readwrite/model/LDataFrameAck.go
copy to plc4go/internal/plc4go/knxnetip/readwrite/model/ApduDataExtFileStreamInfoReport.go
index 1bd9767..51ede0f 100644
--- a/plc4go/internal/plc4go/knxnetip/readwrite/model/LDataFrameAck.go
+++ b/plc4go/internal/plc4go/knxnetip/readwrite/model/ApduDataExtFileStreamInfoReport.go
@@ -25,13 +25,13 @@ import (
)
// The data-structure of this message
-type LDataFrameAck struct {
- Parent *LDataFrame
- ILDataFrameAck
+type ApduDataExtFileStreamInfoReport struct {
+ Parent *ApduDataExt
+ IApduDataExtFileStreamInfoReport
}
// The corresponding interface
-type ILDataFrameAck interface {
+type IApduDataExtFileStreamInfoReport interface {
LengthInBytes() uint16
LengthInBits() uint16
Serialize(io utils.WriteBuffer) error
@@ -41,78 +41,66 @@ type ILDataFrameAck interface {
///////////////////////////////////////////////////////////
// Accessors for discriminator values.
///////////////////////////////////////////////////////////
-func (m *LDataFrameAck) NotAckFrame() bool {
- return false
-}
-
-func (m *LDataFrameAck) ExtendedFrame() bool {
- return false
-}
-
-func (m *LDataFrameAck) Polling() bool {
- return false
+func (m *ApduDataExtFileStreamInfoReport) ExtApciType() uint8 {
+ return 0x30
}
-func (m *LDataFrameAck) InitializeParent(parent *LDataFrame, repeated bool, priority CEMIPriority, acknowledgeRequested bool, errorFlag bool) {
- m.Parent.Repeated = repeated
- m.Parent.Priority = priority
- m.Parent.AcknowledgeRequested = acknowledgeRequested
- m.Parent.ErrorFlag = errorFlag
+func (m *ApduDataExtFileStreamInfoReport) InitializeParent(parent *ApduDataExt) {
}
-func NewLDataFrameAck(repeated bool, priority CEMIPriority, acknowledgeRequested bool, errorFlag bool) *LDataFrame {
- child := &LDataFrameAck{
- Parent: NewLDataFrame(repeated, priority, acknowledgeRequested, errorFlag),
+func NewApduDataExtFileStreamInfoReport() *ApduDataExt {
+ child := &ApduDataExtFileStreamInfoReport{
+ Parent: NewApduDataExt(),
}
child.Parent.Child = child
return child.Parent
}
-func CastLDataFrameAck(structType interface{}) *LDataFrameAck {
- castFunc := func(typ interface{}) *LDataFrameAck {
- if casted, ok := typ.(LDataFrameAck); ok {
+func CastApduDataExtFileStreamInfoReport(structType interface{}) *ApduDataExtFileStreamInfoReport {
+ castFunc := func(typ interface{}) *ApduDataExtFileStreamInfoReport {
+ if casted, ok := typ.(ApduDataExtFileStreamInfoReport); ok {
return &casted
}
- if casted, ok := typ.(*LDataFrameAck); ok {
+ if casted, ok := typ.(*ApduDataExtFileStreamInfoReport); ok {
return casted
}
- if casted, ok := typ.(LDataFrame); ok {
- return CastLDataFrameAck(casted.Child)
+ if casted, ok := typ.(ApduDataExt); ok {
+ return CastApduDataExtFileStreamInfoReport(casted.Child)
}
- if casted, ok := typ.(*LDataFrame); ok {
- return CastLDataFrameAck(casted.Child)
+ if casted, ok := typ.(*ApduDataExt); ok {
+ return CastApduDataExtFileStreamInfoReport(casted.Child)
}
return nil
}
return castFunc(structType)
}
-func (m *LDataFrameAck) GetTypeName() string {
- return "LDataFrameAck"
+func (m *ApduDataExtFileStreamInfoReport) GetTypeName() string {
+ return "ApduDataExtFileStreamInfoReport"
}
-func (m *LDataFrameAck) LengthInBits() uint16 {
+func (m *ApduDataExtFileStreamInfoReport) LengthInBits() uint16 {
lengthInBits := uint16(0)
return lengthInBits
}
-func (m *LDataFrameAck) LengthInBytes() uint16 {
+func (m *ApduDataExtFileStreamInfoReport) LengthInBytes() uint16 {
return m.LengthInBits() / 8
}
-func LDataFrameAckParse(io *utils.ReadBuffer) (*LDataFrame, error) {
+func ApduDataExtFileStreamInfoReportParse(io *utils.ReadBuffer) (*ApduDataExt, error) {
// Create a partially initialized instance
- _child := &LDataFrameAck{
- Parent: &LDataFrame{},
+ _child := &ApduDataExtFileStreamInfoReport{
+ Parent: &ApduDataExt{},
}
_child.Parent.Child = _child
return _child.Parent, nil
}
-func (m *LDataFrameAck) Serialize(io utils.WriteBuffer) error {
+func (m *ApduDataExtFileStreamInfoReport) Serialize(io utils.WriteBuffer) error {
ser := func() error {
return nil
@@ -120,7 +108,7 @@ func (m *LDataFrameAck) Serialize(io utils.WriteBuffer) error {
return m.Parent.SerializeParent(io, m, ser)
}
-func (m *LDataFrameAck) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
+func (m *ApduDataExtFileStreamInfoReport) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
var token xml.Token
var err error
token = start
@@ -141,7 +129,7 @@ func (m *LDataFrameAck) UnmarshalXML(d *xml.Decoder, start xml.StartElement) err
}
}
-func (m *LDataFrameAck) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
+func (m *ApduDataExtFileStreamInfoReport) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
return nil
}
diff --git a/plc4go/internal/plc4go/knxnetip/readwrite/model/LDataFrameAck.go b/plc4go/internal/plc4go/knxnetip/readwrite/model/ApduDataExtGroupPropertyValueInfoReport.go
similarity index 54%
copy from plc4go/internal/plc4go/knxnetip/readwrite/model/LDataFrameAck.go
copy to plc4go/internal/plc4go/knxnetip/readwrite/model/ApduDataExtGroupPropertyValueInfoReport.go
index 1bd9767..b331dc0 100644
--- a/plc4go/internal/plc4go/knxnetip/readwrite/model/LDataFrameAck.go
+++ b/plc4go/internal/plc4go/knxnetip/readwrite/model/ApduDataExtGroupPropertyValueInfoReport.go
@@ -25,13 +25,13 @@ import (
)
// The data-structure of this message
-type LDataFrameAck struct {
- Parent *LDataFrame
- ILDataFrameAck
+type ApduDataExtGroupPropertyValueInfoReport struct {
+ Parent *ApduDataExt
+ IApduDataExtGroupPropertyValueInfoReport
}
// The corresponding interface
-type ILDataFrameAck interface {
+type IApduDataExtGroupPropertyValueInfoReport interface {
LengthInBytes() uint16
LengthInBits() uint16
Serialize(io utils.WriteBuffer) error
@@ -41,78 +41,66 @@ type ILDataFrameAck interface {
///////////////////////////////////////////////////////////
// Accessors for discriminator values.
///////////////////////////////////////////////////////////
-func (m *LDataFrameAck) NotAckFrame() bool {
- return false
-}
-
-func (m *LDataFrameAck) ExtendedFrame() bool {
- return false
-}
-
-func (m *LDataFrameAck) Polling() bool {
- return false
+func (m *ApduDataExtGroupPropertyValueInfoReport) ExtApciType() uint8 {
+ return 0x2B
}
-func (m *LDataFrameAck) InitializeParent(parent *LDataFrame, repeated bool, priority CEMIPriority, acknowledgeRequested bool, errorFlag bool) {
- m.Parent.Repeated = repeated
- m.Parent.Priority = priority
- m.Parent.AcknowledgeRequested = acknowledgeRequested
- m.Parent.ErrorFlag = errorFlag
+func (m *ApduDataExtGroupPropertyValueInfoReport) InitializeParent(parent *ApduDataExt) {
}
-func NewLDataFrameAck(repeated bool, priority CEMIPriority, acknowledgeRequested bool, errorFlag bool) *LDataFrame {
- child := &LDataFrameAck{
- Parent: NewLDataFrame(repeated, priority, acknowledgeRequested, errorFlag),
+func NewApduDataExtGroupPropertyValueInfoReport() *ApduDataExt {
+ child := &ApduDataExtGroupPropertyValueInfoReport{
+ Parent: NewApduDataExt(),
}
child.Parent.Child = child
return child.Parent
}
-func CastLDataFrameAck(structType interface{}) *LDataFrameAck {
- castFunc := func(typ interface{}) *LDataFrameAck {
- if casted, ok := typ.(LDataFrameAck); ok {
+func CastApduDataExtGroupPropertyValueInfoReport(structType interface{}) *ApduDataExtGroupPropertyValueInfoReport {
+ castFunc := func(typ interface{}) *ApduDataExtGroupPropertyValueInfoReport {
+ if casted, ok := typ.(ApduDataExtGroupPropertyValueInfoReport); ok {
return &casted
}
- if casted, ok := typ.(*LDataFrameAck); ok {
+ if casted, ok := typ.(*ApduDataExtGroupPropertyValueInfoReport); ok {
return casted
}
- if casted, ok := typ.(LDataFrame); ok {
- return CastLDataFrameAck(casted.Child)
+ if casted, ok := typ.(ApduDataExt); ok {
+ return CastApduDataExtGroupPropertyValueInfoReport(casted.Child)
}
- if casted, ok := typ.(*LDataFrame); ok {
- return CastLDataFrameAck(casted.Child)
+ if casted, ok := typ.(*ApduDataExt); ok {
+ return CastApduDataExtGroupPropertyValueInfoReport(casted.Child)
}
return nil
}
return castFunc(structType)
}
-func (m *LDataFrameAck) GetTypeName() string {
- return "LDataFrameAck"
+func (m *ApduDataExtGroupPropertyValueInfoReport) GetTypeName() string {
+ return "ApduDataExtGroupPropertyValueInfoReport"
}
-func (m *LDataFrameAck) LengthInBits() uint16 {
+func (m *ApduDataExtGroupPropertyValueInfoReport) LengthInBits() uint16 {
lengthInBits := uint16(0)
return lengthInBits
}
-func (m *LDataFrameAck) LengthInBytes() uint16 {
+func (m *ApduDataExtGroupPropertyValueInfoReport) LengthInBytes() uint16 {
return m.LengthInBits() / 8
}
-func LDataFrameAckParse(io *utils.ReadBuffer) (*LDataFrame, error) {
+func ApduDataExtGroupPropertyValueInfoReportParse(io *utils.ReadBuffer) (*ApduDataExt, error) {
// Create a partially initialized instance
- _child := &LDataFrameAck{
- Parent: &LDataFrame{},
+ _child := &ApduDataExtGroupPropertyValueInfoReport{
+ Parent: &ApduDataExt{},
}
_child.Parent.Child = _child
return _child.Parent, nil
}
-func (m *LDataFrameAck) Serialize(io utils.WriteBuffer) error {
+func (m *ApduDataExtGroupPropertyValueInfoReport) Serialize(io utils.WriteBuffer) error {
ser := func() error {
return nil
@@ -120,7 +108,7 @@ func (m *LDataFrameAck) Serialize(io utils.WriteBuffer) error {
return m.Parent.SerializeParent(io, m, ser)
}
-func (m *LDataFrameAck) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
+func (m *ApduDataExtGroupPropertyValueInfoReport) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
var token xml.Token
var err error
token = start
@@ -141,7 +129,7 @@ func (m *LDataFrameAck) UnmarshalXML(d *xml.Decoder, start xml.StartElement) err
}
}
-func (m *LDataFrameAck) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
+func (m *ApduDataExtGroupPropertyValueInfoReport) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
return nil
}
diff --git a/plc4go/internal/plc4go/knxnetip/readwrite/model/LDataFrameAck.go b/plc4go/internal/plc4go/knxnetip/readwrite/model/ApduDataExtGroupPropertyValueRead.go
similarity index 55%
copy from plc4go/internal/plc4go/knxnetip/readwrite/model/LDataFrameAck.go
copy to plc4go/internal/plc4go/knxnetip/readwrite/model/ApduDataExtGroupPropertyValueRead.go
index 1bd9767..b2c5678 100644
--- a/plc4go/internal/plc4go/knxnetip/readwrite/model/LDataFrameAck.go
+++ b/plc4go/internal/plc4go/knxnetip/readwrite/model/ApduDataExtGroupPropertyValueRead.go
@@ -25,13 +25,13 @@ import (
)
// The data-structure of this message
-type LDataFrameAck struct {
- Parent *LDataFrame
- ILDataFrameAck
+type ApduDataExtGroupPropertyValueRead struct {
+ Parent *ApduDataExt
+ IApduDataExtGroupPropertyValueRead
}
// The corresponding interface
-type ILDataFrameAck interface {
+type IApduDataExtGroupPropertyValueRead interface {
LengthInBytes() uint16
LengthInBits() uint16
Serialize(io utils.WriteBuffer) error
@@ -41,78 +41,66 @@ type ILDataFrameAck interface {
///////////////////////////////////////////////////////////
// Accessors for discriminator values.
///////////////////////////////////////////////////////////
-func (m *LDataFrameAck) NotAckFrame() bool {
- return false
-}
-
-func (m *LDataFrameAck) ExtendedFrame() bool {
- return false
-}
-
-func (m *LDataFrameAck) Polling() bool {
- return false
+func (m *ApduDataExtGroupPropertyValueRead) ExtApciType() uint8 {
+ return 0x28
}
-func (m *LDataFrameAck) InitializeParent(parent *LDataFrame, repeated bool, priority CEMIPriority, acknowledgeRequested bool, errorFlag bool) {
- m.Parent.Repeated = repeated
- m.Parent.Priority = priority
- m.Parent.AcknowledgeRequested = acknowledgeRequested
- m.Parent.ErrorFlag = errorFlag
+func (m *ApduDataExtGroupPropertyValueRead) InitializeParent(parent *ApduDataExt) {
}
-func NewLDataFrameAck(repeated bool, priority CEMIPriority, acknowledgeRequested bool, errorFlag bool) *LDataFrame {
- child := &LDataFrameAck{
- Parent: NewLDataFrame(repeated, priority, acknowledgeRequested, errorFlag),
+func NewApduDataExtGroupPropertyValueRead() *ApduDataExt {
+ child := &ApduDataExtGroupPropertyValueRead{
+ Parent: NewApduDataExt(),
}
child.Parent.Child = child
return child.Parent
}
-func CastLDataFrameAck(structType interface{}) *LDataFrameAck {
- castFunc := func(typ interface{}) *LDataFrameAck {
- if casted, ok := typ.(LDataFrameAck); ok {
+func CastApduDataExtGroupPropertyValueRead(structType interface{}) *ApduDataExtGroupPropertyValueRead {
+ castFunc := func(typ interface{}) *ApduDataExtGroupPropertyValueRead {
+ if casted, ok := typ.(ApduDataExtGroupPropertyValueRead); ok {
return &casted
}
- if casted, ok := typ.(*LDataFrameAck); ok {
+ if casted, ok := typ.(*ApduDataExtGroupPropertyValueRead); ok {
return casted
}
- if casted, ok := typ.(LDataFrame); ok {
- return CastLDataFrameAck(casted.Child)
+ if casted, ok := typ.(ApduDataExt); ok {
+ return CastApduDataExtGroupPropertyValueRead(casted.Child)
}
- if casted, ok := typ.(*LDataFrame); ok {
- return CastLDataFrameAck(casted.Child)
+ if casted, ok := typ.(*ApduDataExt); ok {
+ return CastApduDataExtGroupPropertyValueRead(casted.Child)
}
return nil
}
return castFunc(structType)
}
-func (m *LDataFrameAck) GetTypeName() string {
- return "LDataFrameAck"
+func (m *ApduDataExtGroupPropertyValueRead) GetTypeName() string {
+ return "ApduDataExtGroupPropertyValueRead"
}
-func (m *LDataFrameAck) LengthInBits() uint16 {
+func (m *ApduDataExtGroupPropertyValueRead) LengthInBits() uint16 {
lengthInBits := uint16(0)
return lengthInBits
}
-func (m *LDataFrameAck) LengthInBytes() uint16 {
+func (m *ApduDataExtGroupPropertyValueRead) LengthInBytes() uint16 {
return m.LengthInBits() / 8
}
-func LDataFrameAckParse(io *utils.ReadBuffer) (*LDataFrame, error) {
+func ApduDataExtGroupPropertyValueReadParse(io *utils.ReadBuffer) (*ApduDataExt, error) {
// Create a partially initialized instance
- _child := &LDataFrameAck{
- Parent: &LDataFrame{},
+ _child := &ApduDataExtGroupPropertyValueRead{
+ Parent: &ApduDataExt{},
}
_child.Parent.Child = _child
return _child.Parent, nil
}
-func (m *LDataFrameAck) Serialize(io utils.WriteBuffer) error {
+func (m *ApduDataExtGroupPropertyValueRead) Serialize(io utils.WriteBuffer) error {
ser := func() error {
return nil
@@ -120,7 +108,7 @@ func (m *LDataFrameAck) Serialize(io utils.WriteBuffer) error {
return m.Parent.SerializeParent(io, m, ser)
}
-func (m *LDataFrameAck) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
+func (m *ApduDataExtGroupPropertyValueRead) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
var token xml.Token
var err error
token = start
@@ -141,7 +129,7 @@ func (m *LDataFrameAck) UnmarshalXML(d *xml.Decoder, start xml.StartElement) err
}
}
-func (m *LDataFrameAck) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
+func (m *ApduDataExtGroupPropertyValueRead) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
return nil
}
diff --git a/plc4go/internal/plc4go/knxnetip/readwrite/model/LDataFrameAck.go b/plc4go/internal/plc4go/knxnetip/readwrite/model/ApduDataExtGroupPropertyValueResponse.go
similarity index 54%
copy from plc4go/internal/plc4go/knxnetip/readwrite/model/LDataFrameAck.go
copy to plc4go/internal/plc4go/knxnetip/readwrite/model/ApduDataExtGroupPropertyValueResponse.go
index 1bd9767..9a13bf4 100644
--- a/plc4go/internal/plc4go/knxnetip/readwrite/model/LDataFrameAck.go
+++ b/plc4go/internal/plc4go/knxnetip/readwrite/model/ApduDataExtGroupPropertyValueResponse.go
@@ -25,13 +25,13 @@ import (
)
// The data-structure of this message
-type LDataFrameAck struct {
- Parent *LDataFrame
- ILDataFrameAck
+type ApduDataExtGroupPropertyValueResponse struct {
+ Parent *ApduDataExt
+ IApduDataExtGroupPropertyValueResponse
}
// The corresponding interface
-type ILDataFrameAck interface {
+type IApduDataExtGroupPropertyValueResponse interface {
LengthInBytes() uint16
LengthInBits() uint16
Serialize(io utils.WriteBuffer) error
@@ -41,78 +41,66 @@ type ILDataFrameAck interface {
///////////////////////////////////////////////////////////
// Accessors for discriminator values.
///////////////////////////////////////////////////////////
-func (m *LDataFrameAck) NotAckFrame() bool {
- return false
-}
-
-func (m *LDataFrameAck) ExtendedFrame() bool {
- return false
-}
-
-func (m *LDataFrameAck) Polling() bool {
- return false
+func (m *ApduDataExtGroupPropertyValueResponse) ExtApciType() uint8 {
+ return 0x29
}
-func (m *LDataFrameAck) InitializeParent(parent *LDataFrame, repeated bool, priority CEMIPriority, acknowledgeRequested bool, errorFlag bool) {
- m.Parent.Repeated = repeated
- m.Parent.Priority = priority
- m.Parent.AcknowledgeRequested = acknowledgeRequested
- m.Parent.ErrorFlag = errorFlag
+func (m *ApduDataExtGroupPropertyValueResponse) InitializeParent(parent *ApduDataExt) {
}
-func NewLDataFrameAck(repeated bool, priority CEMIPriority, acknowledgeRequested bool, errorFlag bool) *LDataFrame {
- child := &LDataFrameAck{
- Parent: NewLDataFrame(repeated, priority, acknowledgeRequested, errorFlag),
+func NewApduDataExtGroupPropertyValueResponse() *ApduDataExt {
+ child := &ApduDataExtGroupPropertyValueResponse{
+ Parent: NewApduDataExt(),
}
child.Parent.Child = child
return child.Parent
}
-func CastLDataFrameAck(structType interface{}) *LDataFrameAck {
- castFunc := func(typ interface{}) *LDataFrameAck {
- if casted, ok := typ.(LDataFrameAck); ok {
+func CastApduDataExtGroupPropertyValueResponse(structType interface{}) *ApduDataExtGroupPropertyValueResponse {
+ castFunc := func(typ interface{}) *ApduDataExtGroupPropertyValueResponse {
+ if casted, ok := typ.(ApduDataExtGroupPropertyValueResponse); ok {
return &casted
}
- if casted, ok := typ.(*LDataFrameAck); ok {
+ if casted, ok := typ.(*ApduDataExtGroupPropertyValueResponse); ok {
return casted
}
- if casted, ok := typ.(LDataFrame); ok {
- return CastLDataFrameAck(casted.Child)
+ if casted, ok := typ.(ApduDataExt); ok {
+ return CastApduDataExtGroupPropertyValueResponse(casted.Child)
}
- if casted, ok := typ.(*LDataFrame); ok {
- return CastLDataFrameAck(casted.Child)
+ if casted, ok := typ.(*ApduDataExt); ok {
+ return CastApduDataExtGroupPropertyValueResponse(casted.Child)
}
return nil
}
return castFunc(structType)
}
-func (m *LDataFrameAck) GetTypeName() string {
- return "LDataFrameAck"
+func (m *ApduDataExtGroupPropertyValueResponse) GetTypeName() string {
+ return "ApduDataExtGroupPropertyValueResponse"
}
-func (m *LDataFrameAck) LengthInBits() uint16 {
+func (m *ApduDataExtGroupPropertyValueResponse) LengthInBits() uint16 {
lengthInBits := uint16(0)
return lengthInBits
}
-func (m *LDataFrameAck) LengthInBytes() uint16 {
+func (m *ApduDataExtGroupPropertyValueResponse) LengthInBytes() uint16 {
return m.LengthInBits() / 8
}
-func LDataFrameAckParse(io *utils.ReadBuffer) (*LDataFrame, error) {
+func ApduDataExtGroupPropertyValueResponseParse(io *utils.ReadBuffer) (*ApduDataExt, error) {
// Create a partially initialized instance
- _child := &LDataFrameAck{
- Parent: &LDataFrame{},
+ _child := &ApduDataExtGroupPropertyValueResponse{
+ Parent: &ApduDataExt{},
}
_child.Parent.Child = _child
return _child.Parent, nil
}
-func (m *LDataFrameAck) Serialize(io utils.WriteBuffer) error {
+func (m *ApduDataExtGroupPropertyValueResponse) Serialize(io utils.WriteBuffer) error {
ser := func() error {
return nil
@@ -120,7 +108,7 @@ func (m *LDataFrameAck) Serialize(io utils.WriteBuffer) error {
return m.Parent.SerializeParent(io, m, ser)
}
-func (m *LDataFrameAck) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
+func (m *ApduDataExtGroupPropertyValueResponse) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
var token xml.Token
var err error
token = start
@@ -141,7 +129,7 @@ func (m *LDataFrameAck) UnmarshalXML(d *xml.Decoder, start xml.StartElement) err
}
}
-func (m *LDataFrameAck) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
+func (m *ApduDataExtGroupPropertyValueResponse) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
return nil
}
diff --git a/plc4go/internal/plc4go/knxnetip/readwrite/model/LDataFrameAck.go b/plc4go/internal/plc4go/knxnetip/readwrite/model/ApduDataExtGroupPropertyValueWrite.go
similarity index 55%
copy from plc4go/internal/plc4go/knxnetip/readwrite/model/LDataFrameAck.go
copy to plc4go/internal/plc4go/knxnetip/readwrite/model/ApduDataExtGroupPropertyValueWrite.go
index 1bd9767..4bb507a 100644
--- a/plc4go/internal/plc4go/knxnetip/readwrite/model/LDataFrameAck.go
+++ b/plc4go/internal/plc4go/knxnetip/readwrite/model/ApduDataExtGroupPropertyValueWrite.go
@@ -25,13 +25,13 @@ import (
)
// The data-structure of this message
-type LDataFrameAck struct {
- Parent *LDataFrame
- ILDataFrameAck
+type ApduDataExtGroupPropertyValueWrite struct {
+ Parent *ApduDataExt
+ IApduDataExtGroupPropertyValueWrite
}
// The corresponding interface
-type ILDataFrameAck interface {
+type IApduDataExtGroupPropertyValueWrite interface {
LengthInBytes() uint16
LengthInBits() uint16
Serialize(io utils.WriteBuffer) error
@@ -41,78 +41,66 @@ type ILDataFrameAck interface {
///////////////////////////////////////////////////////////
// Accessors for discriminator values.
///////////////////////////////////////////////////////////
-func (m *LDataFrameAck) NotAckFrame() bool {
- return false
-}
-
-func (m *LDataFrameAck) ExtendedFrame() bool {
- return false
-}
-
-func (m *LDataFrameAck) Polling() bool {
- return false
+func (m *ApduDataExtGroupPropertyValueWrite) ExtApciType() uint8 {
+ return 0x2A
}
-func (m *LDataFrameAck) InitializeParent(parent *LDataFrame, repeated bool, priority CEMIPriority, acknowledgeRequested bool, errorFlag bool) {
- m.Parent.Repeated = repeated
- m.Parent.Priority = priority
- m.Parent.AcknowledgeRequested = acknowledgeRequested
- m.Parent.ErrorFlag = errorFlag
+func (m *ApduDataExtGroupPropertyValueWrite) InitializeParent(parent *ApduDataExt) {
}
-func NewLDataFrameAck(repeated bool, priority CEMIPriority, acknowledgeRequested bool, errorFlag bool) *LDataFrame {
- child := &LDataFrameAck{
- Parent: NewLDataFrame(repeated, priority, acknowledgeRequested, errorFlag),
+func NewApduDataExtGroupPropertyValueWrite() *ApduDataExt {
+ child := &ApduDataExtGroupPropertyValueWrite{
+ Parent: NewApduDataExt(),
}
child.Parent.Child = child
return child.Parent
}
-func CastLDataFrameAck(structType interface{}) *LDataFrameAck {
- castFunc := func(typ interface{}) *LDataFrameAck {
- if casted, ok := typ.(LDataFrameAck); ok {
+func CastApduDataExtGroupPropertyValueWrite(structType interface{}) *ApduDataExtGroupPropertyValueWrite {
+ castFunc := func(typ interface{}) *ApduDataExtGroupPropertyValueWrite {
+ if casted, ok := typ.(ApduDataExtGroupPropertyValueWrite); ok {
return &casted
}
- if casted, ok := typ.(*LDataFrameAck); ok {
+ if casted, ok := typ.(*ApduDataExtGroupPropertyValueWrite); ok {
return casted
}
- if casted, ok := typ.(LDataFrame); ok {
- return CastLDataFrameAck(casted.Child)
+ if casted, ok := typ.(ApduDataExt); ok {
+ return CastApduDataExtGroupPropertyValueWrite(casted.Child)
}
- if casted, ok := typ.(*LDataFrame); ok {
- return CastLDataFrameAck(casted.Child)
+ if casted, ok := typ.(*ApduDataExt); ok {
+ return CastApduDataExtGroupPropertyValueWrite(casted.Child)
}
return nil
}
return castFunc(structType)
}
-func (m *LDataFrameAck) GetTypeName() string {
- return "LDataFrameAck"
+func (m *ApduDataExtGroupPropertyValueWrite) GetTypeName() string {
+ return "ApduDataExtGroupPropertyValueWrite"
}
-func (m *LDataFrameAck) LengthInBits() uint16 {
+func (m *ApduDataExtGroupPropertyValueWrite) LengthInBits() uint16 {
lengthInBits := uint16(0)
return lengthInBits
}
-func (m *LDataFrameAck) LengthInBytes() uint16 {
+func (m *ApduDataExtGroupPropertyValueWrite) LengthInBytes() uint16 {
return m.LengthInBits() / 8
}
-func LDataFrameAckParse(io *utils.ReadBuffer) (*LDataFrame, error) {
+func ApduDataExtGroupPropertyValueWriteParse(io *utils.ReadBuffer) (*ApduDataExt, error) {
// Create a partially initialized instance
- _child := &LDataFrameAck{
- Parent: &LDataFrame{},
+ _child := &ApduDataExtGroupPropertyValueWrite{
+ Parent: &ApduDataExt{},
}
_child.Parent.Child = _child
return _child.Parent, nil
}
-func (m *LDataFrameAck) Serialize(io utils.WriteBuffer) error {
+func (m *ApduDataExtGroupPropertyValueWrite) Serialize(io utils.WriteBuffer) error {
ser := func() error {
return nil
@@ -120,7 +108,7 @@ func (m *LDataFrameAck) Serialize(io utils.WriteBuffer) error {
return m.Parent.SerializeParent(io, m, ser)
}
-func (m *LDataFrameAck) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
+func (m *ApduDataExtGroupPropertyValueWrite) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
var token xml.Token
var err error
token = start
@@ -141,7 +129,7 @@ func (m *LDataFrameAck) UnmarshalXML(d *xml.Decoder, start xml.StartElement) err
}
}
-func (m *LDataFrameAck) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
+func (m *ApduDataExtGroupPropertyValueWrite) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
return nil
}
diff --git a/plc4go/internal/plc4go/knxnetip/readwrite/model/LDataFrameAck.go b/plc4go/internal/plc4go/knxnetip/readwrite/model/ApduDataExtIndividualAddressSerialNumberRead.go
similarity index 52%
copy from plc4go/internal/plc4go/knxnetip/readwrite/model/LDataFrameAck.go
copy to plc4go/internal/plc4go/knxnetip/readwrite/model/ApduDataExtIndividualAddressSerialNumberRead.go
index 1bd9767..31f00f1 100644
--- a/plc4go/internal/plc4go/knxnetip/readwrite/model/LDataFrameAck.go
+++ b/plc4go/internal/plc4go/knxnetip/readwrite/model/ApduDataExtIndividualAddressSerialNumberRead.go
@@ -25,13 +25,13 @@ import (
)
// The data-structure of this message
-type LDataFrameAck struct {
- Parent *LDataFrame
- ILDataFrameAck
+type ApduDataExtIndividualAddressSerialNumberRead struct {
+ Parent *ApduDataExt
+ IApduDataExtIndividualAddressSerialNumberRead
}
// The corresponding interface
-type ILDataFrameAck interface {
+type IApduDataExtIndividualAddressSerialNumberRead interface {
LengthInBytes() uint16
LengthInBits() uint16
Serialize(io utils.WriteBuffer) error
@@ -41,78 +41,66 @@ type ILDataFrameAck interface {
///////////////////////////////////////////////////////////
// Accessors for discriminator values.
///////////////////////////////////////////////////////////
-func (m *LDataFrameAck) NotAckFrame() bool {
- return false
-}
-
-func (m *LDataFrameAck) ExtendedFrame() bool {
- return false
-}
-
-func (m *LDataFrameAck) Polling() bool {
- return false
+func (m *ApduDataExtIndividualAddressSerialNumberRead) ExtApciType() uint8 {
+ return 0x1C
}
-func (m *LDataFrameAck) InitializeParent(parent *LDataFrame, repeated bool, priority CEMIPriority, acknowledgeRequested bool, errorFlag bool) {
- m.Parent.Repeated = repeated
- m.Parent.Priority = priority
- m.Parent.AcknowledgeRequested = acknowledgeRequested
- m.Parent.ErrorFlag = errorFlag
+func (m *ApduDataExtIndividualAddressSerialNumberRead) InitializeParent(parent *ApduDataExt) {
}
-func NewLDataFrameAck(repeated bool, priority CEMIPriority, acknowledgeRequested bool, errorFlag bool) *LDataFrame {
- child := &LDataFrameAck{
- Parent: NewLDataFrame(repeated, priority, acknowledgeRequested, errorFlag),
+func NewApduDataExtIndividualAddressSerialNumberRead() *ApduDataExt {
+ child := &ApduDataExtIndividualAddressSerialNumberRead{
+ Parent: NewApduDataExt(),
}
child.Parent.Child = child
return child.Parent
}
-func CastLDataFrameAck(structType interface{}) *LDataFrameAck {
- castFunc := func(typ interface{}) *LDataFrameAck {
- if casted, ok := typ.(LDataFrameAck); ok {
+func CastApduDataExtIndividualAddressSerialNumberRead(structType interface{}) *ApduDataExtIndividualAddressSerialNumberRead {
+ castFunc := func(typ interface{}) *ApduDataExtIndividualAddressSerialNumberRead {
+ if casted, ok := typ.(ApduDataExtIndividualAddressSerialNumberRead); ok {
return &casted
}
- if casted, ok := typ.(*LDataFrameAck); ok {
+ if casted, ok := typ.(*ApduDataExtIndividualAddressSerialNumberRead); ok {
return casted
}
- if casted, ok := typ.(LDataFrame); ok {
- return CastLDataFrameAck(casted.Child)
+ if casted, ok := typ.(ApduDataExt); ok {
+ return CastApduDataExtIndividualAddressSerialNumberRead(casted.Child)
}
- if casted, ok := typ.(*LDataFrame); ok {
- return CastLDataFrameAck(casted.Child)
+ if casted, ok := typ.(*ApduDataExt); ok {
+ return CastApduDataExtIndividualAddressSerialNumberRead(casted.Child)
}
return nil
}
return castFunc(structType)
}
-func (m *LDataFrameAck) GetTypeName() string {
- return "LDataFrameAck"
+func (m *ApduDataExtIndividualAddressSerialNumberRead) GetTypeName() string {
+ return "ApduDataExtIndividualAddressSerialNumberRead"
}
-func (m *LDataFrameAck) LengthInBits() uint16 {
+func (m *ApduDataExtIndividualAddressSerialNumberRead) LengthInBits() uint16 {
lengthInBits := uint16(0)
return lengthInBits
}
-func (m *LDataFrameAck) LengthInBytes() uint16 {
+func (m *ApduDataExtIndividualAddressSerialNumberRead) LengthInBytes() uint16 {
return m.LengthInBits() / 8
}
-func LDataFrameAckParse(io *utils.ReadBuffer) (*LDataFrame, error) {
+func ApduDataExtIndividualAddressSerialNumberReadParse(io *utils.ReadBuffer) (*ApduDataExt, error) {
// Create a partially initialized instance
- _child := &LDataFrameAck{
- Parent: &LDataFrame{},
+ _child := &ApduDataExtIndividualAddressSerialNumberRead{
+ Parent: &ApduDataExt{},
}
_child.Parent.Child = _child
return _child.Parent, nil
}
-func (m *LDataFrameAck) Serialize(io utils.WriteBuffer) error {
+func (m *ApduDataExtIndividualAddressSerialNumberRead) Serialize(io utils.WriteBuffer) error {
ser := func() error {
return nil
@@ -120,7 +108,7 @@ func (m *LDataFrameAck) Serialize(io utils.WriteBuffer) error {
return m.Parent.SerializeParent(io, m, ser)
}
-func (m *LDataFrameAck) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
+func (m *ApduDataExtIndividualAddressSerialNumberRead) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
var token xml.Token
var err error
token = start
@@ -141,7 +129,7 @@ func (m *LDataFrameAck) UnmarshalXML(d *xml.Decoder, start xml.StartElement) err
}
}
-func (m *LDataFrameAck) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
+func (m *ApduDataExtIndividualAddressSerialNumberRead) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
return nil
}
diff --git a/plc4go/internal/plc4go/knxnetip/readwrite/model/LDataFrameAck.go b/plc4go/internal/plc4go/knxnetip/readwrite/model/ApduDataExtIndividualAddressSerialNumberResponse.go
similarity index 51%
copy from plc4go/internal/plc4go/knxnetip/readwrite/model/LDataFrameAck.go
copy to plc4go/internal/plc4go/knxnetip/readwrite/model/ApduDataExtIndividualAddressSerialNumberResponse.go
index 1bd9767..e343022 100644
--- a/plc4go/internal/plc4go/knxnetip/readwrite/model/LDataFrameAck.go
+++ b/plc4go/internal/plc4go/knxnetip/readwrite/model/ApduDataExtIndividualAddressSerialNumberResponse.go
@@ -25,13 +25,13 @@ import (
)
// The data-structure of this message
-type LDataFrameAck struct {
- Parent *LDataFrame
- ILDataFrameAck
+type ApduDataExtIndividualAddressSerialNumberResponse struct {
+ Parent *ApduDataExt
+ IApduDataExtIndividualAddressSerialNumberResponse
}
// The corresponding interface
-type ILDataFrameAck interface {
+type IApduDataExtIndividualAddressSerialNumberResponse interface {
LengthInBytes() uint16
LengthInBits() uint16
Serialize(io utils.WriteBuffer) error
@@ -41,78 +41,66 @@ type ILDataFrameAck interface {
///////////////////////////////////////////////////////////
// Accessors for discriminator values.
///////////////////////////////////////////////////////////
-func (m *LDataFrameAck) NotAckFrame() bool {
- return false
-}
-
-func (m *LDataFrameAck) ExtendedFrame() bool {
- return false
-}
-
-func (m *LDataFrameAck) Polling() bool {
- return false
+func (m *ApduDataExtIndividualAddressSerialNumberResponse) ExtApciType() uint8 {
+ return 0x1D
}
-func (m *LDataFrameAck) InitializeParent(parent *LDataFrame, repeated bool, priority CEMIPriority, acknowledgeRequested bool, errorFlag bool) {
- m.Parent.Repeated = repeated
- m.Parent.Priority = priority
- m.Parent.AcknowledgeRequested = acknowledgeRequested
- m.Parent.ErrorFlag = errorFlag
+func (m *ApduDataExtIndividualAddressSerialNumberResponse) InitializeParent(parent *ApduDataExt) {
}
-func NewLDataFrameAck(repeated bool, priority CEMIPriority, acknowledgeRequested bool, errorFlag bool) *LDataFrame {
- child := &LDataFrameAck{
- Parent: NewLDataFrame(repeated, priority, acknowledgeRequested, errorFlag),
+func NewApduDataExtIndividualAddressSerialNumberResponse() *ApduDataExt {
+ child := &ApduDataExtIndividualAddressSerialNumberResponse{
+ Parent: NewApduDataExt(),
}
child.Parent.Child = child
return child.Parent
}
-func CastLDataFrameAck(structType interface{}) *LDataFrameAck {
- castFunc := func(typ interface{}) *LDataFrameAck {
- if casted, ok := typ.(LDataFrameAck); ok {
+func CastApduDataExtIndividualAddressSerialNumberResponse(structType interface{}) *ApduDataExtIndividualAddressSerialNumberResponse {
+ castFunc := func(typ interface{}) *ApduDataExtIndividualAddressSerialNumberResponse {
+ if casted, ok := typ.(ApduDataExtIndividualAddressSerialNumberResponse); ok {
return &casted
}
- if casted, ok := typ.(*LDataFrameAck); ok {
+ if casted, ok := typ.(*ApduDataExtIndividualAddressSerialNumberResponse); ok {
return casted
}
- if casted, ok := typ.(LDataFrame); ok {
- return CastLDataFrameAck(casted.Child)
+ if casted, ok := typ.(ApduDataExt); ok {
+ return CastApduDataExtIndividualAddressSerialNumberResponse(casted.Child)
}
- if casted, ok := typ.(*LDataFrame); ok {
- return CastLDataFrameAck(casted.Child)
+ if casted, ok := typ.(*ApduDataExt); ok {
+ return CastApduDataExtIndividualAddressSerialNumberResponse(casted.Child)
}
return nil
}
return castFunc(structType)
}
-func (m *LDataFrameAck) GetTypeName() string {
- return "LDataFrameAck"
+func (m *ApduDataExtIndividualAddressSerialNumberResponse) GetTypeName() string {
+ return "ApduDataExtIndividualAddressSerialNumberResponse"
}
-func (m *LDataFrameAck) LengthInBits() uint16 {
+func (m *ApduDataExtIndividualAddressSerialNumberResponse) LengthInBits() uint16 {
lengthInBits := uint16(0)
return lengthInBits
}
-func (m *LDataFrameAck) LengthInBytes() uint16 {
+func (m *ApduDataExtIndividualAddressSerialNumberResponse) LengthInBytes() uint16 {
return m.LengthInBits() / 8
}
-func LDataFrameAckParse(io *utils.ReadBuffer) (*LDataFrame, error) {
+func ApduDataExtIndividualAddressSerialNumberResponseParse(io *utils.ReadBuffer) (*ApduDataExt, error) {
// Create a partially initialized instance
- _child := &LDataFrameAck{
- Parent: &LDataFrame{},
+ _child := &ApduDataExtIndividualAddressSerialNumberResponse{
+ Parent: &ApduDataExt{},
}
_child.Parent.Child = _child
return _child.Parent, nil
}
-func (m *LDataFrameAck) Serialize(io utils.WriteBuffer) error {
+func (m *ApduDataExtIndividualAddressSerialNumberResponse) Serialize(io utils.WriteBuffer) error {
ser := func() error {
return nil
@@ -120,7 +108,7 @@ func (m *LDataFrameAck) Serialize(io utils.WriteBuffer) error {
return m.Parent.SerializeParent(io, m, ser)
}
-func (m *LDataFrameAck) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
+func (m *ApduDataExtIndividualAddressSerialNumberResponse) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
var token xml.Token
var err error
token = start
@@ -141,7 +129,7 @@ func (m *LDataFrameAck) UnmarshalXML(d *xml.Decoder, start xml.StartElement) err
}
}
-func (m *LDataFrameAck) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
+func (m *ApduDataExtIndividualAddressSerialNumberResponse) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
return nil
}
diff --git a/plc4go/internal/plc4go/knxnetip/readwrite/model/LDataFrameAck.go b/plc4go/internal/plc4go/knxnetip/readwrite/model/ApduDataExtIndividualAddressSerialNumberWrite.go
similarity index 52%
copy from plc4go/internal/plc4go/knxnetip/readwrite/model/LDataFrameAck.go
copy to plc4go/internal/plc4go/knxnetip/readwrite/model/ApduDataExtIndividualAddressSerialNumberWrite.go
index 1bd9767..3ce963b 100644
--- a/plc4go/internal/plc4go/knxnetip/readwrite/model/LDataFrameAck.go
+++ b/plc4go/internal/plc4go/knxnetip/readwrite/model/ApduDataExtIndividualAddressSerialNumberWrite.go
@@ -25,13 +25,13 @@ import (
)
// The data-structure of this message
-type LDataFrameAck struct {
- Parent *LDataFrame
- ILDataFrameAck
+type ApduDataExtIndividualAddressSerialNumberWrite struct {
+ Parent *ApduDataExt
+ IApduDataExtIndividualAddressSerialNumberWrite
}
// The corresponding interface
-type ILDataFrameAck interface {
+type IApduDataExtIndividualAddressSerialNumberWrite interface {
LengthInBytes() uint16
LengthInBits() uint16
Serialize(io utils.WriteBuffer) error
@@ -41,78 +41,66 @@ type ILDataFrameAck interface {
///////////////////////////////////////////////////////////
// Accessors for discriminator values.
///////////////////////////////////////////////////////////
-func (m *LDataFrameAck) NotAckFrame() bool {
- return false
-}
-
-func (m *LDataFrameAck) ExtendedFrame() bool {
- return false
-}
-
-func (m *LDataFrameAck) Polling() bool {
- return false
+func (m *ApduDataExtIndividualAddressSerialNumberWrite) ExtApciType() uint8 {
+ return 0x1E
}
-func (m *LDataFrameAck) InitializeParent(parent *LDataFrame, repeated bool, priority CEMIPriority, acknowledgeRequested bool, errorFlag bool) {
- m.Parent.Repeated = repeated
- m.Parent.Priority = priority
- m.Parent.AcknowledgeRequested = acknowledgeRequested
- m.Parent.ErrorFlag = errorFlag
+func (m *ApduDataExtIndividualAddressSerialNumberWrite) InitializeParent(parent *ApduDataExt) {
}
-func NewLDataFrameAck(repeated bool, priority CEMIPriority, acknowledgeRequested bool, errorFlag bool) *LDataFrame {
- child := &LDataFrameAck{
- Parent: NewLDataFrame(repeated, priority, acknowledgeRequested, errorFlag),
+func NewApduDataExtIndividualAddressSerialNumberWrite() *ApduDataExt {
+ child := &ApduDataExtIndividualAddressSerialNumberWrite{
+ Parent: NewApduDataExt(),
}
child.Parent.Child = child
return child.Parent
}
-func CastLDataFrameAck(structType interface{}) *LDataFrameAck {
- castFunc := func(typ interface{}) *LDataFrameAck {
- if casted, ok := typ.(LDataFrameAck); ok {
+func CastApduDataExtIndividualAddressSerialNumberWrite(structType interface{}) *ApduDataExtIndividualAddressSerialNumberWrite {
+ castFunc := func(typ interface{}) *ApduDataExtIndividualAddressSerialNumberWrite {
+ if casted, ok := typ.(ApduDataExtIndividualAddressSerialNumberWrite); ok {
return &casted
}
- if casted, ok := typ.(*LDataFrameAck); ok {
+ if casted, ok := typ.(*ApduDataExtIndividualAddressSerialNumberWrite); ok {
return casted
}
- if casted, ok := typ.(LDataFrame); ok {
- return CastLDataFrameAck(casted.Child)
+ if casted, ok := typ.(ApduDataExt); ok {
+ return CastApduDataExtIndividualAddressSerialNumberWrite(casted.Child)
}
- if casted, ok := typ.(*LDataFrame); ok {
- return CastLDataFrameAck(casted.Child)
+ if casted, ok := typ.(*ApduDataExt); ok {
+ return CastApduDataExtIndividualAddressSerialNumberWrite(casted.Child)
}
return nil
}
return castFunc(structType)
}
-func (m *LDataFrameAck) GetTypeName() string {
- return "LDataFrameAck"
+func (m *ApduDataExtIndividualAddressSerialNumberWrite) GetTypeName() string {
+ return "ApduDataExtIndividualAddressSerialNumberWrite"
}
-func (m *LDataFrameAck) LengthInBits() uint16 {
+func (m *ApduDataExtIndividualAddressSerialNumberWrite) LengthInBits() uint16 {
lengthInBits := uint16(0)
return lengthInBits
}
-func (m *LDataFrameAck) LengthInBytes() uint16 {
+func (m *ApduDataExtIndividualAddressSerialNumberWrite) LengthInBytes() uint16 {
return m.LengthInBits() / 8
}
-func LDataFrameAckParse(io *utils.ReadBuffer) (*LDataFrame, error) {
+func ApduDataExtIndividualAddressSerialNumberWriteParse(io *utils.ReadBuffer) (*ApduDataExt, error) {
// Create a partially initialized instance
- _child := &LDataFrameAck{
- Parent: &LDataFrame{},
+ _child := &ApduDataExtIndividualAddressSerialNumberWrite{
+ Parent: &ApduDataExt{},
}
_child.Parent.Child = _child
return _child.Parent, nil
}
-func (m *LDataFrameAck) Serialize(io utils.WriteBuffer) error {
+func (m *ApduDataExtIndividualAddressSerialNumberWrite) Serialize(io utils.WriteBuffer) error {
ser := func() error {
return nil
@@ -120,7 +108,7 @@ func (m *LDataFrameAck) Serialize(io utils.WriteBuffer) error {
return m.Parent.SerializeParent(io, m, ser)
}
-func (m *LDataFrameAck) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
+func (m *ApduDataExtIndividualAddressSerialNumberWrite) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
var token xml.Token
var err error
token = start
@@ -141,7 +129,7 @@ func (m *LDataFrameAck) UnmarshalXML(d *xml.Decoder, start xml.StartElement) err
}
}
-func (m *LDataFrameAck) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
+func (m *ApduDataExtIndividualAddressSerialNumberWrite) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
return nil
}
diff --git a/plc4go/internal/plc4go/knxnetip/readwrite/model/LDataFrameAck.go b/plc4go/internal/plc4go/knxnetip/readwrite/model/ApduDataExtKeyResponse.go
similarity index 55%
copy from plc4go/internal/plc4go/knxnetip/readwrite/model/LDataFrameAck.go
copy to plc4go/internal/plc4go/knxnetip/readwrite/model/ApduDataExtKeyResponse.go
index 1bd9767..66a1a18 100644
--- a/plc4go/internal/plc4go/knxnetip/readwrite/model/LDataFrameAck.go
+++ b/plc4go/internal/plc4go/knxnetip/readwrite/model/ApduDataExtKeyResponse.go
@@ -25,13 +25,13 @@ import (
)
// The data-structure of this message
-type LDataFrameAck struct {
- Parent *LDataFrame
- ILDataFrameAck
+type ApduDataExtKeyResponse struct {
+ Parent *ApduDataExt
+ IApduDataExtKeyResponse
}
// The corresponding interface
-type ILDataFrameAck interface {
+type IApduDataExtKeyResponse interface {
LengthInBytes() uint16
LengthInBits() uint16
Serialize(io utils.WriteBuffer) error
@@ -41,78 +41,66 @@ type ILDataFrameAck interface {
///////////////////////////////////////////////////////////
// Accessors for discriminator values.
///////////////////////////////////////////////////////////
-func (m *LDataFrameAck) NotAckFrame() bool {
- return false
-}
-
-func (m *LDataFrameAck) ExtendedFrame() bool {
- return false
-}
-
-func (m *LDataFrameAck) Polling() bool {
- return false
+func (m *ApduDataExtKeyResponse) ExtApciType() uint8 {
+ return 0x14
}
-func (m *LDataFrameAck) InitializeParent(parent *LDataFrame, repeated bool, priority CEMIPriority, acknowledgeRequested bool, errorFlag bool) {
- m.Parent.Repeated = repeated
- m.Parent.Priority = priority
- m.Parent.AcknowledgeRequested = acknowledgeRequested
- m.Parent.ErrorFlag = errorFlag
+func (m *ApduDataExtKeyResponse) InitializeParent(parent *ApduDataExt) {
}
-func NewLDataFrameAck(repeated bool, priority CEMIPriority, acknowledgeRequested bool, errorFlag bool) *LDataFrame {
- child := &LDataFrameAck{
- Parent: NewLDataFrame(repeated, priority, acknowledgeRequested, errorFlag),
+func NewApduDataExtKeyResponse() *ApduDataExt {
+ child := &ApduDataExtKeyResponse{
+ Parent: NewApduDataExt(),
}
child.Parent.Child = child
return child.Parent
}
-func CastLDataFrameAck(structType interface{}) *LDataFrameAck {
- castFunc := func(typ interface{}) *LDataFrameAck {
- if casted, ok := typ.(LDataFrameAck); ok {
+func CastApduDataExtKeyResponse(structType interface{}) *ApduDataExtKeyResponse {
+ castFunc := func(typ interface{}) *ApduDataExtKeyResponse {
+ if casted, ok := typ.(ApduDataExtKeyResponse); ok {
return &casted
}
- if casted, ok := typ.(*LDataFrameAck); ok {
+ if casted, ok := typ.(*ApduDataExtKeyResponse); ok {
return casted
}
- if casted, ok := typ.(LDataFrame); ok {
- return CastLDataFrameAck(casted.Child)
+ if casted, ok := typ.(ApduDataExt); ok {
+ return CastApduDataExtKeyResponse(casted.Child)
}
- if casted, ok := typ.(*LDataFrame); ok {
- return CastLDataFrameAck(casted.Child)
+ if casted, ok := typ.(*ApduDataExt); ok {
+ return CastApduDataExtKeyResponse(casted.Child)
}
return nil
}
return castFunc(structType)
}
-func (m *LDataFrameAck) GetTypeName() string {
- return "LDataFrameAck"
+func (m *ApduDataExtKeyResponse) GetTypeName() string {
+ return "ApduDataExtKeyResponse"
}
-func (m *LDataFrameAck) LengthInBits() uint16 {
+func (m *ApduDataExtKeyResponse) LengthInBits() uint16 {
lengthInBits := uint16(0)
return lengthInBits
}
-func (m *LDataFrameAck) LengthInBytes() uint16 {
+func (m *ApduDataExtKeyResponse) LengthInBytes() uint16 {
return m.LengthInBits() / 8
}
-func LDataFrameAckParse(io *utils.ReadBuffer) (*LDataFrame, error) {
+func ApduDataExtKeyResponseParse(io *utils.ReadBuffer) (*ApduDataExt, error) {
// Create a partially initialized instance
- _child := &LDataFrameAck{
- Parent: &LDataFrame{},
+ _child := &ApduDataExtKeyResponse{
+ Parent: &ApduDataExt{},
}
_child.Parent.Child = _child
return _child.Parent, nil
}
-func (m *LDataFrameAck) Serialize(io utils.WriteBuffer) error {
+func (m *ApduDataExtKeyResponse) Serialize(io utils.WriteBuffer) error {
ser := func() error {
return nil
@@ -120,7 +108,7 @@ func (m *LDataFrameAck) Serialize(io utils.WriteBuffer) error {
return m.Parent.SerializeParent(io, m, ser)
}
-func (m *LDataFrameAck) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
+func (m *ApduDataExtKeyResponse) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
var token xml.Token
var err error
token = start
@@ -141,7 +129,7 @@ func (m *LDataFrameAck) UnmarshalXML(d *xml.Decoder, start xml.StartElement) err
}
}
-func (m *LDataFrameAck) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
+func (m *ApduDataExtKeyResponse) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
return nil
}
diff --git a/plc4go/internal/plc4go/knxnetip/readwrite/model/LDataFrameAck.go b/plc4go/internal/plc4go/knxnetip/readwrite/model/ApduDataExtKeyWrite.go
similarity index 55%
copy from plc4go/internal/plc4go/knxnetip/readwrite/model/LDataFrameAck.go
copy to plc4go/internal/plc4go/knxnetip/readwrite/model/ApduDataExtKeyWrite.go
index 1bd9767..c8bfab1 100644
--- a/plc4go/internal/plc4go/knxnetip/readwrite/model/LDataFrameAck.go
+++ b/plc4go/internal/plc4go/knxnetip/readwrite/model/ApduDataExtKeyWrite.go
@@ -25,13 +25,13 @@ import (
)
// The data-structure of this message
-type LDataFrameAck struct {
- Parent *LDataFrame
- ILDataFrameAck
+type ApduDataExtKeyWrite struct {
+ Parent *ApduDataExt
+ IApduDataExtKeyWrite
}
// The corresponding interface
-type ILDataFrameAck interface {
+type IApduDataExtKeyWrite interface {
LengthInBytes() uint16
LengthInBits() uint16
Serialize(io utils.WriteBuffer) error
@@ -41,78 +41,66 @@ type ILDataFrameAck interface {
///////////////////////////////////////////////////////////
// Accessors for discriminator values.
///////////////////////////////////////////////////////////
-func (m *LDataFrameAck) NotAckFrame() bool {
- return false
-}
-
-func (m *LDataFrameAck) ExtendedFrame() bool {
- return false
-}
-
-func (m *LDataFrameAck) Polling() bool {
- return false
+func (m *ApduDataExtKeyWrite) ExtApciType() uint8 {
+ return 0x13
}
-func (m *LDataFrameAck) InitializeParent(parent *LDataFrame, repeated bool, priority CEMIPriority, acknowledgeRequested bool, errorFlag bool) {
- m.Parent.Repeated = repeated
- m.Parent.Priority = priority
- m.Parent.AcknowledgeRequested = acknowledgeRequested
- m.Parent.ErrorFlag = errorFlag
+func (m *ApduDataExtKeyWrite) InitializeParent(parent *ApduDataExt) {
}
-func NewLDataFrameAck(repeated bool, priority CEMIPriority, acknowledgeRequested bool, errorFlag bool) *LDataFrame {
- child := &LDataFrameAck{
- Parent: NewLDataFrame(repeated, priority, acknowledgeRequested, errorFlag),
+func NewApduDataExtKeyWrite() *ApduDataExt {
+ child := &ApduDataExtKeyWrite{
+ Parent: NewApduDataExt(),
}
child.Parent.Child = child
return child.Parent
}
-func CastLDataFrameAck(structType interface{}) *LDataFrameAck {
- castFunc := func(typ interface{}) *LDataFrameAck {
- if casted, ok := typ.(LDataFrameAck); ok {
+func CastApduDataExtKeyWrite(structType interface{}) *ApduDataExtKeyWrite {
+ castFunc := func(typ interface{}) *ApduDataExtKeyWrite {
+ if casted, ok := typ.(ApduDataExtKeyWrite); ok {
return &casted
}
- if casted, ok := typ.(*LDataFrameAck); ok {
+ if casted, ok := typ.(*ApduDataExtKeyWrite); ok {
return casted
}
- if casted, ok := typ.(LDataFrame); ok {
- return CastLDataFrameAck(casted.Child)
+ if casted, ok := typ.(ApduDataExt); ok {
+ return CastApduDataExtKeyWrite(casted.Child)
}
- if casted, ok := typ.(*LDataFrame); ok {
- return CastLDataFrameAck(casted.Child)
+ if casted, ok := typ.(*ApduDataExt); ok {
+ return CastApduDataExtKeyWrite(casted.Child)
}
return nil
}
return castFunc(structType)
}
-func (m *LDataFrameAck) GetTypeName() string {
- return "LDataFrameAck"
+func (m *ApduDataExtKeyWrite) GetTypeName() string {
+ return "ApduDataExtKeyWrite"
}
-func (m *LDataFrameAck) LengthInBits() uint16 {
+func (m *ApduDataExtKeyWrite) LengthInBits() uint16 {
lengthInBits := uint16(0)
return lengthInBits
}
-func (m *LDataFrameAck) LengthInBytes() uint16 {
+func (m *ApduDataExtKeyWrite) LengthInBytes() uint16 {
return m.LengthInBits() / 8
}
-func LDataFrameAckParse(io *utils.ReadBuffer) (*LDataFrame, error) {
+func ApduDataExtKeyWriteParse(io *utils.ReadBuffer) (*ApduDataExt, error) {
// Create a partially initialized instance
- _child := &LDataFrameAck{
- Parent: &LDataFrame{},
+ _child := &ApduDataExtKeyWrite{
+ Parent: &ApduDataExt{},
}
_child.Parent.Child = _child
return _child.Parent, nil
}
-func (m *LDataFrameAck) Serialize(io utils.WriteBuffer) error {
+func (m *ApduDataExtKeyWrite) Serialize(io utils.WriteBuffer) error {
ser := func() error {
return nil
@@ -120,7 +108,7 @@ func (m *LDataFrameAck) Serialize(io utils.WriteBuffer) error {
return m.Parent.SerializeParent(io, m, ser)
}
-func (m *LDataFrameAck) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
+func (m *ApduDataExtKeyWrite) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
var token xml.Token
var err error
token = start
@@ -141,7 +129,7 @@ func (m *LDataFrameAck) UnmarshalXML(d *xml.Decoder, start xml.StartElement) err
}
}
-func (m *LDataFrameAck) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
+func (m *ApduDataExtKeyWrite) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
return nil
}
diff --git a/plc4go/internal/plc4go/knxnetip/readwrite/model/LDataFrameAck.go b/plc4go/internal/plc4go/knxnetip/readwrite/model/ApduDataExtLinkRead.go
similarity index 55%
copy from plc4go/internal/plc4go/knxnetip/readwrite/model/LDataFrameAck.go
copy to plc4go/internal/plc4go/knxnetip/readwrite/model/ApduDataExtLinkRead.go
index 1bd9767..037bfb1 100644
--- a/plc4go/internal/plc4go/knxnetip/readwrite/model/LDataFrameAck.go
+++ b/plc4go/internal/plc4go/knxnetip/readwrite/model/ApduDataExtLinkRead.go
@@ -25,13 +25,13 @@ import (
)
// The data-structure of this message
-type LDataFrameAck struct {
- Parent *LDataFrame
- ILDataFrameAck
+type ApduDataExtLinkRead struct {
+ Parent *ApduDataExt
+ IApduDataExtLinkRead
}
// The corresponding interface
-type ILDataFrameAck interface {
+type IApduDataExtLinkRead interface {
LengthInBytes() uint16
LengthInBits() uint16
Serialize(io utils.WriteBuffer) error
@@ -41,78 +41,66 @@ type ILDataFrameAck interface {
///////////////////////////////////////////////////////////
// Accessors for discriminator values.
///////////////////////////////////////////////////////////
-func (m *LDataFrameAck) NotAckFrame() bool {
- return false
-}
-
-func (m *LDataFrameAck) ExtendedFrame() bool {
- return false
-}
-
-func (m *LDataFrameAck) Polling() bool {
- return false
+func (m *ApduDataExtLinkRead) ExtApciType() uint8 {
+ return 0x25
}
-func (m *LDataFrameAck) InitializeParent(parent *LDataFrame, repeated bool, priority CEMIPriority, acknowledgeRequested bool, errorFlag bool) {
- m.Parent.Repeated = repeated
- m.Parent.Priority = priority
- m.Parent.AcknowledgeRequested = acknowledgeRequested
- m.Parent.ErrorFlag = errorFlag
+func (m *ApduDataExtLinkRead) InitializeParent(parent *ApduDataExt) {
}
-func NewLDataFrameAck(repeated bool, priority CEMIPriority, acknowledgeRequested bool, errorFlag bool) *LDataFrame {
- child := &LDataFrameAck{
- Parent: NewLDataFrame(repeated, priority, acknowledgeRequested, errorFlag),
+func NewApduDataExtLinkRead() *ApduDataExt {
+ child := &ApduDataExtLinkRead{
+ Parent: NewApduDataExt(),
}
child.Parent.Child = child
return child.Parent
}
-func CastLDataFrameAck(structType interface{}) *LDataFrameAck {
- castFunc := func(typ interface{}) *LDataFrameAck {
- if casted, ok := typ.(LDataFrameAck); ok {
+func CastApduDataExtLinkRead(structType interface{}) *ApduDataExtLinkRead {
+ castFunc := func(typ interface{}) *ApduDataExtLinkRead {
+ if casted, ok := typ.(ApduDataExtLinkRead); ok {
return &casted
}
- if casted, ok := typ.(*LDataFrameAck); ok {
+ if casted, ok := typ.(*ApduDataExtLinkRead); ok {
return casted
}
- if casted, ok := typ.(LDataFrame); ok {
- return CastLDataFrameAck(casted.Child)
+ if casted, ok := typ.(ApduDataExt); ok {
+ return CastApduDataExtLinkRead(casted.Child)
}
- if casted, ok := typ.(*LDataFrame); ok {
- return CastLDataFrameAck(casted.Child)
+ if casted, ok := typ.(*ApduDataExt); ok {
+ return CastApduDataExtLinkRead(casted.Child)
}
return nil
}
return castFunc(structType)
}
-func (m *LDataFrameAck) GetTypeName() string {
- return "LDataFrameAck"
+func (m *ApduDataExtLinkRead) GetTypeName() string {
+ return "ApduDataExtLinkRead"
}
-func (m *LDataFrameAck) LengthInBits() uint16 {
+func (m *ApduDataExtLinkRead) LengthInBits() uint16 {
lengthInBits := uint16(0)
return lengthInBits
}
-func (m *LDataFrameAck) LengthInBytes() uint16 {
+func (m *ApduDataExtLinkRead) LengthInBytes() uint16 {
return m.LengthInBits() / 8
}
-func LDataFrameAckParse(io *utils.ReadBuffer) (*LDataFrame, error) {
+func ApduDataExtLinkReadParse(io *utils.ReadBuffer) (*ApduDataExt, error) {
// Create a partially initialized instance
- _child := &LDataFrameAck{
- Parent: &LDataFrame{},
+ _child := &ApduDataExtLinkRead{
+ Parent: &ApduDataExt{},
}
_child.Parent.Child = _child
return _child.Parent, nil
}
-func (m *LDataFrameAck) Serialize(io utils.WriteBuffer) error {
+func (m *ApduDataExtLinkRead) Serialize(io utils.WriteBuffer) error {
ser := func() error {
return nil
@@ -120,7 +108,7 @@ func (m *LDataFrameAck) Serialize(io utils.WriteBuffer) error {
return m.Parent.SerializeParent(io, m, ser)
}
-func (m *LDataFrameAck) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
+func (m *ApduDataExtLinkRead) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
var token xml.Token
var err error
token = start
@@ -141,7 +129,7 @@ func (m *LDataFrameAck) UnmarshalXML(d *xml.Decoder, start xml.StartElement) err
}
}
-func (m *LDataFrameAck) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
+func (m *ApduDataExtLinkRead) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
return nil
}
diff --git a/plc4go/internal/plc4go/knxnetip/readwrite/model/LDataFrameAck.go b/plc4go/internal/plc4go/knxnetip/readwrite/model/ApduDataExtLinkResponse.go
similarity index 55%
copy from plc4go/internal/plc4go/knxnetip/readwrite/model/LDataFrameAck.go
copy to plc4go/internal/plc4go/knxnetip/readwrite/model/ApduDataExtLinkResponse.go
index 1bd9767..7109c8e 100644
--- a/plc4go/internal/plc4go/knxnetip/readwrite/model/LDataFrameAck.go
+++ b/plc4go/internal/plc4go/knxnetip/readwrite/model/ApduDataExtLinkResponse.go
@@ -25,13 +25,13 @@ import (
)
// The data-structure of this message
-type LDataFrameAck struct {
- Parent *LDataFrame
- ILDataFrameAck
+type ApduDataExtLinkResponse struct {
+ Parent *ApduDataExt
+ IApduDataExtLinkResponse
}
// The corresponding interface
-type ILDataFrameAck interface {
+type IApduDataExtLinkResponse interface {
LengthInBytes() uint16
LengthInBits() uint16
Serialize(io utils.WriteBuffer) error
@@ -41,78 +41,66 @@ type ILDataFrameAck interface {
///////////////////////////////////////////////////////////
// Accessors for discriminator values.
///////////////////////////////////////////////////////////
-func (m *LDataFrameAck) NotAckFrame() bool {
- return false
-}
-
-func (m *LDataFrameAck) ExtendedFrame() bool {
- return false
-}
-
-func (m *LDataFrameAck) Polling() bool {
- return false
+func (m *ApduDataExtLinkResponse) ExtApciType() uint8 {
+ return 0x26
}
-func (m *LDataFrameAck) InitializeParent(parent *LDataFrame, repeated bool, priority CEMIPriority, acknowledgeRequested bool, errorFlag bool) {
- m.Parent.Repeated = repeated
- m.Parent.Priority = priority
- m.Parent.AcknowledgeRequested = acknowledgeRequested
- m.Parent.ErrorFlag = errorFlag
+func (m *ApduDataExtLinkResponse) InitializeParent(parent *ApduDataExt) {
}
-func NewLDataFrameAck(repeated bool, priority CEMIPriority, acknowledgeRequested bool, errorFlag bool) *LDataFrame {
- child := &LDataFrameAck{
- Parent: NewLDataFrame(repeated, priority, acknowledgeRequested, errorFlag),
+func NewApduDataExtLinkResponse() *ApduDataExt {
+ child := &ApduDataExtLinkResponse{
+ Parent: NewApduDataExt(),
}
child.Parent.Child = child
return child.Parent
}
-func CastLDataFrameAck(structType interface{}) *LDataFrameAck {
- castFunc := func(typ interface{}) *LDataFrameAck {
- if casted, ok := typ.(LDataFrameAck); ok {
+func CastApduDataExtLinkResponse(structType interface{}) *ApduDataExtLinkResponse {
+ castFunc := func(typ interface{}) *ApduDataExtLinkResponse {
+ if casted, ok := typ.(ApduDataExtLinkResponse); ok {
return &casted
}
- if casted, ok := typ.(*LDataFrameAck); ok {
+ if casted, ok := typ.(*ApduDataExtLinkResponse); ok {
return casted
}
- if casted, ok := typ.(LDataFrame); ok {
- return CastLDataFrameAck(casted.Child)
+ if casted, ok := typ.(ApduDataExt); ok {
+ return CastApduDataExtLinkResponse(casted.Child)
}
- if casted, ok := typ.(*LDataFrame); ok {
- return CastLDataFrameAck(casted.Child)
+ if casted, ok := typ.(*ApduDataExt); ok {
+ return CastApduDataExtLinkResponse(casted.Child)
}
return nil
}
return castFunc(structType)
}
-func (m *LDataFrameAck) GetTypeName() string {
- return "LDataFrameAck"
+func (m *ApduDataExtLinkResponse) GetTypeName() string {
+ return "ApduDataExtLinkResponse"
}
-func (m *LDataFrameAck) LengthInBits() uint16 {
+func (m *ApduDataExtLinkResponse) LengthInBits() uint16 {
lengthInBits := uint16(0)
return lengthInBits
}
-func (m *LDataFrameAck) LengthInBytes() uint16 {
+func (m *ApduDataExtLinkResponse) LengthInBytes() uint16 {
return m.LengthInBits() / 8
}
-func LDataFrameAckParse(io *utils.ReadBuffer) (*LDataFrame, error) {
+func ApduDataExtLinkResponseParse(io *utils.ReadBuffer) (*ApduDataExt, error) {
// Create a partially initialized instance
- _child := &LDataFrameAck{
- Parent: &LDataFrame{},
+ _child := &ApduDataExtLinkResponse{
+ Parent: &ApduDataExt{},
}
_child.Parent.Child = _child
return _child.Parent, nil
}
-func (m *LDataFrameAck) Serialize(io utils.WriteBuffer) error {
+func (m *ApduDataExtLinkResponse) Serialize(io utils.WriteBuffer) error {
ser := func() error {
return nil
@@ -120,7 +108,7 @@ func (m *LDataFrameAck) Serialize(io utils.WriteBuffer) error {
return m.Parent.SerializeParent(io, m, ser)
}
-func (m *LDataFrameAck) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
+func (m *ApduDataExtLinkResponse) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
var token xml.Token
var err error
token = start
@@ -141,7 +129,7 @@ func (m *LDataFrameAck) UnmarshalXML(d *xml.Decoder, start xml.StartElement) err
}
}
-func (m *LDataFrameAck) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
+func (m *ApduDataExtLinkResponse) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
return nil
}
diff --git a/plc4go/internal/plc4go/knxnetip/readwrite/model/LDataFrameAck.go b/plc4go/internal/plc4go/knxnetip/readwrite/model/ApduDataExtLinkWrite.go
similarity index 55%
copy from plc4go/internal/plc4go/knxnetip/readwrite/model/LDataFrameAck.go
copy to plc4go/internal/plc4go/knxnetip/readwrite/model/ApduDataExtLinkWrite.go
index 1bd9767..d45ef83 100644
--- a/plc4go/internal/plc4go/knxnetip/readwrite/model/LDataFrameAck.go
+++ b/plc4go/internal/plc4go/knxnetip/readwrite/model/ApduDataExtLinkWrite.go
@@ -25,13 +25,13 @@ import (
)
// The data-structure of this message
-type LDataFrameAck struct {
- Parent *LDataFrame
- ILDataFrameAck
+type ApduDataExtLinkWrite struct {
+ Parent *ApduDataExt
+ IApduDataExtLinkWrite
}
// The corresponding interface
-type ILDataFrameAck interface {
+type IApduDataExtLinkWrite interface {
LengthInBytes() uint16
LengthInBits() uint16
Serialize(io utils.WriteBuffer) error
@@ -41,78 +41,66 @@ type ILDataFrameAck interface {
///////////////////////////////////////////////////////////
// Accessors for discriminator values.
///////////////////////////////////////////////////////////
-func (m *LDataFrameAck) NotAckFrame() bool {
- return false
-}
-
-func (m *LDataFrameAck) ExtendedFrame() bool {
- return false
-}
-
-func (m *LDataFrameAck) Polling() bool {
- return false
+func (m *ApduDataExtLinkWrite) ExtApciType() uint8 {
+ return 0x27
}
-func (m *LDataFrameAck) InitializeParent(parent *LDataFrame, repeated bool, priority CEMIPriority, acknowledgeRequested bool, errorFlag bool) {
- m.Parent.Repeated = repeated
- m.Parent.Priority = priority
- m.Parent.AcknowledgeRequested = acknowledgeRequested
- m.Parent.ErrorFlag = errorFlag
+func (m *ApduDataExtLinkWrite) InitializeParent(parent *ApduDataExt) {
}
-func NewLDataFrameAck(repeated bool, priority CEMIPriority, acknowledgeRequested bool, errorFlag bool) *LDataFrame {
- child := &LDataFrameAck{
- Parent: NewLDataFrame(repeated, priority, acknowledgeRequested, errorFlag),
+func NewApduDataExtLinkWrite() *ApduDataExt {
+ child := &ApduDataExtLinkWrite{
+ Parent: NewApduDataExt(),
}
child.Parent.Child = child
return child.Parent
}
-func CastLDataFrameAck(structType interface{}) *LDataFrameAck {
- castFunc := func(typ interface{}) *LDataFrameAck {
- if casted, ok := typ.(LDataFrameAck); ok {
+func CastApduDataExtLinkWrite(structType interface{}) *ApduDataExtLinkWrite {
+ castFunc := func(typ interface{}) *ApduDataExtLinkWrite {
+ if casted, ok := typ.(ApduDataExtLinkWrite); ok {
return &casted
}
- if casted, ok := typ.(*LDataFrameAck); ok {
+ if casted, ok := typ.(*ApduDataExtLinkWrite); ok {
return casted
}
- if casted, ok := typ.(LDataFrame); ok {
- return CastLDataFrameAck(casted.Child)
+ if casted, ok := typ.(ApduDataExt); ok {
+ return CastApduDataExtLinkWrite(casted.Child)
}
- if casted, ok := typ.(*LDataFrame); ok {
- return CastLDataFrameAck(casted.Child)
+ if casted, ok := typ.(*ApduDataExt); ok {
+ return CastApduDataExtLinkWrite(casted.Child)
}
return nil
}
return castFunc(structType)
}
-func (m *LDataFrameAck) GetTypeName() string {
- return "LDataFrameAck"
+func (m *ApduDataExtLinkWrite) GetTypeName() string {
+ return "ApduDataExtLinkWrite"
}
-func (m *LDataFrameAck) LengthInBits() uint16 {
+func (m *ApduDataExtLinkWrite) LengthInBits() uint16 {
lengthInBits := uint16(0)
return lengthInBits
}
-func (m *LDataFrameAck) LengthInBytes() uint16 {
+func (m *ApduDataExtLinkWrite) LengthInBytes() uint16 {
return m.LengthInBits() / 8
}
-func LDataFrameAckParse(io *utils.ReadBuffer) (*LDataFrame, error) {
+func ApduDataExtLinkWriteParse(io *utils.ReadBuffer) (*ApduDataExt, error) {
// Create a partially initialized instance
- _child := &LDataFrameAck{
- Parent: &LDataFrame{},
+ _child := &ApduDataExtLinkWrite{
+ Parent: &ApduDataExt{},
}
_child.Parent.Child = _child
return _child.Parent, nil
}
-func (m *LDataFrameAck) Serialize(io utils.WriteBuffer) error {
+func (m *ApduDataExtLinkWrite) Serialize(io utils.WriteBuffer) error {
ser := func() error {
return nil
@@ -120,7 +108,7 @@ func (m *LDataFrameAck) Serialize(io utils.WriteBuffer) error {
return m.Parent.SerializeParent(io, m, ser)
}
-func (m *LDataFrameAck) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
+func (m *ApduDataExtLinkWrite) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
var token xml.Token
var err error
token = start
@@ -141,7 +129,7 @@ func (m *LDataFrameAck) UnmarshalXML(d *xml.Decoder, start xml.StartElement) err
}
}
-func (m *LDataFrameAck) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
+func (m *ApduDataExtLinkWrite) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
return nil
}
diff --git a/plc4go/internal/plc4go/knxnetip/readwrite/model/LDataFrameAck.go b/plc4go/internal/plc4go/knxnetip/readwrite/model/ApduDataExtMemoryBitWrite.go
similarity index 55%
copy from plc4go/internal/plc4go/knxnetip/readwrite/model/LDataFrameAck.go
copy to plc4go/internal/plc4go/knxnetip/readwrite/model/ApduDataExtMemoryBitWrite.go
index 1bd9767..609804d 100644
--- a/plc4go/internal/plc4go/knxnetip/readwrite/model/LDataFrameAck.go
+++ b/plc4go/internal/plc4go/knxnetip/readwrite/model/ApduDataExtMemoryBitWrite.go
@@ -25,13 +25,13 @@ import (
)
// The data-structure of this message
-type LDataFrameAck struct {
- Parent *LDataFrame
- ILDataFrameAck
+type ApduDataExtMemoryBitWrite struct {
+ Parent *ApduDataExt
+ IApduDataExtMemoryBitWrite
}
// The corresponding interface
-type ILDataFrameAck interface {
+type IApduDataExtMemoryBitWrite interface {
LengthInBytes() uint16
LengthInBits() uint16
Serialize(io utils.WriteBuffer) error
@@ -41,78 +41,66 @@ type ILDataFrameAck interface {
///////////////////////////////////////////////////////////
// Accessors for discriminator values.
///////////////////////////////////////////////////////////
-func (m *LDataFrameAck) NotAckFrame() bool {
- return false
-}
-
-func (m *LDataFrameAck) ExtendedFrame() bool {
- return false
-}
-
-func (m *LDataFrameAck) Polling() bool {
- return false
+func (m *ApduDataExtMemoryBitWrite) ExtApciType() uint8 {
+ return 0x10
}
-func (m *LDataFrameAck) InitializeParent(parent *LDataFrame, repeated bool, priority CEMIPriority, acknowledgeRequested bool, errorFlag bool) {
- m.Parent.Repeated = repeated
- m.Parent.Priority = priority
- m.Parent.AcknowledgeRequested = acknowledgeRequested
- m.Parent.ErrorFlag = errorFlag
+func (m *ApduDataExtMemoryBitWrite) InitializeParent(parent *ApduDataExt) {
}
-func NewLDataFrameAck(repeated bool, priority CEMIPriority, acknowledgeRequested bool, errorFlag bool) *LDataFrame {
- child := &LDataFrameAck{
- Parent: NewLDataFrame(repeated, priority, acknowledgeRequested, errorFlag),
+func NewApduDataExtMemoryBitWrite() *ApduDataExt {
+ child := &ApduDataExtMemoryBitWrite{
+ Parent: NewApduDataExt(),
}
child.Parent.Child = child
return child.Parent
}
-func CastLDataFrameAck(structType interface{}) *LDataFrameAck {
- castFunc := func(typ interface{}) *LDataFrameAck {
- if casted, ok := typ.(LDataFrameAck); ok {
+func CastApduDataExtMemoryBitWrite(structType interface{}) *ApduDataExtMemoryBitWrite {
+ castFunc := func(typ interface{}) *ApduDataExtMemoryBitWrite {
+ if casted, ok := typ.(ApduDataExtMemoryBitWrite); ok {
return &casted
}
- if casted, ok := typ.(*LDataFrameAck); ok {
+ if casted, ok := typ.(*ApduDataExtMemoryBitWrite); ok {
return casted
}
- if casted, ok := typ.(LDataFrame); ok {
- return CastLDataFrameAck(casted.Child)
+ if casted, ok := typ.(ApduDataExt); ok {
+ return CastApduDataExtMemoryBitWrite(casted.Child)
}
- if casted, ok := typ.(*LDataFrame); ok {
- return CastLDataFrameAck(casted.Child)
+ if casted, ok := typ.(*ApduDataExt); ok {
+ return CastApduDataExtMemoryBitWrite(casted.Child)
}
return nil
}
return castFunc(structType)
}
-func (m *LDataFrameAck) GetTypeName() string {
- return "LDataFrameAck"
+func (m *ApduDataExtMemoryBitWrite) GetTypeName() string {
+ return "ApduDataExtMemoryBitWrite"
}
-func (m *LDataFrameAck) LengthInBits() uint16 {
+func (m *ApduDataExtMemoryBitWrite) LengthInBits() uint16 {
lengthInBits := uint16(0)
return lengthInBits
}
-func (m *LDataFrameAck) LengthInBytes() uint16 {
+func (m *ApduDataExtMemoryBitWrite) LengthInBytes() uint16 {
return m.LengthInBits() / 8
}
-func LDataFrameAckParse(io *utils.ReadBuffer) (*LDataFrame, error) {
+func ApduDataExtMemoryBitWriteParse(io *utils.ReadBuffer) (*ApduDataExt, error) {
// Create a partially initialized instance
- _child := &LDataFrameAck{
- Parent: &LDataFrame{},
+ _child := &ApduDataExtMemoryBitWrite{
+ Parent: &ApduDataExt{},
}
_child.Parent.Child = _child
return _child.Parent, nil
}
-func (m *LDataFrameAck) Serialize(io utils.WriteBuffer) error {
+func (m *ApduDataExtMemoryBitWrite) Serialize(io utils.WriteBuffer) error {
ser := func() error {
return nil
@@ -120,7 +108,7 @@ func (m *LDataFrameAck) Serialize(io utils.WriteBuffer) error {
return m.Parent.SerializeParent(io, m, ser)
}
-func (m *LDataFrameAck) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
+func (m *ApduDataExtMemoryBitWrite) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
var token xml.Token
var err error
token = start
@@ -141,7 +129,7 @@ func (m *LDataFrameAck) UnmarshalXML(d *xml.Decoder, start xml.StartElement) err
}
}
-func (m *LDataFrameAck) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
+func (m *ApduDataExtMemoryBitWrite) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
return nil
}
diff --git a/plc4go/internal/plc4go/knxnetip/readwrite/model/LDataFrameAck.go b/plc4go/internal/plc4go/knxnetip/readwrite/model/ApduDataExtNetworkParameterRead.go
similarity index 55%
copy from plc4go/internal/plc4go/knxnetip/readwrite/model/LDataFrameAck.go
copy to plc4go/internal/plc4go/knxnetip/readwrite/model/ApduDataExtNetworkParameterRead.go
index 1bd9767..9c6454b 100644
--- a/plc4go/internal/plc4go/knxnetip/readwrite/model/LDataFrameAck.go
+++ b/plc4go/internal/plc4go/knxnetip/readwrite/model/ApduDataExtNetworkParameterRead.go
@@ -25,13 +25,13 @@ import (
)
// The data-structure of this message
-type LDataFrameAck struct {
- Parent *LDataFrame
- ILDataFrameAck
+type ApduDataExtNetworkParameterRead struct {
+ Parent *ApduDataExt
+ IApduDataExtNetworkParameterRead
}
// The corresponding interface
-type ILDataFrameAck interface {
+type IApduDataExtNetworkParameterRead interface {
LengthInBytes() uint16
LengthInBits() uint16
Serialize(io utils.WriteBuffer) error
@@ -41,78 +41,66 @@ type ILDataFrameAck interface {
///////////////////////////////////////////////////////////
// Accessors for discriminator values.
///////////////////////////////////////////////////////////
-func (m *LDataFrameAck) NotAckFrame() bool {
- return false
-}
-
-func (m *LDataFrameAck) ExtendedFrame() bool {
- return false
-}
-
-func (m *LDataFrameAck) Polling() bool {
- return false
+func (m *ApduDataExtNetworkParameterRead) ExtApciType() uint8 {
+ return 0x1A
}
-func (m *LDataFrameAck) InitializeParent(parent *LDataFrame, repeated bool, priority CEMIPriority, acknowledgeRequested bool, errorFlag bool) {
- m.Parent.Repeated = repeated
- m.Parent.Priority = priority
- m.Parent.AcknowledgeRequested = acknowledgeRequested
- m.Parent.ErrorFlag = errorFlag
+func (m *ApduDataExtNetworkParameterRead) InitializeParent(parent *ApduDataExt) {
}
-func NewLDataFrameAck(repeated bool, priority CEMIPriority, acknowledgeRequested bool, errorFlag bool) *LDataFrame {
- child := &LDataFrameAck{
- Parent: NewLDataFrame(repeated, priority, acknowledgeRequested, errorFlag),
+func NewApduDataExtNetworkParameterRead() *ApduDataExt {
+ child := &ApduDataExtNetworkParameterRead{
+ Parent: NewApduDataExt(),
}
child.Parent.Child = child
return child.Parent
}
-func CastLDataFrameAck(structType interface{}) *LDataFrameAck {
- castFunc := func(typ interface{}) *LDataFrameAck {
- if casted, ok := typ.(LDataFrameAck); ok {
+func CastApduDataExtNetworkParameterRead(structType interface{}) *ApduDataExtNetworkParameterRead {
+ castFunc := func(typ interface{}) *ApduDataExtNetworkParameterRead {
+ if casted, ok := typ.(ApduDataExtNetworkParameterRead); ok {
return &casted
}
- if casted, ok := typ.(*LDataFrameAck); ok {
+ if casted, ok := typ.(*ApduDataExtNetworkParameterRead); ok {
return casted
}
- if casted, ok := typ.(LDataFrame); ok {
- return CastLDataFrameAck(casted.Child)
+ if casted, ok := typ.(ApduDataExt); ok {
+ return CastApduDataExtNetworkParameterRead(casted.Child)
}
- if casted, ok := typ.(*LDataFrame); ok {
- return CastLDataFrameAck(casted.Child)
+ if casted, ok := typ.(*ApduDataExt); ok {
+ return CastApduDataExtNetworkParameterRead(casted.Child)
}
return nil
}
return castFunc(structType)
}
-func (m *LDataFrameAck) GetTypeName() string {
- return "LDataFrameAck"
+func (m *ApduDataExtNetworkParameterRead) GetTypeName() string {
+ return "ApduDataExtNetworkParameterRead"
}
-func (m *LDataFrameAck) LengthInBits() uint16 {
+func (m *ApduDataExtNetworkParameterRead) LengthInBits() uint16 {
lengthInBits := uint16(0)
return lengthInBits
}
-func (m *LDataFrameAck) LengthInBytes() uint16 {
+func (m *ApduDataExtNetworkParameterRead) LengthInBytes() uint16 {
return m.LengthInBits() / 8
}
-func LDataFrameAckParse(io *utils.ReadBuffer) (*LDataFrame, error) {
+func ApduDataExtNetworkParameterReadParse(io *utils.ReadBuffer) (*ApduDataExt, error) {
// Create a partially initialized instance
- _child := &LDataFrameAck{
- Parent: &LDataFrame{},
+ _child := &ApduDataExtNetworkParameterRead{
+ Parent: &ApduDataExt{},
}
_child.Parent.Child = _child
return _child.Parent, nil
}
-func (m *LDataFrameAck) Serialize(io utils.WriteBuffer) error {
+func (m *ApduDataExtNetworkParameterRead) Serialize(io utils.WriteBuffer) error {
ser := func() error {
return nil
@@ -120,7 +108,7 @@ func (m *LDataFrameAck) Serialize(io utils.WriteBuffer) error {
return m.Parent.SerializeParent(io, m, ser)
}
-func (m *LDataFrameAck) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
+func (m *ApduDataExtNetworkParameterRead) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
var token xml.Token
var err error
token = start
@@ -141,7 +129,7 @@ func (m *LDataFrameAck) UnmarshalXML(d *xml.Decoder, start xml.StartElement) err
}
}
-func (m *LDataFrameAck) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
+func (m *ApduDataExtNetworkParameterRead) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
return nil
}
diff --git a/plc4go/internal/plc4go/knxnetip/readwrite/model/LDataFrameAck.go b/plc4go/internal/plc4go/knxnetip/readwrite/model/ApduDataExtNetworkParameterResponse.go
similarity index 55%
copy from plc4go/internal/plc4go/knxnetip/readwrite/model/LDataFrameAck.go
copy to plc4go/internal/plc4go/knxnetip/readwrite/model/ApduDataExtNetworkParameterResponse.go
index 1bd9767..9912164 100644
--- a/plc4go/internal/plc4go/knxnetip/readwrite/model/LDataFrameAck.go
+++ b/plc4go/internal/plc4go/knxnetip/readwrite/model/ApduDataExtNetworkParameterResponse.go
@@ -25,13 +25,13 @@ import (
)
// The data-structure of this message
-type LDataFrameAck struct {
- Parent *LDataFrame
- ILDataFrameAck
+type ApduDataExtNetworkParameterResponse struct {
+ Parent *ApduDataExt
+ IApduDataExtNetworkParameterResponse
}
// The corresponding interface
-type ILDataFrameAck interface {
+type IApduDataExtNetworkParameterResponse interface {
LengthInBytes() uint16
LengthInBits() uint16
Serialize(io utils.WriteBuffer) error
@@ -41,78 +41,66 @@ type ILDataFrameAck interface {
///////////////////////////////////////////////////////////
// Accessors for discriminator values.
///////////////////////////////////////////////////////////
-func (m *LDataFrameAck) NotAckFrame() bool {
- return false
-}
-
-func (m *LDataFrameAck) ExtendedFrame() bool {
- return false
-}
-
-func (m *LDataFrameAck) Polling() bool {
- return false
+func (m *ApduDataExtNetworkParameterResponse) ExtApciType() uint8 {
+ return 0x1B
}
-func (m *LDataFrameAck) InitializeParent(parent *LDataFrame, repeated bool, priority CEMIPriority, acknowledgeRequested bool, errorFlag bool) {
- m.Parent.Repeated = repeated
- m.Parent.Priority = priority
- m.Parent.AcknowledgeRequested = acknowledgeRequested
- m.Parent.ErrorFlag = errorFlag
+func (m *ApduDataExtNetworkParameterResponse) InitializeParent(parent *ApduDataExt) {
}
-func NewLDataFrameAck(repeated bool, priority CEMIPriority, acknowledgeRequested bool, errorFlag bool) *LDataFrame {
- child := &LDataFrameAck{
- Parent: NewLDataFrame(repeated, priority, acknowledgeRequested, errorFlag),
+func NewApduDataExtNetworkParameterResponse() *ApduDataExt {
+ child := &ApduDataExtNetworkParameterResponse{
+ Parent: NewApduDataExt(),
}
child.Parent.Child = child
return child.Parent
}
-func CastLDataFrameAck(structType interface{}) *LDataFrameAck {
- castFunc := func(typ interface{}) *LDataFrameAck {
- if casted, ok := typ.(LDataFrameAck); ok {
+func CastApduDataExtNetworkParameterResponse(structType interface{}) *ApduDataExtNetworkParameterResponse {
+ castFunc := func(typ interface{}) *ApduDataExtNetworkParameterResponse {
+ if casted, ok := typ.(ApduDataExtNetworkParameterResponse); ok {
return &casted
}
- if casted, ok := typ.(*LDataFrameAck); ok {
+ if casted, ok := typ.(*ApduDataExtNetworkParameterResponse); ok {
return casted
}
- if casted, ok := typ.(LDataFrame); ok {
- return CastLDataFrameAck(casted.Child)
+ if casted, ok := typ.(ApduDataExt); ok {
+ return CastApduDataExtNetworkParameterResponse(casted.Child)
}
- if casted, ok := typ.(*LDataFrame); ok {
- return CastLDataFrameAck(casted.Child)
+ if casted, ok := typ.(*ApduDataExt); ok {
+ return CastApduDataExtNetworkParameterResponse(casted.Child)
}
return nil
}
return castFunc(structType)
}
-func (m *LDataFrameAck) GetTypeName() string {
- return "LDataFrameAck"
+func (m *ApduDataExtNetworkParameterResponse) GetTypeName() string {
+ return "ApduDataExtNetworkParameterResponse"
}
-func (m *LDataFrameAck) LengthInBits() uint16 {
+func (m *ApduDataExtNetworkParameterResponse) LengthInBits() uint16 {
lengthInBits := uint16(0)
return lengthInBits
}
-func (m *LDataFrameAck) LengthInBytes() uint16 {
+func (m *ApduDataExtNetworkParameterResponse) LengthInBytes() uint16 {
return m.LengthInBits() / 8
}
-func LDataFrameAckParse(io *utils.ReadBuffer) (*LDataFrame, error) {
+func ApduDataExtNetworkParameterResponseParse(io *utils.ReadBuffer) (*ApduDataExt, error) {
// Create a partially initialized instance
- _child := &LDataFrameAck{
- Parent: &LDataFrame{},
+ _child := &ApduDataExtNetworkParameterResponse{
+ Parent: &ApduDataExt{},
}
_child.Parent.Child = _child
return _child.Parent, nil
}
-func (m *LDataFrameAck) Serialize(io utils.WriteBuffer) error {
+func (m *ApduDataExtNetworkParameterResponse) Serialize(io utils.WriteBuffer) error {
ser := func() error {
return nil
@@ -120,7 +108,7 @@ func (m *LDataFrameAck) Serialize(io utils.WriteBuffer) error {
return m.Parent.SerializeParent(io, m, ser)
}
-func (m *LDataFrameAck) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
+func (m *ApduDataExtNetworkParameterResponse) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
var token xml.Token
var err error
token = start
@@ -141,7 +129,7 @@ func (m *LDataFrameAck) UnmarshalXML(d *xml.Decoder, start xml.StartElement) err
}
}
-func (m *LDataFrameAck) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
+func (m *ApduDataExtNetworkParameterResponse) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
return nil
}
diff --git a/plc4go/internal/plc4go/knxnetip/readwrite/model/LDataFrameAck.go b/plc4go/internal/plc4go/knxnetip/readwrite/model/ApduDataExtNetworkParameterWrite.go
similarity index 55%
copy from plc4go/internal/plc4go/knxnetip/readwrite/model/LDataFrameAck.go
copy to plc4go/internal/plc4go/knxnetip/readwrite/model/ApduDataExtNetworkParameterWrite.go
index 1bd9767..6b0ff24 100644
--- a/plc4go/internal/plc4go/knxnetip/readwrite/model/LDataFrameAck.go
+++ b/plc4go/internal/plc4go/knxnetip/readwrite/model/ApduDataExtNetworkParameterWrite.go
@@ -25,13 +25,13 @@ import (
)
// The data-structure of this message
-type LDataFrameAck struct {
- Parent *LDataFrame
- ILDataFrameAck
+type ApduDataExtNetworkParameterWrite struct {
+ Parent *ApduDataExt
+ IApduDataExtNetworkParameterWrite
}
// The corresponding interface
-type ILDataFrameAck interface {
+type IApduDataExtNetworkParameterWrite interface {
LengthInBytes() uint16
LengthInBits() uint16
Serialize(io utils.WriteBuffer) error
@@ -41,78 +41,66 @@ type ILDataFrameAck interface {
///////////////////////////////////////////////////////////
// Accessors for discriminator values.
///////////////////////////////////////////////////////////
-func (m *LDataFrameAck) NotAckFrame() bool {
- return false
-}
-
-func (m *LDataFrameAck) ExtendedFrame() bool {
- return false
-}
-
-func (m *LDataFrameAck) Polling() bool {
- return false
+func (m *ApduDataExtNetworkParameterWrite) ExtApciType() uint8 {
+ return 0x24
}
-func (m *LDataFrameAck) InitializeParent(parent *LDataFrame, repeated bool, priority CEMIPriority, acknowledgeRequested bool, errorFlag bool) {
- m.Parent.Repeated = repeated
- m.Parent.Priority = priority
- m.Parent.AcknowledgeRequested = acknowledgeRequested
- m.Parent.ErrorFlag = errorFlag
+func (m *ApduDataExtNetworkParameterWrite) InitializeParent(parent *ApduDataExt) {
}
-func NewLDataFrameAck(repeated bool, priority CEMIPriority, acknowledgeRequested bool, errorFlag bool) *LDataFrame {
- child := &LDataFrameAck{
- Parent: NewLDataFrame(repeated, priority, acknowledgeRequested, errorFlag),
+func NewApduDataExtNetworkParameterWrite() *ApduDataExt {
+ child := &ApduDataExtNetworkParameterWrite{
+ Parent: NewApduDataExt(),
}
child.Parent.Child = child
return child.Parent
}
-func CastLDataFrameAck(structType interface{}) *LDataFrameAck {
- castFunc := func(typ interface{}) *LDataFrameAck {
- if casted, ok := typ.(LDataFrameAck); ok {
+func CastApduDataExtNetworkParameterWrite(structType interface{}) *ApduDataExtNetworkParameterWrite {
+ castFunc := func(typ interface{}) *ApduDataExtNetworkParameterWrite {
+ if casted, ok := typ.(ApduDataExtNetworkParameterWrite); ok {
return &casted
}
- if casted, ok := typ.(*LDataFrameAck); ok {
+ if casted, ok := typ.(*ApduDataExtNetworkParameterWrite); ok {
return casted
}
- if casted, ok := typ.(LDataFrame); ok {
- return CastLDataFrameAck(casted.Child)
+ if casted, ok := typ.(ApduDataExt); ok {
+ return CastApduDataExtNetworkParameterWrite(casted.Child)
}
- if casted, ok := typ.(*LDataFrame); ok {
- return CastLDataFrameAck(casted.Child)
+ if casted, ok := typ.(*ApduDataExt); ok {
+ return CastApduDataExtNetworkParameterWrite(casted.Child)
}
return nil
}
return castFunc(structType)
}
-func (m *LDataFrameAck) GetTypeName() string {
- return "LDataFrameAck"
+func (m *ApduDataExtNetworkParameterWrite) GetTypeName() string {
+ return "ApduDataExtNetworkParameterWrite"
}
-func (m *LDataFrameAck) LengthInBits() uint16 {
+func (m *ApduDataExtNetworkParameterWrite) LengthInBits() uint16 {
lengthInBits := uint16(0)
return lengthInBits
}
-func (m *LDataFrameAck) LengthInBytes() uint16 {
+func (m *ApduDataExtNetworkParameterWrite) LengthInBytes() uint16 {
return m.LengthInBits() / 8
}
-func LDataFrameAckParse(io *utils.ReadBuffer) (*LDataFrame, error) {
+func ApduDataExtNetworkParameterWriteParse(io *utils.ReadBuffer) (*ApduDataExt, error) {
// Create a partially initialized instance
- _child := &LDataFrameAck{
- Parent: &LDataFrame{},
+ _child := &ApduDataExtNetworkParameterWrite{
+ Parent: &ApduDataExt{},
}
_child.Parent.Child = _child
return _child.Parent, nil
}
-func (m *LDataFrameAck) Serialize(io utils.WriteBuffer) error {
+func (m *ApduDataExtNetworkParameterWrite) Serialize(io utils.WriteBuffer) error {
ser := func() error {
return nil
@@ -120,7 +108,7 @@ func (m *LDataFrameAck) Serialize(io utils.WriteBuffer) error {
return m.Parent.SerializeParent(io, m, ser)
}
-func (m *LDataFrameAck) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
+func (m *ApduDataExtNetworkParameterWrite) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
var token xml.Token
var err error
token = start
@@ -141,7 +129,7 @@ func (m *LDataFrameAck) UnmarshalXML(d *xml.Decoder, start xml.StartElement) err
}
}
-func (m *LDataFrameAck) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
+func (m *ApduDataExtNetworkParameterWrite) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
return nil
}
diff --git a/plc4go/internal/plc4go/knxnetip/readwrite/model/LDataFrameAck.go b/plc4go/internal/plc4go/knxnetip/readwrite/model/ApduDataExtOpenRoutingTableRequest.go
similarity index 55%
copy from plc4go/internal/plc4go/knxnetip/readwrite/model/LDataFrameAck.go
copy to plc4go/internal/plc4go/knxnetip/readwrite/model/ApduDataExtOpenRoutingTableRequest.go
index 1bd9767..37aa4b9 100644
--- a/plc4go/internal/plc4go/knxnetip/readwrite/model/LDataFrameAck.go
+++ b/plc4go/internal/plc4go/knxnetip/readwrite/model/ApduDataExtOpenRoutingTableRequest.go
@@ -25,13 +25,13 @@ import (
)
// The data-structure of this message
-type LDataFrameAck struct {
- Parent *LDataFrame
- ILDataFrameAck
+type ApduDataExtOpenRoutingTableRequest struct {
+ Parent *ApduDataExt
+ IApduDataExtOpenRoutingTableRequest
}
// The corresponding interface
-type ILDataFrameAck interface {
+type IApduDataExtOpenRoutingTableRequest interface {
LengthInBytes() uint16
LengthInBits() uint16
Serialize(io utils.WriteBuffer) error
@@ -41,78 +41,66 @@ type ILDataFrameAck interface {
///////////////////////////////////////////////////////////
// Accessors for discriminator values.
///////////////////////////////////////////////////////////
-func (m *LDataFrameAck) NotAckFrame() bool {
- return false
-}
-
-func (m *LDataFrameAck) ExtendedFrame() bool {
- return false
-}
-
-func (m *LDataFrameAck) Polling() bool {
- return false
+func (m *ApduDataExtOpenRoutingTableRequest) ExtApciType() uint8 {
+ return 0x00
}
-func (m *LDataFrameAck) InitializeParent(parent *LDataFrame, repeated bool, priority CEMIPriority, acknowledgeRequested bool, errorFlag bool) {
- m.Parent.Repeated = repeated
- m.Parent.Priority = priority
- m.Parent.AcknowledgeRequested = acknowledgeRequested
- m.Parent.ErrorFlag = errorFlag
+func (m *ApduDataExtOpenRoutingTableRequest) InitializeParent(parent *ApduDataExt) {
}
-func NewLDataFrameAck(repeated bool, priority CEMIPriority, acknowledgeRequested bool, errorFlag bool) *LDataFrame {
- child := &LDataFrameAck{
- Parent: NewLDataFrame(repeated, priority, acknowledgeRequested, errorFlag),
+func NewApduDataExtOpenRoutingTableRequest() *ApduDataExt {
+ child := &ApduDataExtOpenRoutingTableRequest{
+ Parent: NewApduDataExt(),
}
child.Parent.Child = child
return child.Parent
}
-func CastLDataFrameAck(structType interface{}) *LDataFrameAck {
- castFunc := func(typ interface{}) *LDataFrameAck {
- if casted, ok := typ.(LDataFrameAck); ok {
+func CastApduDataExtOpenRoutingTableRequest(structType interface{}) *ApduDataExtOpenRoutingTableRequest {
+ castFunc := func(typ interface{}) *ApduDataExtOpenRoutingTableRequest {
+ if casted, ok := typ.(ApduDataExtOpenRoutingTableRequest); ok {
return &casted
}
- if casted, ok := typ.(*LDataFrameAck); ok {
+ if casted, ok := typ.(*ApduDataExtOpenRoutingTableRequest); ok {
return casted
}
- if casted, ok := typ.(LDataFrame); ok {
- return CastLDataFrameAck(casted.Child)
+ if casted, ok := typ.(ApduDataExt); ok {
+ return CastApduDataExtOpenRoutingTableRequest(casted.Child)
}
- if casted, ok := typ.(*LDataFrame); ok {
- return CastLDataFrameAck(casted.Child)
+ if casted, ok := typ.(*ApduDataExt); ok {
+ return CastApduDataExtOpenRoutingTableRequest(casted.Child)
}
return nil
}
return castFunc(structType)
}
-func (m *LDataFrameAck) GetTypeName() string {
- return "LDataFrameAck"
+func (m *ApduDataExtOpenRoutingTableRequest) GetTypeName() string {
+ return "ApduDataExtOpenRoutingTableRequest"
}
-func (m *LDataFrameAck) LengthInBits() uint16 {
+func (m *ApduDataExtOpenRoutingTableRequest) LengthInBits() uint16 {
lengthInBits := uint16(0)
return lengthInBits
}
-func (m *LDataFrameAck) LengthInBytes() uint16 {
+func (m *ApduDataExtOpenRoutingTableRequest) LengthInBytes() uint16 {
return m.LengthInBits() / 8
}
-func LDataFrameAckParse(io *utils.ReadBuffer) (*LDataFrame, error) {
+func ApduDataExtOpenRoutingTableRequestParse(io *utils.ReadBuffer) (*ApduDataExt, error) {
// Create a partially initialized instance
- _child := &LDataFrameAck{
- Parent: &LDataFrame{},
+ _child := &ApduDataExtOpenRoutingTableRequest{
+ Parent: &ApduDataExt{},
}
_child.Parent.Child = _child
return _child.Parent, nil
}
-func (m *LDataFrameAck) Serialize(io utils.WriteBuffer) error {
+func (m *ApduDataExtOpenRoutingTableRequest) Serialize(io utils.WriteBuffer) error {
ser := func() error {
return nil
@@ -120,7 +108,7 @@ func (m *LDataFrameAck) Serialize(io utils.WriteBuffer) error {
return m.Parent.SerializeParent(io, m, ser)
}
-func (m *LDataFrameAck) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
+func (m *ApduDataExtOpenRoutingTableRequest) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
var token xml.Token
var err error
token = start
@@ -141,7 +129,7 @@ func (m *LDataFrameAck) UnmarshalXML(d *xml.Decoder, start xml.StartElement) err
}
}
-func (m *LDataFrameAck) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
+func (m *ApduDataExtOpenRoutingTableRequest) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
return nil
}
diff --git a/plc4go/internal/plc4go/knxnetip/readwrite/model/LDataFrameAck.go b/plc4go/internal/plc4go/knxnetip/readwrite/model/ApduDataExtPropertyDescriptionRead.go
similarity index 55%
copy from plc4go/internal/plc4go/knxnetip/readwrite/model/LDataFrameAck.go
copy to plc4go/internal/plc4go/knxnetip/readwrite/model/ApduDataExtPropertyDescriptionRead.go
index 1bd9767..130eb4f 100644
--- a/plc4go/internal/plc4go/knxnetip/readwrite/model/LDataFrameAck.go
+++ b/plc4go/internal/plc4go/knxnetip/readwrite/model/ApduDataExtPropertyDescriptionRead.go
@@ -25,13 +25,13 @@ import (
)
// The data-structure of this message
-type LDataFrameAck struct {
- Parent *LDataFrame
- ILDataFrameAck
+type ApduDataExtPropertyDescriptionRead struct {
+ Parent *ApduDataExt
+ IApduDataExtPropertyDescriptionRead
}
// The corresponding interface
-type ILDataFrameAck interface {
+type IApduDataExtPropertyDescriptionRead interface {
LengthInBytes() uint16
LengthInBits() uint16
Serialize(io utils.WriteBuffer) error
@@ -41,78 +41,66 @@ type ILDataFrameAck interface {
///////////////////////////////////////////////////////////
// Accessors for discriminator values.
///////////////////////////////////////////////////////////
-func (m *LDataFrameAck) NotAckFrame() bool {
- return false
-}
-
-func (m *LDataFrameAck) ExtendedFrame() bool {
- return false
-}
-
-func (m *LDataFrameAck) Polling() bool {
- return false
+func (m *ApduDataExtPropertyDescriptionRead) ExtApciType() uint8 {
+ return 0x18
}
-func (m *LDataFrameAck) InitializeParent(parent *LDataFrame, repeated bool, priority CEMIPriority, acknowledgeRequested bool, errorFlag bool) {
- m.Parent.Repeated = repeated
- m.Parent.Priority = priority
- m.Parent.AcknowledgeRequested = acknowledgeRequested
- m.Parent.ErrorFlag = errorFlag
+func (m *ApduDataExtPropertyDescriptionRead) InitializeParent(parent *ApduDataExt) {
}
-func NewLDataFrameAck(repeated bool, priority CEMIPriority, acknowledgeRequested bool, errorFlag bool) *LDataFrame {
- child := &LDataFrameAck{
- Parent: NewLDataFrame(repeated, priority, acknowledgeRequested, errorFlag),
+func NewApduDataExtPropertyDescriptionRead() *ApduDataExt {
+ child := &ApduDataExtPropertyDescriptionRead{
+ Parent: NewApduDataExt(),
}
child.Parent.Child = child
return child.Parent
}
-func CastLDataFrameAck(structType interface{}) *LDataFrameAck {
- castFunc := func(typ interface{}) *LDataFrameAck {
- if casted, ok := typ.(LDataFrameAck); ok {
+func CastApduDataExtPropertyDescriptionRead(structType interface{}) *ApduDataExtPropertyDescriptionRead {
+ castFunc := func(typ interface{}) *ApduDataExtPropertyDescriptionRead {
+ if casted, ok := typ.(ApduDataExtPropertyDescriptionRead); ok {
return &casted
}
- if casted, ok := typ.(*LDataFrameAck); ok {
+ if casted, ok := typ.(*ApduDataExtPropertyDescriptionRead); ok {
return casted
}
- if casted, ok := typ.(LDataFrame); ok {
- return CastLDataFrameAck(casted.Child)
+ if casted, ok := typ.(ApduDataExt); ok {
+ return CastApduDataExtPropertyDescriptionRead(casted.Child)
}
- if casted, ok := typ.(*LDataFrame); ok {
- return CastLDataFrameAck(casted.Child)
+ if casted, ok := typ.(*ApduDataExt); ok {
+ return CastApduDataExtPropertyDescriptionRead(casted.Child)
}
return nil
}
return castFunc(structType)
}
-func (m *LDataFrameAck) GetTypeName() string {
- return "LDataFrameAck"
+func (m *ApduDataExtPropertyDescriptionRead) GetTypeName() string {
+ return "ApduDataExtPropertyDescriptionRead"
}
-func (m *LDataFrameAck) LengthInBits() uint16 {
+func (m *ApduDataExtPropertyDescriptionRead) LengthInBits() uint16 {
lengthInBits := uint16(0)
return lengthInBits
}
-func (m *LDataFrameAck) LengthInBytes() uint16 {
+func (m *ApduDataExtPropertyDescriptionRead) LengthInBytes() uint16 {
return m.LengthInBits() / 8
}
-func LDataFrameAckParse(io *utils.ReadBuffer) (*LDataFrame, error) {
+func ApduDataExtPropertyDescriptionReadParse(io *utils.ReadBuffer) (*ApduDataExt, error) {
// Create a partially initialized instance
- _child := &LDataFrameAck{
- Parent: &LDataFrame{},
+ _child := &ApduDataExtPropertyDescriptionRead{
+ Parent: &ApduDataExt{},
}
_child.Parent.Child = _child
return _child.Parent, nil
}
-func (m *LDataFrameAck) Serialize(io utils.WriteBuffer) error {
+func (m *ApduDataExtPropertyDescriptionRead) Serialize(io utils.WriteBuffer) error {
ser := func() error {
return nil
@@ -120,7 +108,7 @@ func (m *LDataFrameAck) Serialize(io utils.WriteBuffer) error {
return m.Parent.SerializeParent(io, m, ser)
}
-func (m *LDataFrameAck) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
+func (m *ApduDataExtPropertyDescriptionRead) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
var token xml.Token
var err error
token = start
@@ -141,7 +129,7 @@ func (m *LDataFrameAck) UnmarshalXML(d *xml.Decoder, start xml.StartElement) err
}
}
-func (m *LDataFrameAck) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
+func (m *ApduDataExtPropertyDescriptionRead) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
return nil
}
diff --git a/plc4go/internal/plc4go/knxnetip/readwrite/model/LDataFrameAck.go b/plc4go/internal/plc4go/knxnetip/readwrite/model/ApduDataExtPropertyDescriptionResponse.go
similarity index 54%
copy from plc4go/internal/plc4go/knxnetip/readwrite/model/LDataFrameAck.go
copy to plc4go/internal/plc4go/knxnetip/readwrite/model/ApduDataExtPropertyDescriptionResponse.go
index 1bd9767..af9fb3b 100644
--- a/plc4go/internal/plc4go/knxnetip/readwrite/model/LDataFrameAck.go
+++ b/plc4go/internal/plc4go/knxnetip/readwrite/model/ApduDataExtPropertyDescriptionResponse.go
@@ -25,13 +25,13 @@ import (
)
// The data-structure of this message
-type LDataFrameAck struct {
- Parent *LDataFrame
- ILDataFrameAck
+type ApduDataExtPropertyDescriptionResponse struct {
+ Parent *ApduDataExt
+ IApduDataExtPropertyDescriptionResponse
}
// The corresponding interface
-type ILDataFrameAck interface {
+type IApduDataExtPropertyDescriptionResponse interface {
LengthInBytes() uint16
LengthInBits() uint16
Serialize(io utils.WriteBuffer) error
@@ -41,78 +41,66 @@ type ILDataFrameAck interface {
///////////////////////////////////////////////////////////
// Accessors for discriminator values.
///////////////////////////////////////////////////////////
-func (m *LDataFrameAck) NotAckFrame() bool {
- return false
-}
-
-func (m *LDataFrameAck) ExtendedFrame() bool {
- return false
-}
-
-func (m *LDataFrameAck) Polling() bool {
- return false
+func (m *ApduDataExtPropertyDescriptionResponse) ExtApciType() uint8 {
+ return 0x19
}
-func (m *LDataFrameAck) InitializeParent(parent *LDataFrame, repeated bool, priority CEMIPriority, acknowledgeRequested bool, errorFlag bool) {
- m.Parent.Repeated = repeated
- m.Parent.Priority = priority
- m.Parent.AcknowledgeRequested = acknowledgeRequested
- m.Parent.ErrorFlag = errorFlag
+func (m *ApduDataExtPropertyDescriptionResponse) InitializeParent(parent *ApduDataExt) {
}
-func NewLDataFrameAck(repeated bool, priority CEMIPriority, acknowledgeRequested bool, errorFlag bool) *LDataFrame {
- child := &LDataFrameAck{
- Parent: NewLDataFrame(repeated, priority, acknowledgeRequested, errorFlag),
+func NewApduDataExtPropertyDescriptionResponse() *ApduDataExt {
+ child := &ApduDataExtPropertyDescriptionResponse{
+ Parent: NewApduDataExt(),
}
child.Parent.Child = child
return child.Parent
}
-func CastLDataFrameAck(structType interface{}) *LDataFrameAck {
- castFunc := func(typ interface{}) *LDataFrameAck {
- if casted, ok := typ.(LDataFrameAck); ok {
+func CastApduDataExtPropertyDescriptionResponse(structType interface{}) *ApduDataExtPropertyDescriptionResponse {
+ castFunc := func(typ interface{}) *ApduDataExtPropertyDescriptionResponse {
+ if casted, ok := typ.(ApduDataExtPropertyDescriptionResponse); ok {
return &casted
}
- if casted, ok := typ.(*LDataFrameAck); ok {
+ if casted, ok := typ.(*ApduDataExtPropertyDescriptionResponse); ok {
return casted
}
- if casted, ok := typ.(LDataFrame); ok {
- return CastLDataFrameAck(casted.Child)
+ if casted, ok := typ.(ApduDataExt); ok {
+ return CastApduDataExtPropertyDescriptionResponse(casted.Child)
}
- if casted, ok := typ.(*LDataFrame); ok {
- return CastLDataFrameAck(casted.Child)
+ if casted, ok := typ.(*ApduDataExt); ok {
+ return CastApduDataExtPropertyDescriptionResponse(casted.Child)
}
return nil
}
return castFunc(structType)
}
-func (m *LDataFrameAck) GetTypeName() string {
- return "LDataFrameAck"
+func (m *ApduDataExtPropertyDescriptionResponse) GetTypeName() string {
+ return "ApduDataExtPropertyDescriptionResponse"
}
-func (m *LDataFrameAck) LengthInBits() uint16 {
+func (m *ApduDataExtPropertyDescriptionResponse) LengthInBits() uint16 {
lengthInBits := uint16(0)
return lengthInBits
}
-func (m *LDataFrameAck) LengthInBytes() uint16 {
+func (m *ApduDataExtPropertyDescriptionResponse) LengthInBytes() uint16 {
return m.LengthInBits() / 8
}
-func LDataFrameAckParse(io *utils.ReadBuffer) (*LDataFrame, error) {
+func ApduDataExtPropertyDescriptionResponseParse(io *utils.ReadBuffer) (*ApduDataExt, error) {
// Create a partially initialized instance
- _child := &LDataFrameAck{
- Parent: &LDataFrame{},
+ _child := &ApduDataExtPropertyDescriptionResponse{
+ Parent: &ApduDataExt{},
}
_child.Parent.Child = _child
return _child.Parent, nil
}
-func (m *LDataFrameAck) Serialize(io utils.WriteBuffer) error {
+func (m *ApduDataExtPropertyDescriptionResponse) Serialize(io utils.WriteBuffer) error {
ser := func() error {
return nil
@@ -120,7 +108,7 @@ func (m *LDataFrameAck) Serialize(io utils.WriteBuffer) error {
return m.Parent.SerializeParent(io, m, ser)
}
-func (m *LDataFrameAck) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
+func (m *ApduDataExtPropertyDescriptionResponse) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
var token xml.Token
... 26989 lines suppressed ...