diff --git a/plc4go/internal/bacnetip/ApplicationLayerMessageCodec.go b/plc4go/internal/bacnetip/ApplicationLayerMessageCodec.go new file mode 100644 index 00000000000..7ddf86812ce --- /dev/null +++ b/plc4go/internal/bacnetip/ApplicationLayerMessageCodec.go @@ -0,0 +1,209 @@ +/* + * 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 + * + * https://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 bacnetip + +import ( + "context" + "fmt" + "net" + "net/url" + "time" + + "github.com/pkg/errors" + "github.com/rs/zerolog" + + "github.com/apache/plc4x/plc4go/internal/bacnetip/bacgopes" + "github.com/apache/plc4x/plc4go/protocols/bacnetip/readwrite/model" + "github.com/apache/plc4x/plc4go/spi" + "github.com/apache/plc4x/plc4go/spi/transports/udp" +) + +// ApplicationLayerMessageCodec is a wrapper for MessageCodec which takes care of segmentation, retries etc. +// +//go:generate go run ../../tools/plc4xgenerator/gen.go -type=ApplicationLayerMessageCodec +type ApplicationLayerMessageCodec struct { + bipSimpleApplication *bacgopes.BIPSimpleApplication + messageCode *MessageCodec + deviceInfoCache bacgopes.DeviceInfoCache + + localAddress *net.UDPAddr `stringer:"true"` + remoteAddress *net.UDPAddr `stringer:"true"` + + log zerolog.Logger `ignore:"true"` +} + +func NewApplicationLayerMessageCodec(localLog zerolog.Logger, udpTransport *udp.Transport, transportUrl url.URL, options map[string][]string, localAddress *net.UDPAddr, remoteAddress *net.UDPAddr) (*ApplicationLayerMessageCodec, error) { + // TODO: currently this is done by the BIP down below + // Have the transport create a new transport-instance. + //transportInstance, err := udpTransport.CreateTransportInstanceForLocalAddress(transportUrl, options, localAddress) + //if err != nil { + // return nil, errors.Wrap(err, "error creating transport instance") + //} + a := &ApplicationLayerMessageCodec{ + localAddress: localAddress, + remoteAddress: remoteAddress, + + log: localLog, + } + address, err := bacgopes.NewAddress(localLog, localAddress) + if err != nil { + return nil, errors.Wrap(err, "error creating address") + } + // TODO: workaround for strange address parsing + address.AddrTuple = bacgopes.NewAddressTuple(fmt.Sprintf("%d.%d.%d.%d", address.AddrAddress[0], address.AddrAddress[1], address.AddrAddress[2], address.AddrAddress[3]), *address.AddrPort) + application, err := bacgopes.NewBIPSimpleApplication(localLog, &bacgopes.LocalDeviceObject{ + NumberOfAPDURetries: func() *uint { retries := uint(10); return &retries }(), + }, *address, &a.deviceInfoCache, nil) + if err != nil { + return nil, err + } + a.bipSimpleApplication = application + // TODO: this is currently done by the BIP + //a.messageCode = NewMessageCodec(transportInstance) + return a, nil +} + +func (m *ApplicationLayerMessageCodec) GetCodec() spi.MessageCodec { + return m +} + +func (m *ApplicationLayerMessageCodec) Connect() error { + // TODO: this is currently done by the BIP + // return m.messageCode.Connect() + return nil +} + +func (m *ApplicationLayerMessageCodec) ConnectWithContext(ctx context.Context) error { + // TODO: this is currently done by the BIP + // return m.messageCode.ConnectWithContext(ctx) + return nil +} + +func (m *ApplicationLayerMessageCodec) Disconnect() error { + if err := m.bipSimpleApplication.Close(); err != nil { + m.log.Error().Err(err).Msg("error closing application") + } + return m.messageCode.Disconnect() +} + +func (m *ApplicationLayerMessageCodec) IsRunning() bool { + return m.messageCode.IsRunning() +} + +func (m *ApplicationLayerMessageCodec) Send(message spi.Message) error { + address, err := bacgopes.NewAddress(m.log, m.remoteAddress) + if err != nil { + return err + } + iocb, err := bacgopes.NewIOCB(m.log, bacgopes.NewPDU(message, bacgopes.WithPDUDestination(address)), address) + if err != nil { + return errors.Wrap(err, "error creating IOCB") + } + go func() { + go func() { + if err := m.bipSimpleApplication.RequestIO(iocb); err != nil { + m.log.Debug().Err(err).Msg("errored") + } + }() + iocb.Wait() + if err := iocb.GetIOError(); err != nil { + // TODO: handle error + fmt.Printf("Err: %v\n", err) + } else if iocb.GetIOResponse() != nil { + // TODO: response? + fmt.Printf("Response: %v\n", iocb.GetIOResponse()) + } else { + // TODO: what now? + } + }() + return nil +} + +func (m *ApplicationLayerMessageCodec) Expect(ctx context.Context, acceptsMessage spi.AcceptsMessage, handleMessage spi.HandleMessage, handleError spi.HandleError, ttl time.Duration) error { + // TODO: implement me + panic("not yet implemented") +} + +func (m *ApplicationLayerMessageCodec) SendRequest(ctx context.Context, message spi.Message, acceptsMessage spi.AcceptsMessage, handleMessage spi.HandleMessage, handleError spi.HandleError, ttl time.Duration) error { + address, err := bacgopes.NewAddress(m.log, m.remoteAddress) + if err != nil { + return err + } + iocb, err := bacgopes.NewIOCB(m.log, bacgopes.NewPDU(message, bacgopes.WithPDUDestination(address)), address) + if err != nil { + return errors.Wrap(err, "error creating IOCB") + } + go func() { + go func() { + if err := m.bipSimpleApplication.RequestIO(iocb); err != nil { + + } + }() + iocb.Wait() + if err := iocb.GetIOError(); err != nil { + if err := handleError(err); err != nil { + m.log.Debug().Err(err).Msg("error handling error") + return + } + } else if response := iocb.GetIOResponse(); response != nil { + // TODO: we wrap it into a BVLC for now. Once we change the Readers etc. to accept apdus we can remove that + tempBVLC := model.NewBVLCOriginalUnicastNPDU( + model.NewNPDU( + 0, + model.NewNPDUControl( + false, + false, + false, + false, + model.NPDUNetworkPriority_NORMAL_MESSAGE, + ), + nil, + nil, + nil, + nil, + nil, + nil, + nil, + nil, + response.GetRootMessage().(model.APDU), + 0, + ), + 0, + ) + if acceptsMessage(tempBVLC) { + if err := handleMessage( + tempBVLC, + ); err != nil { + m.log.Debug().Err(err).Msg("error handling message") + return + } + } + } else { + // TODO: what now? + } + }() + return nil +} + +func (m *ApplicationLayerMessageCodec) GetDefaultIncomingMessageChannel() chan spi.Message { + // TODO: this is currently done by the BIP + //return m.messageCode.GetDefaultIncomingMessageChannel() + return make(chan spi.Message) +} diff --git a/plc4go/internal/bacnetip/ApplicationLayerMessageCodec_plc4xgen.go b/plc4go/internal/bacnetip/ApplicationLayerMessageCodec_plc4xgen.go index e2f4347c7ac..0d47b085bf0 100644 --- a/plc4go/internal/bacnetip/ApplicationLayerMessageCodec_plc4xgen.go +++ b/plc4go/internal/bacnetip/ApplicationLayerMessageCodec_plc4xgen.go @@ -42,11 +42,23 @@ func (d *ApplicationLayerMessageCodec) SerializeWithWriteBuffer(ctx context.Cont if err := writeBuffer.PushContext("ApplicationLayerMessageCodec"); err != nil { return err } - { - _value := fmt.Sprintf("%v", d.bipSimpleApplication) - if err := writeBuffer.WriteString("bipSimpleApplication", uint32(len(_value)*8), _value); err != nil { - return err + if any(d.bipSimpleApplication) != nil { + if serializableField, ok := any(d.bipSimpleApplication).(utils.Serializable); ok { + if err := writeBuffer.PushContext("bipSimpleApplication"); err != nil { + return err + } + if err := serializableField.SerializeWithWriteBuffer(ctx, writeBuffer); err != nil { + return err + } + if err := writeBuffer.PopContext("bipSimpleApplication"); err != nil { + return err + } + } else { + stringValue := fmt.Sprintf("%v", d.bipSimpleApplication) + if err := writeBuffer.WriteString("bipSimpleApplication", uint32(len(stringValue)*8), stringValue); err != nil { + return err + } } } { @@ -56,11 +68,23 @@ func (d *ApplicationLayerMessageCodec) SerializeWithWriteBuffer(ctx context.Cont return err } } - { - _value := fmt.Sprintf("%v", d.deviceInfoCache) - if err := writeBuffer.WriteString("deviceInfoCache", uint32(len(_value)*8), _value); err != nil { - return err + if any(d.deviceInfoCache) != nil { + if serializableField, ok := any(d.deviceInfoCache).(utils.Serializable); ok { + if err := writeBuffer.PushContext("deviceInfoCache"); err != nil { + return err + } + if err := serializableField.SerializeWithWriteBuffer(ctx, writeBuffer); err != nil { + return err + } + if err := writeBuffer.PopContext("deviceInfoCache"); err != nil { + return err + } + } else { + stringValue := fmt.Sprintf("%v", d.deviceInfoCache) + if err := writeBuffer.WriteString("deviceInfoCache", uint32(len(stringValue)*8), stringValue); err != nil { + return err + } } } if d.localAddress != nil { diff --git a/plc4go/internal/bacnetip/MessageCodec.go b/plc4go/internal/bacnetip/MessageCodec.go index 293c5d30b7c..1c5955b5806 100644 --- a/plc4go/internal/bacnetip/MessageCodec.go +++ b/plc4go/internal/bacnetip/MessageCodec.go @@ -21,10 +21,6 @@ package bacnetip import ( "context" - "fmt" - "net" - "net/url" - "time" "github.com/pkg/errors" "github.com/rs/zerolog" @@ -34,183 +30,8 @@ import ( "github.com/apache/plc4x/plc4go/spi/default" "github.com/apache/plc4x/plc4go/spi/options" "github.com/apache/plc4x/plc4go/spi/transports" - "github.com/apache/plc4x/plc4go/spi/transports/udp" ) -// ApplicationLayerMessageCodec is a wrapper for MessageCodec which takes care of segmentation, retries etc. -// -//go:generate go run ../../tools/plc4xgenerator/gen.go -type=ApplicationLayerMessageCodec -type ApplicationLayerMessageCodec struct { - bipSimpleApplication *BIPSimpleApplication - messageCode *MessageCodec - deviceInfoCache DeviceInfoCache - - localAddress *net.UDPAddr `stringer:"true"` - remoteAddress *net.UDPAddr `stringer:"true"` - - log zerolog.Logger `ignore:"true"` -} - -func NewApplicationLayerMessageCodec(localLog zerolog.Logger, udpTransport *udp.Transport, transportUrl url.URL, options map[string][]string, localAddress *net.UDPAddr, remoteAddress *net.UDPAddr) (*ApplicationLayerMessageCodec, error) { - // TODO: currently this is done by the BIP down below - // Have the transport create a new transport-instance. - //transportInstance, err := udpTransport.CreateTransportInstanceForLocalAddress(transportUrl, options, localAddress) - //if err != nil { - // return nil, errors.Wrap(err, "error creating transport instance") - //} - a := &ApplicationLayerMessageCodec{ - localAddress: localAddress, - remoteAddress: remoteAddress, - - log: localLog, - } - address, err := NewAddress(localLog, localAddress) - if err != nil { - return nil, errors.Wrap(err, "error creating address") - } - // TODO: workaround for strange address parsing - at := AddressTuple[string, uint16]{fmt.Sprintf("%d.%d.%d.%d", address.AddrAddress[0], address.AddrAddress[1], address.AddrAddress[2], address.AddrAddress[3]), *address.AddrPort} - address.AddrTuple = &at - application, err := NewBIPSimpleApplication(localLog, &LocalDeviceObject{ - NumberOfAPDURetries: func() *uint { retries := uint(10); return &retries }(), - }, *address, &a.deviceInfoCache, nil) - if err != nil { - return nil, err - } - a.bipSimpleApplication = application - // TODO: this is currently done by the BIP - //a.messageCode = NewMessageCodec(transportInstance) - return a, nil -} - -func (m *ApplicationLayerMessageCodec) GetCodec() spi.MessageCodec { - return m -} - -func (m *ApplicationLayerMessageCodec) Connect() error { - // TODO: this is currently done by the BIP - // return m.messageCode.Connect() - return nil -} - -func (m *ApplicationLayerMessageCodec) ConnectWithContext(ctx context.Context) error { - // TODO: this is currently done by the BIP - // return m.messageCode.ConnectWithContext(ctx) - return nil -} - -func (m *ApplicationLayerMessageCodec) Disconnect() error { - if err := m.bipSimpleApplication.Close(); err != nil { - m.log.Error().Err(err).Msg("error closing application") - } - return m.messageCode.Disconnect() -} - -func (m *ApplicationLayerMessageCodec) IsRunning() bool { - return m.messageCode.IsRunning() -} - -func (m *ApplicationLayerMessageCodec) Send(message spi.Message) error { - address, err := NewAddress(m.log, m.remoteAddress) - if err != nil { - return err - } - iocb, err := NewIOCB(m.log, NewPDU(message, WithPDUDestination(address)), address) - if err != nil { - return errors.Wrap(err, "error creating IOCB") - } - go func() { - go func() { - if err := m.bipSimpleApplication.RequestIO(iocb); err != nil { - m.log.Debug().Err(err).Msg("errored") - } - }() - iocb.Wait() - if iocb.ioError != nil { - // TODO: handle error - fmt.Printf("Err: %v\n", iocb.ioError) - } else if iocb.ioResponse != nil { - // TODO: response? - fmt.Printf("Response: %v\n", iocb.ioResponse) - } else { - // TODO: what now? - } - }() - return nil -} - -func (m *ApplicationLayerMessageCodec) Expect(ctx context.Context, acceptsMessage spi.AcceptsMessage, handleMessage spi.HandleMessage, handleError spi.HandleError, ttl time.Duration) error { - // TODO: implement me - panic("not yet implemented") -} - -func (m *ApplicationLayerMessageCodec) SendRequest(ctx context.Context, message spi.Message, acceptsMessage spi.AcceptsMessage, handleMessage spi.HandleMessage, handleError spi.HandleError, ttl time.Duration) error { - address, err := NewAddress(m.log, m.remoteAddress) - if err != nil { - return err - } - iocb, err := NewIOCB(m.log, NewPDU(message, WithPDUDestination(address)), address) - if err != nil { - return errors.Wrap(err, "error creating IOCB") - } - go func() { - go func() { - if err := m.bipSimpleApplication.RequestIO(iocb); err != nil { - - } - }() - iocb.Wait() - if err := iocb.ioError; err != nil { - if err := handleError(err); err != nil { - m.log.Debug().Err(err).Msg("error handling error") - return - } - } else if response := iocb.ioResponse; response != nil { - // TODO: we wrap it into a BVLC for now. Once we change the Readers etc. to accept apdus we can remove that - tempBVLC := model.NewBVLCOriginalUnicastNPDU( - model.NewNPDU( - 0, - model.NewNPDUControl( - false, - false, - false, - false, - model.NPDUNetworkPriority_NORMAL_MESSAGE, - ), - nil, - nil, - nil, - nil, - nil, - nil, - nil, - nil, - response.GetRootMessage().(model.APDU), - 0, - ), - 0, - ) - if acceptsMessage(tempBVLC) { - if err := handleMessage( - tempBVLC, - ); err != nil { - m.log.Debug().Err(err).Msg("error handling message") - return - } - } - } else { - // TODO: what now? - } - }() - return nil -} - -func (m *ApplicationLayerMessageCodec) GetDefaultIncomingMessageChannel() chan spi.Message { - // TODO: this is currently done by the BIP - //return m.messageCode.GetDefaultIncomingMessageChannel() - return make(chan spi.Message) -} - //go:generate go run ../../tools/plc4xgenerator/gen.go -type=MessageCodec type MessageCodec struct { _default.DefaultCodec diff --git a/plc4go/internal/bacnetip/Subscriber_plc4xgen.go b/plc4go/internal/bacnetip/Subscriber_plc4xgen.go index d4eace4731c..d638cab5140 100644 --- a/plc4go/internal/bacnetip/Subscriber_plc4xgen.go +++ b/plc4go/internal/bacnetip/Subscriber_plc4xgen.go @@ -82,8 +82,8 @@ func (d *Subscriber) SerializeWithWriteBuffer(ctx context.Context, writeBuffer u for _, elem := range d._options { var elem any = elem - if elem != nil { - if serializableField, ok := elem.(utils.Serializable); ok { + if any(elem) != nil { + if serializableField, ok := any(elem).(utils.Serializable); ok { if err := writeBuffer.PushContext("value"); err != nil { return err } diff --git a/plc4go/internal/bacnetip/bacgopes/BIPSimpleApplication_plc4xgen.go b/plc4go/internal/bacnetip/bacgopes/BIPSimpleApplication_plc4xgen.go new file mode 100644 index 00000000000..1d9cf6ee235 --- /dev/null +++ b/plc4go/internal/bacnetip/bacgopes/BIPSimpleApplication_plc4xgen.go @@ -0,0 +1,122 @@ +/* + * 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 + * + * https://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. + */ + +// Code generated by "plc4xgenerator -type=BIPSimpleApplication"; DO NOT EDIT. + +package bacgopes + +import ( + "context" + "encoding/binary" + "fmt" + "github.com/apache/plc4x/plc4go/spi/utils" +) + +var _ = fmt.Printf + +func (d *BIPSimpleApplication) Serialize() ([]byte, error) { + wb := utils.NewWriteBufferByteBased(utils.WithByteOrderForByteBasedBuffer(binary.BigEndian)) + if err := d.SerializeWithWriteBuffer(context.Background(), wb); err != nil { + return nil, err + } + return wb.GetBytes(), nil +} + +func (d *BIPSimpleApplication) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { + if err := writeBuffer.PushContext("BIPSimpleApplication"); err != nil { + return err + } + if err := d.ApplicationIOController.SerializeWithWriteBuffer(ctx, writeBuffer); err != nil { + return err + } + if err := d.WhoIsIAmServices.SerializeWithWriteBuffer(ctx, writeBuffer); err != nil { + return err + } + if err := d.ReadWritePropertyServices.SerializeWithWriteBuffer(ctx, writeBuffer); err != nil { + return err + } + { + _value := fmt.Sprintf("%v", d.localAddress) + + if err := writeBuffer.WriteString("localAddress", uint32(len(_value)*8), _value); err != nil { + return err + } + } + { + _value := fmt.Sprintf("%v", d.asap) + + if err := writeBuffer.WriteString("asap", uint32(len(_value)*8), _value); err != nil { + return err + } + } + { + _value := fmt.Sprintf("%v", d.smap) + + if err := writeBuffer.WriteString("smap", uint32(len(_value)*8), _value); err != nil { + return err + } + } + { + _value := fmt.Sprintf("%v", d.nsap) + + if err := writeBuffer.WriteString("nsap", uint32(len(_value)*8), _value); err != nil { + return err + } + } + { + _value := fmt.Sprintf("%v", d.nse) + + if err := writeBuffer.WriteString("nse", uint32(len(_value)*8), _value); err != nil { + return err + } + } + { + _value := fmt.Sprintf("%v", d.bip) + + if err := writeBuffer.WriteString("bip", uint32(len(_value)*8), _value); err != nil { + return err + } + } + { + _value := fmt.Sprintf("%v", d.annexj) + + if err := writeBuffer.WriteString("annexj", uint32(len(_value)*8), _value); err != nil { + return err + } + } + { + _value := fmt.Sprintf("%v", d.mux) + + if err := writeBuffer.WriteString("mux", uint32(len(_value)*8), _value); err != nil { + return err + } + } + if err := writeBuffer.PopContext("BIPSimpleApplication"); err != nil { + return err + } + return nil +} + +func (d *BIPSimpleApplication) String() string { + writeBuffer := utils.NewWriteBufferBoxBasedWithOptions(true, true) + if err := writeBuffer.WriteSerializable(context.Background(), d); err != nil { + return err.Error() + } + return writeBuffer.GetBox().String() +} diff --git a/plc4go/internal/bacnetip/bacgopes/Capability_plc4xgen.go b/plc4go/internal/bacnetip/bacgopes/Capability_plc4xgen.go new file mode 100644 index 00000000000..df95b9145f0 --- /dev/null +++ b/plc4go/internal/bacnetip/bacgopes/Capability_plc4xgen.go @@ -0,0 +1,57 @@ +/* + * 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 + * + * https://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. + */ + +// Code generated by "plc4xgenerator -type=Capability"; DO NOT EDIT. + +package bacgopes + +import ( + "context" + "encoding/binary" + "fmt" + "github.com/apache/plc4x/plc4go/spi/utils" +) + +var _ = fmt.Printf + +func (d *Capability) Serialize() ([]byte, error) { + wb := utils.NewWriteBufferByteBased(utils.WithByteOrderForByteBasedBuffer(binary.BigEndian)) + if err := d.SerializeWithWriteBuffer(context.Background(), wb); err != nil { + return nil, err + } + return wb.GetBytes(), nil +} + +func (d *Capability) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { + if err := writeBuffer.PushContext("Capability"); err != nil { + return err + } + if err := writeBuffer.PopContext("Capability"); err != nil { + return err + } + return nil +} + +func (d *Capability) String() string { + writeBuffer := utils.NewWriteBufferBoxBasedWithOptions(true, true) + if err := writeBuffer.WriteSerializable(context.Background(), d); err != nil { + return err.Error() + } + return writeBuffer.GetBox().String() +} diff --git a/plc4go/internal/bacnetip/DeviceInfo_plc4xgen.go b/plc4go/internal/bacnetip/bacgopes/DeviceInfo_plc4xgen.go similarity index 96% rename from plc4go/internal/bacnetip/DeviceInfo_plc4xgen.go rename to plc4go/internal/bacnetip/bacgopes/DeviceInfo_plc4xgen.go index a05a31109dc..72d3623618b 100644 --- a/plc4go/internal/bacnetip/DeviceInfo_plc4xgen.go +++ b/plc4go/internal/bacnetip/bacgopes/DeviceInfo_plc4xgen.go @@ -19,7 +19,7 @@ // Code generated by "plc4xgenerator -type=DeviceInfo"; DO NOT EDIT. -package bacnetip +package bacgopes import ( "context" @@ -43,8 +43,8 @@ func (d *DeviceInfo) SerializeWithWriteBuffer(ctx context.Context, writeBuffer u return err } - if d.DeviceIdentifier != nil { - if serializableField, ok := d.DeviceIdentifier.(utils.Serializable); ok { + if any(d.DeviceIdentifier) != nil { + if serializableField, ok := any(d.DeviceIdentifier).(utils.Serializable); ok { if err := writeBuffer.PushContext("deviceIdentifier"); err != nil { return err } diff --git a/plc4go/internal/bacnetip/IOCB_plc4xgen.go b/plc4go/internal/bacnetip/bacgopes/IOCB_plc4xgen.go similarity index 99% rename from plc4go/internal/bacnetip/IOCB_plc4xgen.go rename to plc4go/internal/bacnetip/bacgopes/IOCB_plc4xgen.go index 740fb670187..9c380762543 100644 --- a/plc4go/internal/bacnetip/IOCB_plc4xgen.go +++ b/plc4go/internal/bacnetip/bacgopes/IOCB_plc4xgen.go @@ -19,7 +19,7 @@ // Code generated by "plc4xgenerator -type=IOCB"; DO NOT EDIT. -package bacnetip +package bacgopes import ( "context" diff --git a/plc4go/internal/bacnetip/IOController_plc4xgen.go b/plc4go/internal/bacnetip/bacgopes/IOController_plc4xgen.go similarity index 99% rename from plc4go/internal/bacnetip/IOController_plc4xgen.go rename to plc4go/internal/bacnetip/bacgopes/IOController_plc4xgen.go index 6c4e8413de8..05c322f737e 100644 --- a/plc4go/internal/bacnetip/IOController_plc4xgen.go +++ b/plc4go/internal/bacnetip/bacgopes/IOController_plc4xgen.go @@ -19,7 +19,7 @@ // Code generated by "plc4xgenerator -type=IOController"; DO NOT EDIT. -package bacnetip +package bacgopes import ( "context" diff --git a/plc4go/internal/bacnetip/IOQController_plc4xgen.go b/plc4go/internal/bacnetip/bacgopes/IOQController_plc4xgen.go similarity index 99% rename from plc4go/internal/bacnetip/IOQController_plc4xgen.go rename to plc4go/internal/bacnetip/bacgopes/IOQController_plc4xgen.go index 051d87b85c1..1425ec7aede 100644 --- a/plc4go/internal/bacnetip/IOQController_plc4xgen.go +++ b/plc4go/internal/bacnetip/bacgopes/IOQController_plc4xgen.go @@ -19,7 +19,7 @@ // Code generated by "plc4xgenerator -type=IOQController"; DO NOT EDIT. -package bacnetip +package bacgopes import ( "context" diff --git a/plc4go/internal/bacnetip/IOQueue_plc4xgen.go b/plc4go/internal/bacnetip/bacgopes/IOQueue_plc4xgen.go similarity index 99% rename from plc4go/internal/bacnetip/IOQueue_plc4xgen.go rename to plc4go/internal/bacnetip/bacgopes/IOQueue_plc4xgen.go index d1dbbabe140..75e44bb3cf4 100644 --- a/plc4go/internal/bacnetip/IOQueue_plc4xgen.go +++ b/plc4go/internal/bacnetip/bacgopes/IOQueue_plc4xgen.go @@ -19,7 +19,7 @@ // Code generated by "plc4xgenerator -type=IOQueue"; DO NOT EDIT. -package bacnetip +package bacgopes import ( "context" diff --git a/plc4go/internal/bacnetip/bacgopes/ReadWritePropertyServices_plc4xgen.go b/plc4go/internal/bacnetip/bacgopes/ReadWritePropertyServices_plc4xgen.go new file mode 100644 index 00000000000..ab7c1d3a823 --- /dev/null +++ b/plc4go/internal/bacnetip/bacgopes/ReadWritePropertyServices_plc4xgen.go @@ -0,0 +1,57 @@ +/* + * 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 + * + * https://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. + */ + +// Code generated by "plc4xgenerator -type=ReadWritePropertyServices"; DO NOT EDIT. + +package bacgopes + +import ( + "context" + "encoding/binary" + "fmt" + "github.com/apache/plc4x/plc4go/spi/utils" +) + +var _ = fmt.Printf + +func (d *ReadWritePropertyServices) Serialize() ([]byte, error) { + wb := utils.NewWriteBufferByteBased(utils.WithByteOrderForByteBasedBuffer(binary.BigEndian)) + if err := d.SerializeWithWriteBuffer(context.Background(), wb); err != nil { + return nil, err + } + return wb.GetBytes(), nil +} + +func (d *ReadWritePropertyServices) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { + if err := writeBuffer.PushContext("ReadWritePropertyServices"); err != nil { + return err + } + if err := writeBuffer.PopContext("ReadWritePropertyServices"); err != nil { + return err + } + return nil +} + +func (d *ReadWritePropertyServices) String() string { + writeBuffer := utils.NewWriteBufferBoxBasedWithOptions(true, true) + if err := writeBuffer.WriteSerializable(context.Background(), d); err != nil { + return err.Error() + } + return writeBuffer.GetBox().String() +} diff --git a/plc4go/internal/bacnetip/SieveQueue_plc4xgen.go b/plc4go/internal/bacnetip/bacgopes/SieveQueue_plc4xgen.go similarity index 99% rename from plc4go/internal/bacnetip/SieveQueue_plc4xgen.go rename to plc4go/internal/bacnetip/bacgopes/SieveQueue_plc4xgen.go index 59875cb6207..c3ae682d783 100644 --- a/plc4go/internal/bacnetip/SieveQueue_plc4xgen.go +++ b/plc4go/internal/bacnetip/bacgopes/SieveQueue_plc4xgen.go @@ -19,7 +19,7 @@ // Code generated by "plc4xgenerator -type=SieveQueue"; DO NOT EDIT. -package bacnetip +package bacgopes import ( "context" diff --git a/plc4go/internal/bacnetip/UDPActor_plc4xgen.go b/plc4go/internal/bacnetip/bacgopes/UDPActor_plc4xgen.go similarity index 99% rename from plc4go/internal/bacnetip/UDPActor_plc4xgen.go rename to plc4go/internal/bacnetip/bacgopes/UDPActor_plc4xgen.go index f164def31ce..372a5f6d748 100644 --- a/plc4go/internal/bacnetip/UDPActor_plc4xgen.go +++ b/plc4go/internal/bacnetip/bacgopes/UDPActor_plc4xgen.go @@ -19,7 +19,7 @@ // Code generated by "plc4xgenerator -type=UDPActor"; DO NOT EDIT. -package bacnetip +package bacgopes import ( "context" diff --git a/plc4go/internal/bacnetip/bacgopes/WhoIsIAmServices_plc4xgen.go b/plc4go/internal/bacnetip/bacgopes/WhoIsIAmServices_plc4xgen.go new file mode 100644 index 00000000000..7633f452cf8 --- /dev/null +++ b/plc4go/internal/bacnetip/bacgopes/WhoIsIAmServices_plc4xgen.go @@ -0,0 +1,74 @@ +/* + * 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 + * + * https://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. + */ + +// Code generated by "plc4xgenerator -type=WhoIsIAmServices"; DO NOT EDIT. + +package bacgopes + +import ( + "context" + "encoding/binary" + "fmt" + "github.com/apache/plc4x/plc4go/spi/utils" +) + +var _ = fmt.Printf + +func (d *WhoIsIAmServices) Serialize() ([]byte, error) { + wb := utils.NewWriteBufferByteBased(utils.WithByteOrderForByteBasedBuffer(binary.BigEndian)) + if err := d.SerializeWithWriteBuffer(context.Background(), wb); err != nil { + return nil, err + } + return wb.GetBytes(), nil +} + +func (d *WhoIsIAmServices) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { + if err := writeBuffer.PushContext("WhoIsIAmServices"); err != nil { + return err + } + { + _value := fmt.Sprintf("%v", d._requirements) + + if err := writeBuffer.WriteString("_requirements", uint32(len(_value)*8), _value); err != nil { + return err + } + } + if err := d.Capability.SerializeWithWriteBuffer(ctx, writeBuffer); err != nil { + return err + } + { + _value := fmt.Sprintf("%v", d.localDevice) + + if err := writeBuffer.WriteString("localDevice", uint32(len(_value)*8), _value); err != nil { + return err + } + } + if err := writeBuffer.PopContext("WhoIsIAmServices"); err != nil { + return err + } + return nil +} + +func (d *WhoIsIAmServices) String() string { + writeBuffer := utils.NewWriteBufferBoxBasedWithOptions(true, true) + if err := writeBuffer.WriteSerializable(context.Background(), d); err != nil { + return err.Error() + } + return writeBuffer.GetBox().String() +} diff --git a/plc4go/internal/bacnetip/apdu.go b/plc4go/internal/bacnetip/bacgopes/apdu.go similarity index 99% rename from plc4go/internal/bacnetip/apdu.go rename to plc4go/internal/bacnetip/bacgopes/apdu.go index 535ba30bee2..4a9db1c859d 100644 --- a/plc4go/internal/bacnetip/apdu.go +++ b/plc4go/internal/bacnetip/bacgopes/apdu.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes import readWriteModel "github.com/apache/plc4x/plc4go/protocols/bacnetip/readwrite/model" diff --git a/plc4go/internal/bacnetip/apdu_APCI.go b/plc4go/internal/bacnetip/bacgopes/apdu_APCI.go similarity index 99% rename from plc4go/internal/bacnetip/apdu_APCI.go rename to plc4go/internal/bacnetip/bacgopes/apdu_APCI.go index 034d4c6d3aa..9e807b52020 100644 --- a/plc4go/internal/bacnetip/apdu_APCI.go +++ b/plc4go/internal/bacnetip/bacgopes/apdu_APCI.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes import ( "context" @@ -26,9 +26,8 @@ import ( "github.com/pkg/errors" + "github.com/apache/plc4x/plc4go/internal/bacnetip/bacgopes/globals" readWriteModel "github.com/apache/plc4x/plc4go/protocols/bacnetip/readwrite/model" - - "github.com/apache/plc4x/plc4go/internal/bacnetip/globals" ) type APCI interface { diff --git a/plc4go/internal/bacnetip/apdu_APCISequence.go b/plc4go/internal/bacnetip/bacgopes/apdu_APCISequence.go similarity index 99% rename from plc4go/internal/bacnetip/apdu_APCISequence.go rename to plc4go/internal/bacnetip/bacgopes/apdu_APCISequence.go index fc08d07bd70..67b9dc9c4c1 100644 --- a/plc4go/internal/bacnetip/apdu_APCISequence.go +++ b/plc4go/internal/bacnetip/bacgopes/apdu_APCISequence.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes import ( "github.com/pkg/errors" diff --git a/plc4go/internal/bacnetip/apdu_APDU.go b/plc4go/internal/bacnetip/bacgopes/apdu_APDU.go similarity index 99% rename from plc4go/internal/bacnetip/apdu_APDU.go rename to plc4go/internal/bacnetip/bacgopes/apdu_APDU.go index 95389aba2ab..fdf55d164e8 100644 --- a/plc4go/internal/bacnetip/apdu_APDU.go +++ b/plc4go/internal/bacnetip/bacgopes/apdu_APDU.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes import ( "context" diff --git a/plc4go/internal/bacnetip/apdu_AbortPDU.go b/plc4go/internal/bacnetip/bacgopes/apdu_AbortPDU.go similarity index 98% rename from plc4go/internal/bacnetip/apdu_AbortPDU.go rename to plc4go/internal/bacnetip/bacgopes/apdu_AbortPDU.go index 2d7c0d6282f..2a3ea1761aa 100644 --- a/plc4go/internal/bacnetip/apdu_AbortPDU.go +++ b/plc4go/internal/bacnetip/bacgopes/apdu_AbortPDU.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes // TODO: implement it... type AbortPDU struct { diff --git a/plc4go/internal/bacnetip/apdu_AbortReason.go b/plc4go/internal/bacnetip/bacgopes/apdu_AbortReason.go similarity index 98% rename from plc4go/internal/bacnetip/apdu_AbortReason.go rename to plc4go/internal/bacnetip/bacgopes/apdu_AbortReason.go index 60cf98a6fd2..f8ec216c9af 100644 --- a/plc4go/internal/bacnetip/apdu_AbortReason.go +++ b/plc4go/internal/bacnetip/bacgopes/apdu_AbortReason.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes // TODO: implement it... type AbortReason struct { diff --git a/plc4go/internal/bacnetip/apdu_AcknowledgeAlarmRequest.go b/plc4go/internal/bacnetip/bacgopes/apdu_AcknowledgeAlarmRequest.go similarity index 98% rename from plc4go/internal/bacnetip/apdu_AcknowledgeAlarmRequest.go rename to plc4go/internal/bacnetip/bacgopes/apdu_AcknowledgeAlarmRequest.go index 0b39aee23c2..8e641eda1db 100644 --- a/plc4go/internal/bacnetip/apdu_AcknowledgeAlarmRequest.go +++ b/plc4go/internal/bacnetip/bacgopes/apdu_AcknowledgeAlarmRequest.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes // TODO: implement it... type AcknowledgeAlarmRequest struct { diff --git a/plc4go/internal/bacnetip/apdu_AddListElementRequest.go b/plc4go/internal/bacnetip/bacgopes/apdu_AddListElementRequest.go similarity index 98% rename from plc4go/internal/bacnetip/apdu_AddListElementRequest.go rename to plc4go/internal/bacnetip/bacgopes/apdu_AddListElementRequest.go index b4147cc868e..3db1aef47d9 100644 --- a/plc4go/internal/bacnetip/apdu_AddListElementRequest.go +++ b/plc4go/internal/bacnetip/bacgopes/apdu_AddListElementRequest.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes // TODO: implement it... type AddListElementRequest struct { diff --git a/plc4go/internal/bacnetip/apdu_AtomicReadFileACKAccessMethodChoice.go b/plc4go/internal/bacnetip/bacgopes/apdu_AtomicReadFileACKAccessMethodChoice.go similarity index 98% rename from plc4go/internal/bacnetip/apdu_AtomicReadFileACKAccessMethodChoice.go rename to plc4go/internal/bacnetip/bacgopes/apdu_AtomicReadFileACKAccessMethodChoice.go index 073079632c2..d5a0a960eb9 100644 --- a/plc4go/internal/bacnetip/apdu_AtomicReadFileACKAccessMethodChoice.go +++ b/plc4go/internal/bacnetip/bacgopes/apdu_AtomicReadFileACKAccessMethodChoice.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes // TODO: implement it... type AtomicReadFileACKAccessMethodChoice struct { diff --git a/plc4go/internal/bacnetip/apdu_AtomicReadFileACKAccessMethodRecordAccess.go b/plc4go/internal/bacnetip/bacgopes/apdu_AtomicReadFileACKAccessMethodRecordAccess.go similarity index 98% rename from plc4go/internal/bacnetip/apdu_AtomicReadFileACKAccessMethodRecordAccess.go rename to plc4go/internal/bacnetip/bacgopes/apdu_AtomicReadFileACKAccessMethodRecordAccess.go index ffc7de96b97..00d6363f251 100644 --- a/plc4go/internal/bacnetip/apdu_AtomicReadFileACKAccessMethodRecordAccess.go +++ b/plc4go/internal/bacnetip/bacgopes/apdu_AtomicReadFileACKAccessMethodRecordAccess.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes // TODO: implement it... type AtomicReadFileACKAccessMethodRecordAccess struct { diff --git a/plc4go/internal/bacnetip/apdu_AtomicReadFileACKAccessMethodStreamAccess.go b/plc4go/internal/bacnetip/bacgopes/apdu_AtomicReadFileACKAccessMethodStreamAccess.go similarity index 98% rename from plc4go/internal/bacnetip/apdu_AtomicReadFileACKAccessMethodStreamAccess.go rename to plc4go/internal/bacnetip/bacgopes/apdu_AtomicReadFileACKAccessMethodStreamAccess.go index e06aeb8b2e6..9d6879644c2 100644 --- a/plc4go/internal/bacnetip/apdu_AtomicReadFileACKAccessMethodStreamAccess.go +++ b/plc4go/internal/bacnetip/bacgopes/apdu_AtomicReadFileACKAccessMethodStreamAccess.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes // TODO: implement it... type AtomicReadFileACKAccessMethodStreamAccess struct { diff --git a/plc4go/internal/bacnetip/apdu_AtomicReadFileRequest.go b/plc4go/internal/bacnetip/bacgopes/apdu_AtomicReadFileRequest.go similarity index 98% rename from plc4go/internal/bacnetip/apdu_AtomicReadFileRequest.go rename to plc4go/internal/bacnetip/bacgopes/apdu_AtomicReadFileRequest.go index cf2d225e7df..60c8259dd7c 100644 --- a/plc4go/internal/bacnetip/apdu_AtomicReadFileRequest.go +++ b/plc4go/internal/bacnetip/bacgopes/apdu_AtomicReadFileRequest.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes // TODO: implement it... type AtomicReadFileRequest struct { diff --git a/plc4go/internal/bacnetip/apdu_AtomicReadFileRequestAccessMethodChoice.go b/plc4go/internal/bacnetip/bacgopes/apdu_AtomicReadFileRequestAccessMethodChoice.go similarity index 98% rename from plc4go/internal/bacnetip/apdu_AtomicReadFileRequestAccessMethodChoice.go rename to plc4go/internal/bacnetip/bacgopes/apdu_AtomicReadFileRequestAccessMethodChoice.go index 8a95e33aed8..5fb29bfb484 100644 --- a/plc4go/internal/bacnetip/apdu_AtomicReadFileRequestAccessMethodChoice.go +++ b/plc4go/internal/bacnetip/bacgopes/apdu_AtomicReadFileRequestAccessMethodChoice.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes // TODO: implement it... type AtomicReadFileRequestAccessMethodChoice struct { diff --git a/plc4go/internal/bacnetip/apdu_AtomicReadFileRequestAccessMethodChoiceRecordAccess.go b/plc4go/internal/bacnetip/bacgopes/apdu_AtomicReadFileRequestAccessMethodChoiceRecordAccess.go similarity index 98% rename from plc4go/internal/bacnetip/apdu_AtomicReadFileRequestAccessMethodChoiceRecordAccess.go rename to plc4go/internal/bacnetip/bacgopes/apdu_AtomicReadFileRequestAccessMethodChoiceRecordAccess.go index 5e6b74871da..7890c2a7adb 100644 --- a/plc4go/internal/bacnetip/apdu_AtomicReadFileRequestAccessMethodChoiceRecordAccess.go +++ b/plc4go/internal/bacnetip/bacgopes/apdu_AtomicReadFileRequestAccessMethodChoiceRecordAccess.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes // TODO: implement it... type AtomicReadFileRequestAccessMethodChoiceRecordAccess struct { diff --git a/plc4go/internal/bacnetip/apdu_AtomicReadFileRequestAccessMethodChoiceStreamAccess.go b/plc4go/internal/bacnetip/bacgopes/apdu_AtomicReadFileRequestAccessMethodChoiceStreamAccess.go similarity index 98% rename from plc4go/internal/bacnetip/apdu_AtomicReadFileRequestAccessMethodChoiceStreamAccess.go rename to plc4go/internal/bacnetip/bacgopes/apdu_AtomicReadFileRequestAccessMethodChoiceStreamAccess.go index a18b606251e..855563e2422 100644 --- a/plc4go/internal/bacnetip/apdu_AtomicReadFileRequestAccessMethodChoiceStreamAccess.go +++ b/plc4go/internal/bacnetip/bacgopes/apdu_AtomicReadFileRequestAccessMethodChoiceStreamAccess.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes // TODO: implement it... type AtomicReadFileRequestAccessMethodChoiceStreamAccess struct { diff --git a/plc4go/internal/bacnetip/apdu_AtomicWriteFileACK.go b/plc4go/internal/bacnetip/bacgopes/apdu_AtomicWriteFileACK.go similarity index 98% rename from plc4go/internal/bacnetip/apdu_AtomicWriteFileACK.go rename to plc4go/internal/bacnetip/bacgopes/apdu_AtomicWriteFileACK.go index 654c75c029a..e0b20d4c29a 100644 --- a/plc4go/internal/bacnetip/apdu_AtomicWriteFileACK.go +++ b/plc4go/internal/bacnetip/bacgopes/apdu_AtomicWriteFileACK.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes // TODO: implement it... type AtomicWriteFileACK struct { diff --git a/plc4go/internal/bacnetip/apdu_AtomicWriteFileRequest.go b/plc4go/internal/bacnetip/bacgopes/apdu_AtomicWriteFileRequest.go similarity index 98% rename from plc4go/internal/bacnetip/apdu_AtomicWriteFileRequest.go rename to plc4go/internal/bacnetip/bacgopes/apdu_AtomicWriteFileRequest.go index d6f1269e459..a80ee89b9db 100644 --- a/plc4go/internal/bacnetip/apdu_AtomicWriteFileRequest.go +++ b/plc4go/internal/bacnetip/bacgopes/apdu_AtomicWriteFileRequest.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes // TODO: implement it... type AtomicWriteFileRequest struct { diff --git a/plc4go/internal/bacnetip/apdu_AtomicWriteFileRequestAccessMethodChoice.go b/plc4go/internal/bacnetip/bacgopes/apdu_AtomicWriteFileRequestAccessMethodChoice.go similarity index 98% rename from plc4go/internal/bacnetip/apdu_AtomicWriteFileRequestAccessMethodChoice.go rename to plc4go/internal/bacnetip/bacgopes/apdu_AtomicWriteFileRequestAccessMethodChoice.go index ca2a69a4b16..5f5637a6629 100644 --- a/plc4go/internal/bacnetip/apdu_AtomicWriteFileRequestAccessMethodChoice.go +++ b/plc4go/internal/bacnetip/bacgopes/apdu_AtomicWriteFileRequestAccessMethodChoice.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes // TODO: implement it... type AtomicWriteFileRequestAccessMethodChoice struct { diff --git a/plc4go/internal/bacnetip/apdu_AtomicWriteFileRequestAccessMethodChoiceRecordAccess.go b/plc4go/internal/bacnetip/bacgopes/apdu_AtomicWriteFileRequestAccessMethodChoiceRecordAccess.go similarity index 98% rename from plc4go/internal/bacnetip/apdu_AtomicWriteFileRequestAccessMethodChoiceRecordAccess.go rename to plc4go/internal/bacnetip/bacgopes/apdu_AtomicWriteFileRequestAccessMethodChoiceRecordAccess.go index 81ddb57f913..2c9e0155b7f 100644 --- a/plc4go/internal/bacnetip/apdu_AtomicWriteFileRequestAccessMethodChoiceRecordAccess.go +++ b/plc4go/internal/bacnetip/bacgopes/apdu_AtomicWriteFileRequestAccessMethodChoiceRecordAccess.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes // TODO: implement it... type AtomicWriteFileRequestAccessMethodChoiceRecordAccess struct { diff --git a/plc4go/internal/bacnetip/apdu_AtomicWriteFileRequestAccessMethodChoiceStreamAccess.go b/plc4go/internal/bacnetip/bacgopes/apdu_AtomicWriteFileRequestAccessMethodChoiceStreamAccess.go similarity index 98% rename from plc4go/internal/bacnetip/apdu_AtomicWriteFileRequestAccessMethodChoiceStreamAccess.go rename to plc4go/internal/bacnetip/bacgopes/apdu_AtomicWriteFileRequestAccessMethodChoiceStreamAccess.go index 5600c990e23..10cd2e850a7 100644 --- a/plc4go/internal/bacnetip/apdu_AtomicWriteFileRequestAccessMethodChoiceStreamAccess.go +++ b/plc4go/internal/bacnetip/bacgopes/apdu_AtomicWriteFileRequestAccessMethodChoiceStreamAccess.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes // TODO: implement it... type AtomicWriteFileRequestAccessMethodChoiceStreamAccess struct { diff --git a/plc4go/internal/bacnetip/apdu_AuthenticateACK.go b/plc4go/internal/bacnetip/bacgopes/apdu_AuthenticateACK.go similarity index 98% rename from plc4go/internal/bacnetip/apdu_AuthenticateACK.go rename to plc4go/internal/bacnetip/bacgopes/apdu_AuthenticateACK.go index 0a6fe63de92..782a4f1974e 100644 --- a/plc4go/internal/bacnetip/apdu_AuthenticateACK.go +++ b/plc4go/internal/bacnetip/bacgopes/apdu_AuthenticateACK.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes // TODO: implement it... type AuthenticateACK struct { diff --git a/plc4go/internal/bacnetip/apdu_AuthenticateRequest.go b/plc4go/internal/bacnetip/bacgopes/apdu_AuthenticateRequest.go similarity index 98% rename from plc4go/internal/bacnetip/apdu_AuthenticateRequest.go rename to plc4go/internal/bacnetip/bacgopes/apdu_AuthenticateRequest.go index 5c2eae83f89..56d32c2c69c 100644 --- a/plc4go/internal/bacnetip/apdu_AuthenticateRequest.go +++ b/plc4go/internal/bacnetip/bacgopes/apdu_AuthenticateRequest.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes // TODO: implement it... type AuthenticateRequest struct { diff --git a/plc4go/internal/bacnetip/apdu_COVNotificationParameters.go b/plc4go/internal/bacnetip/bacgopes/apdu_COVNotificationParameters.go similarity index 98% rename from plc4go/internal/bacnetip/apdu_COVNotificationParameters.go rename to plc4go/internal/bacnetip/bacgopes/apdu_COVNotificationParameters.go index d915042c56e..8f62a589d32 100644 --- a/plc4go/internal/bacnetip/apdu_COVNotificationParameters.go +++ b/plc4go/internal/bacnetip/bacgopes/apdu_COVNotificationParameters.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes // TODO: implement it... type COVNotificationParameters struct { diff --git a/plc4go/internal/bacnetip/apdu_ChangeListError.go b/plc4go/internal/bacnetip/bacgopes/apdu_ChangeListError.go similarity index 98% rename from plc4go/internal/bacnetip/apdu_ChangeListError.go rename to plc4go/internal/bacnetip/bacgopes/apdu_ChangeListError.go index c6741f9b107..642d38d0a1b 100644 --- a/plc4go/internal/bacnetip/apdu_ChangeListError.go +++ b/plc4go/internal/bacnetip/bacgopes/apdu_ChangeListError.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes // TODO: implement it... type ChangeListError struct { diff --git a/plc4go/internal/bacnetip/apdu_ComplexAckPDU.go b/plc4go/internal/bacnetip/bacgopes/apdu_ComplexAckPDU.go similarity index 99% rename from plc4go/internal/bacnetip/apdu_ComplexAckPDU.go rename to plc4go/internal/bacnetip/bacgopes/apdu_ComplexAckPDU.go index 7b583c34d75..60e92ff1af3 100644 --- a/plc4go/internal/bacnetip/apdu_ComplexAckPDU.go +++ b/plc4go/internal/bacnetip/bacgopes/apdu_ComplexAckPDU.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes import readWriteModel "github.com/apache/plc4x/plc4go/protocols/bacnetip/readwrite/model" diff --git a/plc4go/internal/bacnetip/apdu_ComplexAckSequence.go b/plc4go/internal/bacnetip/bacgopes/apdu_ComplexAckSequence.go similarity index 98% rename from plc4go/internal/bacnetip/apdu_ComplexAckSequence.go rename to plc4go/internal/bacnetip/bacgopes/apdu_ComplexAckSequence.go index 7c41890f962..722c66490da 100644 --- a/plc4go/internal/bacnetip/apdu_ComplexAckSequence.go +++ b/plc4go/internal/bacnetip/bacgopes/apdu_ComplexAckSequence.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes // TODO: implement it... type ComplexAckSequence struct { diff --git a/plc4go/internal/bacnetip/apdu_ConfirmedCOVNotificationRequest.go b/plc4go/internal/bacnetip/bacgopes/apdu_ConfirmedCOVNotificationRequest.go similarity index 98% rename from plc4go/internal/bacnetip/apdu_ConfirmedCOVNotificationRequest.go rename to plc4go/internal/bacnetip/bacgopes/apdu_ConfirmedCOVNotificationRequest.go index 3d9f0ab8bba..8601110ff4a 100644 --- a/plc4go/internal/bacnetip/apdu_ConfirmedCOVNotificationRequest.go +++ b/plc4go/internal/bacnetip/bacgopes/apdu_ConfirmedCOVNotificationRequest.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes // TODO: implement it... type ConfirmedCOVNotificationRequest struct { diff --git a/plc4go/internal/bacnetip/apdu_ConfirmedEventNotificationRequest.go b/plc4go/internal/bacnetip/bacgopes/apdu_ConfirmedEventNotificationRequest.go similarity index 98% rename from plc4go/internal/bacnetip/apdu_ConfirmedEventNotificationRequest.go rename to plc4go/internal/bacnetip/bacgopes/apdu_ConfirmedEventNotificationRequest.go index fcf02d3e474..b610f2fcb25 100644 --- a/plc4go/internal/bacnetip/apdu_ConfirmedEventNotificationRequest.go +++ b/plc4go/internal/bacnetip/bacgopes/apdu_ConfirmedEventNotificationRequest.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes // TODO: implement it... type ConfirmedEventNotificationRequest struct { diff --git a/plc4go/internal/bacnetip/apdu_ConfirmedPrivateTransferACK.go b/plc4go/internal/bacnetip/bacgopes/apdu_ConfirmedPrivateTransferACK.go similarity index 98% rename from plc4go/internal/bacnetip/apdu_ConfirmedPrivateTransferACK.go rename to plc4go/internal/bacnetip/bacgopes/apdu_ConfirmedPrivateTransferACK.go index 25b6ec35176..e94bc7cdbc4 100644 --- a/plc4go/internal/bacnetip/apdu_ConfirmedPrivateTransferACK.go +++ b/plc4go/internal/bacnetip/bacgopes/apdu_ConfirmedPrivateTransferACK.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes // TODO: implement it... type ConfirmedPrivateTransferACK struct { diff --git a/plc4go/internal/bacnetip/apdu_ConfirmedPrivateTransferError.go b/plc4go/internal/bacnetip/bacgopes/apdu_ConfirmedPrivateTransferError.go similarity index 98% rename from plc4go/internal/bacnetip/apdu_ConfirmedPrivateTransferError.go rename to plc4go/internal/bacnetip/bacgopes/apdu_ConfirmedPrivateTransferError.go index f4f0309ed1f..cf4505b6b04 100644 --- a/plc4go/internal/bacnetip/apdu_ConfirmedPrivateTransferError.go +++ b/plc4go/internal/bacnetip/bacgopes/apdu_ConfirmedPrivateTransferError.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes // TODO: implement it... type ConfirmedPrivateTransferError struct { diff --git a/plc4go/internal/bacnetip/apdu_ConfirmedPrivateTransferRequest.go b/plc4go/internal/bacnetip/bacgopes/apdu_ConfirmedPrivateTransferRequest.go similarity index 98% rename from plc4go/internal/bacnetip/apdu_ConfirmedPrivateTransferRequest.go rename to plc4go/internal/bacnetip/bacgopes/apdu_ConfirmedPrivateTransferRequest.go index 779d7e36a59..104f2de06d2 100644 --- a/plc4go/internal/bacnetip/apdu_ConfirmedPrivateTransferRequest.go +++ b/plc4go/internal/bacnetip/bacgopes/apdu_ConfirmedPrivateTransferRequest.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes import "fmt" diff --git a/plc4go/internal/bacnetip/apdu_ConfirmedRequestPDU.go b/plc4go/internal/bacnetip/bacgopes/apdu_ConfirmedRequestPDU.go similarity index 99% rename from plc4go/internal/bacnetip/apdu_ConfirmedRequestPDU.go rename to plc4go/internal/bacnetip/bacgopes/apdu_ConfirmedRequestPDU.go index 59eca5bcbc1..fc46330ea89 100644 --- a/plc4go/internal/bacnetip/apdu_ConfirmedRequestPDU.go +++ b/plc4go/internal/bacnetip/bacgopes/apdu_ConfirmedRequestPDU.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes import ( "github.com/pkg/errors" diff --git a/plc4go/internal/bacnetip/apdu_ConfirmedRequestSequence.go b/plc4go/internal/bacnetip/bacgopes/apdu_ConfirmedRequestSequence.go similarity index 98% rename from plc4go/internal/bacnetip/apdu_ConfirmedRequestSequence.go rename to plc4go/internal/bacnetip/bacgopes/apdu_ConfirmedRequestSequence.go index e23b61c20d5..3e62ea68f44 100644 --- a/plc4go/internal/bacnetip/apdu_ConfirmedRequestSequence.go +++ b/plc4go/internal/bacnetip/bacgopes/apdu_ConfirmedRequestSequence.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes // TODO: implement it... type ConfirmedRequestSequence struct { diff --git a/plc4go/internal/bacnetip/apdu_ConfirmedServiceChoice.go b/plc4go/internal/bacnetip/bacgopes/apdu_ConfirmedServiceChoice.go similarity index 98% rename from plc4go/internal/bacnetip/apdu_ConfirmedServiceChoice.go rename to plc4go/internal/bacnetip/bacgopes/apdu_ConfirmedServiceChoice.go index 978e958a6aa..0e0d710874e 100644 --- a/plc4go/internal/bacnetip/apdu_ConfirmedServiceChoice.go +++ b/plc4go/internal/bacnetip/bacgopes/apdu_ConfirmedServiceChoice.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes // TODO: implement it... type ConfirmedServiceChoice struct { diff --git a/plc4go/internal/bacnetip/apdu_ConfirmedTextMessageRequest.go b/plc4go/internal/bacnetip/bacgopes/apdu_ConfirmedTextMessageRequest.go similarity index 98% rename from plc4go/internal/bacnetip/apdu_ConfirmedTextMessageRequest.go rename to plc4go/internal/bacnetip/bacgopes/apdu_ConfirmedTextMessageRequest.go index 9d4c6c00037..aceb39d03c2 100644 --- a/plc4go/internal/bacnetip/apdu_ConfirmedTextMessageRequest.go +++ b/plc4go/internal/bacnetip/bacgopes/apdu_ConfirmedTextMessageRequest.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes // TODO: implement it... type ConfirmedTextMessageRequest struct { diff --git a/plc4go/internal/bacnetip/apdu_ConfirmedTextMessageRequestMessageClass.go b/plc4go/internal/bacnetip/bacgopes/apdu_ConfirmedTextMessageRequestMessageClass.go similarity index 98% rename from plc4go/internal/bacnetip/apdu_ConfirmedTextMessageRequestMessageClass.go rename to plc4go/internal/bacnetip/bacgopes/apdu_ConfirmedTextMessageRequestMessageClass.go index e3431e8a654..35cafc962fd 100644 --- a/plc4go/internal/bacnetip/apdu_ConfirmedTextMessageRequestMessageClass.go +++ b/plc4go/internal/bacnetip/bacgopes/apdu_ConfirmedTextMessageRequestMessageClass.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes // TODO: implement it... type ConfirmedTextMessageRequestMessageClass struct { diff --git a/plc4go/internal/bacnetip/apdu_ConfirmedTextMessageRequestMessagePriority.go b/plc4go/internal/bacnetip/bacgopes/apdu_ConfirmedTextMessageRequestMessagePriority.go similarity index 98% rename from plc4go/internal/bacnetip/apdu_ConfirmedTextMessageRequestMessagePriority.go rename to plc4go/internal/bacnetip/bacgopes/apdu_ConfirmedTextMessageRequestMessagePriority.go index 5ee21ee9e01..7d0104d313a 100644 --- a/plc4go/internal/bacnetip/apdu_ConfirmedTextMessageRequestMessagePriority.go +++ b/plc4go/internal/bacnetip/bacgopes/apdu_ConfirmedTextMessageRequestMessagePriority.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes // TODO: implement it... type ConfirmedTextMessageRequestMessagePriority struct { diff --git a/plc4go/internal/bacnetip/apdu_CreateObjectACK.go b/plc4go/internal/bacnetip/bacgopes/apdu_CreateObjectACK.go similarity index 98% rename from plc4go/internal/bacnetip/apdu_CreateObjectACK.go rename to plc4go/internal/bacnetip/bacgopes/apdu_CreateObjectACK.go index f62c145c079..082642e5cb3 100644 --- a/plc4go/internal/bacnetip/apdu_CreateObjectACK.go +++ b/plc4go/internal/bacnetip/bacgopes/apdu_CreateObjectACK.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes // TODO: implement it... type CreateObjectACK struct { diff --git a/plc4go/internal/bacnetip/apdu_CreateObjectError.go b/plc4go/internal/bacnetip/bacgopes/apdu_CreateObjectError.go similarity index 98% rename from plc4go/internal/bacnetip/apdu_CreateObjectError.go rename to plc4go/internal/bacnetip/bacgopes/apdu_CreateObjectError.go index f8db5d81b86..6bdd77a817b 100644 --- a/plc4go/internal/bacnetip/apdu_CreateObjectError.go +++ b/plc4go/internal/bacnetip/bacgopes/apdu_CreateObjectError.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes // TODO: implement it... type CreateObjectError struct { diff --git a/plc4go/internal/bacnetip/apdu_CreateObjectRequest.go b/plc4go/internal/bacnetip/bacgopes/apdu_CreateObjectRequest.go similarity index 98% rename from plc4go/internal/bacnetip/apdu_CreateObjectRequest.go rename to plc4go/internal/bacnetip/bacgopes/apdu_CreateObjectRequest.go index 0364a4e61a4..6386989893c 100644 --- a/plc4go/internal/bacnetip/apdu_CreateObjectRequest.go +++ b/plc4go/internal/bacnetip/bacgopes/apdu_CreateObjectRequest.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes // TODO: implement it... type CreateObjectRequest struct { diff --git a/plc4go/internal/bacnetip/apdu_CreateObjectRequestObjectSpecifier.go b/plc4go/internal/bacnetip/bacgopes/apdu_CreateObjectRequestObjectSpecifier.go similarity index 98% rename from plc4go/internal/bacnetip/apdu_CreateObjectRequestObjectSpecifier.go rename to plc4go/internal/bacnetip/bacgopes/apdu_CreateObjectRequestObjectSpecifier.go index 69460f068e7..0077c501dd8 100644 --- a/plc4go/internal/bacnetip/apdu_CreateObjectRequestObjectSpecifier.go +++ b/plc4go/internal/bacnetip/bacgopes/apdu_CreateObjectRequestObjectSpecifier.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes // TODO: implement it... type CreateObjectRequestObjectSpecifier struct { diff --git a/plc4go/internal/bacnetip/apdu_DeleteObjectRequest.go b/plc4go/internal/bacnetip/bacgopes/apdu_DeleteObjectRequest.go similarity index 98% rename from plc4go/internal/bacnetip/apdu_DeleteObjectRequest.go rename to plc4go/internal/bacnetip/bacgopes/apdu_DeleteObjectRequest.go index 43f36e64c0c..2790a91e0a6 100644 --- a/plc4go/internal/bacnetip/apdu_DeleteObjectRequest.go +++ b/plc4go/internal/bacnetip/bacgopes/apdu_DeleteObjectRequest.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes // TODO: implement it... type DeleteObjectRequest struct { diff --git a/plc4go/internal/bacnetip/apdu_DeviceCommunicationControlRequest.go b/plc4go/internal/bacnetip/bacgopes/apdu_DeviceCommunicationControlRequest.go similarity index 98% rename from plc4go/internal/bacnetip/apdu_DeviceCommunicationControlRequest.go rename to plc4go/internal/bacnetip/bacgopes/apdu_DeviceCommunicationControlRequest.go index 3db46bd09b7..82e3df8e5bb 100644 --- a/plc4go/internal/bacnetip/apdu_DeviceCommunicationControlRequest.go +++ b/plc4go/internal/bacnetip/bacgopes/apdu_DeviceCommunicationControlRequest.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes // TODO: implement it... type DeviceCommunicationControlRequest struct { diff --git a/plc4go/internal/bacnetip/apdu_DeviceCommunicationControlRequestEnableDisable.go b/plc4go/internal/bacnetip/bacgopes/apdu_DeviceCommunicationControlRequestEnableDisable.go similarity index 98% rename from plc4go/internal/bacnetip/apdu_DeviceCommunicationControlRequestEnableDisable.go rename to plc4go/internal/bacnetip/bacgopes/apdu_DeviceCommunicationControlRequestEnableDisable.go index 8981df59ee0..525fea6809b 100644 --- a/plc4go/internal/bacnetip/apdu_DeviceCommunicationControlRequestEnableDisable.go +++ b/plc4go/internal/bacnetip/bacgopes/apdu_DeviceCommunicationControlRequestEnableDisable.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes // TODO: implement it... type DeviceCommunicationControlRequestEnableDisable struct { diff --git a/plc4go/internal/bacnetip/apdu_Error.go b/plc4go/internal/bacnetip/bacgopes/apdu_Error.go similarity index 98% rename from plc4go/internal/bacnetip/apdu_Error.go rename to plc4go/internal/bacnetip/bacgopes/apdu_Error.go index 8c125705797..909837bcecc 100644 --- a/plc4go/internal/bacnetip/apdu_Error.go +++ b/plc4go/internal/bacnetip/bacgopes/apdu_Error.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes // TODO: implement it... type Error struct { diff --git a/plc4go/internal/bacnetip/apdu_ErrorPDU.go b/plc4go/internal/bacnetip/bacgopes/apdu_ErrorPDU.go similarity index 98% rename from plc4go/internal/bacnetip/apdu_ErrorPDU.go rename to plc4go/internal/bacnetip/bacgopes/apdu_ErrorPDU.go index 61b13f2a55e..834f9d42c8a 100644 --- a/plc4go/internal/bacnetip/apdu_ErrorPDU.go +++ b/plc4go/internal/bacnetip/bacgopes/apdu_ErrorPDU.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes // TODO: implement it... type ErrorPDU struct { diff --git a/plc4go/internal/bacnetip/apdu_ErrorSequence.go b/plc4go/internal/bacnetip/bacgopes/apdu_ErrorSequence.go similarity index 98% rename from plc4go/internal/bacnetip/apdu_ErrorSequence.go rename to plc4go/internal/bacnetip/bacgopes/apdu_ErrorSequence.go index ef8e7720b24..22826e0a768 100644 --- a/plc4go/internal/bacnetip/apdu_ErrorSequence.go +++ b/plc4go/internal/bacnetip/bacgopes/apdu_ErrorSequence.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes // TODO: implement it... type ErrorSequence struct { diff --git a/plc4go/internal/bacnetip/apdu_EventNotificationParameters.go b/plc4go/internal/bacnetip/bacgopes/apdu_EventNotificationParameters.go similarity index 98% rename from plc4go/internal/bacnetip/apdu_EventNotificationParameters.go rename to plc4go/internal/bacnetip/bacgopes/apdu_EventNotificationParameters.go index f0a739d834f..75ce7647936 100644 --- a/plc4go/internal/bacnetip/apdu_EventNotificationParameters.go +++ b/plc4go/internal/bacnetip/bacgopes/apdu_EventNotificationParameters.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes // TODO: implement it... type EventNotificationParameters struct { diff --git a/plc4go/internal/bacnetip/apdu_GetAlarmSummaryACK.go b/plc4go/internal/bacnetip/bacgopes/apdu_GetAlarmSummaryACK.go similarity index 98% rename from plc4go/internal/bacnetip/apdu_GetAlarmSummaryACK.go rename to plc4go/internal/bacnetip/bacgopes/apdu_GetAlarmSummaryACK.go index 3ba1b2a49cf..ab02682d330 100644 --- a/plc4go/internal/bacnetip/apdu_GetAlarmSummaryACK.go +++ b/plc4go/internal/bacnetip/bacgopes/apdu_GetAlarmSummaryACK.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes // TODO: implement it... type GetAlarmSummaryACK struct { diff --git a/plc4go/internal/bacnetip/apdu_GetAlarmSummaryAlarmSummary.go b/plc4go/internal/bacnetip/bacgopes/apdu_GetAlarmSummaryAlarmSummary.go similarity index 98% rename from plc4go/internal/bacnetip/apdu_GetAlarmSummaryAlarmSummary.go rename to plc4go/internal/bacnetip/bacgopes/apdu_GetAlarmSummaryAlarmSummary.go index 53542b7c40e..8dae0149ee6 100644 --- a/plc4go/internal/bacnetip/apdu_GetAlarmSummaryAlarmSummary.go +++ b/plc4go/internal/bacnetip/bacgopes/apdu_GetAlarmSummaryAlarmSummary.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes // TODO: implement it... type GetAlarmSummaryAlarmSummary struct { diff --git a/plc4go/internal/bacnetip/apdu_GetAlarmSummaryRequest.go b/plc4go/internal/bacnetip/bacgopes/apdu_GetAlarmSummaryRequest.go similarity index 98% rename from plc4go/internal/bacnetip/apdu_GetAlarmSummaryRequest.go rename to plc4go/internal/bacnetip/bacgopes/apdu_GetAlarmSummaryRequest.go index acb053d06ca..1d70a23bc4e 100644 --- a/plc4go/internal/bacnetip/apdu_GetAlarmSummaryRequest.go +++ b/plc4go/internal/bacnetip/bacgopes/apdu_GetAlarmSummaryRequest.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes // TODO: implement it... type GetAlarmSummaryRequest struct { diff --git a/plc4go/internal/bacnetip/apdu_GetEnrollmentSummaryACK.go b/plc4go/internal/bacnetip/bacgopes/apdu_GetEnrollmentSummaryACK.go similarity index 98% rename from plc4go/internal/bacnetip/apdu_GetEnrollmentSummaryACK.go rename to plc4go/internal/bacnetip/bacgopes/apdu_GetEnrollmentSummaryACK.go index 2ae4807a39c..003b7f84e16 100644 --- a/plc4go/internal/bacnetip/apdu_GetEnrollmentSummaryACK.go +++ b/plc4go/internal/bacnetip/bacgopes/apdu_GetEnrollmentSummaryACK.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes // TODO: implement it... type GetEnrollmentSummaryACK struct { diff --git a/plc4go/internal/bacnetip/apdu_GetEnrollmentSummaryEnrollmentSummary.go b/plc4go/internal/bacnetip/bacgopes/apdu_GetEnrollmentSummaryEnrollmentSummary.go similarity index 98% rename from plc4go/internal/bacnetip/apdu_GetEnrollmentSummaryEnrollmentSummary.go rename to plc4go/internal/bacnetip/bacgopes/apdu_GetEnrollmentSummaryEnrollmentSummary.go index 60f05197d42..35b0c727fe1 100644 --- a/plc4go/internal/bacnetip/apdu_GetEnrollmentSummaryEnrollmentSummary.go +++ b/plc4go/internal/bacnetip/bacgopes/apdu_GetEnrollmentSummaryEnrollmentSummary.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes // TODO: implement it... type GetEnrollmentSummaryEnrollmentSummary struct { diff --git a/plc4go/internal/bacnetip/apdu_GetEnrollmentSummaryRequest.go b/plc4go/internal/bacnetip/bacgopes/apdu_GetEnrollmentSummaryRequest.go similarity index 98% rename from plc4go/internal/bacnetip/apdu_GetEnrollmentSummaryRequest.go rename to plc4go/internal/bacnetip/bacgopes/apdu_GetEnrollmentSummaryRequest.go index 289e704197c..cb729f915c9 100644 --- a/plc4go/internal/bacnetip/apdu_GetEnrollmentSummaryRequest.go +++ b/plc4go/internal/bacnetip/bacgopes/apdu_GetEnrollmentSummaryRequest.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes // TODO: implement it... type GetEnrollmentSummaryRequest struct { diff --git a/plc4go/internal/bacnetip/apdu_GetEnrollmentSummaryRequestAcknowledgmentFilterType.go b/plc4go/internal/bacnetip/bacgopes/apdu_GetEnrollmentSummaryRequestAcknowledgmentFilterType.go similarity index 98% rename from plc4go/internal/bacnetip/apdu_GetEnrollmentSummaryRequestAcknowledgmentFilterType.go rename to plc4go/internal/bacnetip/bacgopes/apdu_GetEnrollmentSummaryRequestAcknowledgmentFilterType.go index c1ebe1cc322..9828e1ed131 100644 --- a/plc4go/internal/bacnetip/apdu_GetEnrollmentSummaryRequestAcknowledgmentFilterType.go +++ b/plc4go/internal/bacnetip/bacgopes/apdu_GetEnrollmentSummaryRequestAcknowledgmentFilterType.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes // TODO: implement it... type GetEnrollmentSummaryRequestAcknowledgmentFilterType struct { diff --git a/plc4go/internal/bacnetip/apdu_GetEnrollmentSummaryRequestEventStateFilterType.go b/plc4go/internal/bacnetip/bacgopes/apdu_GetEnrollmentSummaryRequestEventStateFilterType.go similarity index 98% rename from plc4go/internal/bacnetip/apdu_GetEnrollmentSummaryRequestEventStateFilterType.go rename to plc4go/internal/bacnetip/bacgopes/apdu_GetEnrollmentSummaryRequestEventStateFilterType.go index b39c721b91e..4b204114133 100644 --- a/plc4go/internal/bacnetip/apdu_GetEnrollmentSummaryRequestEventStateFilterType.go +++ b/plc4go/internal/bacnetip/bacgopes/apdu_GetEnrollmentSummaryRequestEventStateFilterType.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes // TODO: implement it... type GetEnrollmentSummaryRequestEventStateFilterType struct { diff --git a/plc4go/internal/bacnetip/apdu_GetEnrollmentSummaryRequestPriorityFilterType.go b/plc4go/internal/bacnetip/bacgopes/apdu_GetEnrollmentSummaryRequestPriorityFilterType.go similarity index 98% rename from plc4go/internal/bacnetip/apdu_GetEnrollmentSummaryRequestPriorityFilterType.go rename to plc4go/internal/bacnetip/bacgopes/apdu_GetEnrollmentSummaryRequestPriorityFilterType.go index 21431ff12db..98da49f33ea 100644 --- a/plc4go/internal/bacnetip/apdu_GetEnrollmentSummaryRequestPriorityFilterType.go +++ b/plc4go/internal/bacnetip/bacgopes/apdu_GetEnrollmentSummaryRequestPriorityFilterType.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes // TODO: implement it... type GetEnrollmentSummaryRequestPriorityFilterType struct { diff --git a/plc4go/internal/bacnetip/apdu_GetEventInformationACK.go b/plc4go/internal/bacnetip/bacgopes/apdu_GetEventInformationACK.go similarity index 98% rename from plc4go/internal/bacnetip/apdu_GetEventInformationACK.go rename to plc4go/internal/bacnetip/bacgopes/apdu_GetEventInformationACK.go index 7aa78084207..537516b6fc6 100644 --- a/plc4go/internal/bacnetip/apdu_GetEventInformationACK.go +++ b/plc4go/internal/bacnetip/bacgopes/apdu_GetEventInformationACK.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes // TODO: implement it... type GetEventInformationACK struct { diff --git a/plc4go/internal/bacnetip/apdu_GetEventInformationEventSummary.go b/plc4go/internal/bacnetip/bacgopes/apdu_GetEventInformationEventSummary.go similarity index 98% rename from plc4go/internal/bacnetip/apdu_GetEventInformationEventSummary.go rename to plc4go/internal/bacnetip/bacgopes/apdu_GetEventInformationEventSummary.go index 9d688485449..2d8173127a6 100644 --- a/plc4go/internal/bacnetip/apdu_GetEventInformationEventSummary.go +++ b/plc4go/internal/bacnetip/bacgopes/apdu_GetEventInformationEventSummary.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes // TODO: implement it... type GetEventInformationEventSummary struct { diff --git a/plc4go/internal/bacnetip/apdu_GetEventInformationRequest.go b/plc4go/internal/bacnetip/bacgopes/apdu_GetEventInformationRequest.go similarity index 98% rename from plc4go/internal/bacnetip/apdu_GetEventInformationRequest.go rename to plc4go/internal/bacnetip/bacgopes/apdu_GetEventInformationRequest.go index 67371d37b47..383c938e403 100644 --- a/plc4go/internal/bacnetip/apdu_GetEventInformationRequest.go +++ b/plc4go/internal/bacnetip/bacgopes/apdu_GetEventInformationRequest.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes // TODO: implement it... type GetEventInformationRequest struct { diff --git a/plc4go/internal/bacnetip/apdu_GroupChannelValue.go b/plc4go/internal/bacnetip/bacgopes/apdu_GroupChannelValue.go similarity index 98% rename from plc4go/internal/bacnetip/apdu_GroupChannelValue.go rename to plc4go/internal/bacnetip/bacgopes/apdu_GroupChannelValue.go index bb579dfe862..368c9852ad1 100644 --- a/plc4go/internal/bacnetip/apdu_GroupChannelValue.go +++ b/plc4go/internal/bacnetip/bacgopes/apdu_GroupChannelValue.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes // TODO: implement it... type GroupChannelValue struct { diff --git a/plc4go/internal/bacnetip/apdu_IAmRequest.go b/plc4go/internal/bacnetip/bacgopes/apdu_IAmRequest.go similarity index 98% rename from plc4go/internal/bacnetip/apdu_IAmRequest.go rename to plc4go/internal/bacnetip/bacgopes/apdu_IAmRequest.go index f0a22325522..2392cf62001 100644 --- a/plc4go/internal/bacnetip/apdu_IAmRequest.go +++ b/plc4go/internal/bacnetip/bacgopes/apdu_IAmRequest.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes // TODO: implement it... type IAmRequest struct { diff --git a/plc4go/internal/bacnetip/apdu_IHaveRequest.go b/plc4go/internal/bacnetip/bacgopes/apdu_IHaveRequest.go similarity index 98% rename from plc4go/internal/bacnetip/apdu_IHaveRequest.go rename to plc4go/internal/bacnetip/bacgopes/apdu_IHaveRequest.go index 79e7cf35f00..2a9cf9acf11 100644 --- a/plc4go/internal/bacnetip/apdu_IHaveRequest.go +++ b/plc4go/internal/bacnetip/bacgopes/apdu_IHaveRequest.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes // TODO: implement it... type IHaveRequest struct { diff --git a/plc4go/internal/bacnetip/apdu_LifeSafetyOperationRequest.go b/plc4go/internal/bacnetip/bacgopes/apdu_LifeSafetyOperationRequest.go similarity index 98% rename from plc4go/internal/bacnetip/apdu_LifeSafetyOperationRequest.go rename to plc4go/internal/bacnetip/bacgopes/apdu_LifeSafetyOperationRequest.go index 3c90938e9cc..34ad9f08728 100644 --- a/plc4go/internal/bacnetip/apdu_LifeSafetyOperationRequest.go +++ b/plc4go/internal/bacnetip/bacgopes/apdu_LifeSafetyOperationRequest.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes // TODO: implement it... type LifeSafetyOperationRequest struct { diff --git a/plc4go/internal/bacnetip/apdu_Range.go b/plc4go/internal/bacnetip/bacgopes/apdu_Range.go similarity index 98% rename from plc4go/internal/bacnetip/apdu_Range.go rename to plc4go/internal/bacnetip/bacgopes/apdu_Range.go index 30bfe5f0d25..0501c4f5c71 100644 --- a/plc4go/internal/bacnetip/apdu_Range.go +++ b/plc4go/internal/bacnetip/bacgopes/apdu_Range.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes // TODO: implement it... type Range struct { diff --git a/plc4go/internal/bacnetip/apdu_RangeByPosition.go b/plc4go/internal/bacnetip/bacgopes/apdu_RangeByPosition.go similarity index 98% rename from plc4go/internal/bacnetip/apdu_RangeByPosition.go rename to plc4go/internal/bacnetip/bacgopes/apdu_RangeByPosition.go index b7c05c0d052..c4900f08ddf 100644 --- a/plc4go/internal/bacnetip/apdu_RangeByPosition.go +++ b/plc4go/internal/bacnetip/bacgopes/apdu_RangeByPosition.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes // TODO: implement it... type RangeByPosition struct { diff --git a/plc4go/internal/bacnetip/apdu_RangeBySequenceNumber.go b/plc4go/internal/bacnetip/bacgopes/apdu_RangeBySequenceNumber.go similarity index 98% rename from plc4go/internal/bacnetip/apdu_RangeBySequenceNumber.go rename to plc4go/internal/bacnetip/bacgopes/apdu_RangeBySequenceNumber.go index a603c1eacf4..dde568bbb4c 100644 --- a/plc4go/internal/bacnetip/apdu_RangeBySequenceNumber.go +++ b/plc4go/internal/bacnetip/bacgopes/apdu_RangeBySequenceNumber.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes // TODO: implement it... type RangeBySequenceNumber struct { diff --git a/plc4go/internal/bacnetip/apdu_RangeByTime.go b/plc4go/internal/bacnetip/bacgopes/apdu_RangeByTime.go similarity index 98% rename from plc4go/internal/bacnetip/apdu_RangeByTime.go rename to plc4go/internal/bacnetip/bacgopes/apdu_RangeByTime.go index e527e64da8f..08be135a2e3 100644 --- a/plc4go/internal/bacnetip/apdu_RangeByTime.go +++ b/plc4go/internal/bacnetip/bacgopes/apdu_RangeByTime.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes // TODO: implement it... type RangeByTime struct { diff --git a/plc4go/internal/bacnetip/apdu_ReadAccessResult.go b/plc4go/internal/bacnetip/bacgopes/apdu_ReadAccessResult.go similarity index 98% rename from plc4go/internal/bacnetip/apdu_ReadAccessResult.go rename to plc4go/internal/bacnetip/bacgopes/apdu_ReadAccessResult.go index 8ade9109d92..2e73a017176 100644 --- a/plc4go/internal/bacnetip/apdu_ReadAccessResult.go +++ b/plc4go/internal/bacnetip/bacgopes/apdu_ReadAccessResult.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes // TODO: implement it... type ReadAccessResult struct { diff --git a/plc4go/internal/bacnetip/apdu_ReadAccessResultElement.go b/plc4go/internal/bacnetip/bacgopes/apdu_ReadAccessResultElement.go similarity index 98% rename from plc4go/internal/bacnetip/apdu_ReadAccessResultElement.go rename to plc4go/internal/bacnetip/bacgopes/apdu_ReadAccessResultElement.go index 6f90f057420..775252a53a4 100644 --- a/plc4go/internal/bacnetip/apdu_ReadAccessResultElement.go +++ b/plc4go/internal/bacnetip/bacgopes/apdu_ReadAccessResultElement.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes // TODO: implement it... type ReadAccessResultElement struct { diff --git a/plc4go/internal/bacnetip/apdu_ReadAccessResultElementChoice.go b/plc4go/internal/bacnetip/bacgopes/apdu_ReadAccessResultElementChoice.go similarity index 98% rename from plc4go/internal/bacnetip/apdu_ReadAccessResultElementChoice.go rename to plc4go/internal/bacnetip/bacgopes/apdu_ReadAccessResultElementChoice.go index 655d476698c..df8c2fc598b 100644 --- a/plc4go/internal/bacnetip/apdu_ReadAccessResultElementChoice.go +++ b/plc4go/internal/bacnetip/bacgopes/apdu_ReadAccessResultElementChoice.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes // TODO: implement it... type ReadAccessResultElementChoice struct { diff --git a/plc4go/internal/bacnetip/apdu_ReadAccessSpecification.go b/plc4go/internal/bacnetip/bacgopes/apdu_ReadAccessSpecification.go similarity index 98% rename from plc4go/internal/bacnetip/apdu_ReadAccessSpecification.go rename to plc4go/internal/bacnetip/bacgopes/apdu_ReadAccessSpecification.go index 70a5c68aa19..dee28c85559 100644 --- a/plc4go/internal/bacnetip/apdu_ReadAccessSpecification.go +++ b/plc4go/internal/bacnetip/bacgopes/apdu_ReadAccessSpecification.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes // TODO: implement it... type ReadAccessSpecification struct { diff --git a/plc4go/internal/bacnetip/apdu_ReadPropertyACK.go b/plc4go/internal/bacnetip/bacgopes/apdu_ReadPropertyACK.go similarity index 98% rename from plc4go/internal/bacnetip/apdu_ReadPropertyACK.go rename to plc4go/internal/bacnetip/bacgopes/apdu_ReadPropertyACK.go index 1625acd335d..3c6de16a3d7 100644 --- a/plc4go/internal/bacnetip/apdu_ReadPropertyACK.go +++ b/plc4go/internal/bacnetip/bacgopes/apdu_ReadPropertyACK.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes // TODO: implement it... type ReadPropertyACK struct { diff --git a/plc4go/internal/bacnetip/apdu_ReadPropertyMultipleACK.go b/plc4go/internal/bacnetip/bacgopes/apdu_ReadPropertyMultipleACK.go similarity index 98% rename from plc4go/internal/bacnetip/apdu_ReadPropertyMultipleACK.go rename to plc4go/internal/bacnetip/bacgopes/apdu_ReadPropertyMultipleACK.go index fa27f82cc36..c85a585549c 100644 --- a/plc4go/internal/bacnetip/apdu_ReadPropertyMultipleACK.go +++ b/plc4go/internal/bacnetip/bacgopes/apdu_ReadPropertyMultipleACK.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes // TODO: implement it... type ReadPropertyMultipleACK struct { diff --git a/plc4go/internal/bacnetip/apdu_ReadPropertyMultipleRequest.go b/plc4go/internal/bacnetip/bacgopes/apdu_ReadPropertyMultipleRequest.go similarity index 98% rename from plc4go/internal/bacnetip/apdu_ReadPropertyMultipleRequest.go rename to plc4go/internal/bacnetip/bacgopes/apdu_ReadPropertyMultipleRequest.go index 3ba456f22a6..dcbb1701712 100644 --- a/plc4go/internal/bacnetip/apdu_ReadPropertyMultipleRequest.go +++ b/plc4go/internal/bacnetip/bacgopes/apdu_ReadPropertyMultipleRequest.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes // TODO: implement it... type ReadPropertyMultipleRequest struct { diff --git a/plc4go/internal/bacnetip/apdu_ReadPropertyRequest.go b/plc4go/internal/bacnetip/bacgopes/apdu_ReadPropertyRequest.go similarity index 98% rename from plc4go/internal/bacnetip/apdu_ReadPropertyRequest.go rename to plc4go/internal/bacnetip/bacgopes/apdu_ReadPropertyRequest.go index c014ef023f0..794a8e4b6ce 100644 --- a/plc4go/internal/bacnetip/apdu_ReadPropertyRequest.go +++ b/plc4go/internal/bacnetip/bacgopes/apdu_ReadPropertyRequest.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes // TODO: implement it... type ReadPropertyRequest struct { diff --git a/plc4go/internal/bacnetip/apdu_ReadRangeACK.go b/plc4go/internal/bacnetip/bacgopes/apdu_ReadRangeACK.go similarity index 98% rename from plc4go/internal/bacnetip/apdu_ReadRangeACK.go rename to plc4go/internal/bacnetip/bacgopes/apdu_ReadRangeACK.go index 0d522651893..99a8c310375 100644 --- a/plc4go/internal/bacnetip/apdu_ReadRangeACK.go +++ b/plc4go/internal/bacnetip/bacgopes/apdu_ReadRangeACK.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes // TODO: implement it... type ReadRangeACK struct { diff --git a/plc4go/internal/bacnetip/apdu_ReadRangeRequest.go b/plc4go/internal/bacnetip/bacgopes/apdu_ReadRangeRequest.go similarity index 98% rename from plc4go/internal/bacnetip/apdu_ReadRangeRequest.go rename to plc4go/internal/bacnetip/bacgopes/apdu_ReadRangeRequest.go index 07ce5ce1bea..593475f75ce 100644 --- a/plc4go/internal/bacnetip/apdu_ReadRangeRequest.go +++ b/plc4go/internal/bacnetip/bacgopes/apdu_ReadRangeRequest.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes // TODO: implement it... type ReadRangeRequest struct { diff --git a/plc4go/internal/bacnetip/apdu_ReinitializeDeviceRequest.go b/plc4go/internal/bacnetip/bacgopes/apdu_ReinitializeDeviceRequest.go similarity index 98% rename from plc4go/internal/bacnetip/apdu_ReinitializeDeviceRequest.go rename to plc4go/internal/bacnetip/bacgopes/apdu_ReinitializeDeviceRequest.go index 076379df06b..ed4dd054bbc 100644 --- a/plc4go/internal/bacnetip/apdu_ReinitializeDeviceRequest.go +++ b/plc4go/internal/bacnetip/bacgopes/apdu_ReinitializeDeviceRequest.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes // TODO: implement it... type ReinitializeDeviceRequest struct { diff --git a/plc4go/internal/bacnetip/apdu_ReinitializeDeviceRequestReinitializedStateOfDevice.go b/plc4go/internal/bacnetip/bacgopes/apdu_ReinitializeDeviceRequestReinitializedStateOfDevice.go similarity index 98% rename from plc4go/internal/bacnetip/apdu_ReinitializeDeviceRequestReinitializedStateOfDevice.go rename to plc4go/internal/bacnetip/bacgopes/apdu_ReinitializeDeviceRequestReinitializedStateOfDevice.go index 2688c04ee65..edf4a5087c7 100644 --- a/plc4go/internal/bacnetip/apdu_ReinitializeDeviceRequestReinitializedStateOfDevice.go +++ b/plc4go/internal/bacnetip/bacgopes/apdu_ReinitializeDeviceRequestReinitializedStateOfDevice.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes // TODO: implement it... type ReinitializeDeviceRequestReinitializedStateOfDevice struct { diff --git a/plc4go/internal/bacnetip/apdu_RejectPDU.go b/plc4go/internal/bacnetip/bacgopes/apdu_RejectPDU.go similarity index 98% rename from plc4go/internal/bacnetip/apdu_RejectPDU.go rename to plc4go/internal/bacnetip/bacgopes/apdu_RejectPDU.go index a5abaaa3abe..6b7adfd3303 100644 --- a/plc4go/internal/bacnetip/apdu_RejectPDU.go +++ b/plc4go/internal/bacnetip/bacgopes/apdu_RejectPDU.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes // TODO: implement it... type RejectPDU struct { diff --git a/plc4go/internal/bacnetip/apdu_RejectReason.go b/plc4go/internal/bacnetip/bacgopes/apdu_RejectReason.go similarity index 98% rename from plc4go/internal/bacnetip/apdu_RejectReason.go rename to plc4go/internal/bacnetip/bacgopes/apdu_RejectReason.go index b4a8a929697..5bb22cfbe09 100644 --- a/plc4go/internal/bacnetip/apdu_RejectReason.go +++ b/plc4go/internal/bacnetip/bacgopes/apdu_RejectReason.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes // TODO: implement it... type RejectReason struct { diff --git a/plc4go/internal/bacnetip/apdu_RemoveListElementRequest.go b/plc4go/internal/bacnetip/bacgopes/apdu_RemoveListElementRequest.go similarity index 98% rename from plc4go/internal/bacnetip/apdu_RemoveListElementRequest.go rename to plc4go/internal/bacnetip/bacgopes/apdu_RemoveListElementRequest.go index 3036ba0c2bd..1c613b39104 100644 --- a/plc4go/internal/bacnetip/apdu_RemoveListElementRequest.go +++ b/plc4go/internal/bacnetip/bacgopes/apdu_RemoveListElementRequest.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes // TODO: implement it... type RemoveListElementRequest struct { diff --git a/plc4go/internal/bacnetip/apdu_RequestKeyRequest.go b/plc4go/internal/bacnetip/bacgopes/apdu_RequestKeyRequest.go similarity index 98% rename from plc4go/internal/bacnetip/apdu_RequestKeyRequest.go rename to plc4go/internal/bacnetip/bacgopes/apdu_RequestKeyRequest.go index 904b3153101..0aceaa5abf4 100644 --- a/plc4go/internal/bacnetip/apdu_RequestKeyRequest.go +++ b/plc4go/internal/bacnetip/bacgopes/apdu_RequestKeyRequest.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes // TODO: implement it... type RequestKeyRequest struct { diff --git a/plc4go/internal/bacnetip/apdu_SegmentAckPDU.go b/plc4go/internal/bacnetip/bacgopes/apdu_SegmentAckPDU.go similarity index 98% rename from plc4go/internal/bacnetip/apdu_SegmentAckPDU.go rename to plc4go/internal/bacnetip/bacgopes/apdu_SegmentAckPDU.go index 0ab190b9a4a..680af8b9be8 100644 --- a/plc4go/internal/bacnetip/apdu_SegmentAckPDU.go +++ b/plc4go/internal/bacnetip/bacgopes/apdu_SegmentAckPDU.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes // TODO: implement it... type SegmentAckPDU struct { diff --git a/plc4go/internal/bacnetip/apdu_SimpleAckPDU.go b/plc4go/internal/bacnetip/bacgopes/apdu_SimpleAckPDU.go similarity index 99% rename from plc4go/internal/bacnetip/apdu_SimpleAckPDU.go rename to plc4go/internal/bacnetip/bacgopes/apdu_SimpleAckPDU.go index 3a8c4bbf3cc..7326393ed56 100644 --- a/plc4go/internal/bacnetip/apdu_SimpleAckPDU.go +++ b/plc4go/internal/bacnetip/bacgopes/apdu_SimpleAckPDU.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes import readWriteModel "github.com/apache/plc4x/plc4go/protocols/bacnetip/readwrite/model" diff --git a/plc4go/internal/bacnetip/apdu_SubscribeCOVPropertyRequest.go b/plc4go/internal/bacnetip/bacgopes/apdu_SubscribeCOVPropertyRequest.go similarity index 98% rename from plc4go/internal/bacnetip/apdu_SubscribeCOVPropertyRequest.go rename to plc4go/internal/bacnetip/bacgopes/apdu_SubscribeCOVPropertyRequest.go index 93606887150..379f09b9ac2 100644 --- a/plc4go/internal/bacnetip/apdu_SubscribeCOVPropertyRequest.go +++ b/plc4go/internal/bacnetip/bacgopes/apdu_SubscribeCOVPropertyRequest.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes // TODO: implement it... type SubscribeCOVPropertyRequest struct { diff --git a/plc4go/internal/bacnetip/apdu_SubscribeCOVRequest.go b/plc4go/internal/bacnetip/bacgopes/apdu_SubscribeCOVRequest.go similarity index 98% rename from plc4go/internal/bacnetip/apdu_SubscribeCOVRequest.go rename to plc4go/internal/bacnetip/bacgopes/apdu_SubscribeCOVRequest.go index 071cbd8d04a..a85a28e2ea8 100644 --- a/plc4go/internal/bacnetip/apdu_SubscribeCOVRequest.go +++ b/plc4go/internal/bacnetip/bacgopes/apdu_SubscribeCOVRequest.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes // TODO: implement it... type SubscribeCOVRequest struct { diff --git a/plc4go/internal/bacnetip/apdu_TimeSynchronizationRequest.go b/plc4go/internal/bacnetip/bacgopes/apdu_TimeSynchronizationRequest.go similarity index 98% rename from plc4go/internal/bacnetip/apdu_TimeSynchronizationRequest.go rename to plc4go/internal/bacnetip/bacgopes/apdu_TimeSynchronizationRequest.go index df0bbb16264..02363863452 100644 --- a/plc4go/internal/bacnetip/apdu_TimeSynchronizationRequest.go +++ b/plc4go/internal/bacnetip/bacgopes/apdu_TimeSynchronizationRequest.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes // TODO: implement it... type TimeSynchronizationRequest struct { diff --git a/plc4go/internal/bacnetip/apdu_UTCTimeSynchronizationRequest.go b/plc4go/internal/bacnetip/bacgopes/apdu_UTCTimeSynchronizationRequest.go similarity index 98% rename from plc4go/internal/bacnetip/apdu_UTCTimeSynchronizationRequest.go rename to plc4go/internal/bacnetip/bacgopes/apdu_UTCTimeSynchronizationRequest.go index 954342efe72..0cfe2707406 100644 --- a/plc4go/internal/bacnetip/apdu_UTCTimeSynchronizationRequest.go +++ b/plc4go/internal/bacnetip/bacgopes/apdu_UTCTimeSynchronizationRequest.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes // TODO: implement it... type UTCTimeSynchronizationRequest struct { diff --git a/plc4go/internal/bacnetip/apdu_UnconfirmedCOVNotificationRequest.go b/plc4go/internal/bacnetip/bacgopes/apdu_UnconfirmedCOVNotificationRequest.go similarity index 98% rename from plc4go/internal/bacnetip/apdu_UnconfirmedCOVNotificationRequest.go rename to plc4go/internal/bacnetip/bacgopes/apdu_UnconfirmedCOVNotificationRequest.go index ec6bb875294..87174b7e95a 100644 --- a/plc4go/internal/bacnetip/apdu_UnconfirmedCOVNotificationRequest.go +++ b/plc4go/internal/bacnetip/bacgopes/apdu_UnconfirmedCOVNotificationRequest.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes // TODO: implement it... type UnconfirmedCOVNotificationRequest struct { diff --git a/plc4go/internal/bacnetip/apdu_UnconfirmedEventNotificationRequest.go b/plc4go/internal/bacnetip/bacgopes/apdu_UnconfirmedEventNotificationRequest.go similarity index 98% rename from plc4go/internal/bacnetip/apdu_UnconfirmedEventNotificationRequest.go rename to plc4go/internal/bacnetip/bacgopes/apdu_UnconfirmedEventNotificationRequest.go index e1a3cf64362..e05aa804d86 100644 --- a/plc4go/internal/bacnetip/apdu_UnconfirmedEventNotificationRequest.go +++ b/plc4go/internal/bacnetip/bacgopes/apdu_UnconfirmedEventNotificationRequest.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes // TODO: implement it... type UnconfirmedEventNotificationRequest struct { diff --git a/plc4go/internal/bacnetip/apdu_UnconfirmedPrivateTransferRequest.go b/plc4go/internal/bacnetip/bacgopes/apdu_UnconfirmedPrivateTransferRequest.go similarity index 98% rename from plc4go/internal/bacnetip/apdu_UnconfirmedPrivateTransferRequest.go rename to plc4go/internal/bacnetip/bacgopes/apdu_UnconfirmedPrivateTransferRequest.go index cef009b8354..b40058359ec 100644 --- a/plc4go/internal/bacnetip/apdu_UnconfirmedPrivateTransferRequest.go +++ b/plc4go/internal/bacnetip/bacgopes/apdu_UnconfirmedPrivateTransferRequest.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes // TODO: implement it... type UnconfirmedPrivateTransferRequest struct { diff --git a/plc4go/internal/bacnetip/apdu_UnconfirmedRequestPDU.go b/plc4go/internal/bacnetip/bacgopes/apdu_UnconfirmedRequestPDU.go similarity index 99% rename from plc4go/internal/bacnetip/apdu_UnconfirmedRequestPDU.go rename to plc4go/internal/bacnetip/bacgopes/apdu_UnconfirmedRequestPDU.go index 33d7ba93fa8..382b7b43dea 100644 --- a/plc4go/internal/bacnetip/apdu_UnconfirmedRequestPDU.go +++ b/plc4go/internal/bacnetip/bacgopes/apdu_UnconfirmedRequestPDU.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes import ( readWriteModel "github.com/apache/plc4x/plc4go/protocols/bacnetip/readwrite/model" diff --git a/plc4go/internal/bacnetip/apdu_UnconfirmedRequestPDUAtomicReadFileACK.go b/plc4go/internal/bacnetip/bacgopes/apdu_UnconfirmedRequestPDUAtomicReadFileACK.go similarity index 98% rename from plc4go/internal/bacnetip/apdu_UnconfirmedRequestPDUAtomicReadFileACK.go rename to plc4go/internal/bacnetip/bacgopes/apdu_UnconfirmedRequestPDUAtomicReadFileACK.go index fad671c2e3a..75851f369ce 100644 --- a/plc4go/internal/bacnetip/apdu_UnconfirmedRequestPDUAtomicReadFileACK.go +++ b/plc4go/internal/bacnetip/bacgopes/apdu_UnconfirmedRequestPDUAtomicReadFileACK.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes // TODO: implement it... type AtomicReadFileACK struct { diff --git a/plc4go/internal/bacnetip/apdu_UnconfirmedRequestSequence.go b/plc4go/internal/bacnetip/bacgopes/apdu_UnconfirmedRequestSequence.go similarity index 99% rename from plc4go/internal/bacnetip/apdu_UnconfirmedRequestSequence.go rename to plc4go/internal/bacnetip/bacgopes/apdu_UnconfirmedRequestSequence.go index c653daab796..61da101c632 100644 --- a/plc4go/internal/bacnetip/apdu_UnconfirmedRequestSequence.go +++ b/plc4go/internal/bacnetip/bacgopes/apdu_UnconfirmedRequestSequence.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes import ( "github.com/pkg/errors" diff --git a/plc4go/internal/bacnetip/apdu_UnconfirmedServiceChoice.go b/plc4go/internal/bacnetip/bacgopes/apdu_UnconfirmedServiceChoice.go similarity index 98% rename from plc4go/internal/bacnetip/apdu_UnconfirmedServiceChoice.go rename to plc4go/internal/bacnetip/bacgopes/apdu_UnconfirmedServiceChoice.go index 5e64ca5f608..eed1a375988 100644 --- a/plc4go/internal/bacnetip/apdu_UnconfirmedServiceChoice.go +++ b/plc4go/internal/bacnetip/bacgopes/apdu_UnconfirmedServiceChoice.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes // TODO: implement it... type UnconfirmedServiceChoice struct { diff --git a/plc4go/internal/bacnetip/apdu_UnconfirmedTextMessageRequest.go b/plc4go/internal/bacnetip/bacgopes/apdu_UnconfirmedTextMessageRequest.go similarity index 98% rename from plc4go/internal/bacnetip/apdu_UnconfirmedTextMessageRequest.go rename to plc4go/internal/bacnetip/bacgopes/apdu_UnconfirmedTextMessageRequest.go index 9e4af2d91da..a55caad93a2 100644 --- a/plc4go/internal/bacnetip/apdu_UnconfirmedTextMessageRequest.go +++ b/plc4go/internal/bacnetip/bacgopes/apdu_UnconfirmedTextMessageRequest.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes // TODO: implement it... type UnconfirmedTextMessageRequest struct { diff --git a/plc4go/internal/bacnetip/apdu_UnconfirmedTextMessageRequestMessageClass.go b/plc4go/internal/bacnetip/bacgopes/apdu_UnconfirmedTextMessageRequestMessageClass.go similarity index 98% rename from plc4go/internal/bacnetip/apdu_UnconfirmedTextMessageRequestMessageClass.go rename to plc4go/internal/bacnetip/bacgopes/apdu_UnconfirmedTextMessageRequestMessageClass.go index d0983e31e19..d9a4553f58b 100644 --- a/plc4go/internal/bacnetip/apdu_UnconfirmedTextMessageRequestMessageClass.go +++ b/plc4go/internal/bacnetip/bacgopes/apdu_UnconfirmedTextMessageRequestMessageClass.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes // TODO: implement it... type UnconfirmedTextMessageRequestMessageClass struct { diff --git a/plc4go/internal/bacnetip/apdu_UnconfirmedTextMessageRequestMessagePriority.go b/plc4go/internal/bacnetip/bacgopes/apdu_UnconfirmedTextMessageRequestMessagePriority.go similarity index 98% rename from plc4go/internal/bacnetip/apdu_UnconfirmedTextMessageRequestMessagePriority.go rename to plc4go/internal/bacnetip/bacgopes/apdu_UnconfirmedTextMessageRequestMessagePriority.go index 29ac74a7fa8..ccbc36b5849 100644 --- a/plc4go/internal/bacnetip/apdu_UnconfirmedTextMessageRequestMessagePriority.go +++ b/plc4go/internal/bacnetip/bacgopes/apdu_UnconfirmedTextMessageRequestMessagePriority.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes // TODO: implement it... type UnconfirmedTextMessageRequestMessagePriority struct { diff --git a/plc4go/internal/bacnetip/apdu_VTCloseError.go b/plc4go/internal/bacnetip/bacgopes/apdu_VTCloseError.go similarity index 98% rename from plc4go/internal/bacnetip/apdu_VTCloseError.go rename to plc4go/internal/bacnetip/bacgopes/apdu_VTCloseError.go index 0f297507fa4..52df32af157 100644 --- a/plc4go/internal/bacnetip/apdu_VTCloseError.go +++ b/plc4go/internal/bacnetip/bacgopes/apdu_VTCloseError.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes // TODO: implement it... type VTCloseError struct { diff --git a/plc4go/internal/bacnetip/apdu_VTCloseRequest.go b/plc4go/internal/bacnetip/bacgopes/apdu_VTCloseRequest.go similarity index 98% rename from plc4go/internal/bacnetip/apdu_VTCloseRequest.go rename to plc4go/internal/bacnetip/bacgopes/apdu_VTCloseRequest.go index 146c814bb65..291b88db0b0 100644 --- a/plc4go/internal/bacnetip/apdu_VTCloseRequest.go +++ b/plc4go/internal/bacnetip/bacgopes/apdu_VTCloseRequest.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes // TODO: implement it... type VTCloseRequest struct { diff --git a/plc4go/internal/bacnetip/apdu_VTDataACK.go b/plc4go/internal/bacnetip/bacgopes/apdu_VTDataACK.go similarity index 98% rename from plc4go/internal/bacnetip/apdu_VTDataACK.go rename to plc4go/internal/bacnetip/bacgopes/apdu_VTDataACK.go index 057ce898911..8dec978bf6e 100644 --- a/plc4go/internal/bacnetip/apdu_VTDataACK.go +++ b/plc4go/internal/bacnetip/bacgopes/apdu_VTDataACK.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes // TODO: implement it... type VTDataACK struct { diff --git a/plc4go/internal/bacnetip/apdu_VTDataRequest.go b/plc4go/internal/bacnetip/bacgopes/apdu_VTDataRequest.go similarity index 98% rename from plc4go/internal/bacnetip/apdu_VTDataRequest.go rename to plc4go/internal/bacnetip/bacgopes/apdu_VTDataRequest.go index 3a5903a402b..307a4e53514 100644 --- a/plc4go/internal/bacnetip/apdu_VTDataRequest.go +++ b/plc4go/internal/bacnetip/bacgopes/apdu_VTDataRequest.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes // TODO: implement it... type VTDataRequest struct { diff --git a/plc4go/internal/bacnetip/apdu_VTOpenACK.go b/plc4go/internal/bacnetip/bacgopes/apdu_VTOpenACK.go similarity index 98% rename from plc4go/internal/bacnetip/apdu_VTOpenACK.go rename to plc4go/internal/bacnetip/bacgopes/apdu_VTOpenACK.go index 27f5380ab51..141cbc96492 100644 --- a/plc4go/internal/bacnetip/apdu_VTOpenACK.go +++ b/plc4go/internal/bacnetip/bacgopes/apdu_VTOpenACK.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes // TODO: implement it... type VTOpenACK struct { diff --git a/plc4go/internal/bacnetip/apdu_VTOpenRequest.go b/plc4go/internal/bacnetip/bacgopes/apdu_VTOpenRequest.go similarity index 98% rename from plc4go/internal/bacnetip/apdu_VTOpenRequest.go rename to plc4go/internal/bacnetip/bacgopes/apdu_VTOpenRequest.go index 4be2298a7b8..d07516807da 100644 --- a/plc4go/internal/bacnetip/apdu_VTOpenRequest.go +++ b/plc4go/internal/bacnetip/bacgopes/apdu_VTOpenRequest.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes // TODO: implement it... type VTOpenRequest struct { diff --git a/plc4go/internal/bacnetip/apdu_WhoHasLimits.go b/plc4go/internal/bacnetip/bacgopes/apdu_WhoHasLimits.go similarity index 98% rename from plc4go/internal/bacnetip/apdu_WhoHasLimits.go rename to plc4go/internal/bacnetip/bacgopes/apdu_WhoHasLimits.go index d507f84c18a..71c35ed1eed 100644 --- a/plc4go/internal/bacnetip/apdu_WhoHasLimits.go +++ b/plc4go/internal/bacnetip/bacgopes/apdu_WhoHasLimits.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes // TODO: implement it... type WhoHasLimits struct { diff --git a/plc4go/internal/bacnetip/apdu_WhoHasObject.go b/plc4go/internal/bacnetip/bacgopes/apdu_WhoHasObject.go similarity index 98% rename from plc4go/internal/bacnetip/apdu_WhoHasObject.go rename to plc4go/internal/bacnetip/bacgopes/apdu_WhoHasObject.go index c651dd5cf5f..f1fa8142cef 100644 --- a/plc4go/internal/bacnetip/apdu_WhoHasObject.go +++ b/plc4go/internal/bacnetip/bacgopes/apdu_WhoHasObject.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes // TODO: implement it... type WhoHasObject struct { diff --git a/plc4go/internal/bacnetip/apdu_WhoHasRequest.go b/plc4go/internal/bacnetip/bacgopes/apdu_WhoHasRequest.go similarity index 98% rename from plc4go/internal/bacnetip/apdu_WhoHasRequest.go rename to plc4go/internal/bacnetip/bacgopes/apdu_WhoHasRequest.go index b708c500783..316b35f2a7e 100644 --- a/plc4go/internal/bacnetip/apdu_WhoHasRequest.go +++ b/plc4go/internal/bacnetip/bacgopes/apdu_WhoHasRequest.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes // TODO: implement it... type WhoHasRequest struct { diff --git a/plc4go/internal/bacnetip/apdu_WhoIsRequest.go b/plc4go/internal/bacnetip/bacgopes/apdu_WhoIsRequest.go similarity index 99% rename from plc4go/internal/bacnetip/apdu_WhoIsRequest.go rename to plc4go/internal/bacnetip/bacgopes/apdu_WhoIsRequest.go index c3dfbd4e7ad..459695705e4 100644 --- a/plc4go/internal/bacnetip/apdu_WhoIsRequest.go +++ b/plc4go/internal/bacnetip/bacgopes/apdu_WhoIsRequest.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes import ( "github.com/pkg/errors" diff --git a/plc4go/internal/bacnetip/apdu_WriteAccessSpecification.go b/plc4go/internal/bacnetip/bacgopes/apdu_WriteAccessSpecification.go similarity index 98% rename from plc4go/internal/bacnetip/apdu_WriteAccessSpecification.go rename to plc4go/internal/bacnetip/bacgopes/apdu_WriteAccessSpecification.go index 37dd2fdd95b..9ecb71f70e4 100644 --- a/plc4go/internal/bacnetip/apdu_WriteAccessSpecification.go +++ b/plc4go/internal/bacnetip/bacgopes/apdu_WriteAccessSpecification.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes // TODO: implement it... type WriteAccessSpecification struct { diff --git a/plc4go/internal/bacnetip/apdu_WriteGroupRequest.go b/plc4go/internal/bacnetip/bacgopes/apdu_WriteGroupRequest.go similarity index 98% rename from plc4go/internal/bacnetip/apdu_WriteGroupRequest.go rename to plc4go/internal/bacnetip/bacgopes/apdu_WriteGroupRequest.go index bd627dc62f7..45cde0ccb83 100644 --- a/plc4go/internal/bacnetip/apdu_WriteGroupRequest.go +++ b/plc4go/internal/bacnetip/bacgopes/apdu_WriteGroupRequest.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes // TODO: implement it... type WriteGroupRequest struct { diff --git a/plc4go/internal/bacnetip/apdu_WritePropertyMultipleError.go b/plc4go/internal/bacnetip/bacgopes/apdu_WritePropertyMultipleError.go similarity index 98% rename from plc4go/internal/bacnetip/apdu_WritePropertyMultipleError.go rename to plc4go/internal/bacnetip/bacgopes/apdu_WritePropertyMultipleError.go index ded6bc5a151..c7b155ee5d6 100644 --- a/plc4go/internal/bacnetip/apdu_WritePropertyMultipleError.go +++ b/plc4go/internal/bacnetip/bacgopes/apdu_WritePropertyMultipleError.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes // TODO: implement it... type WritePropertyMultipleError struct { diff --git a/plc4go/internal/bacnetip/apdu_WritePropertyMultipleRequest.go b/plc4go/internal/bacnetip/bacgopes/apdu_WritePropertyMultipleRequest.go similarity index 98% rename from plc4go/internal/bacnetip/apdu_WritePropertyMultipleRequest.go rename to plc4go/internal/bacnetip/bacgopes/apdu_WritePropertyMultipleRequest.go index deae1b06d3a..33e45817297 100644 --- a/plc4go/internal/bacnetip/apdu_WritePropertyMultipleRequest.go +++ b/plc4go/internal/bacnetip/bacgopes/apdu_WritePropertyMultipleRequest.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes // TODO: implement it... type WritePropertyMultipleRequest struct { diff --git a/plc4go/internal/bacnetip/apdu_WritePropertyRequest.go b/plc4go/internal/bacnetip/bacgopes/apdu_WritePropertyRequest.go similarity index 98% rename from plc4go/internal/bacnetip/apdu_WritePropertyRequest.go rename to plc4go/internal/bacnetip/bacgopes/apdu_WritePropertyRequest.go index 94b8acaba00..134fe7be2d5 100644 --- a/plc4go/internal/bacnetip/apdu_WritePropertyRequest.go +++ b/plc4go/internal/bacnetip/bacgopes/apdu_WritePropertyRequest.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes // TODO: implement it... type WritePropertyRequest struct { diff --git a/plc4go/internal/bacnetip/apdu__APDU.go b/plc4go/internal/bacnetip/bacgopes/apdu__APDU.go similarity index 96% rename from plc4go/internal/bacnetip/apdu__APDU.go rename to plc4go/internal/bacnetip/bacgopes/apdu__APDU.go index 73ca2a2ed94..637a76ff506 100644 --- a/plc4go/internal/bacnetip/apdu__APDU.go +++ b/plc4go/internal/bacnetip/bacgopes/apdu__APDU.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes import ( "fmt" @@ -25,9 +25,8 @@ import ( "github.com/pkg/errors" + "github.com/apache/plc4x/plc4go/internal/bacnetip/bacgopes/globals" readWriteModel "github.com/apache/plc4x/plc4go/protocols/bacnetip/readwrite/model" - - "github.com/apache/plc4x/plc4go/internal/bacnetip/globals" ) // _APDU masks the Encode() and Decode() functions of the APDU diff --git a/plc4go/internal/bacnetip/app.go b/plc4go/internal/bacnetip/bacgopes/app.go similarity index 97% rename from plc4go/internal/bacnetip/app.go rename to plc4go/internal/bacnetip/bacgopes/app.go index 1c9b86f6c6d..b3432951fdd 100644 --- a/plc4go/internal/bacnetip/app.go +++ b/plc4go/internal/bacnetip/bacgopes/app.go @@ -17,4 +17,4 @@ * under the License. */ -package bacnetip +package bacgopes diff --git a/plc4go/internal/bacnetip/app_Application.go b/plc4go/internal/bacnetip/bacgopes/app_Application.go similarity index 99% rename from plc4go/internal/bacnetip/app_Application.go rename to plc4go/internal/bacnetip/bacgopes/app_Application.go index d093871cb4e..cc778627885 100644 --- a/plc4go/internal/bacnetip/app_Application.go +++ b/plc4go/internal/bacnetip/bacgopes/app_Application.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes import ( "fmt" diff --git a/plc4go/internal/bacnetip/app_ApplicationIOController.go b/plc4go/internal/bacnetip/bacgopes/app_ApplicationIOController.go similarity index 99% rename from plc4go/internal/bacnetip/app_ApplicationIOController.go rename to plc4go/internal/bacnetip/bacgopes/app_ApplicationIOController.go index 8b0ea299c0d..4583197ba4d 100644 --- a/plc4go/internal/bacnetip/app_ApplicationIOController.go +++ b/plc4go/internal/bacnetip/bacgopes/app_ApplicationIOController.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes import ( "github.com/pkg/errors" diff --git a/plc4go/internal/bacnetip/app_BIPForeignApplication.go b/plc4go/internal/bacnetip/bacgopes/app_BIPForeignApplication.go similarity index 99% rename from plc4go/internal/bacnetip/app_BIPForeignApplication.go rename to plc4go/internal/bacnetip/bacgopes/app_BIPForeignApplication.go index eb8111e9920..816e257e507 100644 --- a/plc4go/internal/bacnetip/app_BIPForeignApplication.go +++ b/plc4go/internal/bacnetip/bacgopes/app_BIPForeignApplication.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes import ( "github.com/pkg/errors" diff --git a/plc4go/internal/bacnetip/app_BIPNetworkApplication.go b/plc4go/internal/bacnetip/bacgopes/app_BIPNetworkApplication.go similarity index 99% rename from plc4go/internal/bacnetip/app_BIPNetworkApplication.go rename to plc4go/internal/bacnetip/bacgopes/app_BIPNetworkApplication.go index cf96708570c..6649304953f 100644 --- a/plc4go/internal/bacnetip/app_BIPNetworkApplication.go +++ b/plc4go/internal/bacnetip/bacgopes/app_BIPNetworkApplication.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes import ( "github.com/pkg/errors" diff --git a/plc4go/internal/bacnetip/app_BIPSimpleApplication.go b/plc4go/internal/bacnetip/bacgopes/app_BIPSimpleApplication.go similarity index 97% rename from plc4go/internal/bacnetip/app_BIPSimpleApplication.go rename to plc4go/internal/bacnetip/bacgopes/app_BIPSimpleApplication.go index 37722db18c8..18a6e65c151 100644 --- a/plc4go/internal/bacnetip/app_BIPSimpleApplication.go +++ b/plc4go/internal/bacnetip/bacgopes/app_BIPSimpleApplication.go @@ -17,13 +17,14 @@ * under the License. */ -package bacnetip +package bacgopes import ( "github.com/pkg/errors" "github.com/rs/zerolog" ) +//go:generate go run ../../../tools/plc4xgenerator/gen.go -type=BIPSimpleApplication type BIPSimpleApplication struct { *ApplicationIOController *WhoIsIAmServices @@ -38,7 +39,7 @@ type BIPSimpleApplication struct { annexj *AnnexJCodec mux *UDPMultiplexer - log zerolog.Logger + log zerolog.Logger `ignore:"true"` } func NewBIPSimpleApplication(localLog zerolog.Logger, localDevice *LocalDeviceObject, localAddress Address, deviceInfoCache *DeviceInfoCache, aseID *int) (*BIPSimpleApplication, error) { diff --git a/plc4go/internal/bacnetip/app_DeviceInfo.go b/plc4go/internal/bacnetip/bacgopes/app_DeviceInfo.go similarity index 95% rename from plc4go/internal/bacnetip/app_DeviceInfo.go rename to plc4go/internal/bacnetip/bacgopes/app_DeviceInfo.go index 3407b226c61..78d9fdb51c8 100644 --- a/plc4go/internal/bacnetip/app_DeviceInfo.go +++ b/plc4go/internal/bacnetip/bacgopes/app_DeviceInfo.go @@ -17,11 +17,11 @@ * under the License. */ -package bacnetip +package bacgopes import readWriteModel "github.com/apache/plc4x/plc4go/protocols/bacnetip/readwrite/model" -//go:generate go run ../../tools/plc4xgenerator/gen.go -type=DeviceInfo +//go:generate go run ../../../tools/plc4xgenerator/gen.go -type=DeviceInfo type DeviceInfo struct { DeviceIdentifier readWriteModel.BACnetTagPayloadObjectIdentifier Address Address diff --git a/plc4go/internal/bacnetip/app_DeviceInfoCache.go b/plc4go/internal/bacnetip/bacgopes/app_DeviceInfoCache.go similarity index 99% rename from plc4go/internal/bacnetip/app_DeviceInfoCache.go rename to plc4go/internal/bacnetip/bacgopes/app_DeviceInfoCache.go index 7465fccc44a..080705001ab 100644 --- a/plc4go/internal/bacnetip/app_DeviceInfoCache.go +++ b/plc4go/internal/bacnetip/bacgopes/app_DeviceInfoCache.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes import ( "encoding/binary" diff --git a/plc4go/internal/bacnetip/appservice.go b/plc4go/internal/bacnetip/bacgopes/appservice.go similarity index 97% rename from plc4go/internal/bacnetip/appservice.go rename to plc4go/internal/bacnetip/bacgopes/appservice.go index 1c9b86f6c6d..b3432951fdd 100644 --- a/plc4go/internal/bacnetip/appservice.go +++ b/plc4go/internal/bacnetip/bacgopes/appservice.go @@ -17,4 +17,4 @@ * under the License. */ -package bacnetip +package bacgopes diff --git a/plc4go/internal/bacnetip/appservice_ApplicationServiceAccessPoint.go b/plc4go/internal/bacnetip/bacgopes/appservice_ApplicationServiceAccessPoint.go similarity index 99% rename from plc4go/internal/bacnetip/appservice_ApplicationServiceAccessPoint.go rename to plc4go/internal/bacnetip/bacgopes/appservice_ApplicationServiceAccessPoint.go index 15f58ef02cf..4b89f834884 100644 --- a/plc4go/internal/bacnetip/appservice_ApplicationServiceAccessPoint.go +++ b/plc4go/internal/bacnetip/bacgopes/appservice_ApplicationServiceAccessPoint.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes import ( "github.com/pkg/errors" diff --git a/plc4go/internal/bacnetip/appservice_ClientSSM.go b/plc4go/internal/bacnetip/bacgopes/appservice_ClientSSM.go similarity index 99% rename from plc4go/internal/bacnetip/appservice_ClientSSM.go rename to plc4go/internal/bacnetip/bacgopes/appservice_ClientSSM.go index de2f78eff42..87c9fc0737a 100644 --- a/plc4go/internal/bacnetip/appservice_ClientSSM.go +++ b/plc4go/internal/bacnetip/bacgopes/appservice_ClientSSM.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes import ( "context" diff --git a/plc4go/internal/bacnetip/appservice_SSM.go b/plc4go/internal/bacnetip/bacgopes/appservice_SSM.go similarity index 99% rename from plc4go/internal/bacnetip/appservice_SSM.go rename to plc4go/internal/bacnetip/bacgopes/appservice_SSM.go index 4a0ff5fb525..4960a645471 100644 --- a/plc4go/internal/bacnetip/appservice_SSM.go +++ b/plc4go/internal/bacnetip/bacgopes/appservice_SSM.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes import ( "time" diff --git a/plc4go/internal/bacnetip/appservice_ServerSSM.go b/plc4go/internal/bacnetip/bacgopes/appservice_ServerSSM.go similarity index 99% rename from plc4go/internal/bacnetip/appservice_ServerSSM.go rename to plc4go/internal/bacnetip/bacgopes/appservice_ServerSSM.go index 00212d2978d..6ed9b1c6b76 100644 --- a/plc4go/internal/bacnetip/appservice_ServerSSM.go +++ b/plc4go/internal/bacnetip/bacgopes/appservice_ServerSSM.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes import ( "context" diff --git a/plc4go/internal/bacnetip/appservice_StateMachineAccessPoint.go b/plc4go/internal/bacnetip/bacgopes/appservice_StateMachineAccessPoint.go similarity index 99% rename from plc4go/internal/bacnetip/appservice_StateMachineAccessPoint.go rename to plc4go/internal/bacnetip/bacgopes/appservice_StateMachineAccessPoint.go index 545090b9840..fa2b8cbf795 100644 --- a/plc4go/internal/bacnetip/appservice_StateMachineAccessPoint.go +++ b/plc4go/internal/bacnetip/bacgopes/appservice_StateMachineAccessPoint.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes import ( "fmt" diff --git a/plc4go/internal/bacnetip/bvll.go b/plc4go/internal/bacnetip/bacgopes/bvll.go similarity index 99% rename from plc4go/internal/bacnetip/bvll.go rename to plc4go/internal/bacnetip/bacgopes/bvll.go index 1a2324e31a7..86ed8831b93 100644 --- a/plc4go/internal/bacnetip/bvll.go +++ b/plc4go/internal/bacnetip/bacgopes/bvll.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes // BVLPDUTypes is a dictionary of message type values and structs var BVLPDUTypes map[uint8]func() interface{ Decode(Arg) error } diff --git a/plc4go/internal/bacnetip/bvll_BVLCI.go b/plc4go/internal/bacnetip/bacgopes/bvll_BVLCI.go similarity index 99% rename from plc4go/internal/bacnetip/bvll_BVLCI.go rename to plc4go/internal/bacnetip/bacgopes/bvll_BVLCI.go index 20d4fcb8fe1..a9373eff326 100644 --- a/plc4go/internal/bacnetip/bvll_BVLCI.go +++ b/plc4go/internal/bacnetip/bacgopes/bvll_BVLCI.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes import ( "context" diff --git a/plc4go/internal/bacnetip/bvll_BVLPDU.go b/plc4go/internal/bacnetip/bacgopes/bvll_BVLPDU.go similarity index 99% rename from plc4go/internal/bacnetip/bvll_BVLPDU.go rename to plc4go/internal/bacnetip/bacgopes/bvll_BVLPDU.go index 2f4c3e8c432..65472cd2220 100644 --- a/plc4go/internal/bacnetip/bvll_BVLPDU.go +++ b/plc4go/internal/bacnetip/bacgopes/bvll_BVLPDU.go @@ -17,16 +17,16 @@ * under the License. */ -package bacnetip +package bacgopes import ( "context" "fmt" - "github.com/apache/plc4x/plc4go/spi" "github.com/pkg/errors" readWriteModel "github.com/apache/plc4x/plc4go/protocols/bacnetip/readwrite/model" + "github.com/apache/plc4x/plc4go/spi" ) type BVLPDU interface { diff --git a/plc4go/internal/bacnetip/bvll_DeleteForeignDeviceTableEntry.go b/plc4go/internal/bacnetip/bacgopes/bvll_DeleteForeignDeviceTableEntry.go similarity index 99% rename from plc4go/internal/bacnetip/bvll_DeleteForeignDeviceTableEntry.go rename to plc4go/internal/bacnetip/bacgopes/bvll_DeleteForeignDeviceTableEntry.go index df17ea33b02..bfa4dc1b533 100644 --- a/plc4go/internal/bacnetip/bvll_DeleteForeignDeviceTableEntry.go +++ b/plc4go/internal/bacnetip/bacgopes/bvll_DeleteForeignDeviceTableEntry.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes import ( "encoding/binary" diff --git a/plc4go/internal/bacnetip/bvll_DistributeBroadcastToNetwork.go b/plc4go/internal/bacnetip/bacgopes/bvll_DistributeBroadcastToNetwork.go similarity index 99% rename from plc4go/internal/bacnetip/bvll_DistributeBroadcastToNetwork.go rename to plc4go/internal/bacnetip/bacgopes/bvll_DistributeBroadcastToNetwork.go index 7e3d26c92b6..d4917984160 100644 --- a/plc4go/internal/bacnetip/bvll_DistributeBroadcastToNetwork.go +++ b/plc4go/internal/bacnetip/bacgopes/bvll_DistributeBroadcastToNetwork.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes import ( "context" diff --git a/plc4go/internal/bacnetip/bvll_FDTEntry.go b/plc4go/internal/bacnetip/bacgopes/bvll_FDTEntry.go similarity index 98% rename from plc4go/internal/bacnetip/bvll_FDTEntry.go rename to plc4go/internal/bacnetip/bacgopes/bvll_FDTEntry.go index 71bef26abc6..c588fd20063 100644 --- a/plc4go/internal/bacnetip/bvll_FDTEntry.go +++ b/plc4go/internal/bacnetip/bacgopes/bvll_FDTEntry.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes import "fmt" diff --git a/plc4go/internal/bacnetip/bvll_ForwardedNPDU.go b/plc4go/internal/bacnetip/bacgopes/bvll_ForwardedNPDU.go similarity index 99% rename from plc4go/internal/bacnetip/bvll_ForwardedNPDU.go rename to plc4go/internal/bacnetip/bacgopes/bvll_ForwardedNPDU.go index a929bf4d9ed..657ebfcc26d 100644 --- a/plc4go/internal/bacnetip/bvll_ForwardedNPDU.go +++ b/plc4go/internal/bacnetip/bacgopes/bvll_ForwardedNPDU.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes import ( "context" diff --git a/plc4go/internal/bacnetip/bvll_OriginalBroadcastNPDU.go b/plc4go/internal/bacnetip/bacgopes/bvll_OriginalBroadcastNPDU.go similarity index 99% rename from plc4go/internal/bacnetip/bvll_OriginalBroadcastNPDU.go rename to plc4go/internal/bacnetip/bacgopes/bvll_OriginalBroadcastNPDU.go index 09092895b08..2345bbd9be9 100644 --- a/plc4go/internal/bacnetip/bvll_OriginalBroadcastNPDU.go +++ b/plc4go/internal/bacnetip/bacgopes/bvll_OriginalBroadcastNPDU.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes import ( "context" diff --git a/plc4go/internal/bacnetip/bvll_OriginalUnicastNPDU.go b/plc4go/internal/bacnetip/bacgopes/bvll_OriginalUnicastNPDU.go similarity index 99% rename from plc4go/internal/bacnetip/bvll_OriginalUnicastNPDU.go rename to plc4go/internal/bacnetip/bacgopes/bvll_OriginalUnicastNPDU.go index 271f8a369bc..fa8cccad334 100644 --- a/plc4go/internal/bacnetip/bvll_OriginalUnicastNPDU.go +++ b/plc4go/internal/bacnetip/bacgopes/bvll_OriginalUnicastNPDU.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes import ( "context" diff --git a/plc4go/internal/bacnetip/bvll_ReadBroadcastDistributionTable.go b/plc4go/internal/bacnetip/bacgopes/bvll_ReadBroadcastDistributionTable.go similarity index 99% rename from plc4go/internal/bacnetip/bvll_ReadBroadcastDistributionTable.go rename to plc4go/internal/bacnetip/bacgopes/bvll_ReadBroadcastDistributionTable.go index abc4fba69da..9080f2f1266 100644 --- a/plc4go/internal/bacnetip/bvll_ReadBroadcastDistributionTable.go +++ b/plc4go/internal/bacnetip/bacgopes/bvll_ReadBroadcastDistributionTable.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes import ( "fmt" diff --git a/plc4go/internal/bacnetip/bvll_ReadBroadcastDistributionTableAck.go b/plc4go/internal/bacnetip/bacgopes/bvll_ReadBroadcastDistributionTableAck.go similarity index 99% rename from plc4go/internal/bacnetip/bvll_ReadBroadcastDistributionTableAck.go rename to plc4go/internal/bacnetip/bacgopes/bvll_ReadBroadcastDistributionTableAck.go index 506a46b6568..62ff53e263b 100644 --- a/plc4go/internal/bacnetip/bvll_ReadBroadcastDistributionTableAck.go +++ b/plc4go/internal/bacnetip/bacgopes/bvll_ReadBroadcastDistributionTableAck.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes import ( "encoding/binary" diff --git a/plc4go/internal/bacnetip/bvll_ReadForeignDeviceTable.go b/plc4go/internal/bacnetip/bacgopes/bvll_ReadForeignDeviceTable.go similarity index 99% rename from plc4go/internal/bacnetip/bvll_ReadForeignDeviceTable.go rename to plc4go/internal/bacnetip/bacgopes/bvll_ReadForeignDeviceTable.go index 2ed3a457f29..1d6b2e4a523 100644 --- a/plc4go/internal/bacnetip/bvll_ReadForeignDeviceTable.go +++ b/plc4go/internal/bacnetip/bacgopes/bvll_ReadForeignDeviceTable.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes import ( "fmt" diff --git a/plc4go/internal/bacnetip/bvll_ReadForeignDeviceTableAck.go b/plc4go/internal/bacnetip/bacgopes/bvll_ReadForeignDeviceTableAck.go similarity index 99% rename from plc4go/internal/bacnetip/bvll_ReadForeignDeviceTableAck.go rename to plc4go/internal/bacnetip/bacgopes/bvll_ReadForeignDeviceTableAck.go index 6b093442a12..a8d67c96b76 100644 --- a/plc4go/internal/bacnetip/bvll_ReadForeignDeviceTableAck.go +++ b/plc4go/internal/bacnetip/bacgopes/bvll_ReadForeignDeviceTableAck.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes import ( "encoding/binary" diff --git a/plc4go/internal/bacnetip/bvll_RegisterForeignDevice.go b/plc4go/internal/bacnetip/bacgopes/bvll_RegisterForeignDevice.go similarity index 99% rename from plc4go/internal/bacnetip/bvll_RegisterForeignDevice.go rename to plc4go/internal/bacnetip/bacgopes/bvll_RegisterForeignDevice.go index ed681b6b71d..803801eaff2 100644 --- a/plc4go/internal/bacnetip/bvll_RegisterForeignDevice.go +++ b/plc4go/internal/bacnetip/bacgopes/bvll_RegisterForeignDevice.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes import ( "fmt" diff --git a/plc4go/internal/bacnetip/bvll_Result.go b/plc4go/internal/bacnetip/bacgopes/bvll_Result.go similarity index 99% rename from plc4go/internal/bacnetip/bvll_Result.go rename to plc4go/internal/bacnetip/bacgopes/bvll_Result.go index 0762a7aba22..d247604c16e 100644 --- a/plc4go/internal/bacnetip/bvll_Result.go +++ b/plc4go/internal/bacnetip/bacgopes/bvll_Result.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes import ( "fmt" diff --git a/plc4go/internal/bacnetip/bvll_WriteBroadcastDistributionTable.go b/plc4go/internal/bacnetip/bacgopes/bvll_WriteBroadcastDistributionTable.go similarity index 99% rename from plc4go/internal/bacnetip/bvll_WriteBroadcastDistributionTable.go rename to plc4go/internal/bacnetip/bacgopes/bvll_WriteBroadcastDistributionTable.go index 27ec9e31273..924f75fbc06 100644 --- a/plc4go/internal/bacnetip/bvll_WriteBroadcastDistributionTable.go +++ b/plc4go/internal/bacnetip/bacgopes/bvll_WriteBroadcastDistributionTable.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes import ( "encoding/binary" diff --git a/plc4go/internal/bacnetip/bvllservice.go b/plc4go/internal/bacnetip/bacgopes/bvllservice.go similarity index 97% rename from plc4go/internal/bacnetip/bvllservice.go rename to plc4go/internal/bacnetip/bacgopes/bvllservice.go index 1c9b86f6c6d..b3432951fdd 100644 --- a/plc4go/internal/bacnetip/bvllservice.go +++ b/plc4go/internal/bacnetip/bacgopes/bvllservice.go @@ -17,4 +17,4 @@ * under the License. */ -package bacnetip +package bacgopes diff --git a/plc4go/internal/bacnetip/bvllservice_AnnexJCodec.go b/plc4go/internal/bacnetip/bacgopes/bvllservice_AnnexJCodec.go similarity index 99% rename from plc4go/internal/bacnetip/bvllservice_AnnexJCodec.go rename to plc4go/internal/bacnetip/bacgopes/bvllservice_AnnexJCodec.go index 0f59ea1c464..288a3d8bbca 100644 --- a/plc4go/internal/bacnetip/bvllservice_AnnexJCodec.go +++ b/plc4go/internal/bacnetip/bacgopes/bvllservice_AnnexJCodec.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes import ( "fmt" diff --git a/plc4go/internal/bacnetip/bvllservice_BIPBBMD.go b/plc4go/internal/bacnetip/bacgopes/bvllservice_BIPBBMD.go similarity index 99% rename from plc4go/internal/bacnetip/bvllservice_BIPBBMD.go rename to plc4go/internal/bacnetip/bacgopes/bvllservice_BIPBBMD.go index f1eca0eb7ab..5a0eaa29966 100644 --- a/plc4go/internal/bacnetip/bvllservice_BIPBBMD.go +++ b/plc4go/internal/bacnetip/bacgopes/bvllservice_BIPBBMD.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes import ( "slices" diff --git a/plc4go/internal/bacnetip/bvllservice_BIPForeign.go b/plc4go/internal/bacnetip/bacgopes/bvllservice_BIPForeign.go similarity index 99% rename from plc4go/internal/bacnetip/bvllservice_BIPForeign.go rename to plc4go/internal/bacnetip/bacgopes/bvllservice_BIPForeign.go index 9d6e1dc5ce4..cf5322147f9 100644 --- a/plc4go/internal/bacnetip/bvllservice_BIPForeign.go +++ b/plc4go/internal/bacnetip/bacgopes/bvllservice_BIPForeign.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes import ( "fmt" diff --git a/plc4go/internal/bacnetip/bvllservice_BIPSAP.go b/plc4go/internal/bacnetip/bacgopes/bvllservice_BIPSAP.go similarity index 99% rename from plc4go/internal/bacnetip/bvllservice_BIPSAP.go rename to plc4go/internal/bacnetip/bacgopes/bvllservice_BIPSAP.go index 8ae8911b232..c30dbb827b3 100644 --- a/plc4go/internal/bacnetip/bvllservice_BIPSAP.go +++ b/plc4go/internal/bacnetip/bacgopes/bvllservice_BIPSAP.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes import ( "fmt" diff --git a/plc4go/internal/bacnetip/bvllservice_BIPSimple.go b/plc4go/internal/bacnetip/bacgopes/bvllservice_BIPSimple.go similarity index 99% rename from plc4go/internal/bacnetip/bvllservice_BIPSimple.go rename to plc4go/internal/bacnetip/bacgopes/bvllservice_BIPSimple.go index e37f6c284ba..c14014917c5 100644 --- a/plc4go/internal/bacnetip/bvllservice_BIPSimple.go +++ b/plc4go/internal/bacnetip/bacgopes/bvllservice_BIPSimple.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes import ( "fmt" diff --git a/plc4go/internal/bacnetip/bvllservice_UDPMultiplexer.go b/plc4go/internal/bacnetip/bacgopes/bvllservice_UDPMultiplexer.go similarity index 99% rename from plc4go/internal/bacnetip/bvllservice_UDPMultiplexer.go rename to plc4go/internal/bacnetip/bacgopes/bvllservice_UDPMultiplexer.go index 113dd49ffd5..823d86e6a90 100644 --- a/plc4go/internal/bacnetip/bvllservice_UDPMultiplexer.go +++ b/plc4go/internal/bacnetip/bacgopes/bvllservice_UDPMultiplexer.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes import ( "github.com/pkg/errors" diff --git a/plc4go/internal/bacnetip/bvllservice__MultiplexClient.go b/plc4go/internal/bacnetip/bacgopes/bvllservice__MultiplexClient.go similarity index 98% rename from plc4go/internal/bacnetip/bvllservice__MultiplexClient.go rename to plc4go/internal/bacnetip/bacgopes/bvllservice__MultiplexClient.go index 3c0fed51195..29addd8d2eb 100644 --- a/plc4go/internal/bacnetip/bvllservice__MultiplexClient.go +++ b/plc4go/internal/bacnetip/bacgopes/bvllservice__MultiplexClient.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes import ( "github.com/pkg/errors" diff --git a/plc4go/internal/bacnetip/bvllservice__MultiplexServer.go b/plc4go/internal/bacnetip/bacgopes/bvllservice__MultiplexServer.go similarity index 98% rename from plc4go/internal/bacnetip/bvllservice__MultiplexServer.go rename to plc4go/internal/bacnetip/bacgopes/bvllservice__MultiplexServer.go index 91a5c43aca1..4ccd672ee97 100644 --- a/plc4go/internal/bacnetip/bvllservice__MultiplexServer.go +++ b/plc4go/internal/bacnetip/bacgopes/bvllservice__MultiplexServer.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes import ( "github.com/pkg/errors" diff --git a/plc4go/internal/bacnetip/capability.go b/plc4go/internal/bacnetip/bacgopes/capability.go similarity index 95% rename from plc4go/internal/bacnetip/capability.go rename to plc4go/internal/bacnetip/bacgopes/capability.go index 56c51b34cf6..4e36f77ac3d 100644 --- a/plc4go/internal/bacnetip/capability.go +++ b/plc4go/internal/bacnetip/bacgopes/capability.go @@ -17,11 +17,13 @@ * under the License. */ -package bacnetip +package bacgopes import "github.com/rs/zerolog" // TODO: implement +// +//go:generate go run ../../../tools/plc4xgenerator/gen.go -type=Capability type Capability struct { } @@ -33,10 +35,6 @@ func (c *Capability) getFN(fn string) func(args Args, kwargs KWArgs) error { panic("implement me") } -func (c *Capability) String() string { - panic("implement me") -} - // TODO: implement type Collector struct { capabilities []*Capability diff --git a/plc4go/internal/bacnetip/comm.go b/plc4go/internal/bacnetip/bacgopes/comm.go similarity index 99% rename from plc4go/internal/bacnetip/comm.go rename to plc4go/internal/bacnetip/bacgopes/comm.go index 70b56cf3e5e..c85f889ad44 100644 --- a/plc4go/internal/bacnetip/comm.go +++ b/plc4go/internal/bacnetip/bacgopes/comm.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes import ( "fmt" diff --git a/plc4go/internal/bacnetip/comm_ApplicationServiceElement.go b/plc4go/internal/bacnetip/bacgopes/comm_ApplicationServiceElement.go similarity index 99% rename from plc4go/internal/bacnetip/comm_ApplicationServiceElement.go rename to plc4go/internal/bacnetip/bacgopes/comm_ApplicationServiceElement.go index b7bdab3b947..8f02543fdce 100644 --- a/plc4go/internal/bacnetip/comm_ApplicationServiceElement.go +++ b/plc4go/internal/bacnetip/bacgopes/comm_ApplicationServiceElement.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes import ( "github.com/pkg/errors" diff --git a/plc4go/internal/bacnetip/comm_Client.go b/plc4go/internal/bacnetip/bacgopes/comm_Client.go similarity index 99% rename from plc4go/internal/bacnetip/comm_Client.go rename to plc4go/internal/bacnetip/bacgopes/comm_Client.go index ac7a2e767c9..b7e57dc4ff5 100644 --- a/plc4go/internal/bacnetip/comm_Client.go +++ b/plc4go/internal/bacnetip/bacgopes/comm_Client.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes import ( "fmt" diff --git a/plc4go/internal/bacnetip/comm_Server.go b/plc4go/internal/bacnetip/bacgopes/comm_Server.go similarity index 99% rename from plc4go/internal/bacnetip/comm_Server.go rename to plc4go/internal/bacnetip/bacgopes/comm_Server.go index a4456214c63..d7129474764 100644 --- a/plc4go/internal/bacnetip/comm_Server.go +++ b/plc4go/internal/bacnetip/bacgopes/comm_Server.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes import ( "fmt" diff --git a/plc4go/internal/bacnetip/comm_ServiceAccessPoint.go b/plc4go/internal/bacnetip/bacgopes/comm_ServiceAccessPoint.go similarity index 99% rename from plc4go/internal/bacnetip/comm_ServiceAccessPoint.go rename to plc4go/internal/bacnetip/bacgopes/comm_ServiceAccessPoint.go index 2aefa7e9a35..c74e1285ee3 100644 --- a/plc4go/internal/bacnetip/comm_ServiceAccessPoint.go +++ b/plc4go/internal/bacnetip/bacgopes/comm_ServiceAccessPoint.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes import ( "fmt" diff --git a/plc4go/internal/bacnetip/comm__PCI.go b/plc4go/internal/bacnetip/bacgopes/comm__PCI.go similarity index 98% rename from plc4go/internal/bacnetip/comm__PCI.go rename to plc4go/internal/bacnetip/bacgopes/comm__PCI.go index bd90db14edd..92d8c8a09dd 100644 --- a/plc4go/internal/bacnetip/comm__PCI.go +++ b/plc4go/internal/bacnetip/bacgopes/comm__PCI.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes import ( "context" @@ -26,10 +26,9 @@ import ( "github.com/pkg/errors" + "github.com/apache/plc4x/plc4go/internal/bacnetip/bacgopes/globals" "github.com/apache/plc4x/plc4go/spi" "github.com/apache/plc4x/plc4go/spi/utils" - - "github.com/apache/plc4x/plc4go/internal/bacnetip/globals" ) type IPCI interface { diff --git a/plc4go/internal/bacnetip/comp.go b/plc4go/internal/bacnetip/bacgopes/comp.go similarity index 99% rename from plc4go/internal/bacnetip/comp.go rename to plc4go/internal/bacnetip/bacgopes/comp.go index a646d470b75..92c9e7a6199 100644 --- a/plc4go/internal/bacnetip/comp.go +++ b/plc4go/internal/bacnetip/bacgopes/comp.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes import ( "cmp" diff --git a/plc4go/internal/bacnetip/constructeddata.go b/plc4go/internal/bacnetip/bacgopes/constructeddata.go similarity index 99% rename from plc4go/internal/bacnetip/constructeddata.go rename to plc4go/internal/bacnetip/bacgopes/constructeddata.go index 96e1919e56c..2535546a5ca 100644 --- a/plc4go/internal/bacnetip/constructeddata.go +++ b/plc4go/internal/bacnetip/bacgopes/constructeddata.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes import ( "reflect" diff --git a/plc4go/internal/bacnetip/constructors/apdu.go b/plc4go/internal/bacnetip/bacgopes/constructors/apdu.go similarity index 76% rename from plc4go/internal/bacnetip/constructors/apdu.go rename to plc4go/internal/bacnetip/bacgopes/constructors/apdu.go index 2e54ced009c..98a7d484cd2 100644 --- a/plc4go/internal/bacnetip/constructors/apdu.go +++ b/plc4go/internal/bacnetip/bacgopes/constructors/apdu.go @@ -19,14 +19,14 @@ package constructors -import "github.com/apache/plc4x/plc4go/internal/bacnetip" +import "github.com/apache/plc4x/plc4go/internal/bacnetip/bacgopes" -func ConfirmedPrivateTransferRequest(kwargs bacnetip.KWArgs) *bacnetip.ConfirmedPrivateTransferRequest { +func ConfirmedPrivateTransferRequest(kwargs bacgopes.KWArgs) *bacgopes.ConfirmedPrivateTransferRequest { panic("implement me") } -func WhoIsRequest(kwargs bacnetip.KWArgs) *bacnetip.WhoIsRequest { - whoIsRequest, err := bacnetip.NewWhoIsRequest() +func WhoIsRequest(kwargs bacgopes.KWArgs) *bacgopes.WhoIsRequest { + whoIsRequest, err := bacgopes.NewWhoIsRequest() if err != nil { panic(err) } diff --git a/plc4go/internal/bacnetip/bacgopes/constructors/bvll.go b/plc4go/internal/bacnetip/bacgopes/constructors/bvll.go new file mode 100644 index 00000000000..8bc580ccd5d --- /dev/null +++ b/plc4go/internal/bacnetip/bacgopes/constructors/bvll.go @@ -0,0 +1,125 @@ +/* + * 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 + * + * https://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 constructors + +import ( + "github.com/apache/plc4x/plc4go/internal/bacnetip/bacgopes" + readWriteModel "github.com/apache/plc4x/plc4go/protocols/bacnetip/readwrite/model" +) + +func Result(i uint16) *bacgopes.Result { + result, err := bacgopes.NewResult(bacgopes.WithResultBvlciResultCode(readWriteModel.BVLCResultCode(i))) + if err != nil { + panic(err) + } + return result +} + +func WriteBroadcastDistributionTable(bdt ...*bacgopes.Address) *bacgopes.WriteBroadcastDistributionTable { + writeBroadcastDistributionTable, err := bacgopes.NewWriteBroadcastDistributionTable(bacgopes.WithWriteBroadcastDistributionTableBDT(bdt...)) + if err != nil { + panic(err) + } + return writeBroadcastDistributionTable +} + +func ReadBroadcastDistributionTable() *bacgopes.ReadBroadcastDistributionTable { + readBroadcastDistributionTable, err := bacgopes.NewReadBroadcastDistributionTable() + if err != nil { + panic(err) + } + return readBroadcastDistributionTable +} + +func ReadBroadcastDistributionTableAck(bdt ...*bacgopes.Address) *bacgopes.ReadBroadcastDistributionTableAck { + readBroadcastDistributionTable, err := bacgopes.NewReadBroadcastDistributionTableAck(bacgopes.WithReadBroadcastDistributionTableAckBDT(bdt...)) + if err != nil { + panic(err) + } + return readBroadcastDistributionTable +} + +func ForwardedNPDU(addr *bacgopes.Address, pduBytes []byte) *bacgopes.ForwardedNPDU { + npdu, err := bacgopes.NewForwardedNPDU(bacgopes.NewPDU(bacgopes.NewMessageBridge(pduBytes...)), bacgopes.WithForwardedNPDUAddress(addr)) + if err != nil { + panic(err) + } + return npdu +} + +func RegisterForeignDevice(ttl uint16) *bacgopes.RegisterForeignDevice { + registerForeignDevice, err := bacgopes.NewRegisterForeignDevice(bacgopes.WithRegisterForeignDeviceBvlciTimeToLive(ttl)) + if err != nil { + panic(err) + } + return registerForeignDevice +} + +func ReadForeignDeviceTable() *bacgopes.ReadForeignDeviceTable { + readForeignDeviceTable, err := bacgopes.NewReadForeignDeviceTable() + if err != nil { + panic(err) + } + return readForeignDeviceTable +} + +func FDTEntry() (entry *bacgopes.FDTEntry) { + return &bacgopes.FDTEntry{} +} + +func ReadForeignDeviceTableAck(fdts ...*bacgopes.FDTEntry) *bacgopes.ReadForeignDeviceTableAck { + readForeignDeviceTableAck, err := bacgopes.NewReadForeignDeviceTableAck(bacgopes.WithReadForeignDeviceTableAckFDT(fdts...)) + if err != nil { + panic(err) + } + return readForeignDeviceTableAck +} + +func DeleteForeignDeviceTableEntry(address *bacgopes.Address) *bacgopes.DeleteForeignDeviceTableEntry { + deleteForeignDeviceTableEntry, err := bacgopes.NewDeleteForeignDeviceTableEntry(bacgopes.WithDeleteForeignDeviceTableEntryAddress(address)) + if err != nil { + panic(err) + } + return deleteForeignDeviceTableEntry +} + +func DistributeBroadcastToNetwork(pduBytes []byte) *bacgopes.DistributeBroadcastToNetwork { + distributeBroadcastToNetwork, err := bacgopes.NewDistributeBroadcastToNetwork(bacgopes.NewPDU(bacgopes.NewMessageBridge(pduBytes...))) + if err != nil { + panic(err) + } + return distributeBroadcastToNetwork +} + +func OriginalUnicastNPDU(pduBytes []byte) *bacgopes.OriginalUnicastNPDU { + npdu, err := bacgopes.NewOriginalUnicastNPDU(bacgopes.NewPDU(bacgopes.NewMessageBridge(pduBytes...))) + if err != nil { + panic(err) + } + return npdu +} + +func OriginalBroadcastNPDU(pduBytes []byte) *bacgopes.OriginalBroadcastNPDU { + npdu, err := bacgopes.NewOriginalBroadcastNPDU(bacgopes.NewPDU(bacgopes.NewMessageBridge(pduBytes...))) + if err != nil { + panic(err) + } + return npdu +} diff --git a/plc4go/internal/bacnetip/constructors/constructeddata.go b/plc4go/internal/bacnetip/bacgopes/constructors/constructeddata.go similarity index 86% rename from plc4go/internal/bacnetip/constructors/constructeddata.go rename to plc4go/internal/bacnetip/bacgopes/constructors/constructeddata.go index 3768b859c38..08cdae70dad 100644 --- a/plc4go/internal/bacnetip/constructors/constructeddata.go +++ b/plc4go/internal/bacnetip/bacgopes/constructors/constructeddata.go @@ -19,10 +19,10 @@ package constructors -import "github.com/apache/plc4x/plc4go/internal/bacnetip" +import "github.com/apache/plc4x/plc4go/internal/bacnetip/bacgopes" -func Any(args ...any) *bacnetip.Any { - newAny, err := bacnetip.NewAny(args) +func Any(args ...any) *bacgopes.Any { + newAny, err := bacgopes.NewAny(args) if err != nil { panic(err) } diff --git a/plc4go/internal/bacnetip/constructors/npdu.go b/plc4go/internal/bacnetip/bacgopes/constructors/npdu.go similarity index 50% rename from plc4go/internal/bacnetip/constructors/npdu.go rename to plc4go/internal/bacnetip/bacgopes/constructors/npdu.go index bff9e2e6de9..47964823ade 100644 --- a/plc4go/internal/bacnetip/constructors/npdu.go +++ b/plc4go/internal/bacnetip/bacgopes/constructors/npdu.go @@ -20,109 +20,108 @@ package constructors import ( + "github.com/apache/plc4x/plc4go/internal/bacnetip/bacgopes" readWriteModel "github.com/apache/plc4x/plc4go/protocols/bacnetip/readwrite/model" - - "github.com/apache/plc4x/plc4go/internal/bacnetip" ) -func WhoIsRouterToNetwork(net uint16) *bacnetip.WhoIsRouterToNetwork { - network, err := bacnetip.NewWhoIsRouterToNetwork(bacnetip.WithWhoIsRouterToNetworkNet(net)) +func WhoIsRouterToNetwork(net uint16) *bacgopes.WhoIsRouterToNetwork { + network, err := bacgopes.NewWhoIsRouterToNetwork(bacgopes.WithWhoIsRouterToNetworkNet(net)) if err != nil { panic(err) } return network } -func IAmRouterToNetwork(netList ...uint16) *bacnetip.IAmRouterToNetwork { - network, err := bacnetip.NewIAmRouterToNetwork(bacnetip.WithIAmRouterToNetworkNetworkList(netList...)) +func IAmRouterToNetwork(netList ...uint16) *bacgopes.IAmRouterToNetwork { + network, err := bacgopes.NewIAmRouterToNetwork(bacgopes.WithIAmRouterToNetworkNetworkList(netList...)) if err != nil { panic(err) } return network } -func ICouldBeRouterToNetwork(net uint16, perf uint8) *bacnetip.ICouldBeRouterToNetwork { - network, err := bacnetip.NewICouldBeRouterToNetwork(bacnetip.WithICouldBeRouterToNetworkNetwork(net), bacnetip.WithICouldBeRouterToNetworkPerformanceIndex(perf)) +func ICouldBeRouterToNetwork(net uint16, perf uint8) *bacgopes.ICouldBeRouterToNetwork { + network, err := bacgopes.NewICouldBeRouterToNetwork(bacgopes.WithICouldBeRouterToNetworkNetwork(net), bacgopes.WithICouldBeRouterToNetworkPerformanceIndex(perf)) if err != nil { panic(err) } return network } -func RejectMessageToNetwork(reason uint8, dnet uint16) *bacnetip.RejectMessageToNetwork { - network, err := bacnetip.NewRejectMessageToNetwork(bacnetip.WithRejectMessageToNetworkRejectionReason(readWriteModel.NLMRejectMessageToNetworkRejectReason(reason)), bacnetip.WithRejectMessageToNetworkDnet(dnet)) +func RejectMessageToNetwork(reason uint8, dnet uint16) *bacgopes.RejectMessageToNetwork { + network, err := bacgopes.NewRejectMessageToNetwork(bacgopes.WithRejectMessageToNetworkRejectionReason(readWriteModel.NLMRejectMessageToNetworkRejectReason(reason)), bacgopes.WithRejectMessageToNetworkDnet(dnet)) if err != nil { panic(err) } return network } -func RouterBusyToNetwork(netList ...uint16) *bacnetip.RouterBusyToNetwork { - network, err := bacnetip.NewRouterBusyToNetwork(bacnetip.WithRouterBusyToNetworkDnet(netList)) +func RouterBusyToNetwork(netList ...uint16) *bacgopes.RouterBusyToNetwork { + network, err := bacgopes.NewRouterBusyToNetwork(bacgopes.WithRouterBusyToNetworkDnet(netList)) if err != nil { panic(err) } return network } -func RouterAvailableToNetwork(netList ...uint16) *bacnetip.RouterAvailableToNetwork { - network, err := bacnetip.NewRouterAvailableToNetwork(bacnetip.WithRouterAvailableToNetworkDnet(netList)) +func RouterAvailableToNetwork(netList ...uint16) *bacgopes.RouterAvailableToNetwork { + network, err := bacgopes.NewRouterAvailableToNetwork(bacgopes.WithRouterAvailableToNetworkDnet(netList)) if err != nil { panic(err) } return network } -func InitializeRoutingTable(irtTable ...*bacnetip.RoutingTableEntry) *bacnetip.InitializeRoutingTable { - network, err := bacnetip.NewInitializeRoutingTable(bacnetip.WithInitializeRoutingTableIrtTable(irtTable...)) +func InitializeRoutingTable(irtTable ...*bacgopes.RoutingTableEntry) *bacgopes.InitializeRoutingTable { + network, err := bacgopes.NewInitializeRoutingTable(bacgopes.WithInitializeRoutingTableIrtTable(irtTable...)) if err != nil { panic(err) } return network } -func RoutingTableEntry(address uint16, portId uint8, portInfo []byte) *bacnetip.RoutingTableEntry { - return bacnetip.NewRoutingTableEntry( - bacnetip.WithRoutingTableEntryDestinationNetworkAddress(address), - bacnetip.WithRoutingTableEntryPortId(portId), - bacnetip.WithRoutingTableEntryPortInfo(portInfo), +func RoutingTableEntry(address uint16, portId uint8, portInfo []byte) *bacgopes.RoutingTableEntry { + return bacgopes.NewRoutingTableEntry( + bacgopes.WithRoutingTableEntryDestinationNetworkAddress(address), + bacgopes.WithRoutingTableEntryPortId(portId), + bacgopes.WithRoutingTableEntryPortInfo(portInfo), ) } -func InitializeRoutingTableAck(irtaTable ...*bacnetip.RoutingTableEntry) *bacnetip.InitializeRoutingTableAck { - network, err := bacnetip.NewInitializeRoutingTableAck(bacnetip.WithInitializeRoutingTableAckIrtaTable(irtaTable...)) +func InitializeRoutingTableAck(irtaTable ...*bacgopes.RoutingTableEntry) *bacgopes.InitializeRoutingTableAck { + network, err := bacgopes.NewInitializeRoutingTableAck(bacgopes.WithInitializeRoutingTableAckIrtaTable(irtaTable...)) if err != nil { panic(err) } return network } -func EstablishConnectionToNetwork(dnet uint16, terminationTime uint8) *bacnetip.EstablishConnectionToNetwork { - network, err := bacnetip.NewEstablishConnectionToNetwork(bacnetip.WithEstablishConnectionToNetworkDNET(dnet), bacnetip.WithEstablishConnectionToNetworkTerminationTime(terminationTime)) +func EstablishConnectionToNetwork(dnet uint16, terminationTime uint8) *bacgopes.EstablishConnectionToNetwork { + network, err := bacgopes.NewEstablishConnectionToNetwork(bacgopes.WithEstablishConnectionToNetworkDNET(dnet), bacgopes.WithEstablishConnectionToNetworkTerminationTime(terminationTime)) if err != nil { panic(err) } return network } -func DisconnectConnectionToNetwork(dnet uint16) *bacnetip.DisconnectConnectionToNetwork { - network, err := bacnetip.NewDisconnectConnectionToNetwork(bacnetip.WithDisconnectConnectionToNetworkDNET(dnet)) +func DisconnectConnectionToNetwork(dnet uint16) *bacgopes.DisconnectConnectionToNetwork { + network, err := bacgopes.NewDisconnectConnectionToNetwork(bacgopes.WithDisconnectConnectionToNetworkDNET(dnet)) if err != nil { panic(err) } return network } -func WhatIsNetworkNumber(dnet uint16) *bacnetip.WhatIsNetworkNumber { - network, err := bacnetip.NewWhatIsNetworkNumber() +func WhatIsNetworkNumber(dnet uint16) *bacgopes.WhatIsNetworkNumber { + network, err := bacgopes.NewWhatIsNetworkNumber() if err != nil { panic(err) } return network } -func NetworkNumberIs(net uint16, flag bool) *bacnetip.NetworkNumberIs { - network, err := bacnetip.NewNetworkNumberIs(bacnetip.WithNetworkNumberIsNET(net), bacnetip.WithNetworkNumberIsTerminationConfigured(flag)) +func NetworkNumberIs(net uint16, flag bool) *bacgopes.NetworkNumberIs { + network, err := bacgopes.NewNetworkNumberIs(bacgopes.WithNetworkNumberIsNET(net), bacgopes.WithNetworkNumberIsTerminationConfigured(flag)) if err != nil { panic(err) } diff --git a/plc4go/internal/bacnetip/constructors/pdu.go b/plc4go/internal/bacnetip/bacgopes/constructors/pdu.go similarity index 68% rename from plc4go/internal/bacnetip/constructors/pdu.go rename to plc4go/internal/bacnetip/bacgopes/constructors/pdu.go index 3e7e24ef308..4c0c6278f9d 100644 --- a/plc4go/internal/bacnetip/constructors/pdu.go +++ b/plc4go/internal/bacnetip/bacgopes/constructors/pdu.go @@ -22,25 +22,25 @@ package constructors import ( "github.com/rs/zerolog" - "github.com/apache/plc4x/plc4go/internal/bacnetip" + "github.com/apache/plc4x/plc4go/internal/bacnetip/bacgopes" ) -func Address(args ...any) *bacnetip.Address { - address, err := bacnetip.NewAddress(zerolog.Nop(), args...) +func Address(args ...any) *bacgopes.Address { + address, err := bacgopes.NewAddress(zerolog.Nop(), args...) if err != nil { panic(err) } return address } -func AddressTuple[L any, R any](l L, r R) *bacnetip.AddressTuple[L, R] { - return &bacnetip.AddressTuple[L, R]{Left: l, Right: r} +func AddressTuple[L any, R any](l L, r R) *bacgopes.AddressTuple[L, R] { + return &bacgopes.AddressTuple[L, R]{Left: l, Right: r} } -func PDUData(args ...any) bacnetip.PDUData { +func PDUData(args ...any) bacgopes.PDUData { if args == nil { - return bacnetip.NewPDUData(bacnetip.NewArgs(bacnetip.NewMessageBridge())) + return bacgopes.NewPDUData(bacgopes.NewArgs(bacgopes.NewMessageBridge())) } else { - return bacnetip.NewPDUData(bacnetip.NewArgs(bacnetip.NewMessageBridge(args[0].([]byte)...))) + return bacgopes.NewPDUData(bacgopes.NewArgs(bacgopes.NewMessageBridge(args[0].([]byte)...))) } } diff --git a/plc4go/internal/bacnetip/constructors/primitivedata.go b/plc4go/internal/bacnetip/bacgopes/constructors/primitivedata.go similarity index 52% rename from plc4go/internal/bacnetip/constructors/primitivedata.go rename to plc4go/internal/bacnetip/bacgopes/constructors/primitivedata.go index b1204a9ff9f..5c773005d08 100644 --- a/plc4go/internal/bacnetip/constructors/primitivedata.go +++ b/plc4go/internal/bacnetip/bacgopes/constructors/primitivedata.go @@ -20,265 +20,265 @@ package constructors import ( - "github.com/apache/plc4x/plc4go/internal/bacnetip" + "github.com/apache/plc4x/plc4go/internal/bacnetip/bacgopes" ) -func BitString(args ...any) *bacnetip.BitString { - bitString, err := bacnetip.NewBitString(args) +func BitString(args ...any) *bacgopes.BitString { + bitString, err := bacgopes.NewBitString(args) if err != nil { panic(err) } return bitString } -func Boolean(arg ...any) *bacnetip.Boolean { +func Boolean(arg ...any) *bacgopes.Boolean { if len(arg) == 0 { - boolean, err := bacnetip.NewBoolean(nil) + boolean, err := bacgopes.NewBoolean(nil) if err != nil { panic(err) } return boolean } - boolean, err := bacnetip.NewBoolean(arg[0]) + boolean, err := bacgopes.NewBoolean(arg[0]) if err != nil { panic(err) } return boolean } -func CharacterString(arg ...any) *bacnetip.CharacterString { +func CharacterString(arg ...any) *bacgopes.CharacterString { if len(arg) == 0 { - CharacterString, err := bacnetip.NewCharacterString(nil) + CharacterString, err := bacgopes.NewCharacterString(nil) if err != nil { panic(err) } return CharacterString } - CharacterString, err := bacnetip.NewCharacterString(arg[0]) + CharacterString, err := bacgopes.NewCharacterString(arg[0]) if err != nil { panic(err) } return CharacterString } -func Date(arg ...any) *bacnetip.Date { +func Date(arg ...any) *bacgopes.Date { if len(arg) == 0 { - Date, err := bacnetip.NewDate(nil, nil) + Date, err := bacgopes.NewDate(nil, nil) if err != nil { panic(err) } return Date } - Date, err := bacnetip.NewDate(arg[0], nil) + Date, err := bacgopes.NewDate(arg[0], nil) if err != nil { panic(err) } return Date } -func Double(arg ...any) *bacnetip.Double { +func Double(arg ...any) *bacgopes.Double { if len(arg) == 0 { - Double, err := bacnetip.NewDouble(nil) + Double, err := bacgopes.NewDouble(nil) if err != nil { panic(err) } return Double } - Double, err := bacnetip.NewDouble(arg[0]) + Double, err := bacgopes.NewDouble(arg[0]) if err != nil { panic(err) } return Double } -func Enumerated(arg ...any) *bacnetip.Enumerated { - Enumerated, err := bacnetip.NewEnumerated(arg...) +func Enumerated(arg ...any) *bacgopes.Enumerated { + Enumerated, err := bacgopes.NewEnumerated(arg...) if err != nil { panic(err) } return Enumerated } -func Integer(arg ...any) *bacnetip.Integer { +func Integer(arg ...any) *bacgopes.Integer { if len(arg) == 0 { - Integer, err := bacnetip.NewInteger(nil) + Integer, err := bacgopes.NewInteger(nil) if err != nil { panic(err) } return Integer } - Integer, err := bacnetip.NewInteger(arg[0]) + Integer, err := bacgopes.NewInteger(arg[0]) if err != nil { panic(err) } return Integer } -func Null(arg ...any) *bacnetip.Null { +func Null(arg ...any) *bacgopes.Null { if len(arg) == 0 { - Null, err := bacnetip.NewNull(nil) + Null, err := bacgopes.NewNull(nil) if err != nil { panic(err) } return Null } - Null, err := bacnetip.NewNull(arg[0]) + Null, err := bacgopes.NewNull(arg[0]) if err != nil { panic(err) } return Null } -func ObjectIdentifier(args ...any) *bacnetip.ObjectIdentifier { +func ObjectIdentifier(args ...any) *bacgopes.ObjectIdentifier { if len(args) == 0 { - ObjectIdentifier, err := bacnetip.NewObjectIdentifier(nil) + ObjectIdentifier, err := bacgopes.NewObjectIdentifier(nil) if err != nil { panic(err) } return ObjectIdentifier } - ObjectIdentifier, err := bacnetip.NewObjectIdentifier(args) + ObjectIdentifier, err := bacgopes.NewObjectIdentifier(args) if err != nil { panic(err) } return ObjectIdentifier } -func ObjectType(args ...any) *bacnetip.ObjectType { +func ObjectType(args ...any) *bacgopes.ObjectType { if len(args) == 0 { - ObjectType, err := bacnetip.NewObjectType(nil) + ObjectType, err := bacgopes.NewObjectType(nil) if err != nil { panic(err) } return ObjectType } - ObjectType, err := bacnetip.NewObjectType(args) + ObjectType, err := bacgopes.NewObjectType(args) if err != nil { panic(err) } return ObjectType } -func OctetString(args ...any) *bacnetip.OctetString { +func OctetString(args ...any) *bacgopes.OctetString { if len(args) == 0 { - OctetString, err := bacnetip.NewOctetString(nil) + OctetString, err := bacgopes.NewOctetString(nil) if err != nil { panic(err) } return OctetString } - OctetString, err := bacnetip.NewOctetString(args[0]) + OctetString, err := bacgopes.NewOctetString(args[0]) if err != nil { panic(err) } return OctetString } -func Real(arg ...any) *bacnetip.Real { +func Real(arg ...any) *bacgopes.Real { if len(arg) == 0 { - Real, err := bacnetip.NewReal(nil) + Real, err := bacgopes.NewReal(nil) if err != nil { panic(err) } return Real } - Real, err := bacnetip.NewReal(arg[0]) + Real, err := bacgopes.NewReal(arg[0]) if err != nil { panic(err) } return Real } -func ApplicationTag(args ...any) *bacnetip.ApplicationTag { - tag, err := bacnetip.NewApplicationTag(args) +func ApplicationTag(args ...any) *bacgopes.ApplicationTag { + tag, err := bacgopes.NewApplicationTag(args) if err != nil { panic(err) } return tag } -func ContextTag(args ...any) *bacnetip.ContextTag { - tag, err := bacnetip.NewContextTag(args) +func ContextTag(args ...any) *bacgopes.ContextTag { + tag, err := bacgopes.NewContextTag(args) if err != nil { panic(err) } return tag } -func OpeningTag(context any) *bacnetip.OpeningTag { - openingTag, err := bacnetip.NewOpeningTag(context) +func OpeningTag(context any) *bacgopes.OpeningTag { + openingTag, err := bacgopes.NewOpeningTag(context) if err != nil { panic(err) } return openingTag } -func ClosingTag(context any) *bacnetip.ClosingTag { - closingTag, err := bacnetip.NewClosingTag(context) +func ClosingTag(context any) *bacgopes.ClosingTag { + closingTag, err := bacgopes.NewClosingTag(context) if err != nil { panic(err) } return closingTag } -func TagList(tags ...bacnetip.Tag) *bacnetip.TagList { - return bacnetip.NewTagList(tags) +func TagList(tags ...bacgopes.Tag) *bacgopes.TagList { + return bacgopes.NewTagList(tags) } -func Time(arg ...any) *bacnetip.Time { +func Time(arg ...any) *bacgopes.Time { if len(arg) == 0 { - Time, err := bacnetip.NewTime(nil, nil) + Time, err := bacgopes.NewTime(nil, nil) if err != nil { panic(err) } return Time } - Time, err := bacnetip.NewTime(arg[0], nil) + Time, err := bacgopes.NewTime(arg[0], nil) if err != nil { panic(err) } return Time } -func Unsigned(arg ...any) *bacnetip.Unsigned { +func Unsigned(arg ...any) *bacgopes.Unsigned { if len(arg) == 0 { - unsigned, err := bacnetip.NewUnsigned(nil) + unsigned, err := bacgopes.NewUnsigned(nil) if err != nil { panic(err) } return unsigned } - unsigned, err := bacnetip.NewUnsigned(arg[0]) + unsigned, err := bacgopes.NewUnsigned(arg[0]) if err != nil { panic(err) } return unsigned } -func Unsigned8(arg ...any) *bacnetip.Unsigned8 { +func Unsigned8(arg ...any) *bacgopes.Unsigned8 { if len(arg) == 0 { - unsigned, err := bacnetip.NewUnsigned8(nil) + unsigned, err := bacgopes.NewUnsigned8(nil) if err != nil { panic(err) } return unsigned } - unsigned, err := bacnetip.NewUnsigned8(arg[0]) + unsigned, err := bacgopes.NewUnsigned8(arg[0]) if err != nil { panic(err) } return unsigned } -func Unsigned16(arg ...any) *bacnetip.Unsigned16 { +func Unsigned16(arg ...any) *bacgopes.Unsigned16 { if len(arg) == 0 { - unsigned, err := bacnetip.NewUnsigned16(nil) + unsigned, err := bacgopes.NewUnsigned16(nil) if err != nil { panic(err) } return unsigned } - unsigned, err := bacnetip.NewUnsigned16(arg[0]) + unsigned, err := bacgopes.NewUnsigned16(arg[0]) if err != nil { panic(err) } diff --git a/plc4go/internal/bacnetip/core.go b/plc4go/internal/bacnetip/bacgopes/core.go similarity index 99% rename from plc4go/internal/bacnetip/core.go rename to plc4go/internal/bacnetip/bacgopes/core.go index a01500b50c2..f34645b8a96 100644 --- a/plc4go/internal/bacnetip/core.go +++ b/plc4go/internal/bacnetip/bacgopes/core.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes import ( "math" diff --git a/plc4go/internal/bacnetip/debugging.go b/plc4go/internal/bacnetip/bacgopes/debugging.go similarity index 98% rename from plc4go/internal/bacnetip/debugging.go rename to plc4go/internal/bacnetip/bacgopes/debugging.go index 19687025bb7..c82a123523e 100644 --- a/plc4go/internal/bacnetip/debugging.go +++ b/plc4go/internal/bacnetip/bacgopes/debugging.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes import ( "encoding/hex" diff --git a/plc4go/internal/bacnetip/globals/settings.go b/plc4go/internal/bacnetip/bacgopes/globals/settings.go similarity index 100% rename from plc4go/internal/bacnetip/globals/settings.go rename to plc4go/internal/bacnetip/bacgopes/globals/settings.go diff --git a/plc4go/internal/bacnetip/iocb.go b/plc4go/internal/bacnetip/bacgopes/iocb.go similarity index 97% rename from plc4go/internal/bacnetip/iocb.go rename to plc4go/internal/bacnetip/bacgopes/iocb.go index 1c9b86f6c6d..b3432951fdd 100644 --- a/plc4go/internal/bacnetip/iocb.go +++ b/plc4go/internal/bacnetip/bacgopes/iocb.go @@ -17,4 +17,4 @@ * under the License. */ -package bacnetip +package bacgopes diff --git a/plc4go/internal/bacnetip/iocb_IOCB.go b/plc4go/internal/bacnetip/bacgopes/iocb_IOCB.go similarity index 96% rename from plc4go/internal/bacnetip/iocb_IOCB.go rename to plc4go/internal/bacnetip/bacgopes/iocb_IOCB.go index f97c9e2e85e..2ec68a92fa1 100644 --- a/plc4go/internal/bacnetip/iocb_IOCB.go +++ b/plc4go/internal/bacnetip/bacgopes/iocb_IOCB.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes import ( "fmt" @@ -74,7 +74,7 @@ type _IOCB interface { var _identNext = 1 var _identLock sync.Mutex -//go:generate go run ../../tools/plc4xgenerator/gen.go -type=IOCB +//go:generate go run ../../../tools/plc4xgenerator/gen.go -type=IOCB type IOCB struct { ioID int request PDU @@ -127,6 +127,14 @@ func NewIOCB(localLog zerolog.Logger, request PDU, destination *Address) (*IOCB, }, nil } +func (i *IOCB) GetIOResponse() PDU { + return i.ioResponse +} + +func (i *IOCB) GetIOError() error { + return i.ioError +} + // AddCallback Pass a function to be called when IO is complete. func (i *IOCB) AddCallback(fn func()) { i.log.Debug(). diff --git a/plc4go/internal/bacnetip/iocb_IOController.go b/plc4go/internal/bacnetip/bacgopes/iocb_IOController.go similarity index 97% rename from plc4go/internal/bacnetip/iocb_IOController.go rename to plc4go/internal/bacnetip/bacgopes/iocb_IOController.go index 754158f13ec..643b73bcce5 100644 --- a/plc4go/internal/bacnetip/iocb_IOController.go +++ b/plc4go/internal/bacnetip/bacgopes/iocb_IOController.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes import ( "github.com/pkg/errors" @@ -52,7 +52,7 @@ type IOControllerRequirements interface { AbortIO(iocb _IOCB, err error) error } -//go:generate go run ../../tools/plc4xgenerator/gen.go -type=IOController +//go:generate go run ../../../tools/plc4xgenerator/gen.go -type=IOController type IOController struct { name string requirements IOControllerRequirements diff --git a/plc4go/internal/bacnetip/iocb_IOQController.go b/plc4go/internal/bacnetip/bacgopes/iocb_IOQController.go similarity index 98% rename from plc4go/internal/bacnetip/iocb_IOQController.go rename to plc4go/internal/bacnetip/bacgopes/iocb_IOQController.go index ff63bc09a87..ae67803b9b9 100644 --- a/plc4go/internal/bacnetip/iocb_IOQController.go +++ b/plc4go/internal/bacnetip/bacgopes/iocb_IOQController.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes import ( "time" @@ -31,7 +31,7 @@ type IOQControllerRequirements interface { ProcessIO(iocb _IOCB) error } -//go:generate go run ../../tools/plc4xgenerator/gen.go -type=IOQController +//go:generate go run ../../../tools/plc4xgenerator/gen.go -type=IOQController type IOQController struct { *IOController state IOQControllerStates diff --git a/plc4go/internal/bacnetip/iocb_IOQueue.go b/plc4go/internal/bacnetip/bacgopes/iocb_IOQueue.go similarity index 97% rename from plc4go/internal/bacnetip/iocb_IOQueue.go rename to plc4go/internal/bacnetip/bacgopes/iocb_IOQueue.go index e779221cdec..1996e118c04 100644 --- a/plc4go/internal/bacnetip/iocb_IOQueue.go +++ b/plc4go/internal/bacnetip/bacgopes/iocb_IOQueue.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes import ( "container/heap" @@ -30,7 +30,7 @@ import ( "github.com/apache/plc4x/plc4go/spi/utils" ) -//go:generate go run ../../tools/plc4xgenerator/gen.go -type=IOQueue +//go:generate go run ../../../tools/plc4xgenerator/gen.go -type=IOQueue type IOQueue struct { name string notEmpty sync.Cond diff --git a/plc4go/internal/bacnetip/iocb_SieveQueue.go b/plc4go/internal/bacnetip/bacgopes/iocb_SieveQueue.go similarity index 94% rename from plc4go/internal/bacnetip/iocb_SieveQueue.go rename to plc4go/internal/bacnetip/bacgopes/iocb_SieveQueue.go index 83206c16d05..f4044cc628b 100644 --- a/plc4go/internal/bacnetip/iocb_SieveQueue.go +++ b/plc4go/internal/bacnetip/bacgopes/iocb_SieveQueue.go @@ -17,14 +17,14 @@ * under the License. */ -package bacnetip +package bacgopes import ( "github.com/pkg/errors" "github.com/rs/zerolog" ) -//go:generate go run ../../tools/plc4xgenerator/gen.go -type=SieveQueue +//go:generate go run ../../../tools/plc4xgenerator/gen.go -type=SieveQueue type SieveQueue struct { *IOQController requestFn func(apdu PDU) diff --git a/plc4go/internal/bacnetip/local_device_LocalDevice.go b/plc4go/internal/bacnetip/bacgopes/local_device_LocalDevice.go similarity index 99% rename from plc4go/internal/bacnetip/local_device_LocalDevice.go rename to plc4go/internal/bacnetip/bacgopes/local_device_LocalDevice.go index 807294ea731..8b649cb9276 100644 --- a/plc4go/internal/bacnetip/local_device_LocalDevice.go +++ b/plc4go/internal/bacnetip/bacgopes/local_device_LocalDevice.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes import ( "fmt" diff --git a/plc4go/internal/bacnetip/netservice.go b/plc4go/internal/bacnetip/bacgopes/netservice.go similarity index 98% rename from plc4go/internal/bacnetip/netservice.go rename to plc4go/internal/bacnetip/bacgopes/netservice.go index c7c70af324b..291b9b6c313 100644 --- a/plc4go/internal/bacnetip/netservice.go +++ b/plc4go/internal/bacnetip/bacgopes/netservice.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes // used for net keys like snet and dnet (tri state) type netKey = NillableKey[uint16] diff --git a/plc4go/internal/bacnetip/netservice_NetworkAdapter.go b/plc4go/internal/bacnetip/bacgopes/netservice_NetworkAdapter.go similarity index 99% rename from plc4go/internal/bacnetip/netservice_NetworkAdapter.go rename to plc4go/internal/bacnetip/bacgopes/netservice_NetworkAdapter.go index 9a7da2cd770..e3f056da37d 100644 --- a/plc4go/internal/bacnetip/netservice_NetworkAdapter.go +++ b/plc4go/internal/bacnetip/bacgopes/netservice_NetworkAdapter.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes import ( "github.com/pkg/errors" diff --git a/plc4go/internal/bacnetip/netservice_NetworkServiceAccessPoint.go b/plc4go/internal/bacnetip/bacgopes/netservice_NetworkServiceAccessPoint.go similarity index 99% rename from plc4go/internal/bacnetip/netservice_NetworkServiceAccessPoint.go rename to plc4go/internal/bacnetip/bacgopes/netservice_NetworkServiceAccessPoint.go index 0865c1a4df0..b4aaf19fbc1 100644 --- a/plc4go/internal/bacnetip/netservice_NetworkServiceAccessPoint.go +++ b/plc4go/internal/bacnetip/bacgopes/netservice_NetworkServiceAccessPoint.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes import ( "bytes" diff --git a/plc4go/internal/bacnetip/netservice_NetworkServiceElement.go b/plc4go/internal/bacnetip/bacgopes/netservice_NetworkServiceElement.go similarity index 99% rename from plc4go/internal/bacnetip/netservice_NetworkServiceElement.go rename to plc4go/internal/bacnetip/bacgopes/netservice_NetworkServiceElement.go index 024e0a3e545..859b78e9ba9 100644 --- a/plc4go/internal/bacnetip/netservice_NetworkServiceElement.go +++ b/plc4go/internal/bacnetip/bacgopes/netservice_NetworkServiceElement.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes import ( "fmt" diff --git a/plc4go/internal/bacnetip/netservice_RouterInfoCache.go b/plc4go/internal/bacnetip/bacgopes/netservice_RouterInfoCache.go similarity index 99% rename from plc4go/internal/bacnetip/netservice_RouterInfoCache.go rename to plc4go/internal/bacnetip/bacgopes/netservice_RouterInfoCache.go index 16cb7d3e570..43870dabf5b 100644 --- a/plc4go/internal/bacnetip/netservice_RouterInfoCache.go +++ b/plc4go/internal/bacnetip/bacgopes/netservice_RouterInfoCache.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes import ( "fmt" diff --git a/plc4go/internal/bacnetip/npdu.go b/plc4go/internal/bacnetip/bacgopes/npdu.go similarity index 99% rename from plc4go/internal/bacnetip/npdu.go rename to plc4go/internal/bacnetip/bacgopes/npdu.go index 7194d657c70..0cb456f37b7 100644 --- a/plc4go/internal/bacnetip/npdu.go +++ b/plc4go/internal/bacnetip/bacgopes/npdu.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes // NPDUTypes is a dictionary of message type values and structs var NPDUTypes map[uint8]func() interface{ Decode(Arg) error } diff --git a/plc4go/internal/bacnetip/npdu_DisconnectConnectionToNetwork.go b/plc4go/internal/bacnetip/bacgopes/npdu_DisconnectConnectionToNetwork.go similarity index 99% rename from plc4go/internal/bacnetip/npdu_DisconnectConnectionToNetwork.go rename to plc4go/internal/bacnetip/bacgopes/npdu_DisconnectConnectionToNetwork.go index 85408b202ad..17d721561c9 100644 --- a/plc4go/internal/bacnetip/npdu_DisconnectConnectionToNetwork.go +++ b/plc4go/internal/bacnetip/bacgopes/npdu_DisconnectConnectionToNetwork.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes import ( "fmt" diff --git a/plc4go/internal/bacnetip/npdu_EstablishConnectionToNetwork.go b/plc4go/internal/bacnetip/bacgopes/npdu_EstablishConnectionToNetwork.go similarity index 99% rename from plc4go/internal/bacnetip/npdu_EstablishConnectionToNetwork.go rename to plc4go/internal/bacnetip/bacgopes/npdu_EstablishConnectionToNetwork.go index e87a9b19852..e51f4445b70 100644 --- a/plc4go/internal/bacnetip/npdu_EstablishConnectionToNetwork.go +++ b/plc4go/internal/bacnetip/bacgopes/npdu_EstablishConnectionToNetwork.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes import ( "fmt" diff --git a/plc4go/internal/bacnetip/npdu_IAmRouterToNetwork.go b/plc4go/internal/bacnetip/bacgopes/npdu_IAmRouterToNetwork.go similarity index 99% rename from plc4go/internal/bacnetip/npdu_IAmRouterToNetwork.go rename to plc4go/internal/bacnetip/bacgopes/npdu_IAmRouterToNetwork.go index b20c72ad25a..67e4e3535fd 100644 --- a/plc4go/internal/bacnetip/npdu_IAmRouterToNetwork.go +++ b/plc4go/internal/bacnetip/bacgopes/npdu_IAmRouterToNetwork.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes import ( "fmt" diff --git a/plc4go/internal/bacnetip/npdu_ICouldBeRouterToNetwork.go b/plc4go/internal/bacnetip/bacgopes/npdu_ICouldBeRouterToNetwork.go similarity index 99% rename from plc4go/internal/bacnetip/npdu_ICouldBeRouterToNetwork.go rename to plc4go/internal/bacnetip/bacgopes/npdu_ICouldBeRouterToNetwork.go index dad6af4967e..25a27391914 100644 --- a/plc4go/internal/bacnetip/npdu_ICouldBeRouterToNetwork.go +++ b/plc4go/internal/bacnetip/bacgopes/npdu_ICouldBeRouterToNetwork.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes import ( "fmt" diff --git a/plc4go/internal/bacnetip/npdu_InitializeRoutingTable.go b/plc4go/internal/bacnetip/bacgopes/npdu_InitializeRoutingTable.go similarity index 99% rename from plc4go/internal/bacnetip/npdu_InitializeRoutingTable.go rename to plc4go/internal/bacnetip/bacgopes/npdu_InitializeRoutingTable.go index f193a68b7b5..6083aabb262 100644 --- a/plc4go/internal/bacnetip/npdu_InitializeRoutingTable.go +++ b/plc4go/internal/bacnetip/bacgopes/npdu_InitializeRoutingTable.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes import ( "fmt" diff --git a/plc4go/internal/bacnetip/npdu_InitializeRoutingTableAck.go b/plc4go/internal/bacnetip/bacgopes/npdu_InitializeRoutingTableAck.go similarity index 99% rename from plc4go/internal/bacnetip/npdu_InitializeRoutingTableAck.go rename to plc4go/internal/bacnetip/bacgopes/npdu_InitializeRoutingTableAck.go index b1a313bce5d..ff347c7d1e7 100644 --- a/plc4go/internal/bacnetip/npdu_InitializeRoutingTableAck.go +++ b/plc4go/internal/bacnetip/bacgopes/npdu_InitializeRoutingTableAck.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes import ( "fmt" diff --git a/plc4go/internal/bacnetip/npdu_NPCI.go b/plc4go/internal/bacnetip/bacgopes/npdu_NPCI.go similarity index 99% rename from plc4go/internal/bacnetip/npdu_NPCI.go rename to plc4go/internal/bacnetip/bacgopes/npdu_NPCI.go index bb8ab359628..fc02d427b38 100644 --- a/plc4go/internal/bacnetip/npdu_NPCI.go +++ b/plc4go/internal/bacnetip/bacgopes/npdu_NPCI.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes import ( "context" diff --git a/plc4go/internal/bacnetip/npdu_NPDU.go b/plc4go/internal/bacnetip/bacgopes/npdu_NPDU.go similarity index 99% rename from plc4go/internal/bacnetip/npdu_NPDU.go rename to plc4go/internal/bacnetip/bacgopes/npdu_NPDU.go index 99d32c87713..f676dbe41b7 100644 --- a/plc4go/internal/bacnetip/npdu_NPDU.go +++ b/plc4go/internal/bacnetip/bacgopes/npdu_NPDU.go @@ -17,16 +17,16 @@ * under the License. */ -package bacnetip +package bacgopes import ( "context" "fmt" - "github.com/apache/plc4x/plc4go/spi" "github.com/pkg/errors" readWriteModel "github.com/apache/plc4x/plc4go/protocols/bacnetip/readwrite/model" + "github.com/apache/plc4x/plc4go/spi" ) type NPDU interface { diff --git a/plc4go/internal/bacnetip/npdu_NetworkNumberIs.go b/plc4go/internal/bacnetip/bacgopes/npdu_NetworkNumberIs.go similarity index 99% rename from plc4go/internal/bacnetip/npdu_NetworkNumberIs.go rename to plc4go/internal/bacnetip/bacgopes/npdu_NetworkNumberIs.go index 46fc7b7f894..7728ed73717 100644 --- a/plc4go/internal/bacnetip/npdu_NetworkNumberIs.go +++ b/plc4go/internal/bacnetip/bacgopes/npdu_NetworkNumberIs.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes import ( "fmt" diff --git a/plc4go/internal/bacnetip/npdu_RejectMessageToNetwork.go b/plc4go/internal/bacnetip/bacgopes/npdu_RejectMessageToNetwork.go similarity index 99% rename from plc4go/internal/bacnetip/npdu_RejectMessageToNetwork.go rename to plc4go/internal/bacnetip/bacgopes/npdu_RejectMessageToNetwork.go index 1a1ef937536..55999dcc80f 100644 --- a/plc4go/internal/bacnetip/npdu_RejectMessageToNetwork.go +++ b/plc4go/internal/bacnetip/bacgopes/npdu_RejectMessageToNetwork.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes import ( "fmt" diff --git a/plc4go/internal/bacnetip/npdu_RouterAvailableToNetwork.go b/plc4go/internal/bacnetip/bacgopes/npdu_RouterAvailableToNetwork.go similarity index 99% rename from plc4go/internal/bacnetip/npdu_RouterAvailableToNetwork.go rename to plc4go/internal/bacnetip/bacgopes/npdu_RouterAvailableToNetwork.go index bd012273d38..2c977c701f7 100644 --- a/plc4go/internal/bacnetip/npdu_RouterAvailableToNetwork.go +++ b/plc4go/internal/bacnetip/bacgopes/npdu_RouterAvailableToNetwork.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes import ( "fmt" diff --git a/plc4go/internal/bacnetip/npdu_RouterBusyToNetwork.go b/plc4go/internal/bacnetip/bacgopes/npdu_RouterBusyToNetwork.go similarity index 99% rename from plc4go/internal/bacnetip/npdu_RouterBusyToNetwork.go rename to plc4go/internal/bacnetip/bacgopes/npdu_RouterBusyToNetwork.go index 9ca975f2fcd..ed65281115e 100644 --- a/plc4go/internal/bacnetip/npdu_RouterBusyToNetwork.go +++ b/plc4go/internal/bacnetip/bacgopes/npdu_RouterBusyToNetwork.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes import ( "fmt" diff --git a/plc4go/internal/bacnetip/npdu_RoutingTableEntry.go b/plc4go/internal/bacnetip/bacgopes/npdu_RoutingTableEntry.go similarity index 99% rename from plc4go/internal/bacnetip/npdu_RoutingTableEntry.go rename to plc4go/internal/bacnetip/bacgopes/npdu_RoutingTableEntry.go index 49d656f8d82..80d7b325676 100644 --- a/plc4go/internal/bacnetip/npdu_RoutingTableEntry.go +++ b/plc4go/internal/bacnetip/bacgopes/npdu_RoutingTableEntry.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes import ( "bytes" diff --git a/plc4go/internal/bacnetip/npdu_WhatIsNetworkNumber.go b/plc4go/internal/bacnetip/bacgopes/npdu_WhatIsNetworkNumber.go similarity index 99% rename from plc4go/internal/bacnetip/npdu_WhatIsNetworkNumber.go rename to plc4go/internal/bacnetip/bacgopes/npdu_WhatIsNetworkNumber.go index 8b869ab4e70..6b179c819d4 100644 --- a/plc4go/internal/bacnetip/npdu_WhatIsNetworkNumber.go +++ b/plc4go/internal/bacnetip/bacgopes/npdu_WhatIsNetworkNumber.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes import ( "fmt" diff --git a/plc4go/internal/bacnetip/npdu_WhoIsRouterToNetwork.go b/plc4go/internal/bacnetip/bacgopes/npdu_WhoIsRouterToNetwork.go similarity index 99% rename from plc4go/internal/bacnetip/npdu_WhoIsRouterToNetwork.go rename to plc4go/internal/bacnetip/bacgopes/npdu_WhoIsRouterToNetwork.go index 63d9580a354..8b5d4dbe0e4 100644 --- a/plc4go/internal/bacnetip/npdu_WhoIsRouterToNetwork.go +++ b/plc4go/internal/bacnetip/bacgopes/npdu_WhoIsRouterToNetwork.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes import ( "fmt" diff --git a/plc4go/internal/bacnetip/object.go b/plc4go/internal/bacnetip/bacgopes/object.go similarity index 97% rename from plc4go/internal/bacnetip/object.go rename to plc4go/internal/bacnetip/bacgopes/object.go index 1c9b86f6c6d..b3432951fdd 100644 --- a/plc4go/internal/bacnetip/object.go +++ b/plc4go/internal/bacnetip/bacgopes/object.go @@ -17,4 +17,4 @@ * under the License. */ -package bacnetip +package bacgopes diff --git a/plc4go/internal/bacnetip/object_Property.go b/plc4go/internal/bacnetip/bacgopes/object_Property.go similarity index 98% rename from plc4go/internal/bacnetip/object_Property.go rename to plc4go/internal/bacnetip/bacgopes/object_Property.go index 23879156c1c..34b4d280b68 100644 --- a/plc4go/internal/bacnetip/object_Property.go +++ b/plc4go/internal/bacnetip/bacgopes/object_Property.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes type Property struct { //TODO: implement me diff --git a/plc4go/internal/bacnetip/object_ReadWritePropertyServices.go b/plc4go/internal/bacnetip/bacgopes/object_ReadWritePropertyServices.go similarity index 90% rename from plc4go/internal/bacnetip/object_ReadWritePropertyServices.go rename to plc4go/internal/bacnetip/bacgopes/object_ReadWritePropertyServices.go index e7670e8b7d0..e8ab63b5116 100644 --- a/plc4go/internal/bacnetip/object_ReadWritePropertyServices.go +++ b/plc4go/internal/bacnetip/bacgopes/object_ReadWritePropertyServices.go @@ -17,8 +17,9 @@ * under the License. */ -package bacnetip +package bacgopes +//go:generate go run ../../../tools/plc4xgenerator/gen.go -type=ReadWritePropertyServices type ReadWritePropertyServices struct { } diff --git a/plc4go/internal/bacnetip/pdu.go b/plc4go/internal/bacnetip/bacgopes/pdu.go similarity index 99% rename from plc4go/internal/bacnetip/pdu.go rename to plc4go/internal/bacnetip/bacgopes/pdu.go index 94c1a7712c7..e9b7fa669a2 100644 --- a/plc4go/internal/bacnetip/pdu.go +++ b/plc4go/internal/bacnetip/bacgopes/pdu.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes import ( "encoding/binary" diff --git a/plc4go/internal/bacnetip/pdu_Address.go b/plc4go/internal/bacnetip/bacgopes/pdu_Address.go similarity index 99% rename from plc4go/internal/bacnetip/pdu_Address.go rename to plc4go/internal/bacnetip/bacgopes/pdu_Address.go index f07fcf57bf0..223be4daf65 100644 --- a/plc4go/internal/bacnetip/pdu_Address.go +++ b/plc4go/internal/bacnetip/bacgopes/pdu_Address.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes import ( "bytes" @@ -68,6 +68,10 @@ type AddressTuple[L any, R any] struct { Right R } +func NewAddressTuple[L any, R any](l L, r R) *AddressTuple[L, R] { + return &AddressTuple[L, R]{l, r} +} + func (a *AddressTuple[L, R]) deepCopy() *AddressTuple[L, R] { // TODO: check if that works like intended (might just fail for pointer types) return &AddressTuple[L, R]{*CopyPtr[L](&a.Left), *CopyPtr[R](&a.Right)} diff --git a/plc4go/internal/bacnetip/pdu_PCI.go b/plc4go/internal/bacnetip/bacgopes/pdu_PCI.go similarity index 99% rename from plc4go/internal/bacnetip/pdu_PCI.go rename to plc4go/internal/bacnetip/bacgopes/pdu_PCI.go index 07bcd0bc7fc..ebe1d9b6ab7 100644 --- a/plc4go/internal/bacnetip/pdu_PCI.go +++ b/plc4go/internal/bacnetip/bacgopes/pdu_PCI.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes import ( "fmt" diff --git a/plc4go/internal/bacnetip/pdu_PDU.go b/plc4go/internal/bacnetip/bacgopes/pdu_PDU.go similarity index 96% rename from plc4go/internal/bacnetip/pdu_PDU.go rename to plc4go/internal/bacnetip/bacgopes/pdu_PDU.go index b6a1a4f5798..c78c006b894 100644 --- a/plc4go/internal/bacnetip/pdu_PDU.go +++ b/plc4go/internal/bacnetip/bacgopes/pdu_PDU.go @@ -17,15 +17,14 @@ * under the License. */ -package bacnetip +package bacgopes import ( "fmt" + "github.com/apache/plc4x/plc4go/internal/bacnetip/bacgopes/globals" "github.com/apache/plc4x/plc4go/protocols/bacnetip/readwrite/model" "github.com/apache/plc4x/plc4go/spi" - - "github.com/apache/plc4x/plc4go/internal/bacnetip/globals" ) type PDU interface { diff --git a/plc4go/internal/bacnetip/pdu_PDUData.go b/plc4go/internal/bacnetip/bacgopes/pdu_PDUData.go similarity index 99% rename from plc4go/internal/bacnetip/pdu_PDUData.go rename to plc4go/internal/bacnetip/bacgopes/pdu_PDUData.go index 4b990bc3d8c..df5a34d27a9 100644 --- a/plc4go/internal/bacnetip/pdu_PDUData.go +++ b/plc4go/internal/bacnetip/bacgopes/pdu_PDUData.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes import ( "encoding/binary" diff --git a/plc4go/internal/bacnetip/primitivedata.go b/plc4go/internal/bacnetip/bacgopes/primitivedata.go similarity index 97% rename from plc4go/internal/bacnetip/primitivedata.go rename to plc4go/internal/bacnetip/bacgopes/primitivedata.go index 1c9b86f6c6d..b3432951fdd 100644 --- a/plc4go/internal/bacnetip/primitivedata.go +++ b/plc4go/internal/bacnetip/bacgopes/primitivedata.go @@ -17,4 +17,4 @@ * under the License. */ -package bacnetip +package bacgopes diff --git a/plc4go/internal/bacnetip/primitivedata_ApplicationTag.go b/plc4go/internal/bacnetip/bacgopes/primitivedata_ApplicationTag.go similarity index 99% rename from plc4go/internal/bacnetip/primitivedata_ApplicationTag.go rename to plc4go/internal/bacnetip/bacgopes/primitivedata_ApplicationTag.go index 0fafd3b1d05..c993e4ff1e8 100644 --- a/plc4go/internal/bacnetip/primitivedata_ApplicationTag.go +++ b/plc4go/internal/bacnetip/bacgopes/primitivedata_ApplicationTag.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes import ( "github.com/pkg/errors" diff --git a/plc4go/internal/bacnetip/primitivedata_Atomic.go b/plc4go/internal/bacnetip/bacgopes/primitivedata_Atomic.go similarity index 99% rename from plc4go/internal/bacnetip/primitivedata_Atomic.go rename to plc4go/internal/bacnetip/bacgopes/primitivedata_Atomic.go index 8d67ae783c0..f18fae26ec8 100644 --- a/plc4go/internal/bacnetip/primitivedata_Atomic.go +++ b/plc4go/internal/bacnetip/bacgopes/primitivedata_Atomic.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes import ( "cmp" diff --git a/plc4go/internal/bacnetip/primitivedata_BitString.go b/plc4go/internal/bacnetip/bacgopes/primitivedata_BitString.go similarity index 99% rename from plc4go/internal/bacnetip/primitivedata_BitString.go rename to plc4go/internal/bacnetip/bacgopes/primitivedata_BitString.go index a8321c3eb75..7038df0c1f6 100644 --- a/plc4go/internal/bacnetip/primitivedata_BitString.go +++ b/plc4go/internal/bacnetip/bacgopes/primitivedata_BitString.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes import ( "fmt" diff --git a/plc4go/internal/bacnetip/primitivedata_Boolean.go b/plc4go/internal/bacnetip/bacgopes/primitivedata_Boolean.go similarity index 99% rename from plc4go/internal/bacnetip/primitivedata_Boolean.go rename to plc4go/internal/bacnetip/bacgopes/primitivedata_Boolean.go index 2e942c8f1ef..1d972de11b0 100644 --- a/plc4go/internal/bacnetip/primitivedata_Boolean.go +++ b/plc4go/internal/bacnetip/bacgopes/primitivedata_Boolean.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes import ( "fmt" diff --git a/plc4go/internal/bacnetip/primitivedata_CharacterString.go b/plc4go/internal/bacnetip/bacgopes/primitivedata_CharacterString.go similarity index 99% rename from plc4go/internal/bacnetip/primitivedata_CharacterString.go rename to plc4go/internal/bacnetip/bacgopes/primitivedata_CharacterString.go index 8527d53d315..71ddf99965f 100644 --- a/plc4go/internal/bacnetip/primitivedata_CharacterString.go +++ b/plc4go/internal/bacnetip/bacgopes/primitivedata_CharacterString.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes import ( "fmt" diff --git a/plc4go/internal/bacnetip/primitivedata_ClosingTag.go b/plc4go/internal/bacnetip/bacgopes/primitivedata_ClosingTag.go similarity index 98% rename from plc4go/internal/bacnetip/primitivedata_ClosingTag.go rename to plc4go/internal/bacnetip/bacgopes/primitivedata_ClosingTag.go index b2feeb67577..966f2abe6ba 100644 --- a/plc4go/internal/bacnetip/primitivedata_ClosingTag.go +++ b/plc4go/internal/bacnetip/bacgopes/primitivedata_ClosingTag.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes import "github.com/pkg/errors" diff --git a/plc4go/internal/bacnetip/primitivedata_CommonMath.go b/plc4go/internal/bacnetip/bacgopes/primitivedata_CommonMath.go similarity index 98% rename from plc4go/internal/bacnetip/primitivedata_CommonMath.go rename to plc4go/internal/bacnetip/bacgopes/primitivedata_CommonMath.go index 7574af99792..8f45b58077d 100644 --- a/plc4go/internal/bacnetip/primitivedata_CommonMath.go +++ b/plc4go/internal/bacnetip/bacgopes/primitivedata_CommonMath.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes type CommonMath struct { // TODO: implement me diff --git a/plc4go/internal/bacnetip/primitivedata_ContextTag.go b/plc4go/internal/bacnetip/bacgopes/primitivedata_ContextTag.go similarity index 99% rename from plc4go/internal/bacnetip/primitivedata_ContextTag.go rename to plc4go/internal/bacnetip/bacgopes/primitivedata_ContextTag.go index 3a68eda8299..9c7596cb240 100644 --- a/plc4go/internal/bacnetip/primitivedata_ContextTag.go +++ b/plc4go/internal/bacnetip/bacgopes/primitivedata_ContextTag.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes import ( "github.com/pkg/errors" diff --git a/plc4go/internal/bacnetip/primitivedata_Date.go b/plc4go/internal/bacnetip/bacgopes/primitivedata_Date.go similarity index 99% rename from plc4go/internal/bacnetip/primitivedata_Date.go rename to plc4go/internal/bacnetip/bacgopes/primitivedata_Date.go index 3d33d185722..8c996d81ba7 100644 --- a/plc4go/internal/bacnetip/primitivedata_Date.go +++ b/plc4go/internal/bacnetip/bacgopes/primitivedata_Date.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes import ( "fmt" diff --git a/plc4go/internal/bacnetip/primitivedata_Double.go b/plc4go/internal/bacnetip/bacgopes/primitivedata_Double.go similarity index 99% rename from plc4go/internal/bacnetip/primitivedata_Double.go rename to plc4go/internal/bacnetip/bacgopes/primitivedata_Double.go index d1fc6f438e7..5c61332aa04 100644 --- a/plc4go/internal/bacnetip/primitivedata_Double.go +++ b/plc4go/internal/bacnetip/bacgopes/primitivedata_Double.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes import ( "encoding/binary" diff --git a/plc4go/internal/bacnetip/primitivedata_Enumeration.go b/plc4go/internal/bacnetip/bacgopes/primitivedata_Enumeration.go similarity index 99% rename from plc4go/internal/bacnetip/primitivedata_Enumeration.go rename to plc4go/internal/bacnetip/bacgopes/primitivedata_Enumeration.go index da67326fbf2..986d3b6f59a 100644 --- a/plc4go/internal/bacnetip/primitivedata_Enumeration.go +++ b/plc4go/internal/bacnetip/bacgopes/primitivedata_Enumeration.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes import ( "encoding/binary" diff --git a/plc4go/internal/bacnetip/primitivedata_Integer.go b/plc4go/internal/bacnetip/bacgopes/primitivedata_Integer.go similarity index 99% rename from plc4go/internal/bacnetip/primitivedata_Integer.go rename to plc4go/internal/bacnetip/bacgopes/primitivedata_Integer.go index bfedd163025..c7388923cfe 100644 --- a/plc4go/internal/bacnetip/primitivedata_Integer.go +++ b/plc4go/internal/bacnetip/bacgopes/primitivedata_Integer.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes import ( "encoding/binary" diff --git a/plc4go/internal/bacnetip/primitivedata_Null.go b/plc4go/internal/bacnetip/bacgopes/primitivedata_Null.go similarity index 99% rename from plc4go/internal/bacnetip/primitivedata_Null.go rename to plc4go/internal/bacnetip/bacgopes/primitivedata_Null.go index b9c04117456..4c475f5c72f 100644 --- a/plc4go/internal/bacnetip/primitivedata_Null.go +++ b/plc4go/internal/bacnetip/bacgopes/primitivedata_Null.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes import ( "fmt" diff --git a/plc4go/internal/bacnetip/primitivedata_ObjectIdentifier.go b/plc4go/internal/bacnetip/bacgopes/primitivedata_ObjectIdentifier.go similarity index 99% rename from plc4go/internal/bacnetip/primitivedata_ObjectIdentifier.go rename to plc4go/internal/bacnetip/bacgopes/primitivedata_ObjectIdentifier.go index c873aa2020d..348a8297d79 100644 --- a/plc4go/internal/bacnetip/primitivedata_ObjectIdentifier.go +++ b/plc4go/internal/bacnetip/bacgopes/primitivedata_ObjectIdentifier.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes import ( "encoding/binary" diff --git a/plc4go/internal/bacnetip/primitivedata_ObjectType.go b/plc4go/internal/bacnetip/bacgopes/primitivedata_ObjectType.go similarity index 99% rename from plc4go/internal/bacnetip/primitivedata_ObjectType.go rename to plc4go/internal/bacnetip/bacgopes/primitivedata_ObjectType.go index ad3b54bd701..7173c98ce54 100644 --- a/plc4go/internal/bacnetip/primitivedata_ObjectType.go +++ b/plc4go/internal/bacnetip/bacgopes/primitivedata_ObjectType.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes import ( "fmt" diff --git a/plc4go/internal/bacnetip/primitivedata_OctetString.go b/plc4go/internal/bacnetip/bacgopes/primitivedata_OctetString.go similarity index 99% rename from plc4go/internal/bacnetip/primitivedata_OctetString.go rename to plc4go/internal/bacnetip/bacgopes/primitivedata_OctetString.go index 019ef9411ca..5b47d8e8925 100644 --- a/plc4go/internal/bacnetip/primitivedata_OctetString.go +++ b/plc4go/internal/bacnetip/bacgopes/primitivedata_OctetString.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes import ( "bytes" diff --git a/plc4go/internal/bacnetip/primitivedata_OpeningTag.go b/plc4go/internal/bacnetip/bacgopes/primitivedata_OpeningTag.go similarity index 98% rename from plc4go/internal/bacnetip/primitivedata_OpeningTag.go rename to plc4go/internal/bacnetip/bacgopes/primitivedata_OpeningTag.go index 8014b765820..0187fed4b00 100644 --- a/plc4go/internal/bacnetip/primitivedata_OpeningTag.go +++ b/plc4go/internal/bacnetip/bacgopes/primitivedata_OpeningTag.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes import "github.com/pkg/errors" diff --git a/plc4go/internal/bacnetip/primitivedata_Real.go b/plc4go/internal/bacnetip/bacgopes/primitivedata_Real.go similarity index 99% rename from plc4go/internal/bacnetip/primitivedata_Real.go rename to plc4go/internal/bacnetip/bacgopes/primitivedata_Real.go index 05d97d26e6f..cb709640e7d 100644 --- a/plc4go/internal/bacnetip/primitivedata_Real.go +++ b/plc4go/internal/bacnetip/bacgopes/primitivedata_Real.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes import ( "encoding/binary" diff --git a/plc4go/internal/bacnetip/primitivedata_Tag.go b/plc4go/internal/bacnetip/bacgopes/primitivedata_Tag.go similarity index 99% rename from plc4go/internal/bacnetip/primitivedata_Tag.go rename to plc4go/internal/bacnetip/bacgopes/primitivedata_Tag.go index 7302c772a8e..329a91305d0 100644 --- a/plc4go/internal/bacnetip/primitivedata_Tag.go +++ b/plc4go/internal/bacnetip/bacgopes/primitivedata_Tag.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes import ( "bytes" diff --git a/plc4go/internal/bacnetip/primitivedata_TagList.go b/plc4go/internal/bacnetip/bacgopes/primitivedata_TagList.go similarity index 99% rename from plc4go/internal/bacnetip/primitivedata_TagList.go rename to plc4go/internal/bacnetip/bacgopes/primitivedata_TagList.go index 695a167b465..d3c7ac1441b 100644 --- a/plc4go/internal/bacnetip/primitivedata_TagList.go +++ b/plc4go/internal/bacnetip/bacgopes/primitivedata_TagList.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes import ( "github.com/pkg/errors" diff --git a/plc4go/internal/bacnetip/primitivedata_Time.go b/plc4go/internal/bacnetip/bacgopes/primitivedata_Time.go similarity index 99% rename from plc4go/internal/bacnetip/primitivedata_Time.go rename to plc4go/internal/bacnetip/bacgopes/primitivedata_Time.go index 41fc778411d..c2e54920fd3 100644 --- a/plc4go/internal/bacnetip/primitivedata_Time.go +++ b/plc4go/internal/bacnetip/bacgopes/primitivedata_Time.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes import ( "fmt" diff --git a/plc4go/internal/bacnetip/primitivedata_Unsigned.go b/plc4go/internal/bacnetip/bacgopes/primitivedata_Unsigned.go similarity index 99% rename from plc4go/internal/bacnetip/primitivedata_Unsigned.go rename to plc4go/internal/bacnetip/bacgopes/primitivedata_Unsigned.go index abc461f69e2..082413678d6 100644 --- a/plc4go/internal/bacnetip/primitivedata_Unsigned.go +++ b/plc4go/internal/bacnetip/bacgopes/primitivedata_Unsigned.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes import ( "encoding/binary" diff --git a/plc4go/internal/bacnetip/primitivedata_Unsigned16.go b/plc4go/internal/bacnetip/bacgopes/primitivedata_Unsigned16.go similarity index 99% rename from plc4go/internal/bacnetip/primitivedata_Unsigned16.go rename to plc4go/internal/bacnetip/bacgopes/primitivedata_Unsigned16.go index a3028ddcacb..4a0366ed412 100644 --- a/plc4go/internal/bacnetip/primitivedata_Unsigned16.go +++ b/plc4go/internal/bacnetip/bacgopes/primitivedata_Unsigned16.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes import ( "encoding/binary" diff --git a/plc4go/internal/bacnetip/primitivedata_Unsigned8.go b/plc4go/internal/bacnetip/bacgopes/primitivedata_Unsigned8.go similarity index 99% rename from plc4go/internal/bacnetip/primitivedata_Unsigned8.go rename to plc4go/internal/bacnetip/bacgopes/primitivedata_Unsigned8.go index 7bc1258fc4f..b586735b45e 100644 --- a/plc4go/internal/bacnetip/primitivedata_Unsigned8.go +++ b/plc4go/internal/bacnetip/bacgopes/primitivedata_Unsigned8.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes import ( "encoding/binary" diff --git a/plc4go/internal/bacnetip/service/Subscription.go b/plc4go/internal/bacnetip/bacgopes/service/Subscription.go similarity index 88% rename from plc4go/internal/bacnetip/service/Subscription.go rename to plc4go/internal/bacnetip/bacgopes/service/Subscription.go index 3aa3f0679a6..751aa414aec 100644 --- a/plc4go/internal/bacnetip/service/Subscription.go +++ b/plc4go/internal/bacnetip/bacgopes/service/Subscription.go @@ -19,10 +19,10 @@ package service -import "github.com/apache/plc4x/plc4go/internal/bacnetip" +import "github.com/apache/plc4x/plc4go/internal/bacnetip/bacgopes" type Subscription struct { - *bacnetip.OneShotTask - *bacnetip.DebugContents + *bacgopes.OneShotTask + *bacgopes.DebugContents //TODO: implement me } diff --git a/plc4go/internal/bacnetip/service/cov.go b/plc4go/internal/bacnetip/bacgopes/service/cov.go similarity index 100% rename from plc4go/internal/bacnetip/service/cov.go rename to plc4go/internal/bacnetip/bacgopes/service/cov.go diff --git a/plc4go/internal/bacnetip/service/cov_AccessDoorCriteria.go b/plc4go/internal/bacnetip/bacgopes/service/cov_AccessDoorCriteria.go similarity index 100% rename from plc4go/internal/bacnetip/service/cov_AccessDoorCriteria.go rename to plc4go/internal/bacnetip/bacgopes/service/cov_AccessDoorCriteria.go diff --git a/plc4go/internal/bacnetip/service/cov_AccessPointCriteria.go b/plc4go/internal/bacnetip/bacgopes/service/cov_AccessPointCriteria.go similarity index 100% rename from plc4go/internal/bacnetip/service/cov_AccessPointCriteria.go rename to plc4go/internal/bacnetip/bacgopes/service/cov_AccessPointCriteria.go diff --git a/plc4go/internal/bacnetip/service/cov_ActiveCOVSubscription.go b/plc4go/internal/bacnetip/bacgopes/service/cov_ActiveCOVSubscription.go similarity index 91% rename from plc4go/internal/bacnetip/service/cov_ActiveCOVSubscription.go rename to plc4go/internal/bacnetip/bacgopes/service/cov_ActiveCOVSubscription.go index 3c8504bff40..3284fcbb960 100644 --- a/plc4go/internal/bacnetip/service/cov_ActiveCOVSubscription.go +++ b/plc4go/internal/bacnetip/bacgopes/service/cov_ActiveCOVSubscription.go @@ -19,9 +19,9 @@ package service -import "github.com/apache/plc4x/plc4go/internal/bacnetip" +import "github.com/apache/plc4x/plc4go/internal/bacnetip/bacgopes" type ActiveCOVSubscription struct { - *bacnetip.Property + *bacgopes.Property //TODO: implement me } diff --git a/plc4go/internal/bacnetip/service/cov_COVDetection.go b/plc4go/internal/bacnetip/bacgopes/service/cov_COVDetection.go similarity index 100% rename from plc4go/internal/bacnetip/service/cov_COVDetection.go rename to plc4go/internal/bacnetip/bacgopes/service/cov_COVDetection.go diff --git a/plc4go/internal/bacnetip/service/cov_COVIncrementCriteria.go b/plc4go/internal/bacnetip/bacgopes/service/cov_COVIncrementCriteria.go similarity index 100% rename from plc4go/internal/bacnetip/service/cov_COVIncrementCriteria.go rename to plc4go/internal/bacnetip/bacgopes/service/cov_COVIncrementCriteria.go diff --git a/plc4go/internal/bacnetip/service/cov_ChangeOfValuesServices.go b/plc4go/internal/bacnetip/bacgopes/service/cov_ChangeOfValuesServices.go similarity index 90% rename from plc4go/internal/bacnetip/service/cov_ChangeOfValuesServices.go rename to plc4go/internal/bacnetip/bacgopes/service/cov_ChangeOfValuesServices.go index 5dc83b6d512..5051c36b7a4 100644 --- a/plc4go/internal/bacnetip/service/cov_ChangeOfValuesServices.go +++ b/plc4go/internal/bacnetip/bacgopes/service/cov_ChangeOfValuesServices.go @@ -19,9 +19,9 @@ package service -import "github.com/apache/plc4x/plc4go/internal/bacnetip" +import "github.com/apache/plc4x/plc4go/internal/bacnetip/bacgopes" type ChangeOfValuesServices struct { - *bacnetip.Capability + *bacgopes.Capability //TODO: implement me } diff --git a/plc4go/internal/bacnetip/service/cov_CredentialDataInputCriteria.go b/plc4go/internal/bacnetip/bacgopes/service/cov_CredentialDataInputCriteria.go similarity index 100% rename from plc4go/internal/bacnetip/service/cov_CredentialDataInputCriteria.go rename to plc4go/internal/bacnetip/bacgopes/service/cov_CredentialDataInputCriteria.go diff --git a/plc4go/internal/bacnetip/service/cov_GenericCriteria.go b/plc4go/internal/bacnetip/bacgopes/service/cov_GenericCriteria.go similarity index 100% rename from plc4go/internal/bacnetip/service/cov_GenericCriteria.go rename to plc4go/internal/bacnetip/bacgopes/service/cov_GenericCriteria.go diff --git a/plc4go/internal/bacnetip/service/cov_LoadControlCriteria.go b/plc4go/internal/bacnetip/bacgopes/service/cov_LoadControlCriteria.go similarity index 100% rename from plc4go/internal/bacnetip/service/cov_LoadControlCriteria.go rename to plc4go/internal/bacnetip/bacgopes/service/cov_LoadControlCriteria.go diff --git a/plc4go/internal/bacnetip/service/cov_PulseConverterCriteria.go b/plc4go/internal/bacnetip/bacgopes/service/cov_PulseConverterCriteria.go similarity index 100% rename from plc4go/internal/bacnetip/service/cov_PulseConverterCriteria.go rename to plc4go/internal/bacnetip/bacgopes/service/cov_PulseConverterCriteria.go diff --git a/plc4go/internal/bacnetip/service/cov_SubscriptionList.go b/plc4go/internal/bacnetip/bacgopes/service/cov_SubscriptionList.go similarity index 100% rename from plc4go/internal/bacnetip/service/cov_SubscriptionList.go rename to plc4go/internal/bacnetip/bacgopes/service/cov_SubscriptionList.go diff --git a/plc4go/internal/bacnetip/service/detect.go b/plc4go/internal/bacnetip/bacgopes/service/detect.go similarity index 100% rename from plc4go/internal/bacnetip/service/detect.go rename to plc4go/internal/bacnetip/bacgopes/service/detect.go diff --git a/plc4go/internal/bacnetip/service_device_Device.go b/plc4go/internal/bacnetip/bacgopes/service_device_Device.go similarity index 93% rename from plc4go/internal/bacnetip/service_device_Device.go rename to plc4go/internal/bacnetip/bacgopes/service_device_Device.go index 3b6012616a2..1a10f1de2ec 100644 --- a/plc4go/internal/bacnetip/service_device_Device.go +++ b/plc4go/internal/bacnetip/bacgopes/service_device_Device.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes import ( "strconv" @@ -33,19 +33,20 @@ type WhoIsIAmServicesRequirements interface { Request(args Args, kwargs KWArgs) error } +//go:generate go run ../../../tools/plc4xgenerator/gen.go -type=WhoIsIAmServices type WhoIsIAmServices struct { - WhoIsIAmServicesRequirements + _requirements WhoIsIAmServicesRequirements *Capability localDevice *LocalDeviceObject - log zerolog.Logger + log zerolog.Logger `ignore:"true"` } func NewWhoIsIAmServices(localLog zerolog.Logger, whoIsIAmServicesRequirements WhoIsIAmServicesRequirements) (*WhoIsIAmServices, error) { w := &WhoIsIAmServices{ log: localLog, } - w.WhoIsIAmServicesRequirements = whoIsIAmServicesRequirements + w._requirements = whoIsIAmServicesRequirements w.Capability = NewCapability() return w, nil } @@ -89,7 +90,7 @@ func (w *WhoIsIAmServices) WhoIs(lowLimit, highLimit *uint, address *Address) er w.log.Debug().Stringer("whoIs", whoIs).Msg("WhoIs") - return w.Request(NewArgs(NewPDU(whoIs, WithPDUDestination(address))), NoKWArgs) + return w._requirements.Request(NewArgs(NewPDU(whoIs, WithPDUDestination(address))), NoKWArgs) } // DoWhoIsRequest respond to a Who-Is request. @@ -168,7 +169,7 @@ func (w *WhoIsIAmServices) IAm(address *Address) error { } w.log.Debug().Stringer("iAm", iAm).Msg("IAm") - return w.Request(NewArgs(NewPDU(iAm, WithPDUDestination(address))), NoKWArgs) + return w._requirements.Request(NewArgs(NewPDU(iAm, WithPDUDestination(address))), NoKWArgs) } // DoIAmRequest responds to an I-Am request. diff --git a/plc4go/internal/bacnetip/settings.go b/plc4go/internal/bacnetip/bacgopes/settings.go similarity index 98% rename from plc4go/internal/bacnetip/settings.go rename to plc4go/internal/bacnetip/bacgopes/settings.go index 96b894e277d..f65cfbe9c92 100644 --- a/plc4go/internal/bacnetip/settings.go +++ b/plc4go/internal/bacnetip/bacgopes/settings.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes type settings struct { Debug bool diff --git a/plc4go/internal/bacnetip/task.go b/plc4go/internal/bacnetip/bacgopes/task.go similarity index 99% rename from plc4go/internal/bacnetip/task.go rename to plc4go/internal/bacnetip/bacgopes/task.go index 4eb9d885c22..2fe14f39656 100644 --- a/plc4go/internal/bacnetip/task.go +++ b/plc4go/internal/bacnetip/bacgopes/task.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes import ( "time" diff --git a/plc4go/internal/bacnetip/task_OneShotDeleteTask.go b/plc4go/internal/bacnetip/bacgopes/task_OneShotDeleteTask.go similarity index 98% rename from plc4go/internal/bacnetip/task_OneShotDeleteTask.go rename to plc4go/internal/bacnetip/bacgopes/task_OneShotDeleteTask.go index 1c054c52aeb..ae57a5ec4ea 100644 --- a/plc4go/internal/bacnetip/task_OneShotDeleteTask.go +++ b/plc4go/internal/bacnetip/bacgopes/task_OneShotDeleteTask.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes import ( "fmt" diff --git a/plc4go/internal/bacnetip/task_OneShotFunctionTask.go b/plc4go/internal/bacnetip/bacgopes/task_OneShotFunctionTask.go similarity index 99% rename from plc4go/internal/bacnetip/task_OneShotFunctionTask.go rename to plc4go/internal/bacnetip/bacgopes/task_OneShotFunctionTask.go index c85d6dd958b..5dd4932bedf 100644 --- a/plc4go/internal/bacnetip/task_OneShotFunctionTask.go +++ b/plc4go/internal/bacnetip/bacgopes/task_OneShotFunctionTask.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes import "fmt" diff --git a/plc4go/internal/bacnetip/task_OneShotTask.go b/plc4go/internal/bacnetip/bacgopes/task_OneShotTask.go similarity index 98% rename from plc4go/internal/bacnetip/task_OneShotTask.go rename to plc4go/internal/bacnetip/bacgopes/task_OneShotTask.go index 8fae4d0c474..c5ea424fd63 100644 --- a/plc4go/internal/bacnetip/task_OneShotTask.go +++ b/plc4go/internal/bacnetip/bacgopes/task_OneShotTask.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes import ( "fmt" diff --git a/plc4go/internal/bacnetip/task_RecurringFunctionTask.go b/plc4go/internal/bacnetip/bacgopes/task_RecurringFunctionTask.go similarity index 99% rename from plc4go/internal/bacnetip/task_RecurringFunctionTask.go rename to plc4go/internal/bacnetip/bacgopes/task_RecurringFunctionTask.go index 669aa0dde98..fc21f3be391 100644 --- a/plc4go/internal/bacnetip/task_RecurringFunctionTask.go +++ b/plc4go/internal/bacnetip/bacgopes/task_RecurringFunctionTask.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes import ( "fmt" diff --git a/plc4go/internal/bacnetip/task_RecurringTask.go b/plc4go/internal/bacnetip/bacgopes/task_RecurringTask.go similarity index 99% rename from plc4go/internal/bacnetip/task_RecurringTask.go rename to plc4go/internal/bacnetip/bacgopes/task_RecurringTask.go index 2c12ad903ab..33e49ff89d9 100644 --- a/plc4go/internal/bacnetip/task_RecurringTask.go +++ b/plc4go/internal/bacnetip/bacgopes/task_RecurringTask.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes import ( "fmt" diff --git a/plc4go/internal/bacnetip/task_Task.go b/plc4go/internal/bacnetip/bacgopes/task_Task.go similarity index 99% rename from plc4go/internal/bacnetip/task_Task.go rename to plc4go/internal/bacnetip/bacgopes/task_Task.go index 73a6661a57a..68a2c7e7596 100644 --- a/plc4go/internal/bacnetip/task_Task.go +++ b/plc4go/internal/bacnetip/bacgopes/task_Task.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes import ( "fmt" diff --git a/plc4go/internal/bacnetip/task_TaskManager.go b/plc4go/internal/bacnetip/bacgopes/task_TaskManager.go similarity index 99% rename from plc4go/internal/bacnetip/task_TaskManager.go rename to plc4go/internal/bacnetip/bacgopes/task_TaskManager.go index 43f15a253d4..285eb01989a 100644 --- a/plc4go/internal/bacnetip/task_TaskManager.go +++ b/plc4go/internal/bacnetip/bacgopes/task_TaskManager.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes import ( "container/heap" diff --git a/plc4go/internal/bacnetip/tests/state_machine.go b/plc4go/internal/bacnetip/bacgopes/tests/state_machine.go similarity index 74% rename from plc4go/internal/bacnetip/tests/state_machine.go rename to plc4go/internal/bacnetip/bacgopes/tests/state_machine.go index bc5e305f41d..758083b6f95 100644 --- a/plc4go/internal/bacnetip/tests/state_machine.go +++ b/plc4go/internal/bacnetip/bacgopes/tests/state_machine.go @@ -27,9 +27,8 @@ import ( "github.com/rs/zerolog" + "github.com/apache/plc4x/plc4go/internal/bacnetip/bacgopes" "github.com/apache/plc4x/plc4go/spi/utils" - - "github.com/apache/plc4x/plc4go/internal/bacnetip" ) // Transition Instances of this class are transitions betweeen getStates of a state machine. @@ -43,7 +42,7 @@ func (t Transition) String() string { type SendTransition struct { Transition - pdu bacnetip.PDU + pdu bacgopes.PDU } func (t SendTransition) String() string { @@ -52,7 +51,7 @@ func (t SendTransition) String() string { type criteria struct { pduType any - pduAttrs map[bacnetip.KnownKey]any + pduAttrs map[bacgopes.KnownKey]any } func (c criteria) String() string { @@ -87,9 +86,9 @@ func (t TimeoutTransition) String() string { } type fnargs struct { - fn func(args bacnetip.Args, kwargs bacnetip.KWArgs) error - args bacnetip.Args - kwargs bacnetip.KWArgs + fn func(args bacgopes.Args, kwargs bacgopes.KWArgs) error + args bacgopes.Args + kwargs bacgopes.KWArgs } func (f fnargs) String() string { @@ -105,7 +104,7 @@ func (t CallTransition) String() string { return fmt.Sprintf("CallTransition{Transition: %s, fnargs: %s}", t.Transition, t.fnargs) } -func MatchPdu(localLog zerolog.Logger, pdu any, pduType any, pduAttrs map[bacnetip.KnownKey]any) (matches bool) { +func MatchPdu(localLog zerolog.Logger, pdu any, pduType any, pduAttrs map[bacgopes.KnownKey]any) (matches bool) { // check the type if pduType != nil && fmt.Sprintf("%T", pdu) != fmt.Sprintf("%T", pduType) { localLog.Debug().Type("got", pdu).Type("want", pduType).Msg("failed match, wrong type") @@ -114,14 +113,14 @@ func MatchPdu(localLog zerolog.Logger, pdu any, pduType any, pduAttrs map[bacnet for attrName, attrValue := range pduAttrs { attrLog := localLog.With().Str("attrName", string(attrName)).Interface("attrValue", attrValue).Logger() switch attrName { - case bacnetip.KWPPDUSource: - equals := pdu.(bacnetip.PDU).GetPDUSource().Equals(attrValue) + case bacgopes.KWPPDUSource: + equals := pdu.(bacgopes.PDU).GetPDUSource().Equals(attrValue) if !equals { attrLog.Trace().Msg("doesn't match") return false } - case bacnetip.KWPDUDestination: - equals := pdu.(bacnetip.PDU).GetPDUDestination().Equals(attrValue) + case bacgopes.KWPDUDestination: + equals := pdu.(bacgopes.PDU).GetPDUDestination().Equals(attrValue) if !equals { attrLog.Trace().Msg("doesn't match") return false @@ -154,13 +153,13 @@ func MatchPdu(localLog zerolog.Logger, pdu any, pduType any, pduAttrs map[bacnet attrLog.Trace().Msg("doesn't match") return false } - case bacnetip.KWPDUData: - got := pdu.(bacnetip.PDU).GetPduData() + case bacgopes.KWPDUData: + got := pdu.(bacgopes.PDU).GetPduData() var want []byte switch attrValue := attrValue.(type) { case []byte: want = attrValue - case bacnetip.PDUData: + case bacgopes.PDUData: want = attrValue.GetPduData() default: attrLog.Debug().Type("type", attrValue).Msg("mismatch, attr unhandled") @@ -173,8 +172,8 @@ func MatchPdu(localLog zerolog.Logger, pdu any, pduType any, pduAttrs map[bacnet attrLog.Debug().Msg("pduData doesn't match") return false } - case bacnetip.KWWirtnNetwork: - wirtn, ok := pdu.(*bacnetip.WhoIsRouterToNetwork) + case bacgopes.KWWirtnNetwork: + wirtn, ok := pdu.(*bacgopes.WhoIsRouterToNetwork) if !ok { attrLog.Trace().Msg("doesn't match") return false @@ -188,8 +187,8 @@ func MatchPdu(localLog zerolog.Logger, pdu any, pduType any, pduAttrs map[bacnet attrLog.Trace().Msg("doesn't match") return false } - case bacnetip.KWIartnNetworkList: - iamrtn, ok := pdu.(*bacnetip.IAmRouterToNetwork) + case bacgopes.KWIartnNetworkList: + iamrtn, ok := pdu.(*bacgopes.IAmRouterToNetwork) if !ok { attrLog.Trace().Msg("doesn't match") return false @@ -205,8 +204,8 @@ func MatchPdu(localLog zerolog.Logger, pdu any, pduType any, pduAttrs map[bacnet attrLog.Trace().Msg("doesn't match") return false } - case bacnetip.KWIcbrtnNetwork: - iamrtn, ok := pdu.(*bacnetip.ICouldBeRouterToNetwork) + case bacgopes.KWIcbrtnNetwork: + iamrtn, ok := pdu.(*bacgopes.ICouldBeRouterToNetwork) if !ok { attrLog.Trace().Msg("doesn't match") return false @@ -216,8 +215,8 @@ func MatchPdu(localLog zerolog.Logger, pdu any, pduType any, pduAttrs map[bacnet attrLog.Trace().Msg("doesn't match") return false } - case bacnetip.KWIcbrtnPerformanceIndex: - iamrtn, ok := pdu.(*bacnetip.ICouldBeRouterToNetwork) + case bacgopes.KWIcbrtnPerformanceIndex: + iamrtn, ok := pdu.(*bacgopes.ICouldBeRouterToNetwork) if !ok { attrLog.Trace().Msg("doesn't match") return false @@ -227,8 +226,8 @@ func MatchPdu(localLog zerolog.Logger, pdu any, pduType any, pduAttrs map[bacnet attrLog.Trace().Msg("doesn't match") return false } - case bacnetip.KWRmtnRejectionReason: - iamrtn, ok := pdu.(*bacnetip.RejectMessageToNetwork) + case bacgopes.KWRmtnRejectionReason: + iamrtn, ok := pdu.(*bacgopes.RejectMessageToNetwork) if !ok { attrLog.Trace().Msg("doesn't match") return false @@ -238,8 +237,8 @@ func MatchPdu(localLog zerolog.Logger, pdu any, pduType any, pduAttrs map[bacnet attrLog.Trace().Msg("doesn't match") return false } - case bacnetip.KWRmtnDNET: - iamrtn, ok := pdu.(*bacnetip.RejectMessageToNetwork) + case bacgopes.KWRmtnDNET: + iamrtn, ok := pdu.(*bacgopes.RejectMessageToNetwork) if !ok { attrLog.Trace().Msg("doesn't match") return false @@ -249,8 +248,8 @@ func MatchPdu(localLog zerolog.Logger, pdu any, pduType any, pduAttrs map[bacnet attrLog.Trace().Msg("doesn't match") return false } - case bacnetip.KWRbtnNetworkList: - rbtn, ok := pdu.(*bacnetip.RouterBusyToNetwork) + case bacgopes.KWRbtnNetworkList: + rbtn, ok := pdu.(*bacgopes.RouterBusyToNetwork) if !ok { attrLog.Trace().Msg("doesn't match") return false @@ -266,8 +265,8 @@ func MatchPdu(localLog zerolog.Logger, pdu any, pduType any, pduAttrs map[bacnet attrLog.Trace().Msg("doesn't match") return false } - case bacnetip.KWRatnNetworkList: - ratn, ok := pdu.(*bacnetip.RouterAvailableToNetwork) + case bacgopes.KWRatnNetworkList: + ratn, ok := pdu.(*bacgopes.RouterAvailableToNetwork) if !ok { attrLog.Trace().Msg("doesn't match") return false @@ -283,46 +282,46 @@ func MatchPdu(localLog zerolog.Logger, pdu any, pduType any, pduAttrs map[bacnet attrLog.Trace().Msg("doesn't match") return false } - case bacnetip.KWIrtTable: - irt, ok := pdu.(*bacnetip.InitializeRoutingTable) + case bacgopes.KWIrtTable: + irt, ok := pdu.(*bacgopes.InitializeRoutingTable) if !ok { attrLog.Trace().Msg("doesn't match") return false } irts := irt.GetIrtTable() - oirts, ok := attrValue.([]*bacnetip.RoutingTableEntry) + oirts, ok := attrValue.([]*bacgopes.RoutingTableEntry) if !ok { attrLog.Trace().Msg("doesn't match") return false } - equals := slices.EqualFunc(irts, oirts, func(entry *bacnetip.RoutingTableEntry, entry2 *bacnetip.RoutingTableEntry) bool { + equals := slices.EqualFunc(irts, oirts, func(entry *bacgopes.RoutingTableEntry, entry2 *bacgopes.RoutingTableEntry) bool { return entry.Equals(entry2) }) if !equals { attrLog.Trace().Msg("doesn't match") return false } - case bacnetip.KWIrtaTable: - irta, ok := pdu.(*bacnetip.InitializeRoutingTableAck) + case bacgopes.KWIrtaTable: + irta, ok := pdu.(*bacgopes.InitializeRoutingTableAck) if !ok { attrLog.Trace().Msg("doesn't match") return false } irts := irta.GetIrtaTable() - oirts, ok := attrValue.([]*bacnetip.RoutingTableEntry) + oirts, ok := attrValue.([]*bacgopes.RoutingTableEntry) if !ok { attrLog.Trace().Msg("doesn't match") return false } - equals := slices.EqualFunc(irts, oirts, func(entry *bacnetip.RoutingTableEntry, entry2 *bacnetip.RoutingTableEntry) bool { + equals := slices.EqualFunc(irts, oirts, func(entry *bacgopes.RoutingTableEntry, entry2 *bacgopes.RoutingTableEntry) bool { return entry.Equals(entry2) }) if !equals { attrLog.Trace().Msg("doesn't match") return false } - case bacnetip.KWEctnDNET: - ectn, ok := pdu.(*bacnetip.EstablishConnectionToNetwork) + case bacgopes.KWEctnDNET: + ectn, ok := pdu.(*bacgopes.EstablishConnectionToNetwork) if !ok { attrLog.Trace().Msg("doesn't match") return false @@ -332,8 +331,8 @@ func MatchPdu(localLog zerolog.Logger, pdu any, pduType any, pduAttrs map[bacnet attrLog.Trace().Msg("doesn't match") return false } - case bacnetip.KWEctnTerminationTime: - ectn, ok := pdu.(*bacnetip.EstablishConnectionToNetwork) + case bacgopes.KWEctnTerminationTime: + ectn, ok := pdu.(*bacgopes.EstablishConnectionToNetwork) if !ok { attrLog.Trace().Msg("doesn't match") return false @@ -343,8 +342,8 @@ func MatchPdu(localLog zerolog.Logger, pdu any, pduType any, pduAttrs map[bacnet attrLog.Trace().Msg("doesn't match") return false } - case bacnetip.KWDctnDNET: - dctn, ok := pdu.(*bacnetip.DisconnectConnectionToNetwork) + case bacgopes.KWDctnDNET: + dctn, ok := pdu.(*bacgopes.DisconnectConnectionToNetwork) if !ok { attrLog.Trace().Msg("doesn't match") return false @@ -354,8 +353,8 @@ func MatchPdu(localLog zerolog.Logger, pdu any, pduType any, pduAttrs map[bacnet attrLog.Trace().Msg("doesn't match") return false } - case bacnetip.KWNniNet: - nni, ok := pdu.(*bacnetip.NetworkNumberIs) + case bacgopes.KWNniNet: + nni, ok := pdu.(*bacgopes.NetworkNumberIs) if !ok { attrLog.Trace().Msg("doesn't match") return false @@ -365,15 +364,15 @@ func MatchPdu(localLog zerolog.Logger, pdu any, pduType any, pduAttrs map[bacnet attrLog.Trace().Msg("doesn't match") return false } - case bacnetip.KWNniFlag: - nni, ok := pdu.(*bacnetip.NetworkNumberIs) + case bacgopes.KWNniFlag: + nni, ok := pdu.(*bacgopes.NetworkNumberIs) if !ok { attrLog.Trace().Msg("doesn't match") return false } return nni.GetNniFlag() == attrValue - case bacnetip.KWBvlciResultCode: - r, ok := pdu.(*bacnetip.Result) + case bacgopes.KWBvlciResultCode: + r, ok := pdu.(*bacgopes.Result) if !ok { attrLog.Trace().Msg("doesn't match") return false @@ -383,35 +382,35 @@ func MatchPdu(localLog zerolog.Logger, pdu any, pduType any, pduAttrs map[bacnet attrLog.Trace().Msg("doesn't match") return false } - case bacnetip.KWBvlciBDT: - var iwbdt []*bacnetip.Address + case bacgopes.KWBvlciBDT: + var iwbdt []*bacgopes.Address switch pdu := pdu.(type) { - case *bacnetip.WriteBroadcastDistributionTable: + case *bacgopes.WriteBroadcastDistributionTable: iwbdt = pdu.GetBvlciBDT() - case *bacnetip.ReadBroadcastDistributionTableAck: + case *bacgopes.ReadBroadcastDistributionTableAck: iwbdt = pdu.GetBvlciBDT() default: attrLog.Trace().Type("type", pdu).Msg("doesn't match") return false } - owbdt, ok := attrValue.([]*bacnetip.Address) + owbdt, ok := attrValue.([]*bacgopes.Address) if !ok { attrLog.Trace().Msg("doesn't match") return false } - equals := slices.EqualFunc(iwbdt, owbdt, func(a *bacnetip.Address, b *bacnetip.Address) bool { + equals := slices.EqualFunc(iwbdt, owbdt, func(a *bacgopes.Address, b *bacgopes.Address) bool { return a.Equals(b) }) if !equals { attrLog.Trace().Msg("doesn't match") return false } - case bacnetip.KWBvlciAddress: - var address *bacnetip.Address + case bacgopes.KWBvlciAddress: + var address *bacgopes.Address switch pdu := pdu.(type) { - case *bacnetip.ForwardedNPDU: + case *bacgopes.ForwardedNPDU: address = pdu.GetBvlciAddress() - case *bacnetip.DeleteForeignDeviceTableEntry: + case *bacgopes.DeleteForeignDeviceTableEntry: address = pdu.GetBvlciAddress() default: attrLog.Trace().Type("type", pdu).Msg("doesn't match") @@ -422,29 +421,29 @@ func MatchPdu(localLog zerolog.Logger, pdu any, pduType any, pduAttrs map[bacnet attrLog.Trace().Msg("doesn't match") return false } - case bacnetip.KWFdAddress: + case bacgopes.KWFdAddress: panic("implement me") equals := true // TODO temporary if !equals { attrLog.Trace().Msg("doesn't match") return false } - case bacnetip.KWFdTTL: + case bacgopes.KWFdTTL: panic("implement me") equals := true // TODO temporary if !equals { attrLog.Trace().Msg("doesn't match") return false } - case bacnetip.KWFdRemain: + case bacgopes.KWFdRemain: panic("implement me") equals := true // TODO temporary if !equals { attrLog.Trace().Msg("doesn't match") return false } - case bacnetip.KWBvlciTimeToLive: - rfd, ok := pdu.(*bacnetip.RegisterForeignDevice) + case bacgopes.KWBvlciTimeToLive: + rfd, ok := pdu.(*bacgopes.RegisterForeignDevice) if !ok { attrLog.Trace().Msg("doesn't match") return false @@ -454,19 +453,19 @@ func MatchPdu(localLog zerolog.Logger, pdu any, pduType any, pduAttrs map[bacnet attrLog.Trace().Msg("doesn't match") return false } - case bacnetip.KWBvlciFDT: - rfdta, ok := pdu.(*bacnetip.ReadForeignDeviceTableAck) + case bacgopes.KWBvlciFDT: + rfdta, ok := pdu.(*bacgopes.ReadForeignDeviceTableAck) if !ok { attrLog.Trace().Msg("doesn't match") return false } ifdt := rfdta.GetBvlciFDT() - oifdt, ok := attrValue.([]*bacnetip.FDTEntry) + oifdt, ok := attrValue.([]*bacgopes.FDTEntry) if !ok { attrLog.Trace().Msg("doesn't match") return false } - equals := slices.EqualFunc(ifdt, oifdt, func(a *bacnetip.FDTEntry, b *bacnetip.FDTEntry) bool { + equals := slices.EqualFunc(ifdt, oifdt, func(a *bacgopes.FDTEntry, b *bacgopes.FDTEntry) bool { equals := a.Equals(b) if !equals { attrLog.Trace().Stringer("a", a).Stringer("b", b).Msg("doesn't match") @@ -486,20 +485,20 @@ func MatchPdu(localLog zerolog.Logger, pdu any, pduType any, pduAttrs map[bacnet } type TimeoutTask struct { - *bacnetip.OneShotTask + *bacgopes.OneShotTask - fn func(args bacnetip.Args, kwargs bacnetip.KWArgs) error - args bacnetip.Args - kwargs bacnetip.KWArgs + fn func(args bacgopes.Args, kwargs bacgopes.KWArgs) error + args bacgopes.Args + kwargs bacgopes.KWArgs } -func NewTimeoutTask(fn func(args bacnetip.Args, kwargs bacnetip.KWArgs) error, args bacnetip.Args, kwargs bacnetip.KWArgs, when *time.Time) *TimeoutTask { +func NewTimeoutTask(fn func(args bacgopes.Args, kwargs bacgopes.KWArgs) error, args bacgopes.Args, kwargs bacgopes.KWArgs, when *time.Time) *TimeoutTask { task := &TimeoutTask{ fn: fn, args: args, kwargs: kwargs, } - task.OneShotTask = bacnetip.NewOneShotTask(task, when) + task.OneShotTask = bacgopes.NewOneShotTask(task, when) return task } diff --git a/plc4go/internal/bacnetip/tests/state_machine_ClientStateMachine.go b/plc4go/internal/bacnetip/bacgopes/tests/state_machine_ClientStateMachine.go similarity index 83% rename from plc4go/internal/bacnetip/tests/state_machine_ClientStateMachine.go rename to plc4go/internal/bacnetip/bacgopes/tests/state_machine_ClientStateMachine.go index db5005cef41..b752b002d26 100644 --- a/plc4go/internal/bacnetip/tests/state_machine_ClientStateMachine.go +++ b/plc4go/internal/bacnetip/bacgopes/tests/state_machine_ClientStateMachine.go @@ -25,16 +25,16 @@ import ( "github.com/pkg/errors" "github.com/rs/zerolog" - "github.com/apache/plc4x/plc4go/internal/bacnetip" - "github.com/apache/plc4x/plc4go/internal/bacnetip/globals" + "github.com/apache/plc4x/plc4go/internal/bacnetip/bacgopes" + "github.com/apache/plc4x/plc4go/internal/bacnetip/bacgopes/globals" ) type ClientStateMachineContract interface { fmt.Stringer - bacnetip.Client + bacgopes.Client StateMachineContract - Send(args bacnetip.Args, kwargs bacnetip.KWArgs) error - Confirmation(args bacnetip.Args, kwargs bacnetip.KWArgs) error + Send(args bacgopes.Args, kwargs bacgopes.KWArgs) error + Confirmation(args bacgopes.Args, kwargs bacgopes.KWArgs) error } // ClientStateMachine An instance of this class sits at the top of a stack. tPDU's that the @@ -42,7 +42,7 @@ type ClientStateMachineContract interface { // state machine sends are sent down the stack and tPDU's coming up the // stack are fed as received tPDU's. type ClientStateMachine struct { - bacnetip.Client + bacgopes.Client StateMachineContract contract ClientStateMachineContract @@ -68,7 +68,7 @@ func NewClientStateMachine(localLog zerolog.Logger, opts ...func(*ClientStateMac c.log = c.log.With().Str("name", c.name).Logger() } var err error - c.Client, err = bacnetip.NewClient(localLog, c.contract) + c.Client, err = bacgopes.NewClient(localLog, c.contract) if err != nil { return nil, errors.Wrap(err, "error creating client") } @@ -90,12 +90,12 @@ func WithClientStateMachineExtension(contract ClientStateMachineContract) func(* } } -func (s *ClientStateMachine) Send(args bacnetip.Args, kwargs bacnetip.KWArgs) error { +func (s *ClientStateMachine) Send(args bacgopes.Args, kwargs bacgopes.KWArgs) error { s.log.Trace().Stringer("args", args).Stringer("kwargs", kwargs).Msg("Send") return s.contract.Request(args, kwargs) } -func (s *ClientStateMachine) Confirmation(args bacnetip.Args, kwargs bacnetip.KWArgs) error { +func (s *ClientStateMachine) Confirmation(args bacgopes.Args, kwargs bacgopes.KWArgs) error { s.log.Trace().Stringer("args", args).Stringer("kwargs", kwargs).Msg("Confirmation") return s.contract.Receive(args, kwargs) } diff --git a/plc4go/internal/bacnetip/tests/state_machine_ServerStateMachine.go b/plc4go/internal/bacnetip/bacgopes/tests/state_machine_ServerStateMachine.go similarity index 86% rename from plc4go/internal/bacnetip/tests/state_machine_ServerStateMachine.go rename to plc4go/internal/bacnetip/bacgopes/tests/state_machine_ServerStateMachine.go index c2e4bd7b93c..636c3bdd7fa 100644 --- a/plc4go/internal/bacnetip/tests/state_machine_ServerStateMachine.go +++ b/plc4go/internal/bacnetip/bacgopes/tests/state_machine_ServerStateMachine.go @@ -25,11 +25,11 @@ import ( "github.com/pkg/errors" "github.com/rs/zerolog" - "github.com/apache/plc4x/plc4go/internal/bacnetip" + "github.com/apache/plc4x/plc4go/internal/bacnetip/bacgopes" ) type ServerStateMachine struct { - bacnetip.Server + bacgopes.Server StateMachineContract name string @@ -45,7 +45,7 @@ func NewServerStateMachine(localLog zerolog.Logger, opts ...func(*ServerStateMac opt(c) } var err error - c.Server, err = bacnetip.NewServer(localLog, c) + c.Server, err = bacgopes.NewServer(localLog, c) if err != nil { return nil, errors.Wrap(err, "error creating Server") } @@ -61,12 +61,12 @@ func WithServerStateMachineName(name string) func(*ServerStateMachine) { } } -func (s *ServerStateMachine) Send(args bacnetip.Args, kwargs bacnetip.KWArgs) error { +func (s *ServerStateMachine) Send(args bacgopes.Args, kwargs bacgopes.KWArgs) error { s.log.Trace().Stringer("args", args).Stringer("kwargs", kwargs).Msg("Send") return s.Response(args, kwargs) } -func (s *ServerStateMachine) Indication(args bacnetip.Args, kwargs bacnetip.KWArgs) error { +func (s *ServerStateMachine) Indication(args bacgopes.Args, kwargs bacgopes.KWArgs) error { s.log.Trace().Stringer("args", args).Stringer("kwargs", kwargs).Msg("Indication") return s.Receive(args, kwargs) } diff --git a/plc4go/internal/bacnetip/tests/state_machine_State.go b/plc4go/internal/bacnetip/bacgopes/tests/state_machine_State.go similarity index 91% rename from plc4go/internal/bacnetip/tests/state_machine_State.go rename to plc4go/internal/bacnetip/bacgopes/tests/state_machine_State.go index 18c9e81b089..32b92e295e5 100644 --- a/plc4go/internal/bacnetip/tests/state_machine_State.go +++ b/plc4go/internal/bacnetip/bacgopes/tests/state_machine_State.go @@ -26,23 +26,23 @@ import ( "github.com/rs/zerolog" - "github.com/apache/plc4x/plc4go/internal/bacnetip" - "github.com/apache/plc4x/plc4go/internal/bacnetip/globals" + "github.com/apache/plc4x/plc4go/internal/bacnetip/bacgopes" + "github.com/apache/plc4x/plc4go/internal/bacnetip/bacgopes/globals" ) type StateInterceptor interface { - BeforeSend(pdu bacnetip.PDU) - AfterSend(pdu bacnetip.PDU) - BeforeReceive(pdu bacnetip.PDU) - AfterReceive(pdu bacnetip.PDU) - UnexpectedReceive(pdu bacnetip.PDU) + BeforeSend(pdu bacgopes.PDU) + AfterSend(pdu bacgopes.PDU) + BeforeReceive(pdu bacgopes.PDU) + AfterReceive(pdu bacgopes.PDU) + UnexpectedReceive(pdu bacgopes.PDU) } type State interface { fmt.Stringer - Send(pdu bacnetip.PDU, nextState State) State - Receive(args bacnetip.Args, kwargs bacnetip.KWArgs) State + Send(pdu bacgopes.PDU, nextState State) State + Receive(args bacgopes.Args, kwargs bacgopes.KWArgs) State Reset() Fail(docstring string) State Success(docstring string) State @@ -54,7 +54,7 @@ type State interface { SetEvent(eventId string) State Doc(docstring string) State DocString() string - Call(fn func(args bacnetip.Args, kwargs bacnetip.KWArgs) error, args bacnetip.Args, kwargs bacnetip.KWArgs) State + Call(fn func(args bacgopes.Args, kwargs bacgopes.KWArgs) error, args bacgopes.Args, kwargs bacgopes.KWArgs) State getStateMachine() StateMachine setStateMachine(StateMachine) @@ -245,7 +245,7 @@ func (s *state) EnterState() { s.log.Debug().Msg("EnterState") if s.timeoutTransition != nil { s.log.Debug().Time("timeout", s.timeoutTransition.timeout).Msg("waiting") - s.stateMachine.getStateTimeoutTask().InstallTask(bacnetip.WithInstallTaskOptionsWhen(s.timeoutTransition.timeout)) + s.stateMachine.getStateTimeoutTask().InstallTask(bacgopes.WithInstallTaskOptionsWhen(s.timeoutTransition.timeout)) } else { s.log.Trace().Msg("no timeout") } @@ -263,7 +263,7 @@ func (s *state) ExitState() { // Send Create a SendTransition from this state to another, possibly new, state. The next state is returned for method // // chaining. pdu tPDU to send nextState state to transition to after sending -func (s *state) Send(pdu bacnetip.PDU, nextState State) State { +func (s *state) Send(pdu bacgopes.PDU, nextState State) State { s.log.Debug().Stringer("pdu", pdu).Msg("Send") if nextState == nil { nextState = s.stateMachine.NewState("") @@ -280,12 +280,12 @@ func (s *state) Send(pdu bacnetip.PDU, nextState State) State { } // BeforeSend Called before each tPDU about to be sent. -func (s *state) BeforeSend(pdu bacnetip.PDU) { +func (s *state) BeforeSend(pdu bacgopes.PDU) { s.stateMachine.BeforeSend(pdu) } // AfterSend Called after each tPDU about to be sent. -func (s *state) AfterSend(pdu bacnetip.PDU) { +func (s *state) AfterSend(pdu bacgopes.PDU) { s.stateMachine.AfterSend(pdu) } @@ -295,7 +295,7 @@ func (s *state) AfterSend(pdu bacnetip.PDU) { // // criteria tPDU to match // next_state destination state after a successful match -func (s *state) Receive(args bacnetip.Args, kwargs bacnetip.KWArgs) State { +func (s *state) Receive(args bacgopes.Args, kwargs bacgopes.KWArgs) State { s.log.Debug().Stringer("args", args).Stringer("kwargs", kwargs).Msg("Receive") pduType := args[0] pduAttrs := kwargs @@ -327,19 +327,19 @@ func (s *state) Receive(args bacnetip.Args, kwargs bacnetip.KWArgs) State { } // BeforeReceive Called with each tPDU received before matching. -func (s *state) BeforeReceive(pdu bacnetip.PDU) { +func (s *state) BeforeReceive(pdu bacgopes.PDU) { s.stateMachine.BeforeReceive(pdu) } // AfterReceive Called with tPDU received after match. -func (s *state) AfterReceive(pdu bacnetip.PDU) { +func (s *state) AfterReceive(pdu bacgopes.PDU) { s.stateMachine.AfterReceive(pdu) } // Ignore Create a ReceiveTransition from this state to itself, if match is successful the effect is to Ignore the tPDU. // // criteria tPDU to match -func (s *state) Ignore(pduType any, pduAttrs map[bacnetip.KnownKey]any) State { +func (s *state) Ignore(pduType any, pduAttrs map[bacgopes.KnownKey]any) State { s.log.Debug().Interface("pduType", pduType).Interface("pduAttrs", pduAttrs).Msg("Ignore") s.receiveTransitions = append(s.receiveTransitions, ReceiveTransition{ Transition: Transition{}, @@ -355,7 +355,7 @@ func (s *state) Ignore(pduType any, pduAttrs map[bacnetip.KnownKey]any) State { // UnexpectedReceive Called with PDU that did not match. // // Unless this is trapped by the state, the default behaviour is to fail. -func (s *state) UnexpectedReceive(pdu bacnetip.PDU) { +func (s *state) UnexpectedReceive(pdu bacgopes.PDU) { s.log.Debug().Stringer("pdu", pdu).Msg("UnexpectedReceive") s.stateMachine.UnexpectedReceive(pdu) } @@ -430,7 +430,7 @@ func (s *state) Timeout(delay time.Duration, nextState State) State { panic("off the rails") } - now := bacnetip.GetTaskManagerTime() + now := bacgopes.GetTaskManagerTime() s.timeoutTransition = &TimeoutTransition{ Transition: Transition{nextState: nextState}, @@ -442,7 +442,7 @@ func (s *state) Timeout(delay time.Duration, nextState State) State { // Call Create a CallTransition from this state to another, possibly new, state. The next state is returned for method // // chaining. criteria tPDU to match next_state destination state after a successful match -func (s *state) Call(fn func(args bacnetip.Args, kwargs bacnetip.KWArgs) error, args bacnetip.Args, kwargs bacnetip.KWArgs) State { +func (s *state) Call(fn func(args bacgopes.Args, kwargs bacgopes.KWArgs) error, args bacgopes.Args, kwargs bacgopes.KWArgs) State { s.log.Debug().Stringer("args", args).Stringer("kwargs", kwargs).Msg("Call") if s.callTransition != nil { panic("state already has a 'Call' per state") diff --git a/plc4go/internal/bacnetip/tests/state_machine_StateMachine.go b/plc4go/internal/bacnetip/bacgopes/tests/state_machine_StateMachine.go similarity index 91% rename from plc4go/internal/bacnetip/tests/state_machine_StateMachine.go rename to plc4go/internal/bacnetip/bacgopes/tests/state_machine_StateMachine.go index 10eb61b161b..f54775e62e5 100644 --- a/plc4go/internal/bacnetip/tests/state_machine_StateMachine.go +++ b/plc4go/internal/bacnetip/bacgopes/tests/state_machine_StateMachine.go @@ -29,8 +29,8 @@ import ( "github.com/pkg/errors" "github.com/rs/zerolog" - "github.com/apache/plc4x/plc4go/internal/bacnetip" - "github.com/apache/plc4x/plc4go/internal/bacnetip/globals" + "github.com/apache/plc4x/plc4go/internal/bacnetip/bacgopes" + "github.com/apache/plc4x/plc4go/internal/bacnetip/bacgopes/globals" ) // StateMachine A state machine consisting of states. Every state machine has a start @@ -47,12 +47,12 @@ type StateMachine interface { type StateMachineContract interface { fmt.Stringer NewState(string) State - UnexpectedReceive(pdu bacnetip.PDU) - BeforeSend(pdu bacnetip.PDU) - AfterSend(pdu bacnetip.PDU) - BeforeReceive(pdu bacnetip.PDU) - Receive(args bacnetip.Args, kwargs bacnetip.KWArgs) error - AfterReceive(pdu bacnetip.PDU) + UnexpectedReceive(pdu bacgopes.PDU) + BeforeSend(pdu bacgopes.PDU) + AfterSend(pdu bacgopes.PDU) + BeforeReceive(pdu bacgopes.PDU) + Receive(args bacgopes.Args, kwargs bacgopes.KWArgs) error + AfterReceive(pdu bacgopes.PDU) EventSet(id string) Run() error Reset() @@ -75,7 +75,7 @@ type StateMachineContract interface { // StateMachineRequirements provides a set of functions which must be overwritten by a sub struct type StateMachineRequirements interface { StateMachineContract - Send(args bacnetip.Args, kwargs bacnetip.KWArgs) error + Send(args bacgopes.Args, kwargs bacgopes.KWArgs) error } type stateMachine struct { @@ -90,7 +90,7 @@ type stateMachine struct { stateSubStruct any startState State unexpectedReceiveState State - transitionQueue chan bacnetip.PDU + transitionQueue chan bacgopes.PDU stateTimeoutTask *TimeoutTask timeout time.Duration timeoutState State @@ -152,13 +152,13 @@ func NewStateMachine(localLog zerolog.Logger, requirements StateMachineRequireme s.unexpectedReceiveState = s.stateDecorator(s.unexpectedReceiveState) } - s.transitionQueue = make(chan bacnetip.PDU, 100) + s.transitionQueue = make(chan bacgopes.PDU, 100) - s.stateTimeoutTask = NewTimeoutTask(s.StateTimeout, bacnetip.NoArgs, bacnetip.NoKWArgs, nil) + s.stateTimeoutTask = NewTimeoutTask(s.StateTimeout, bacgopes.NoArgs, bacgopes.NoKWArgs, nil) if s.timeout != 0 { s.timeoutState = s.NewState("state machine timeout").Fail("") - s.timeoutTask = NewTimeoutTask(s.StateMachineTimeout, bacnetip.NoArgs, bacnetip.NoKWArgs, s.stateMachineTimeout) + s.timeoutTask = NewTimeoutTask(s.StateMachineTimeout, bacgopes.NoArgs, bacgopes.NoKWArgs, s.stateMachineTimeout) } } } @@ -280,7 +280,7 @@ func (s *stateMachine) Run() error { if s.timeoutTask != nil { s.log.Debug().Msg("schedule runtime limit") - s.timeoutTask.InstallTask(bacnetip.WithInstallTaskOptionsDelta(s.timeout)) + s.timeoutTask.InstallTask(bacgopes.WithInstallTaskOptionsDelta(s.timeout)) } // we are starting up @@ -457,7 +457,7 @@ func (s *stateMachine) gotoState(state State) error { for _, transition := range currentState.getSendTransitions() { s.log.Debug().Stringer("transition", transition).Msg("sending transition") currentState.getInterceptor().BeforeSend(transition.pdu) - if err := s.requirements.Send(bacnetip.NewArgs(transition.pdu), bacnetip.NewKWArgs()); err != nil { + if err := s.requirements.Send(bacgopes.NewArgs(transition.pdu), bacgopes.NewKWArgs()); err != nil { return errors.Wrap(err, "failed to send") } currentState.getInterceptor().AfterSend(transition.pdu) @@ -489,7 +489,7 @@ func (s *stateMachine) gotoState(state State) error { for s.running { select { case pdu := <-s.transitionQueue: - if err := s.Receive(bacnetip.NewArgs(pdu), bacnetip.NewKWArgs()); err != nil { + if err := s.Receive(bacgopes.NewArgs(pdu), bacgopes.NewKWArgs()); err != nil { return errors.Wrap(err, "failed to receive") } default: @@ -500,18 +500,18 @@ func (s *stateMachine) gotoState(state State) error { return nil } -func (s *stateMachine) BeforeSend(pdu bacnetip.PDU) { +func (s *stateMachine) BeforeSend(pdu bacgopes.PDU) { s.transactionLog = append(s.transactionLog, fmt.Sprintf("<<<%v", pdu)) } -func (s *stateMachine) AfterSend(pdu bacnetip.PDU) { +func (s *stateMachine) AfterSend(pdu bacgopes.PDU) { } -func (s *stateMachine) BeforeReceive(pdu bacnetip.PDU) { +func (s *stateMachine) BeforeReceive(pdu bacgopes.PDU) { s.transactionLog = append(s.transactionLog, fmt.Sprintf(">>>%v", pdu)) } -func (s *stateMachine) Receive(args bacnetip.Args, kwargs bacnetip.KWArgs) error { +func (s *stateMachine) Receive(args bacgopes.Args, kwargs bacgopes.KWArgs) error { s.log.Trace().Stringer("args", args).Stringer("kwargs", kwargs).Msg("Receive") pdu := args.Get0PDU() if s.currentState == nil || s.stateTransitioning != 0 { @@ -560,11 +560,11 @@ func (s *stateMachine) Receive(args bacnetip.Args, kwargs bacnetip.KWArgs) error return nil } -func (s *stateMachine) AfterReceive(pdu bacnetip.PDU) { +func (s *stateMachine) AfterReceive(pdu bacgopes.PDU) { s.log.Trace().Stringer("pdu", pdu).Msg("AfterReceive") } -func (s *stateMachine) UnexpectedReceive(pdu bacnetip.PDU) { +func (s *stateMachine) UnexpectedReceive(pdu bacgopes.PDU) { s.log.Trace().Stringer("pdu", pdu).Msg("UnexpectedReceive") s.log.Trace().Stringer("currentState", s.currentState).Msg("currentState") if err := s.gotoState(s.unexpectedReceiveState); err != nil { @@ -621,7 +621,7 @@ func (s *stateMachine) EventSet(eventId string) { } } -func (s *stateMachine) StateTimeout(_ bacnetip.Args, _ bacnetip.KWArgs) error { +func (s *stateMachine) StateTimeout(_ bacgopes.Args, _ bacgopes.KWArgs) error { s.log.Trace().Msg("StateTimeout") if !s.running { return errors.New("state machine is not running") @@ -635,7 +635,7 @@ func (s *stateMachine) StateTimeout(_ bacnetip.Args, _ bacnetip.KWArgs) error { return nil } -func (s *stateMachine) StateMachineTimeout(_ bacnetip.Args, _ bacnetip.KWArgs) error { +func (s *stateMachine) StateMachineTimeout(_ bacgopes.Args, _ bacgopes.KWArgs) error { s.log.Trace().Msg("StateMachineTimeout") if !s.running { return errors.New("state machine is not running") @@ -646,7 +646,7 @@ func (s *stateMachine) StateMachineTimeout(_ bacnetip.Args, _ bacnetip.KWArgs) e return nil } -func (s *stateMachine) MatchPDU(pdu bacnetip.PDU, criteria criteria) bool { +func (s *stateMachine) MatchPDU(pdu bacgopes.PDU, criteria criteria) bool { s.log.Debug().Stringer("pdu", pdu).Stringer("criteria", criteria).Msg("MatchPDU") return MatchPdu(s.log, pdu, criteria.pduType, criteria.pduAttrs) } diff --git a/plc4go/internal/bacnetip/tests/state_machine_StateMachineGroup.go b/plc4go/internal/bacnetip/bacgopes/tests/state_machine_StateMachineGroup.go similarity index 100% rename from plc4go/internal/bacnetip/tests/state_machine_StateMachineGroup.go rename to plc4go/internal/bacnetip/bacgopes/tests/state_machine_StateMachineGroup.go diff --git a/plc4go/internal/bacnetip/tests/state_machine_TrafficLog.go b/plc4go/internal/bacnetip/bacgopes/tests/state_machine_TrafficLog.go similarity index 86% rename from plc4go/internal/bacnetip/tests/state_machine_TrafficLog.go rename to plc4go/internal/bacnetip/bacgopes/tests/state_machine_TrafficLog.go index c2a09f79045..7f42cba0b8c 100644 --- a/plc4go/internal/bacnetip/tests/state_machine_TrafficLog.go +++ b/plc4go/internal/bacnetip/bacgopes/tests/state_machine_TrafficLog.go @@ -22,26 +22,26 @@ package tests import ( "time" - "github.com/apache/plc4x/plc4go/internal/bacnetip" + "github.com/apache/plc4x/plc4go/internal/bacnetip/bacgopes" ) type TrafficLog struct { traffic []struct { time.Time - bacnetip.Args + bacgopes.Args } } // Call Capture the current time and the arguments. -func (t *TrafficLog) Call(args bacnetip.Args) { +func (t *TrafficLog) Call(args bacgopes.Args) { t.traffic = append(t.traffic, struct { time.Time - bacnetip.Args - }{Time: bacnetip.GetTaskManagerTime(), Args: args}) + bacgopes.Args + }{Time: bacgopes.GetTaskManagerTime(), Args: args}) } // Dump the traffic, pass the correct handler like SomeClass._debug -func (t *TrafficLog) Dump(handlerFn func(format string, args bacnetip.Args)) { +func (t *TrafficLog) Dump(handlerFn func(format string, args bacgopes.Args)) { if t == nil { return } diff --git a/plc4go/internal/bacnetip/tests/test_apdu/test_max_apdu_length_accepted_test.go b/plc4go/internal/bacnetip/bacgopes/tests/test_apdu/test_max_apdu_length_accepted_test.go similarity index 100% rename from plc4go/internal/bacnetip/tests/test_apdu/test_max_apdu_length_accepted_test.go rename to plc4go/internal/bacnetip/bacgopes/tests/test_apdu/test_max_apdu_length_accepted_test.go diff --git a/plc4go/internal/bacnetip/tests/test_apdu/test_max_segments_accepted_test.go b/plc4go/internal/bacnetip/bacgopes/tests/test_apdu/test_max_segments_accepted_test.go similarity index 100% rename from plc4go/internal/bacnetip/tests/test_apdu/test_max_segments_accepted_test.go rename to plc4go/internal/bacnetip/bacgopes/tests/test_apdu/test_max_segments_accepted_test.go diff --git a/plc4go/internal/bacnetip/tests/test_base_types/test_name_value_test.go b/plc4go/internal/bacnetip/bacgopes/tests/test_base_types/test_name_value_test.go similarity index 100% rename from plc4go/internal/bacnetip/tests/test_base_types/test_name_value_test.go rename to plc4go/internal/bacnetip/bacgopes/tests/test_base_types/test_name_value_test.go diff --git a/plc4go/internal/bacnetip/tests/test_bvll/helpers.go b/plc4go/internal/bacnetip/bacgopes/tests/test_bvll/helpers.go similarity index 72% rename from plc4go/internal/bacnetip/tests/test_bvll/helpers.go rename to plc4go/internal/bacnetip/bacgopes/tests/test_bvll/helpers.go index 15650769008..25c74be3f19 100644 --- a/plc4go/internal/bacnetip/tests/test_bvll/helpers.go +++ b/plc4go/internal/bacnetip/bacgopes/tests/test_bvll/helpers.go @@ -25,13 +25,13 @@ import ( "github.com/pkg/errors" "github.com/rs/zerolog" - "github.com/apache/plc4x/plc4go/internal/bacnetip" - . "github.com/apache/plc4x/plc4go/internal/bacnetip/constructors" - "github.com/apache/plc4x/plc4go/internal/bacnetip/tests" + "github.com/apache/plc4x/plc4go/internal/bacnetip/bacgopes" + . "github.com/apache/plc4x/plc4go/internal/bacnetip/bacgopes/constructors" + "github.com/apache/plc4x/plc4go/internal/bacnetip/bacgopes/tests" ) type _NetworkServiceElement struct { - *bacnetip.NetworkServiceElement + *bacgopes.NetworkServiceElement } func new_NetworkServiceElement(localLog zerolog.Logger) (*_NetworkServiceElement, error) { @@ -40,7 +40,7 @@ func new_NetworkServiceElement(localLog zerolog.Logger) (*_NetworkServiceElement // This class turns off the deferred startup function call that broadcasts // I-Am-Router-To-Network and Network-Number-Is messages. var err error - i.NetworkServiceElement, err = bacnetip.NewNetworkServiceElement(localLog, bacnetip.WithNetworkServiceElementStartupDisabled(true)) + i.NetworkServiceElement, err = bacgopes.NewNetworkServiceElement(localLog, bacgopes.WithNetworkServiceElementStartupDisabled(true)) if err != nil { return nil, errors.Wrap(err, "error creating network service element") } @@ -48,29 +48,29 @@ func new_NetworkServiceElement(localLog zerolog.Logger) (*_NetworkServiceElement } type FauxMultiplexer struct { - bacnetip.Client - bacnetip.Server + bacgopes.Client + bacgopes.Server - address *bacnetip.Address - unicastTuple *bacnetip.AddressTuple[string, uint16] - broadcastTuple *bacnetip.AddressTuple[string, uint16] + address *bacgopes.Address + unicastTuple *bacgopes.AddressTuple[string, uint16] + broadcastTuple *bacgopes.AddressTuple[string, uint16] - node *bacnetip.IPNode + node *bacgopes.IPNode log zerolog.Logger } -func NewFauxMultiplexer(localLog zerolog.Logger, addr *bacnetip.Address, network *bacnetip.IPNetwork) (*FauxMultiplexer, error) { +func NewFauxMultiplexer(localLog zerolog.Logger, addr *bacgopes.Address, network *bacgopes.IPNetwork) (*FauxMultiplexer, error) { f := &FauxMultiplexer{ address: addr, log: localLog, } var err error - f.Client, err = bacnetip.NewClient(localLog, f) + f.Client, err = bacgopes.NewClient(localLog, f) if err != nil { return nil, errors.Wrap(err, "error creating client") } - f.Server, err = bacnetip.NewServer(localLog, f) + f.Server, err = bacgopes.NewServer(localLog, f) if err != nil { return nil, errors.Wrap(err, "error creating server") } @@ -81,11 +81,11 @@ func NewFauxMultiplexer(localLog zerolog.Logger, addr *bacnetip.Address, network // make an internal node and bind to it, this takes the place of // both the direct port and broadcast port of the real UDPMultiplexer - f.node, err = bacnetip.NewIPNode(localLog, addr, network) + f.node, err = bacgopes.NewIPNode(localLog, addr, network) if err != nil { return nil, errors.Wrap(err, "error creating ip node") } - if err := bacnetip.Bind(localLog, f, f.node); err != nil { + if err := bacgopes.Bind(localLog, f, f.node); err != nil { return nil, errors.Wrap(err, "error binding") } return f, nil @@ -95,23 +95,23 @@ func (s *FauxMultiplexer) String() string { return fmt.Sprintf("FauxMultiplexer(TBD...)") // TODO: fill some info here } -func (s *FauxMultiplexer) Indication(args bacnetip.Args, kwargs bacnetip.KWArgs) error { +func (s *FauxMultiplexer) Indication(args bacgopes.Args, kwargs bacgopes.KWArgs) error { s.log.Debug().Stringer("Args", args).Stringer("KWArgs", kwargs).Msg("Indication") pdu := args.Get0PDU() - var dest *bacnetip.Address + var dest *bacgopes.Address // check for a broadcast message - if pdu.GetPDUDestination().AddrType == bacnetip.LOCAL_BROADCAST_ADDRESS { + if pdu.GetPDUDestination().AddrType == bacgopes.LOCAL_BROADCAST_ADDRESS { var err error - dest, err = bacnetip.NewAddress(s.log, s.broadcastTuple) + dest, err = bacgopes.NewAddress(s.log, s.broadcastTuple) if err != nil { return errors.Wrap(err, "error creating address") } s.log.Debug().Stringer("dest", dest).Msg("Requesting local broadcast") - } else if pdu.GetPDUDestination().AddrType == bacnetip.LOCAL_STATION_ADDRESS { + } else if pdu.GetPDUDestination().AddrType == bacgopes.LOCAL_STATION_ADDRESS { var err error - dest, err = bacnetip.NewAddress(s.log, pdu.GetPDUDestination().AddrAddress) + dest, err = bacgopes.NewAddress(s.log, pdu.GetPDUDestination().AddrAddress) if err != nil { return errors.Wrap(err, "error creating address") } @@ -120,49 +120,49 @@ func (s *FauxMultiplexer) Indication(args bacnetip.Args, kwargs bacnetip.KWArgs) return errors.New("unknown destination type") } - unicast, err := bacnetip.NewAddress(s.log, s.unicastTuple) + unicast, err := bacgopes.NewAddress(s.log, s.unicastTuple) if err != nil { return errors.Wrap(err, "error creating address") } - return s.Request(bacnetip.NewArgs(bacnetip.NewPDU(pdu, bacnetip.WithPDUSource(unicast), bacnetip.WithPDUDestination(dest))), bacnetip.NoKWArgs) + return s.Request(bacgopes.NewArgs(bacgopes.NewPDU(pdu, bacgopes.WithPDUSource(unicast), bacgopes.WithPDUDestination(dest))), bacgopes.NoKWArgs) } -func (s *FauxMultiplexer) Confirmation(args bacnetip.Args, kwargs bacnetip.KWArgs) error { +func (s *FauxMultiplexer) Confirmation(args bacgopes.Args, kwargs bacgopes.KWArgs) error { s.log.Debug().Stringer("Args", args).Stringer("KWArgs", kwargs).Msg("Indication") pdu := args.Get0PDU() // the PDU source and destination are tuples, convert them to Address instances src := pdu.GetPDUSource() - broadcast, err := bacnetip.NewAddress(s.log, s.broadcastTuple) + broadcast, err := bacgopes.NewAddress(s.log, s.broadcastTuple) if err != nil { return errors.Wrap(err, "error creating address") } - var dest *bacnetip.Address + var dest *bacgopes.Address // see if the destination was our broadcast address if pdu.GetPDUDestination().Equals(broadcast) { - dest = bacnetip.NewLocalBroadcast(nil) + dest = bacgopes.NewLocalBroadcast(nil) } else { - dest, err = bacnetip.NewAddress(s.log, pdu.GetPDUDestination().AddrAddress) + dest, err = bacgopes.NewAddress(s.log, pdu.GetPDUDestination().AddrAddress) if err != nil { return errors.Wrap(err, "error creating address") } } - return s.Response(bacnetip.NewArgs(bacnetip.NewPDU(pdu, bacnetip.WithPDUSource(src), bacnetip.WithPDUDestination(dest))), bacnetip.NoKWArgs) + return s.Response(bacgopes.NewArgs(bacgopes.NewPDU(pdu, bacgopes.WithPDUSource(src), bacgopes.WithPDUDestination(dest))), bacgopes.NoKWArgs) } type SnifferStateMachine struct { *tests.ClientStateMachine - address *bacnetip.Address - annexj *bacnetip.AnnexJCodec + address *bacgopes.Address + annexj *bacgopes.AnnexJCodec mux *FauxMultiplexer log zerolog.Logger } -func NewSnifferStateMachine(localLog zerolog.Logger, address string, vlan *bacnetip.IPNetwork) (*SnifferStateMachine, error) { +func NewSnifferStateMachine(localLog zerolog.Logger, address string, vlan *bacgopes.IPNetwork) (*SnifferStateMachine, error) { s := &SnifferStateMachine{ log: localLog, } @@ -173,13 +173,13 @@ func NewSnifferStateMachine(localLog zerolog.Logger, address string, vlan *bacne s.ClientStateMachine = machine // save the name and address - s.address, err = bacnetip.NewAddress(localLog, address) + s.address, err = bacgopes.NewAddress(localLog, address) if err != nil { return nil, errors.Wrap(err, "error creating address") } // BACnet/IP interpreter - s.annexj, err = bacnetip.NewAnnexJCodec(localLog) + s.annexj, err = bacgopes.NewAnnexJCodec(localLog) if err != nil { return nil, errors.Wrap(err, "error creating annexj") } @@ -195,7 +195,7 @@ func NewSnifferStateMachine(localLog zerolog.Logger, address string, vlan *bacne s.mux.node.SetSpoofing(true) // bind the stack together - if err := bacnetip.Bind(localLog, s, s.annexj, s.mux); err != nil { + if err := bacgopes.Bind(localLog, s, s.annexj, s.mux); err != nil { return nil, errors.Wrap(err, "error binding") } @@ -210,12 +210,12 @@ func NewSnifferStateMachine(localLog zerolog.Logger, address string, vlan *bacne type BIPStateMachine struct { *tests.ClientStateMachine - address *bacnetip.Address - annexj *bacnetip.AnnexJCodec + address *bacgopes.Address + annexj *bacgopes.AnnexJCodec mux *FauxMultiplexer } -func NewBIPStateMachine(localLog zerolog.Logger, address string, vlan *bacnetip.IPNetwork) (*BIPStateMachine, error) { +func NewBIPStateMachine(localLog zerolog.Logger, address string, vlan *bacgopes.IPNetwork) (*BIPStateMachine, error) { b := &BIPStateMachine{} var err error b.ClientStateMachine, err = tests.NewClientStateMachine(localLog, tests.WithClientStateMachineName(address), tests.WithClientStateMachineExtension(b)) @@ -227,7 +227,7 @@ func NewBIPStateMachine(localLog zerolog.Logger, address string, vlan *bacnetip. b.address = Address(address) // BACnet/IP interpreter - b.annexj, err = bacnetip.NewAnnexJCodec(localLog) + b.annexj, err = bacgopes.NewAnnexJCodec(localLog) if err != nil { return nil, errors.Wrap(err, "error creating annexj") } @@ -236,7 +236,7 @@ func NewBIPStateMachine(localLog zerolog.Logger, address string, vlan *bacnetip. b.mux, err = NewFauxMultiplexer(localLog, b.address, vlan) // bind the stack together - err = bacnetip.Bind(localLog, b, b.annexj, b.mux) + err = bacgopes.Bind(localLog, b, b.annexj, b.mux) if err != nil { return nil, errors.Wrap(err, "error binding") } @@ -247,16 +247,16 @@ type BIPSimpleStateMachine struct { *tests.ClientStateMachine name string - address *bacnetip.Address + address *bacgopes.Address - bip *bacnetip.BIPSimple - annexj *bacnetip.AnnexJCodec + bip *bacgopes.BIPSimple + annexj *bacgopes.AnnexJCodec mux *FauxMultiplexer log zerolog.Logger } -func NewBIPSimpleStateMachine(localLog zerolog.Logger, netstring string, vlan *bacnetip.IPNetwork) (*BIPSimpleStateMachine, error) { +func NewBIPSimpleStateMachine(localLog zerolog.Logger, netstring string, vlan *bacgopes.IPNetwork) (*BIPSimpleStateMachine, error) { b := &BIPSimpleStateMachine{ log: localLog, } @@ -270,11 +270,11 @@ func NewBIPSimpleStateMachine(localLog zerolog.Logger, netstring string, vlan *b b.address = Address(netstring) // BACnet/IP interpreter - b.bip, err = bacnetip.NewBIPSimple(localLog) + b.bip, err = bacgopes.NewBIPSimple(localLog) if err != nil { return nil, errors.Wrap(err, "error building bip simple") } - b.annexj, err = bacnetip.NewAnnexJCodec(localLog) + b.annexj, err = bacgopes.NewAnnexJCodec(localLog) if err != nil { return nil, errors.Wrap(err, "error building annexj codec") } @@ -286,7 +286,7 @@ func NewBIPSimpleStateMachine(localLog zerolog.Logger, netstring string, vlan *b } // bind the stack together - if err := bacnetip.Bind(localLog, b, b.bip, b.annexj, b.mux); err != nil { + if err := bacgopes.Bind(localLog, b, b.bip, b.annexj, b.mux); err != nil { return nil, errors.Wrap(err, "error binding") } @@ -299,15 +299,15 @@ func NewBIPSimpleStateMachine(localLog zerolog.Logger, netstring string, vlan *b type BIPForeignStateMachine struct { *tests.ClientStateMachine - address *bacnetip.Address - bip *bacnetip.BIPForeign - annexj *bacnetip.AnnexJCodec + address *bacgopes.Address + bip *bacgopes.BIPForeign + annexj *bacgopes.AnnexJCodec mux *FauxMultiplexer log zerolog.Logger } -func NewBIPForeignStateMachine(localLog zerolog.Logger, address string, vlan *bacnetip.IPNetwork) (*BIPForeignStateMachine, error) { +func NewBIPForeignStateMachine(localLog zerolog.Logger, address string, vlan *bacgopes.IPNetwork) (*BIPForeignStateMachine, error) { b := &BIPForeignStateMachine{ log: localLog, } @@ -321,11 +321,11 @@ func NewBIPForeignStateMachine(localLog zerolog.Logger, address string, vlan *ba b.address = Address(address) // BACnet/IP interpreter - b.bip, err = bacnetip.NewBIPForeign(localLog) + b.bip, err = bacgopes.NewBIPForeign(localLog) if err != nil { return nil, errors.Wrap(err, "error creating BIPForeign") } - b.annexj, err = bacnetip.NewAnnexJCodec(localLog) + b.annexj, err = bacgopes.NewAnnexJCodec(localLog) if err != nil { return nil, errors.Wrap(err, "error creating AnnexJCodec") } @@ -337,7 +337,7 @@ func NewBIPForeignStateMachine(localLog zerolog.Logger, address string, vlan *ba } // bind the stack together - err = bacnetip.Bind(b.log, b, b.bip, b.annexj, b.mux) + err = bacgopes.Bind(b.log, b, b.bip, b.annexj, b.mux) if err != nil { return nil, errors.Wrap(err, "error binding") } @@ -347,15 +347,15 @@ func NewBIPForeignStateMachine(localLog zerolog.Logger, address string, vlan *ba type BIPBBMDStateMachine struct { *tests.ClientStateMachine - address *bacnetip.Address - bip *bacnetip.BIPBBMD - annexj *bacnetip.AnnexJCodec + address *bacgopes.Address + bip *bacgopes.BIPBBMD + annexj *bacgopes.AnnexJCodec mux *FauxMultiplexer log zerolog.Logger } -func NewBIPBBMDStateMachine(localLog zerolog.Logger, address string, vlan *bacnetip.IPNetwork) (*BIPBBMDStateMachine, error) { +func NewBIPBBMDStateMachine(localLog zerolog.Logger, address string, vlan *bacgopes.IPNetwork) (*BIPBBMDStateMachine, error) { b := &BIPBBMDStateMachine{ log: localLog, } @@ -369,8 +369,8 @@ func NewBIPBBMDStateMachine(localLog zerolog.Logger, address string, vlan *bacne b.address = Address(address) // BACnet/IP interpreter - b.bip, err = bacnetip.NewBIPBBMD(localLog, b.address) - b.annexj, err = bacnetip.NewAnnexJCodec(localLog) + b.bip, err = bacgopes.NewBIPBBMD(localLog, b.address) + b.annexj, err = bacgopes.NewAnnexJCodec(localLog) // build an address, full mask bdtAddress := fmt.Sprintf("%s/32:%d", b.address.AddrTuple.Left, b.address.AddrTuple.Right) @@ -388,7 +388,7 @@ func NewBIPBBMDStateMachine(localLog zerolog.Logger, address string, vlan *bacne } // bind the stack together - err = bacnetip.Bind(b.log, b, b.bip, b.annexj, b.mux) + err = bacgopes.Bind(b.log, b, b.bip, b.annexj, b.mux) if err != nil { return nil, errors.Wrap(err, "error binding") } @@ -397,13 +397,13 @@ func NewBIPBBMDStateMachine(localLog zerolog.Logger, address string, vlan *bacne type BIPSimpleNode struct { name string - address *bacnetip.Address - bip *bacnetip.BIPSimple - annexj *bacnetip.AnnexJCodec + address *bacgopes.Address + bip *bacgopes.BIPSimple + annexj *bacgopes.AnnexJCodec mux *FauxMultiplexer } -func NewBIPSimpleNode(localLog zerolog.Logger, address string, vlan *bacnetip.IPNetwork) (*BIPSimpleNode, error) { +func NewBIPSimpleNode(localLog zerolog.Logger, address string, vlan *bacgopes.IPNetwork) (*BIPSimpleNode, error) { b := &BIPSimpleNode{} // save the name and address @@ -412,11 +412,11 @@ func NewBIPSimpleNode(localLog zerolog.Logger, address string, vlan *bacnetip.IP var err error // BACnet/IP interpreter - b.bip, err = bacnetip.NewBIPSimple(localLog) + b.bip, err = bacgopes.NewBIPSimple(localLog) if err != nil { return nil, errors.Wrap(err, "error building bip simple") } - b.annexj, err = bacnetip.NewAnnexJCodec(localLog) + b.annexj, err = bacgopes.NewAnnexJCodec(localLog) if err != nil { return nil, errors.Wrap(err, "error building annexj codec") } @@ -425,7 +425,7 @@ func NewBIPSimpleNode(localLog zerolog.Logger, address string, vlan *bacnetip.IP b.mux, err = NewFauxMultiplexer(localLog, b.address, vlan) // bind the stack together - err = bacnetip.Bind(localLog, b.bip, b.annexj, b.mux) + err = bacgopes.Bind(localLog, b.bip, b.annexj, b.mux) if err != nil { return nil, errors.Wrap(err, "error binding") } @@ -435,16 +435,16 @@ func NewBIPSimpleNode(localLog zerolog.Logger, address string, vlan *bacnetip.IP type BIPBBMDNode struct { name string - address *bacnetip.Address + address *bacgopes.Address - bip *bacnetip.BIPBBMD - annexj *bacnetip.AnnexJCodec + bip *bacgopes.BIPBBMD + annexj *bacgopes.AnnexJCodec mux *FauxMultiplexer log zerolog.Logger } -func NewBIPBBMDNode(localLog zerolog.Logger, address string, vlan *bacnetip.IPNetwork) (*BIPBBMDNode, error) { +func NewBIPBBMDNode(localLog zerolog.Logger, address string, vlan *bacgopes.IPNetwork) (*BIPBBMDNode, error) { b := &BIPBBMDNode{ log: localLog, } @@ -456,11 +456,11 @@ func NewBIPBBMDNode(localLog zerolog.Logger, address string, vlan *bacnetip.IPNe var err error // BACnet/IP interpreter - b.bip, err = bacnetip.NewBIPBBMD(b.log, b.address) + b.bip, err = bacgopes.NewBIPBBMD(b.log, b.address) if err != nil { return nil, errors.Wrap(err, "error building bip bbmd") } - b.annexj, err = bacnetip.NewAnnexJCodec(b.log) + b.annexj, err = bacgopes.NewAnnexJCodec(b.log) if err != nil { return nil, errors.Wrap(err, "error building annexj codec") } @@ -482,7 +482,7 @@ func NewBIPBBMDNode(localLog zerolog.Logger, address string, vlan *bacnetip.IPNe } // bind the stack together - err = bacnetip.Bind(b.log, b.bip, b.annexj, b.mux) + err = bacgopes.Bind(b.log, b.bip, b.annexj, b.mux) if err != nil { return nil, errors.Wrap(err, "error binding") } @@ -491,27 +491,27 @@ func NewBIPBBMDNode(localLog zerolog.Logger, address string, vlan *bacnetip.IPNe } type TestDeviceObject struct { - *bacnetip.LocalDeviceObject + *bacgopes.LocalDeviceObject } type BIPSimpleApplicationLayerStateMachine struct { - bacnetip.ApplicationServiceElementContract + bacgopes.ApplicationServiceElementContract *tests.ClientStateMachine log zerolog.Logger // TODO: move down name string - address *bacnetip.Address - asap *bacnetip.ApplicationServiceAccessPoint - smap *bacnetip.StateMachineAccessPoint - nsap *bacnetip.NetworkServiceAccessPoint + address *bacgopes.Address + asap *bacgopes.ApplicationServiceAccessPoint + smap *bacgopes.StateMachineAccessPoint + nsap *bacgopes.NetworkServiceAccessPoint nse *_NetworkServiceElement - bip *bacnetip.BIPSimple - annexj *bacnetip.AnnexJCodec + bip *bacgopes.BIPSimple + annexj *bacgopes.AnnexJCodec mux *FauxMultiplexer } -func NewBIPSimpleApplicationLayerStateMachine(localLog zerolog.Logger, address string, vlan *bacnetip.IPNetwork) (*BIPSimpleApplicationLayerStateMachine, error) { +func NewBIPSimpleApplicationLayerStateMachine(localLog zerolog.Logger, address string, vlan *bacgopes.IPNetwork) (*BIPSimpleApplicationLayerStateMachine, error) { b := &BIPSimpleApplicationLayerStateMachine{} // build a name, save the address b.name = fmt.Sprintf("app @ %s", address) @@ -519,7 +519,7 @@ func NewBIPSimpleApplicationLayerStateMachine(localLog zerolog.Logger, address s // build a local device object localDevice := &TestDeviceObject{ - LocalDeviceObject: &bacnetip.LocalDeviceObject{ + LocalDeviceObject: &bacgopes.LocalDeviceObject{ ObjectName: b.name, ObjectIdentifier: "device:998", VendorIdentifier: 999, @@ -528,14 +528,14 @@ func NewBIPSimpleApplicationLayerStateMachine(localLog zerolog.Logger, address s var err error // continue with initialization - b.ApplicationServiceElementContract, err = bacnetip.NewApplicationServiceElement(localLog) + b.ApplicationServiceElementContract, err = bacgopes.NewApplicationServiceElement(localLog) if err != nil { return nil, errors.Wrap(err, "error building application") } b.ClientStateMachine, err = tests.NewClientStateMachine(localLog, tests.WithClientStateMachineName(b.name), tests.WithClientStateMachineExtension(b)) // include a application decoder - b.asap, err = bacnetip.NewApplicationServiceAccessPoint(localLog) + b.asap, err = bacgopes.NewApplicationServiceAccessPoint(localLog) if err != nil { return nil, errors.Wrap(err, "error building application service access point") } @@ -544,13 +544,13 @@ func NewBIPSimpleApplicationLayerStateMachine(localLog zerolog.Logger, address s // can know if it should support segmentation // the segmentation state machines need access to the same device // information cache as the application - b.smap, err = bacnetip.NewStateMachineAccessPoint(localLog, localDevice.LocalDeviceObject, bacnetip.WithStateMachineAccessPointDeviceInfoCache(bacnetip.NewDeviceInfoCache(localLog))) //TODO: this is a indirection that wasn't intended... we don't use the annotation yet so that might be fine + b.smap, err = bacgopes.NewStateMachineAccessPoint(localLog, localDevice.LocalDeviceObject, bacgopes.WithStateMachineAccessPointDeviceInfoCache(bacgopes.NewDeviceInfoCache(localLog))) //TODO: this is a indirection that wasn't intended... we don't use the annotation yet so that might be fine if err != nil { return nil, errors.Wrap(err, "error building state machine access point") } // a network service access point will be needed - b.nsap, err = bacnetip.NewNetworkServiceAccessPoint(localLog) + b.nsap, err = bacgopes.NewNetworkServiceAccessPoint(localLog) if err != nil { return nil, errors.Wrap(err, "error creating network service access point") } @@ -560,23 +560,23 @@ func NewBIPSimpleApplicationLayerStateMachine(localLog zerolog.Logger, address s if err != nil { return nil, errors.Wrap(err, "error creating network service element") } - err = bacnetip.Bind(localLog, b.nse, b.nsap) + err = bacgopes.Bind(localLog, b.nse, b.nsap) if err != nil { return nil, errors.Wrap(err, "error binding") } // bind the top layers - err = bacnetip.Bind(localLog, b, b.asap, b.smap, b.nsap) + err = bacgopes.Bind(localLog, b, b.asap, b.smap, b.nsap) if err != nil { return nil, errors.Wrap(err, "error binding") } // BACnet/IP interpreter - b.bip, err = bacnetip.NewBIPSimple(localLog) + b.bip, err = bacgopes.NewBIPSimple(localLog) if err != nil { return nil, errors.Wrap(err, "error building bip bbmd") } - b.annexj, err = bacnetip.NewAnnexJCodec(localLog) + b.annexj, err = bacgopes.NewAnnexJCodec(localLog) if err != nil { return nil, errors.Wrap(err, "error building annexj codec") } @@ -588,7 +588,7 @@ func NewBIPSimpleApplicationLayerStateMachine(localLog zerolog.Logger, address s } // bind the stack together - err = bacnetip.Bind(localLog, b.bip, b.annexj, b.mux) + err = bacgopes.Bind(localLog, b.bip, b.annexj, b.mux) if err != nil { return nil, errors.Wrap(err, "error binding") } @@ -602,36 +602,36 @@ func NewBIPSimpleApplicationLayerStateMachine(localLog zerolog.Logger, address s return b, nil } -func (b *BIPSimpleApplicationLayerStateMachine) Indication(args bacnetip.Args, kwargs bacnetip.KWArgs) error { +func (b *BIPSimpleApplicationLayerStateMachine) Indication(args bacgopes.Args, kwargs bacgopes.KWArgs) error { b.log.Debug().Stringer("Args", args).Stringer("KWArgs", kwargs).Msg("Indication") - return b.Receive(args, bacnetip.NoKWArgs) + return b.Receive(args, bacgopes.NoKWArgs) } -func (b *BIPSimpleApplicationLayerStateMachine) Confirmation(args bacnetip.Args, kwargs bacnetip.KWArgs) error { +func (b *BIPSimpleApplicationLayerStateMachine) Confirmation(args bacgopes.Args, kwargs bacgopes.KWArgs) error { b.log.Debug().Stringer("Args", args).Stringer("KWArgs", kwargs).Msg("Confirmation") - return b.Receive(args, bacnetip.NoKWArgs) + return b.Receive(args, bacgopes.NoKWArgs) } type BIPBBMDApplication struct { - *bacnetip.Application - *bacnetip.WhoIsIAmServices - *bacnetip.ReadWritePropertyServices + *bacgopes.Application + *bacgopes.WhoIsIAmServices + *bacgopes.ReadWritePropertyServices name string - address *bacnetip.Address + address *bacgopes.Address - asap *bacnetip.ApplicationServiceAccessPoint - smap *bacnetip.StateMachineAccessPoint - nsap *bacnetip.NetworkServiceAccessPoint + asap *bacgopes.ApplicationServiceAccessPoint + smap *bacgopes.StateMachineAccessPoint + nsap *bacgopes.NetworkServiceAccessPoint nse *_NetworkServiceElement - bip *bacnetip.BIPBBMD - annexj *bacnetip.AnnexJCodec + bip *bacgopes.BIPBBMD + annexj *bacgopes.AnnexJCodec mux *FauxMultiplexer log zerolog.Logger } -func NewBIPBBMDApplication(localLog zerolog.Logger, address string, vlan *bacnetip.IPNetwork) (*BIPBBMDApplication, error) { +func NewBIPBBMDApplication(localLog zerolog.Logger, address string, vlan *bacgopes.IPNetwork) (*BIPBBMDApplication, error) { b := &BIPBBMDApplication{ log: localLog, } @@ -642,7 +642,7 @@ func NewBIPBBMDApplication(localLog zerolog.Logger, address string, vlan *bacnet // build a local device object localDevice := &TestDeviceObject{ - LocalDeviceObject: &bacnetip.LocalDeviceObject{ + LocalDeviceObject: &bacgopes.LocalDeviceObject{ ObjectName: b.name, ObjectIdentifier: "device:999", VendorIdentifier: 999, @@ -651,13 +651,13 @@ func NewBIPBBMDApplication(localLog zerolog.Logger, address string, vlan *bacnet var err error // continue with initialization - b.Application, err = bacnetip.NewApplication(localLog, localDevice.LocalDeviceObject) //TODO: this is a indirection that wasn't intended... we don't use the annotation yet so that might be fine + b.Application, err = bacgopes.NewApplication(localLog, localDevice.LocalDeviceObject) //TODO: this is a indirection that wasn't intended... we don't use the annotation yet so that might be fine if err != nil { return nil, errors.Wrap(err, "error building application") } // include a application decoder - b.asap, err = bacnetip.NewApplicationServiceAccessPoint(localLog) + b.asap, err = bacgopes.NewApplicationServiceAccessPoint(localLog) if err != nil { return nil, errors.Wrap(err, "error building application service access point") } @@ -666,13 +666,13 @@ func NewBIPBBMDApplication(localLog zerolog.Logger, address string, vlan *bacnet // can know if it should support segmentation // the segmentation state machines need access to the same device // information cache as the application - b.smap, err = bacnetip.NewStateMachineAccessPoint(localLog, localDevice.LocalDeviceObject, bacnetip.WithStateMachineAccessPointDeviceInfoCache(b.GetDeviceInfoCache())) //TODO: this is a indirection that wasn't intended... we don't use the annotation yet so that might be fine + b.smap, err = bacgopes.NewStateMachineAccessPoint(localLog, localDevice.LocalDeviceObject, bacgopes.WithStateMachineAccessPointDeviceInfoCache(b.GetDeviceInfoCache())) //TODO: this is a indirection that wasn't intended... we don't use the annotation yet so that might be fine if err != nil { return nil, errors.Wrap(err, "error building state machine access point") } // a network service access point will be needed - b.nsap, err = bacnetip.NewNetworkServiceAccessPoint(localLog) + b.nsap, err = bacgopes.NewNetworkServiceAccessPoint(localLog) if err != nil { return nil, errors.Wrap(err, "error creating network service access point") } @@ -682,24 +682,24 @@ func NewBIPBBMDApplication(localLog zerolog.Logger, address string, vlan *bacnet if err != nil { return nil, errors.Wrap(err, "error creating network service element") } - err = bacnetip.Bind(localLog, b.nse, b.nsap) + err = bacgopes.Bind(localLog, b.nse, b.nsap) if err != nil { return nil, errors.Wrap(err, "error binding") } // bind the top layers - err = bacnetip.Bind(localLog, b, b.asap, b.smap, b.nsap) + err = bacgopes.Bind(localLog, b, b.asap, b.smap, b.nsap) if err != nil { return nil, errors.Wrap(err, "error binding") } // BACnet/IP interpreter - b.bip, err = bacnetip.NewBIPBBMD(localLog, b.address) + b.bip, err = bacgopes.NewBIPBBMD(localLog, b.address) if err != nil { return nil, errors.Wrap(err, "error building bip bbmd") } - b.annexj, err = bacnetip.NewAnnexJCodec(localLog) + b.annexj, err = bacgopes.NewAnnexJCodec(localLog) if err != nil { return nil, errors.Wrap(err, "error building annexj codec") } @@ -721,7 +721,7 @@ func NewBIPBBMDApplication(localLog zerolog.Logger, address string, vlan *bacnet } // bind the stack together - err = bacnetip.Bind(localLog, b.bip, b.annexj, b.mux) + err = bacgopes.Bind(localLog, b.bip, b.annexj, b.mux) if err != nil { return nil, errors.Wrap(err, "error binding") } diff --git a/plc4go/internal/bacnetip/tests/test_bvll/test_bbmd_test.go b/plc4go/internal/bacnetip/bacgopes/tests/test_bvll/test_bbmd_test.go similarity index 80% rename from plc4go/internal/bacnetip/tests/test_bvll/test_bbmd_test.go rename to plc4go/internal/bacnetip/bacgopes/tests/test_bvll/test_bbmd_test.go index 7e00bdcbdea..adbe56e8258 100644 --- a/plc4go/internal/bacnetip/tests/test_bvll/test_bbmd_test.go +++ b/plc4go/internal/bacnetip/bacgopes/tests/test_bvll/test_bbmd_test.go @@ -29,20 +29,19 @@ import ( "github.com/stretchr/testify/require" "github.com/stretchr/testify/suite" + "github.com/apache/plc4x/plc4go/internal/bacnetip/bacgopes" + . "github.com/apache/plc4x/plc4go/internal/bacnetip/bacgopes/constructors" + "github.com/apache/plc4x/plc4go/internal/bacnetip/bacgopes/tests" readWriteModel "github.com/apache/plc4x/plc4go/protocols/bacnetip/readwrite/model" "github.com/apache/plc4x/plc4go/spi/testutils" - - "github.com/apache/plc4x/plc4go/internal/bacnetip" - . "github.com/apache/plc4x/plc4go/internal/bacnetip/constructors" - "github.com/apache/plc4x/plc4go/internal/bacnetip/tests" ) type TBNetwork struct { *tests.StateMachineGroup trafficLog *tests.TrafficLog - router *bacnetip.IPRouter - vlan []*bacnetip.IPNetwork + router *bacgopes.IPRouter + vlan []*bacgopes.IPNetwork t *testing.T @@ -65,12 +64,12 @@ func NewTBNetwork(t *testing.T, count int) *TBNetwork { tbn.trafficLog = new(tests.TrafficLog) // make a router - tbn.router = bacnetip.NewIPRouter(localLog) + tbn.router = bacgopes.NewIPRouter(localLog) // make the networks for net := range count { // make a network and set the traffic log - ipNetwork := bacnetip.NewIPNetwork(localLog, bacnetip.WithNetworkName(fmt.Sprintf("192.168.%d.0/24", net+1)), bacnetip.WithNetworkTrafficLogger(tbn.trafficLog)) + ipNetwork := bacgopes.NewIPNetwork(localLog, bacgopes.WithNetworkName(fmt.Sprintf("192.168.%d.0/24", net+1)), bacgopes.WithNetworkTrafficLogger(tbn.trafficLog)) // make a router routerAddress := Address(fmt.Sprintf("192.168.%d.1/24", net+1)) @@ -143,7 +142,7 @@ func (suite *NonBBMDSuite) TestWriteBDTFail() { writeBroadcastDistributionTable.SetPDUDestination(suite.iut.address) // TODO: upstream does this inline suite.td.GetStartState().Doc("1-1-0"). Send(writeBroadcastDistributionTable, nil).Doc("1-1-1"). - Receive(bacnetip.NewArgs((*bacnetip.Result)(nil)), bacnetip.NewKWArgs(bacnetip.KWBvlciResultCode, readWriteModel.BVLCResultCode(0x0010))).Doc("1-1-2"). + Receive(bacgopes.NewArgs((*bacgopes.Result)(nil)), bacgopes.NewKWArgs(bacgopes.KWBvlciResultCode, readWriteModel.BVLCResultCode(0x0010))).Doc("1-1-2"). Success("") // run group @@ -156,7 +155,7 @@ func (suite *NonBBMDSuite) TestReadBDTFail() { readBroadcastDistributionTable.SetPDUDestination(suite.iut.address) // TODO: upstream does this inline suite.td.GetStartState().Doc("1-2-0"). Send(readBroadcastDistributionTable, nil).Doc("1-2-1"). - Receive(bacnetip.NewArgs((*bacnetip.Result)(nil)), bacnetip.NewKWArgs(bacnetip.KWBvlciResultCode, readWriteModel.BVLCResultCode(0x0020))).Doc("1-2-2"). + Receive(bacgopes.NewArgs((*bacgopes.Result)(nil)), bacgopes.NewKWArgs(bacgopes.KWBvlciResultCode, readWriteModel.BVLCResultCode(0x0020))).Doc("1-2-2"). Success("") // run group @@ -169,7 +168,7 @@ func (suite *NonBBMDSuite) TestRegisterFail() { registerForeignDevice.SetPDUDestination(suite.iut.address) // TODO: upstream does this inline suite.td.GetStartState().Doc("1-3-0"). Send(registerForeignDevice, nil).Doc("1-3-1"). - Receive(bacnetip.NewArgs((*bacnetip.Result)(nil)), bacnetip.NewKWArgs(bacnetip.KWBvlciResultCode, readWriteModel.BVLCResultCode(0x0030))).Doc("1-3-2"). + Receive(bacgopes.NewArgs((*bacgopes.Result)(nil)), bacgopes.NewKWArgs(bacgopes.KWBvlciResultCode, readWriteModel.BVLCResultCode(0x0030))).Doc("1-3-2"). Success("") // run group @@ -182,7 +181,7 @@ func (suite *NonBBMDSuite) TestReadFail() { readForeignDeviceTable.SetPDUDestination(suite.iut.address) // TODO: upstream does this inline suite.td.GetStartState().Doc("1-4-0"). Send(readForeignDeviceTable, nil).Doc("1-4-1"). - Receive(bacnetip.NewArgs((*bacnetip.Result)(nil)), bacnetip.NewKWArgs(bacnetip.KWBvlciResultCode, readWriteModel.BVLCResultCode(0x0040))).Doc("1-4-2"). + Receive(bacgopes.NewArgs((*bacgopes.Result)(nil)), bacgopes.NewKWArgs(bacgopes.KWBvlciResultCode, readWriteModel.BVLCResultCode(0x0040))).Doc("1-4-2"). Success("") // run group @@ -195,7 +194,7 @@ func (suite *NonBBMDSuite) TestDeleteFail() { deleteForeignDeviceTableEntry.SetPDUDestination(suite.iut.address) // TODO: upstream does this inline suite.td.GetStartState().Doc("1-5-0"). Send(deleteForeignDeviceTableEntry, nil).Doc("1-5-1"). - Receive(bacnetip.NewArgs((*bacnetip.Result)(nil)), bacnetip.NewKWArgs(bacnetip.KWBvlciResultCode, readWriteModel.BVLCResultCode(0x0050))).Doc("1-5-2"). + Receive(bacgopes.NewArgs((*bacgopes.Result)(nil)), bacgopes.NewKWArgs(bacgopes.KWBvlciResultCode, readWriteModel.BVLCResultCode(0x0050))).Doc("1-5-2"). Success("") // run group @@ -204,7 +203,7 @@ func (suite *NonBBMDSuite) TestDeleteFail() { func (suite *NonBBMDSuite) TestDistributeFail() { // read the broadcast distribution table, get a nack - pduBytes, err := bacnetip.Xtob( + pduBytes, err := bacgopes.Xtob( // "deadbeef", // forwarded PDU // TODO: this is not a ndpu so we just exploded with that. We use the iartn for that for now // TODO: this below is from us as upstream message is not parsable "01.80" + // version, network layer message @@ -215,7 +214,7 @@ func (suite *NonBBMDSuite) TestDistributeFail() { distributeBroadcastToNetwork.SetPDUDestination(suite.iut.address) // TODO: upstream does this inline suite.td.GetStartState().Doc("1-6-0"). Send(distributeBroadcastToNetwork, nil).Doc("1-6-1"). - Receive(bacnetip.NewArgs((*bacnetip.Result)(nil)), bacnetip.NewKWArgs(bacnetip.KWBvlciResultCode, readWriteModel.BVLCResultCode(0x0060))).Doc("1-6-2"). + Receive(bacgopes.NewArgs((*bacgopes.Result)(nil)), bacgopes.NewKWArgs(bacgopes.KWBvlciResultCode, readWriteModel.BVLCResultCode(0x0060))).Doc("1-6-2"). Success("") // run group @@ -261,15 +260,15 @@ func TestBBMD(t *testing.T) { // broadcast a forwarded NPDU td.GetStartState().Doc("2-1-0"). - Send(WhoIsRequest(bacnetip.NewKWArgs(bacnetip.KWPDUDestination, bacnetip.NewLocalBroadcast(nil))), nil).Doc("2-1-1"). - Receive(bacnetip.NewArgs((*bacnetip.IAmRequest)(nil)), bacnetip.NoKWArgs).Doc("2-1-2"). + Send(WhoIsRequest(bacgopes.NewKWArgs(bacgopes.KWPDUDestination, bacgopes.NewLocalBroadcast(nil))), nil).Doc("2-1-1"). + Receive(bacgopes.NewArgs((*bacgopes.IAmRequest)(nil)), bacgopes.NoKWArgs).Doc("2-1-2"). Success("") // listen for the directed broadcast, then the original unicast, // then fail if there's anything else listener.GetStartState().Doc("2-2-0"). - Receive(bacnetip.NewArgs((*bacnetip.ForwardedNPDU)(nil)), bacnetip.NoKWArgs).Doc("2-2-1"). - Receive(bacnetip.NewArgs((*bacnetip.OriginalUnicastNPDU)(nil)), bacnetip.NoKWArgs).Doc("2-2-2"). + Receive(bacgopes.NewArgs((*bacgopes.ForwardedNPDU)(nil)), bacgopes.NoKWArgs).Doc("2-2-1"). + Receive(bacgopes.NewArgs((*bacgopes.OriginalUnicastNPDU)(nil)), bacgopes.NoKWArgs).Doc("2-2-2"). Timeout(3*time.Second, nil).Doc("2-2-3"). Success("") @@ -310,29 +309,29 @@ func TestBBMD(t *testing.T) { // broadcast a forwarded NPDU td.GetStartState().Doc("2-3-0"). - Send(WhoIsRequest(bacnetip.NewKWArgs(bacnetip.KWPDUDestination, bacnetip.NewLocalBroadcast(nil))), nil).Doc("2-3-1"). - Receive(bacnetip.NewArgs((*bacnetip.IAmRequest)(nil)), bacnetip.NoKWArgs).Doc("2-3-2"). + Send(WhoIsRequest(bacgopes.NewKWArgs(bacgopes.KWPDUDestination, bacgopes.NewLocalBroadcast(nil))), nil).Doc("2-3-1"). + Receive(bacgopes.NewArgs((*bacgopes.IAmRequest)(nil)), bacgopes.NoKWArgs).Doc("2-3-2"). Success("") // listen for the forwarded NPDU. The packet will be sent upstream which // will generate the original unicast going back, then it will be // re-broadcast on the local LAN. Fail if there's anything after that. s241 := listener.GetStartState().Doc("2-4-0"). - Receive(bacnetip.NewArgs((*bacnetip.ForwardedNPDU)(nil)), bacnetip.NoKWArgs).Doc("2-4-1") + Receive(bacgopes.NewArgs((*bacgopes.ForwardedNPDU)(nil)), bacgopes.NoKWArgs).Doc("2-4-1") // look for the original unicast going back, followed by the rebroadcast // of the forwarded NPDU on the local LAN both := s241. - Receive(bacnetip.NewArgs((*bacnetip.OriginalUnicastNPDU)(nil)), bacnetip.NoKWArgs).Doc("2-4-1-a"). - Receive(bacnetip.NewArgs((*bacnetip.ForwardedNPDU)(nil)), bacnetip.NoKWArgs).Doc("2-4-1-b") + Receive(bacgopes.NewArgs((*bacgopes.OriginalUnicastNPDU)(nil)), bacgopes.NoKWArgs).Doc("2-4-1-a"). + Receive(bacgopes.NewArgs((*bacgopes.ForwardedNPDU)(nil)), bacgopes.NoKWArgs).Doc("2-4-1-b") // fail if anything is received after both packets both.Timeout(3*time.Second, nil).Doc("2-4-4"). Success("") // allow the two packets in either order - s241.Receive(bacnetip.NewArgs((*bacnetip.ForwardedNPDU)(nil)), bacnetip.NoKWArgs).Doc("2-4-2-a"). - Receive(bacnetip.NewArgs((*bacnetip.OriginalUnicastNPDU)(nil)), bacnetip.NewKWArgs("nextState", both)).Doc("2-4-2-b") + s241.Receive(bacgopes.NewArgs((*bacgopes.ForwardedNPDU)(nil)), bacgopes.NoKWArgs).Doc("2-4-2-a"). + Receive(bacgopes.NewArgs((*bacgopes.OriginalUnicastNPDU)(nil)), bacgopes.NewKWArgs("nextState", both)).Doc("2-4-2-b") // run the group tnet.Run(0) diff --git a/plc4go/internal/bacnetip/tests/test_bvll/test_codec_test.go b/plc4go/internal/bacnetip/bacgopes/tests/test_bvll/test_codec_test.go similarity index 59% rename from plc4go/internal/bacnetip/tests/test_bvll/test_codec_test.go rename to plc4go/internal/bacnetip/bacgopes/tests/test_bvll/test_codec_test.go index 3961f63be25..05c15d9879d 100644 --- a/plc4go/internal/bacnetip/tests/test_bvll/test_codec_test.go +++ b/plc4go/internal/bacnetip/bacgopes/tests/test_bvll/test_codec_test.go @@ -25,19 +25,18 @@ import ( "github.com/rs/zerolog" "github.com/stretchr/testify/suite" + "github.com/apache/plc4x/plc4go/internal/bacnetip/bacgopes" + . "github.com/apache/plc4x/plc4go/internal/bacnetip/bacgopes/constructors" + "github.com/apache/plc4x/plc4go/internal/bacnetip/bacgopes/tests" readWriteModel "github.com/apache/plc4x/plc4go/protocols/bacnetip/readwrite/model" "github.com/apache/plc4x/plc4go/spi/testutils" - - "github.com/apache/plc4x/plc4go/internal/bacnetip" - . "github.com/apache/plc4x/plc4go/internal/bacnetip/constructors" - "github.com/apache/plc4x/plc4go/internal/bacnetip/tests" ) type TestAnnexJCodecSuite struct { suite.Suite client *tests.TrappedClient - codec *bacnetip.AnnexJCodec + codec *bacgopes.AnnexJCodec server *tests.TrappedServer log zerolog.Logger @@ -47,25 +46,25 @@ func (suite *TestAnnexJCodecSuite) SetupTest() { suite.log = testutils.ProduceTestingLogger(suite.T()) // minature trapped stack var err error - suite.codec, err = bacnetip.NewAnnexJCodec(suite.log) + suite.codec, err = bacgopes.NewAnnexJCodec(suite.log) suite.Require().NoError(err) suite.client, err = tests.NewTrappedClient(suite.log) suite.Require().NoError(err) suite.server, err = tests.NewTrappedServer(suite.log) suite.Require().NoError(err) - err = bacnetip.Bind(suite.log, suite.client, suite.codec, suite.server) + err = bacgopes.Bind(suite.log, suite.client, suite.codec, suite.server) suite.Require().NoError(err) } // Pass the PDU to the client to send down the stack. -func (suite *TestAnnexJCodecSuite) Request(args bacnetip.Args, kwargs bacnetip.KWArgs) error { +func (suite *TestAnnexJCodecSuite) Request(args bacgopes.Args, kwargs bacgopes.KWArgs) error { suite.log.Debug().Stringer("Args", args).Stringer("KWArgs", kwargs).Msg("Request") return suite.client.Request(args, kwargs) } // Check what the server received. -func (suite *TestAnnexJCodecSuite) Indication(args bacnetip.Args, kwargs bacnetip.KWArgs) error { +func (suite *TestAnnexJCodecSuite) Indication(args bacgopes.Args, kwargs bacgopes.KWArgs) error { suite.log.Debug().Stringer("Args", args).Stringer("KWArgs", kwargs).Msg("Indication") var pduType any @@ -78,14 +77,14 @@ func (suite *TestAnnexJCodecSuite) Indication(args bacnetip.Args, kwargs bacneti } // Check what the server received. -func (suite *TestAnnexJCodecSuite) Response(args bacnetip.Args, kwargs bacnetip.KWArgs) error { +func (suite *TestAnnexJCodecSuite) Response(args bacgopes.Args, kwargs bacgopes.KWArgs) error { suite.log.Debug().Stringer("Args", args).Stringer("KWArgs", kwargs).Msg("Response") return suite.server.Response(args, kwargs) } // Check what the server received. -func (suite *TestAnnexJCodecSuite) Confirmation(args bacnetip.Args, kwargs bacnetip.KWArgs) error { +func (suite *TestAnnexJCodecSuite) Confirmation(args bacgopes.Args, kwargs bacgopes.KWArgs) error { suite.log.Debug().Stringer("Args", args).Stringer("KWArgs", kwargs).Msg("Confirmation") pduType := args[0].(any) @@ -96,7 +95,7 @@ func (suite *TestAnnexJCodecSuite) Confirmation(args bacnetip.Args, kwargs bacne func (suite *TestAnnexJCodecSuite) TestResult() { // Request successful - pduBytes, err := bacnetip.Xtob("81.00.0006.0000") + pduBytes, err := bacgopes.Xtob("81.00.0006.0000") suite.Require().NoError(err) { // Parse with plc4x parser to validate parse, err := readWriteModel.BVLCParse[readWriteModel.BVLC](testutils.TestContext(suite.T()), pduBytes) @@ -106,17 +105,17 @@ func (suite *TestAnnexJCodecSuite) TestResult() { } } - err = suite.Request(bacnetip.NewArgs(Result(0)), bacnetip.NoKWArgs) + err = suite.Request(bacgopes.NewArgs(Result(0)), bacgopes.NoKWArgs) suite.Assert().NoError(err) - err = suite.Indication(bacnetip.NoArgs, bacnetip.NewKWArgs(bacnetip.KWPDUData, pduBytes)) + err = suite.Indication(bacgopes.NoArgs, bacgopes.NewKWArgs(bacgopes.KWPDUData, pduBytes)) suite.Assert().NoError(err) - err = suite.Response(bacnetip.NewArgs(bacnetip.NewPDU(bacnetip.NewMessageBridge(pduBytes...))), bacnetip.NoKWArgs) + err = suite.Response(bacgopes.NewArgs(bacgopes.NewPDU(bacgopes.NewMessageBridge(pduBytes...))), bacgopes.NoKWArgs) suite.Assert().NoError(err) - err = suite.Confirmation(bacnetip.NewArgs((*bacnetip.Result)(nil)), bacnetip.NewKWArgs(bacnetip.KWBvlciResultCode, readWriteModel.BVLCResultCode(0))) + err = suite.Confirmation(bacgopes.NewArgs((*bacgopes.Result)(nil)), bacgopes.NewKWArgs(bacgopes.KWBvlciResultCode, readWriteModel.BVLCResultCode(0))) // Request error condition - pduBytes, err = bacnetip.Xtob("81.00.0006.0010") // TODO: check if this is right or if it should be 01 as there is no code for 1 + pduBytes, err = bacgopes.Xtob("81.00.0006.0010") // TODO: check if this is right or if it should be 01 as there is no code for 1 suite.Require().NoError(err) { // Parse with plc4x parser to validate parse, err := readWriteModel.BVLCParse[readWriteModel.BVLC](testutils.TestContext(suite.T()), pduBytes) @@ -126,19 +125,19 @@ func (suite *TestAnnexJCodecSuite) TestResult() { } } - err = suite.Request(bacnetip.NewArgs(Result(0x0010)), bacnetip.NoKWArgs) + err = suite.Request(bacgopes.NewArgs(Result(0x0010)), bacgopes.NoKWArgs) suite.Assert().NoError(err) - err = suite.Indication(bacnetip.NoArgs, bacnetip.NewKWArgs(bacnetip.KWPDUData, pduBytes)) + err = suite.Indication(bacgopes.NoArgs, bacgopes.NewKWArgs(bacgopes.KWPDUData, pduBytes)) suite.Assert().NoError(err) - err = suite.Response(bacnetip.NewArgs(bacnetip.NewPDU(bacnetip.NewMessageBridge(pduBytes...))), bacnetip.NoKWArgs) + err = suite.Response(bacgopes.NewArgs(bacgopes.NewPDU(bacgopes.NewMessageBridge(pduBytes...))), bacgopes.NoKWArgs) suite.Assert().NoError(err) - err = suite.Confirmation(bacnetip.NewArgs((*bacnetip.Result)(nil)), bacnetip.NewKWArgs(bacnetip.KWBvlciResultCode, readWriteModel.BVLCResultCode(0x0010))) + err = suite.Confirmation(bacgopes.NewArgs((*bacgopes.Result)(nil)), bacgopes.NewKWArgs(bacgopes.KWBvlciResultCode, readWriteModel.BVLCResultCode(0x0010))) } func (suite *TestAnnexJCodecSuite) TestWriteBroadcastDistributionTable() { // write an empty table - pduBytes, err := bacnetip.Xtob("81.01.0004") + pduBytes, err := bacgopes.Xtob("81.01.0004") suite.Require().NoError(err) { // Parse with plc4x parser to validate parse, err := readWriteModel.BVLCParse[readWriteModel.BVLC](testutils.TestContext(suite.T()), pduBytes) @@ -148,18 +147,18 @@ func (suite *TestAnnexJCodecSuite) TestWriteBroadcastDistributionTable() { } } - err = suite.Request(bacnetip.NewArgs(WriteBroadcastDistributionTable()), bacnetip.NoKWArgs) + err = suite.Request(bacgopes.NewArgs(WriteBroadcastDistributionTable()), bacgopes.NoKWArgs) suite.Assert().NoError(err) - err = suite.Indication(bacnetip.NoArgs, bacnetip.NewKWArgs(bacnetip.KWPDUData, pduBytes)) + err = suite.Indication(bacgopes.NoArgs, bacgopes.NewKWArgs(bacgopes.KWPDUData, pduBytes)) suite.Assert().NoError(err) - err = suite.Response(bacnetip.NewArgs(bacnetip.NewPDU(bacnetip.NewMessageBridge(pduBytes...))), bacnetip.NoKWArgs) + err = suite.Response(bacgopes.NewArgs(bacgopes.NewPDU(bacgopes.NewMessageBridge(pduBytes...))), bacgopes.NoKWArgs) suite.Assert().NoError(err) - err = suite.Confirmation(bacnetip.NewArgs((*bacnetip.WriteBroadcastDistributionTable)(nil)), bacnetip.NewKWArgs(bacnetip.KWBvlciBDT, []*bacnetip.Address{})) + err = suite.Confirmation(bacgopes.NewArgs((*bacgopes.WriteBroadcastDistributionTable)(nil)), bacgopes.NewKWArgs(bacgopes.KWBvlciBDT, []*bacgopes.Address{})) // write table with an element - addr, _ := bacnetip.NewAddress(zerolog.Nop(), "192.168.0.254/24") - pduBytes, err = bacnetip.Xtob("81.01.000e" + + addr, _ := bacgopes.NewAddress(zerolog.Nop(), "192.168.0.254/24") + pduBytes, err = bacgopes.Xtob("81.01.000e" + "c0.a8.00.fe.ba.c0 ff.ff.ff.00") // address and mask suite.Require().NoError(err) { // Parse with plc4x parser to validate @@ -170,19 +169,19 @@ func (suite *TestAnnexJCodecSuite) TestWriteBroadcastDistributionTable() { } } - err = suite.Request(bacnetip.NewArgs(WriteBroadcastDistributionTable(addr)), bacnetip.NoKWArgs) + err = suite.Request(bacgopes.NewArgs(WriteBroadcastDistributionTable(addr)), bacgopes.NoKWArgs) suite.Assert().NoError(err) - err = suite.Indication(bacnetip.NoArgs, bacnetip.NewKWArgs(bacnetip.KWPDUData, pduBytes)) + err = suite.Indication(bacgopes.NoArgs, bacgopes.NewKWArgs(bacgopes.KWPDUData, pduBytes)) suite.Assert().NoError(err) - err = suite.Response(bacnetip.NewArgs(bacnetip.NewPDU(bacnetip.NewMessageBridge(pduBytes...))), bacnetip.NoKWArgs) + err = suite.Response(bacgopes.NewArgs(bacgopes.NewPDU(bacgopes.NewMessageBridge(pduBytes...))), bacgopes.NoKWArgs) suite.Assert().NoError(err) - err = suite.Confirmation(bacnetip.NewArgs((*bacnetip.WriteBroadcastDistributionTable)(nil)), bacnetip.NewKWArgs(bacnetip.KWBvlciBDT, []*bacnetip.Address{addr})) + err = suite.Confirmation(bacgopes.NewArgs((*bacgopes.WriteBroadcastDistributionTable)(nil)), bacgopes.NewKWArgs(bacgopes.KWBvlciBDT, []*bacgopes.Address{addr})) } func (suite *TestAnnexJCodecSuite) TestReadBroadcastDistributionTable() { // Read an empty table - pduBytes, err := bacnetip.Xtob("81.02.0004") + pduBytes, err := bacgopes.Xtob("81.02.0004") suite.Require().NoError(err) { // Parse with plc4x parser to validate parse, err := readWriteModel.BVLCParse[readWriteModel.BVLC](testutils.TestContext(suite.T()), pduBytes) @@ -192,19 +191,19 @@ func (suite *TestAnnexJCodecSuite) TestReadBroadcastDistributionTable() { } } - err = suite.Request(bacnetip.NewArgs(ReadBroadcastDistributionTable()), bacnetip.NoKWArgs) + err = suite.Request(bacgopes.NewArgs(ReadBroadcastDistributionTable()), bacgopes.NoKWArgs) suite.Assert().NoError(err) - err = suite.Indication(bacnetip.NoArgs, bacnetip.NewKWArgs(bacnetip.KWPDUData, pduBytes)) + err = suite.Indication(bacgopes.NoArgs, bacgopes.NewKWArgs(bacgopes.KWPDUData, pduBytes)) suite.Assert().NoError(err) - err = suite.Response(bacnetip.NewArgs(bacnetip.NewPDU(bacnetip.NewMessageBridge(pduBytes...))), bacnetip.NoKWArgs) + err = suite.Response(bacgopes.NewArgs(bacgopes.NewPDU(bacgopes.NewMessageBridge(pduBytes...))), bacgopes.NoKWArgs) suite.Assert().NoError(err) - err = suite.Confirmation(bacnetip.NewArgs((*bacnetip.ReadBroadcastDistributionTable)(nil)), bacnetip.NoKWArgs) + err = suite.Confirmation(bacgopes.NewArgs((*bacgopes.ReadBroadcastDistributionTable)(nil)), bacgopes.NoKWArgs) } func (suite *TestAnnexJCodecSuite) TestReadBroadcastDistributionTableAck() { // Read an empty TableAck - pduBytes, err := bacnetip.Xtob("81.03.0004") + pduBytes, err := bacgopes.Xtob("81.03.0004") suite.Require().NoError(err) { // Parse with plc4x parser to validate parse, err := readWriteModel.BVLCParse[readWriteModel.BVLC](testutils.TestContext(suite.T()), pduBytes) @@ -214,18 +213,18 @@ func (suite *TestAnnexJCodecSuite) TestReadBroadcastDistributionTableAck() { } } - err = suite.Request(bacnetip.NewArgs(ReadBroadcastDistributionTableAck()), bacnetip.NoKWArgs) + err = suite.Request(bacgopes.NewArgs(ReadBroadcastDistributionTableAck()), bacgopes.NoKWArgs) suite.Assert().NoError(err) - err = suite.Indication(bacnetip.NoArgs, bacnetip.NewKWArgs(bacnetip.KWPDUData, pduBytes)) + err = suite.Indication(bacgopes.NoArgs, bacgopes.NewKWArgs(bacgopes.KWPDUData, pduBytes)) suite.Assert().NoError(err) - err = suite.Response(bacnetip.NewArgs(bacnetip.NewPDU(bacnetip.NewMessageBridge(pduBytes...))), bacnetip.NoKWArgs) + err = suite.Response(bacgopes.NewArgs(bacgopes.NewPDU(bacgopes.NewMessageBridge(pduBytes...))), bacgopes.NoKWArgs) suite.Assert().NoError(err) - err = suite.Confirmation(bacnetip.NewArgs((*bacnetip.ReadBroadcastDistributionTableAck)(nil)), bacnetip.NewKWArgs(bacnetip.KWBvlciBDT, []*bacnetip.Address{})) + err = suite.Confirmation(bacgopes.NewArgs((*bacgopes.ReadBroadcastDistributionTableAck)(nil)), bacgopes.NewKWArgs(bacgopes.KWBvlciBDT, []*bacgopes.Address{})) // Read TableAck with an element - addr, _ := bacnetip.NewAddress(zerolog.Nop(), "192.168.0.254/24") - pduBytes, err = bacnetip.Xtob("81.03.000e" + //bvlci + addr, _ := bacgopes.NewAddress(zerolog.Nop(), "192.168.0.254/24") + pduBytes, err = bacgopes.Xtob("81.03.000e" + //bvlci "c0.a8.00.fe.ba.c0 ff.ff.ff.00") // address and mask suite.Require().NoError(err) { // Parse with plc4x parser to validate @@ -236,26 +235,26 @@ func (suite *TestAnnexJCodecSuite) TestReadBroadcastDistributionTableAck() { } } - err = suite.Request(bacnetip.NewArgs(ReadBroadcastDistributionTableAck(addr)), bacnetip.NoKWArgs) + err = suite.Request(bacgopes.NewArgs(ReadBroadcastDistributionTableAck(addr)), bacgopes.NoKWArgs) suite.Assert().NoError(err) - err = suite.Indication(bacnetip.NoArgs, bacnetip.NewKWArgs(bacnetip.KWPDUData, pduBytes)) + err = suite.Indication(bacgopes.NoArgs, bacgopes.NewKWArgs(bacgopes.KWPDUData, pduBytes)) suite.Assert().NoError(err) - err = suite.Response(bacnetip.NewArgs(bacnetip.NewPDU(bacnetip.NewMessageBridge(pduBytes...))), bacnetip.NoKWArgs) + err = suite.Response(bacgopes.NewArgs(bacgopes.NewPDU(bacgopes.NewMessageBridge(pduBytes...))), bacgopes.NoKWArgs) suite.Assert().NoError(err) - err = suite.Confirmation(bacnetip.NewArgs((*bacnetip.ReadBroadcastDistributionTableAck)(nil)), bacnetip.NewKWArgs(bacnetip.KWBvlciBDT, []*bacnetip.Address{addr})) + err = suite.Confirmation(bacgopes.NewArgs((*bacgopes.ReadBroadcastDistributionTableAck)(nil)), bacgopes.NewKWArgs(bacgopes.KWBvlciBDT, []*bacgopes.Address{addr})) } func (suite *TestAnnexJCodecSuite) TestForwardNPDU() { - addr, err := bacnetip.NewAddress(zerolog.Nop(), "192.168.0.1") - xpdu, err := bacnetip.Xtob( + addr, err := bacgopes.NewAddress(zerolog.Nop(), "192.168.0.1") + xpdu, err := bacgopes.Xtob( // "deadbeef", // forwarded PDU // TODO: this is not a ndpu so we just exploded with that. We use the iartn for that for now // TODO: this below is from us as upstream message is not parsable "01.80" + // version, network layer message "01 0001 0002 0003", // message type and network list ) suite.Require().NoError(err) - pduBytes, err := bacnetip.Xtob("81.04.0013" + // bvlci // TODO: length was 0e before + pduBytes, err := bacgopes.Xtob("81.04.0013" + // bvlci // TODO: length was 0e before "c0.a8.00.01.ba.c0" + // original source address // "deadbeef", // forwarded PDU // TODO: this is not a ndpu so we just exploded with that. We use the iartn for that for now // TODO: this below is from us as upstream message is not parsable @@ -271,20 +270,20 @@ func (suite *TestAnnexJCodecSuite) TestForwardNPDU() { } } - err = suite.Request(bacnetip.NewArgs(ForwardedNPDU(addr, xpdu)), bacnetip.NoKWArgs) + err = suite.Request(bacgopes.NewArgs(ForwardedNPDU(addr, xpdu)), bacgopes.NoKWArgs) suite.Assert().NoError(err) - err = suite.Indication(bacnetip.NoArgs, bacnetip.NewKWArgs(bacnetip.KWPDUData, pduBytes)) + err = suite.Indication(bacgopes.NoArgs, bacgopes.NewKWArgs(bacgopes.KWPDUData, pduBytes)) suite.Assert().NoError(err) - err = suite.Response(bacnetip.NewArgs(bacnetip.NewPDU(bacnetip.NewMessageBridge(pduBytes...))), bacnetip.NoKWArgs) + err = suite.Response(bacgopes.NewArgs(bacgopes.NewPDU(bacgopes.NewMessageBridge(pduBytes...))), bacgopes.NoKWArgs) suite.Assert().NoError(err) - err = suite.Confirmation(bacnetip.NewArgs((*bacnetip.ForwardedNPDU)(nil)), bacnetip.NewKWArgs(bacnetip.KWBvlciAddress, addr, bacnetip.KWPDUData, xpdu)) + err = suite.Confirmation(bacgopes.NewArgs((*bacgopes.ForwardedNPDU)(nil)), bacgopes.NewKWArgs(bacgopes.KWBvlciAddress, addr, bacgopes.KWPDUData, xpdu)) suite.Assert().NoError(err) } func (suite *TestAnnexJCodecSuite) TestRegisterForeignDevice() { // Request successful - pduBytes, err := bacnetip.Xtob( + pduBytes, err := bacgopes.Xtob( "81.05.0006" + // bvlci "001e", //time-to-live ) @@ -297,19 +296,19 @@ func (suite *TestAnnexJCodecSuite) TestRegisterForeignDevice() { } } - err = suite.Request(bacnetip.NewArgs(RegisterForeignDevice(30)), bacnetip.NoKWArgs) + err = suite.Request(bacgopes.NewArgs(RegisterForeignDevice(30)), bacgopes.NoKWArgs) suite.Assert().NoError(err) - err = suite.Indication(bacnetip.NoArgs, bacnetip.NewKWArgs(bacnetip.KWPDUData, pduBytes)) + err = suite.Indication(bacgopes.NoArgs, bacgopes.NewKWArgs(bacgopes.KWPDUData, pduBytes)) suite.Assert().NoError(err) - err = suite.Response(bacnetip.NewArgs(bacnetip.NewPDU(bacnetip.NewMessageBridge(pduBytes...))), bacnetip.NoKWArgs) + err = suite.Response(bacgopes.NewArgs(bacgopes.NewPDU(bacgopes.NewMessageBridge(pduBytes...))), bacgopes.NoKWArgs) suite.Assert().NoError(err) - err = suite.Confirmation(bacnetip.NewArgs((*bacnetip.RegisterForeignDevice)(nil)), bacnetip.NewKWArgs(bacnetip.KWBvlciTimeToLive, uint16(30))) + err = suite.Confirmation(bacgopes.NewArgs((*bacgopes.RegisterForeignDevice)(nil)), bacgopes.NewKWArgs(bacgopes.KWBvlciTimeToLive, uint16(30))) } func (suite *TestAnnexJCodecSuite) TestReadForeignDeviceTable() { // Read an empty table - pduBytes, err := bacnetip.Xtob("81.06.0004") + pduBytes, err := bacgopes.Xtob("81.06.0004") suite.Require().NoError(err) { // Parse with plc4x parser to validate parse, err := readWriteModel.BVLCParse[readWriteModel.BVLC](testutils.TestContext(suite.T()), pduBytes) @@ -319,19 +318,19 @@ func (suite *TestAnnexJCodecSuite) TestReadForeignDeviceTable() { } } - err = suite.Request(bacnetip.NewArgs(ReadForeignDeviceTable()), bacnetip.NoKWArgs) + err = suite.Request(bacgopes.NewArgs(ReadForeignDeviceTable()), bacgopes.NoKWArgs) suite.Assert().NoError(err) - err = suite.Indication(bacnetip.NoArgs, bacnetip.NewKWArgs(bacnetip.KWPDUData, pduBytes)) + err = suite.Indication(bacgopes.NoArgs, bacgopes.NewKWArgs(bacgopes.KWPDUData, pduBytes)) suite.Assert().NoError(err) - err = suite.Response(bacnetip.NewArgs(bacnetip.NewPDU(bacnetip.NewMessageBridge(pduBytes...))), bacnetip.NoKWArgs) + err = suite.Response(bacgopes.NewArgs(bacgopes.NewPDU(bacgopes.NewMessageBridge(pduBytes...))), bacgopes.NoKWArgs) suite.Assert().NoError(err) - err = suite.Confirmation(bacnetip.NewArgs((*bacnetip.ReadForeignDeviceTable)(nil)), bacnetip.NoKWArgs) + err = suite.Confirmation(bacgopes.NewArgs((*bacgopes.ReadForeignDeviceTable)(nil)), bacgopes.NoKWArgs) } func (suite *TestAnnexJCodecSuite) TestReadForeignDeviceTableAck() { // Read an empty TableAck - pduBytes, err := bacnetip.Xtob("81.07.0004") + pduBytes, err := bacgopes.Xtob("81.07.0004") suite.Require().NoError(err) { // Parse with plc4x parser to validate parse, err := readWriteModel.BVLCParse[readWriteModel.BVLC](testutils.TestContext(suite.T()), pduBytes) @@ -341,22 +340,22 @@ func (suite *TestAnnexJCodecSuite) TestReadForeignDeviceTableAck() { } } - err = suite.Request(bacnetip.NewArgs(ReadForeignDeviceTableAck()), bacnetip.NoKWArgs) + err = suite.Request(bacgopes.NewArgs(ReadForeignDeviceTableAck()), bacgopes.NoKWArgs) suite.Assert().NoError(err) - err = suite.Indication(bacnetip.NoArgs, bacnetip.NewKWArgs(bacnetip.KWPDUData, pduBytes)) + err = suite.Indication(bacgopes.NoArgs, bacgopes.NewKWArgs(bacgopes.KWPDUData, pduBytes)) suite.Assert().NoError(err) - err = suite.Response(bacnetip.NewArgs(bacnetip.NewPDU(bacnetip.NewMessageBridge(pduBytes...))), bacnetip.NoKWArgs) + err = suite.Response(bacgopes.NewArgs(bacgopes.NewPDU(bacgopes.NewMessageBridge(pduBytes...))), bacgopes.NoKWArgs) suite.Assert().NoError(err) - err = suite.Confirmation(bacnetip.NewArgs((*bacnetip.ReadForeignDeviceTableAck)(nil)), bacnetip.NewKWArgs(bacnetip.KWBvlciFDT, []*bacnetip.FDTEntry{})) + err = suite.Confirmation(bacgopes.NewArgs((*bacgopes.ReadForeignDeviceTableAck)(nil)), bacgopes.NewKWArgs(bacgopes.KWBvlciFDT, []*bacgopes.FDTEntry{})) // Read TableAck with one entry fdte := FDTEntry() - fdte.FDAddress, err = bacnetip.NewAddress(suite.log, "192.168.0.10") + fdte.FDAddress, err = bacgopes.NewAddress(suite.log, "192.168.0.10") suite.Require().NoError(err) fdte.FDTTL = 30 fdte.FDRemain = 15 - pduBytes, err = bacnetip.Xtob( + pduBytes, err = bacgopes.Xtob( "81.07.000e" + //bvlci "c0.a8.00.0a.ba.c0" + // address "001e.000f", // ttl and remaining @@ -370,19 +369,19 @@ func (suite *TestAnnexJCodecSuite) TestReadForeignDeviceTableAck() { } } - err = suite.Request(bacnetip.NewArgs(ReadForeignDeviceTableAck(fdte)), bacnetip.NoKWArgs) + err = suite.Request(bacgopes.NewArgs(ReadForeignDeviceTableAck(fdte)), bacgopes.NoKWArgs) suite.Assert().NoError(err) - err = suite.Indication(bacnetip.NoArgs, bacnetip.NewKWArgs(bacnetip.KWPDUData, pduBytes)) + err = suite.Indication(bacgopes.NoArgs, bacgopes.NewKWArgs(bacgopes.KWPDUData, pduBytes)) suite.Assert().NoError(err) - err = suite.Response(bacnetip.NewArgs(bacnetip.NewPDU(bacnetip.NewMessageBridge(pduBytes...))), bacnetip.NoKWArgs) + err = suite.Response(bacgopes.NewArgs(bacgopes.NewPDU(bacgopes.NewMessageBridge(pduBytes...))), bacgopes.NoKWArgs) suite.Assert().NoError(err) - err = suite.Confirmation(bacnetip.NewArgs((*bacnetip.ReadForeignDeviceTableAck)(nil)), bacnetip.NewKWArgs(bacnetip.KWBvlciFDT, []*bacnetip.FDTEntry{fdte})) + err = suite.Confirmation(bacgopes.NewArgs((*bacgopes.ReadForeignDeviceTableAck)(nil)), bacgopes.NewKWArgs(bacgopes.KWBvlciFDT, []*bacgopes.FDTEntry{fdte})) } func (suite *TestAnnexJCodecSuite) TestDeleteForeignDeviceTableEntry() { - addr, _ := bacnetip.NewAddress(zerolog.Nop(), "192.168.0.11/24") - pduBytes, err := bacnetip.Xtob("81.08.000a" + // bvlci + addr, _ := bacgopes.NewAddress(zerolog.Nop(), "192.168.0.11/24") + pduBytes, err := bacgopes.Xtob("81.08.000a" + // bvlci "c0.a8.00.0b.ba.c0") // address of entry to be deleted suite.Require().NoError(err) { // Parse with plc4x parser to validate @@ -393,14 +392,14 @@ func (suite *TestAnnexJCodecSuite) TestDeleteForeignDeviceTableEntry() { } } - err = suite.Request(bacnetip.NewArgs(DeleteForeignDeviceTableEntry(addr)), bacnetip.NoKWArgs) + err = suite.Request(bacgopes.NewArgs(DeleteForeignDeviceTableEntry(addr)), bacgopes.NoKWArgs) suite.Assert().NoError(err) - err = suite.Indication(bacnetip.NoArgs, bacnetip.NewKWArgs(bacnetip.KWPDUData, pduBytes)) + err = suite.Indication(bacgopes.NoArgs, bacgopes.NewKWArgs(bacgopes.KWPDUData, pduBytes)) suite.Assert().NoError(err) - err = suite.Response(bacnetip.NewArgs(bacnetip.NewPDU(bacnetip.NewMessageBridge(pduBytes...))), bacnetip.NoKWArgs) + err = suite.Response(bacgopes.NewArgs(bacgopes.NewPDU(bacgopes.NewMessageBridge(pduBytes...))), bacgopes.NoKWArgs) suite.Assert().NoError(err) - err = suite.Confirmation(bacnetip.NewArgs((*bacnetip.DeleteForeignDeviceTableEntry)(nil)), bacnetip.NewKWArgs(bacnetip.KWBvlciAddress, addr)) + err = suite.Confirmation(bacgopes.NewArgs((*bacgopes.DeleteForeignDeviceTableEntry)(nil)), bacgopes.NewKWArgs(bacgopes.KWBvlciAddress, addr)) } func (suite *TestAnnexJCodecSuite) TestDeleteForeignDeviceTableAck() { @@ -409,14 +408,14 @@ func (suite *TestAnnexJCodecSuite) TestDeleteForeignDeviceTableAck() { } func (suite *TestAnnexJCodecSuite) TestDistributeBroadcastToNetwork() { - xpdu, err := bacnetip.Xtob( + xpdu, err := bacgopes.Xtob( // "deadbeef", // forwarded PDU // TODO: this is not a ndpu so we just exploded with that. We use the iartn for that for now // TODO: this below is from us as upstream message is not parsable "01.80" + // version, network layer message "01 0001 0002 0003", // message type and network list ) suite.Require().NoError(err) - pduBytes, err := bacnetip.Xtob("81.09.000d" + // bvlci // TODO: length was 08 before + pduBytes, err := bacgopes.Xtob("81.09.000d" + // bvlci // TODO: length was 08 before // "deadbeef", // forwarded PDU // TODO: this is not a ndpu so we just exploded with that. We use the iartn for that for now // TODO: this below is from us as upstream message is not parsable "01.80" + // version, network layer message @@ -431,25 +430,25 @@ func (suite *TestAnnexJCodecSuite) TestDistributeBroadcastToNetwork() { } } - err = suite.Request(bacnetip.NewArgs(DistributeBroadcastToNetwork(xpdu)), bacnetip.NoKWArgs) + err = suite.Request(bacgopes.NewArgs(DistributeBroadcastToNetwork(xpdu)), bacgopes.NoKWArgs) suite.Assert().NoError(err) - err = suite.Indication(bacnetip.NoArgs, bacnetip.NewKWArgs(bacnetip.KWPDUData, pduBytes)) + err = suite.Indication(bacgopes.NoArgs, bacgopes.NewKWArgs(bacgopes.KWPDUData, pduBytes)) suite.Assert().NoError(err) - err = suite.Response(bacnetip.NewArgs(bacnetip.NewPDU(bacnetip.NewMessageBridge(pduBytes...))), bacnetip.NoKWArgs) + err = suite.Response(bacgopes.NewArgs(bacgopes.NewPDU(bacgopes.NewMessageBridge(pduBytes...))), bacgopes.NoKWArgs) suite.Assert().NoError(err) - err = suite.Confirmation(bacnetip.NewArgs((*bacnetip.DistributeBroadcastToNetwork)(nil)), bacnetip.NewKWArgs(bacnetip.KWPDUData, xpdu)) + err = suite.Confirmation(bacgopes.NewArgs((*bacgopes.DistributeBroadcastToNetwork)(nil)), bacgopes.NewKWArgs(bacgopes.KWPDUData, xpdu)) } func (suite *TestAnnexJCodecSuite) TestOriginalUnicastNPDU() { - xpdu, err := bacnetip.Xtob( + xpdu, err := bacgopes.Xtob( // "deadbeef", // forwarded PDU // TODO: this is not a ndpu so we just exploded with that. We use the iartn for that for now // TODO: this below is from us as upstream message is not parsable "01.80" + // version, network layer message "01 0001 0002 0003", // message type and network list ) suite.Require().NoError(err) - pduBytes, err := bacnetip.Xtob("81.0a.000d" + // bvlci // TODO: length was 08 before + pduBytes, err := bacgopes.Xtob("81.0a.000d" + // bvlci // TODO: length was 08 before // "deadbeef", // forwarded PDU // TODO: this is not a ndpu so we just exploded with that. We use the iartn for that for now // TODO: this below is from us as upstream message is not parsable "01.80" + // version, network layer message @@ -464,25 +463,25 @@ func (suite *TestAnnexJCodecSuite) TestOriginalUnicastNPDU() { } } - err = suite.Request(bacnetip.NewArgs(OriginalUnicastNPDU(xpdu)), bacnetip.NoKWArgs) + err = suite.Request(bacgopes.NewArgs(OriginalUnicastNPDU(xpdu)), bacgopes.NoKWArgs) suite.Assert().NoError(err) - err = suite.Indication(bacnetip.NoArgs, bacnetip.NewKWArgs(bacnetip.KWPDUData, pduBytes)) + err = suite.Indication(bacgopes.NoArgs, bacgopes.NewKWArgs(bacgopes.KWPDUData, pduBytes)) suite.Assert().NoError(err) - err = suite.Response(bacnetip.NewArgs(bacnetip.NewPDU(bacnetip.NewMessageBridge(pduBytes...))), bacnetip.NoKWArgs) + err = suite.Response(bacgopes.NewArgs(bacgopes.NewPDU(bacgopes.NewMessageBridge(pduBytes...))), bacgopes.NoKWArgs) suite.Assert().NoError(err) - err = suite.Confirmation(bacnetip.NewArgs((*bacnetip.OriginalUnicastNPDU)(nil)), bacnetip.NewKWArgs(bacnetip.KWPDUData, xpdu)) + err = suite.Confirmation(bacgopes.NewArgs((*bacgopes.OriginalUnicastNPDU)(nil)), bacgopes.NewKWArgs(bacgopes.KWPDUData, xpdu)) } func (suite *TestAnnexJCodecSuite) TestOriginalBroadcastNPDU() { - xpdu, err := bacnetip.Xtob( + xpdu, err := bacgopes.Xtob( // "deadbeef", // forwarded PDU // TODO: this is not a ndpu so we just exploded with that. We use the iartn for that for now // TODO: this below is from us as upstream message is not parsable "01.80" + // version, network layer message "01 0001 0002 0003", // message type and network list ) suite.Require().NoError(err) - pduBytes, err := bacnetip.Xtob("81.0b.000d" + // bvlci // TODO: length was 08 before + pduBytes, err := bacgopes.Xtob("81.0b.000d" + // bvlci // TODO: length was 08 before // "deadbeef", // forwarded PDU // TODO: this is not a ndpu so we just exploded with that. We use the iartn for that for now // TODO: this below is from us as upstream message is not parsable "01.80" + // version, network layer message @@ -497,14 +496,14 @@ func (suite *TestAnnexJCodecSuite) TestOriginalBroadcastNPDU() { } } - err = suite.Request(bacnetip.NewArgs(OriginalBroadcastNPDU(xpdu)), bacnetip.NoKWArgs) + err = suite.Request(bacgopes.NewArgs(OriginalBroadcastNPDU(xpdu)), bacgopes.NoKWArgs) suite.Assert().NoError(err) - err = suite.Indication(bacnetip.NoArgs, bacnetip.NewKWArgs(bacnetip.KWPDUData, pduBytes)) + err = suite.Indication(bacgopes.NoArgs, bacgopes.NewKWArgs(bacgopes.KWPDUData, pduBytes)) suite.Assert().NoError(err) - err = suite.Response(bacnetip.NewArgs(bacnetip.NewPDU(bacnetip.NewMessageBridge(pduBytes...))), bacnetip.NoKWArgs) + err = suite.Response(bacgopes.NewArgs(bacgopes.NewPDU(bacgopes.NewMessageBridge(pduBytes...))), bacgopes.NoKWArgs) suite.Assert().NoError(err) - err = suite.Confirmation(bacnetip.NewArgs((*bacnetip.OriginalBroadcastNPDU)(nil)), bacnetip.NewKWArgs(bacnetip.KWPDUData, xpdu)) + err = suite.Confirmation(bacgopes.NewArgs((*bacgopes.OriginalBroadcastNPDU)(nil)), bacgopes.NewKWArgs(bacgopes.KWPDUData, xpdu)) } func TestAnnexJCodec(t *testing.T) { diff --git a/plc4go/internal/bacnetip/tests/test_bvll/test_foreign_test.go b/plc4go/internal/bacnetip/bacgopes/tests/test_bvll/test_foreign_test.go similarity index 69% rename from plc4go/internal/bacnetip/tests/test_bvll/test_foreign_test.go rename to plc4go/internal/bacnetip/bacgopes/tests/test_bvll/test_foreign_test.go index fc9d06eee9a..96c760be8d6 100644 --- a/plc4go/internal/bacnetip/tests/test_bvll/test_foreign_test.go +++ b/plc4go/internal/bacnetip/bacgopes/tests/test_bvll/test_foreign_test.go @@ -27,20 +27,19 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/apache/plc4x/plc4go/internal/bacnetip/bacgopes" + . "github.com/apache/plc4x/plc4go/internal/bacnetip/bacgopes/constructors" + "github.com/apache/plc4x/plc4go/internal/bacnetip/bacgopes/tests" "github.com/apache/plc4x/plc4go/spi/testutils" - - "github.com/apache/plc4x/plc4go/internal/bacnetip" - . "github.com/apache/plc4x/plc4go/internal/bacnetip/constructors" - "github.com/apache/plc4x/plc4go/internal/bacnetip/tests" ) type TFNetwork struct { *tests.StateMachineGroup trafficLog *tests.TrafficLog - router *bacnetip.IPRouter - vlan5 *bacnetip.IPNetwork - vlan6 *bacnetip.IPNetwork + router *bacgopes.IPRouter + vlan5 *bacgopes.IPNetwork + vlan6 *bacgopes.IPNetwork fd *BIPForeignStateMachine bbmd *BIPBBMDStateMachine @@ -65,14 +64,14 @@ func NewTFNetwork(t *testing.T) *TFNetwork { tfn.trafficLog = new(tests.TrafficLog) // make a router - tfn.router = bacnetip.NewIPRouter(localLog) + tfn.router = bacgopes.NewIPRouter(localLog) // make a home LAN - tfn.vlan5 = bacnetip.NewIPNetwork(localLog, bacnetip.WithNetworkName("192.168.5.0/24"), bacnetip.WithNetworkTrafficLogger(tfn.trafficLog)) + tfn.vlan5 = bacgopes.NewIPNetwork(localLog, bacgopes.WithNetworkName("192.168.5.0/24"), bacgopes.WithNetworkTrafficLogger(tfn.trafficLog)) tfn.router.AddNetwork(Address("192.168.5.1/24"), tfn.vlan5) // make a remote LAN - tfn.vlan6 = bacnetip.NewIPNetwork(localLog, bacnetip.WithNetworkName("192.168.6.0/24"), bacnetip.WithNetworkTrafficLogger(tfn.trafficLog)) + tfn.vlan6 = bacgopes.NewIPNetwork(localLog, bacgopes.WithNetworkName("192.168.6.0/24"), bacgopes.WithNetworkTrafficLogger(tfn.trafficLog)) tfn.router.AddNetwork(Address("192.168.6.1/24"), tfn.vlan6) var err error @@ -136,9 +135,9 @@ func TestForeign(t *testing.T) { // tell the B/IP layer of the foreign device to register tnet.fd.GetStartState(). - Call(func(args bacnetip.Args, _ bacnetip.KWArgs) error { - return tnet.fd.bip.Register(args[0].(*bacnetip.Address), args[1].(int)) - }, bacnetip.NewArgs(tnet.bbmd.address, 30), bacnetip.NoKWArgs). + Call(func(args bacgopes.Args, _ bacgopes.KWArgs) error { + return tnet.fd.bip.Register(args[0].(*bacgopes.Address), args[1].(int)) + }, bacgopes.NewArgs(tnet.bbmd.address, 30), bacgopes.NoKWArgs). Success("") // remote sniffer node @@ -148,8 +147,8 @@ func TestForeign(t *testing.T) { // sniffer traffic remoteSniffer.GetStartState().Doc("1-1-0"). - Receive(bacnetip.NewArgs((*bacnetip.RegisterForeignDevice)(nil)), bacnetip.NoKWArgs).Doc("1-1-1"). - Receive(bacnetip.NewArgs((*bacnetip.Result)(nil)), bacnetip.NoKWArgs).Doc("1-1-2"). + Receive(bacgopes.NewArgs((*bacgopes.RegisterForeignDevice)(nil)), bacgopes.NoKWArgs).Doc("1-1-1"). + Receive(bacgopes.NewArgs((*bacgopes.Result)(nil)), bacgopes.NoKWArgs).Doc("1-1-2"). SetEvent("fd-registered").Doc("1-1-3"). Success("") @@ -166,7 +165,7 @@ func TestForeign(t *testing.T) { homeSnooper.GetStartState().Doc("1-2-0"). WaitEvent("fd-registered", nil).Doc("1-2-1"). Send(readForeignDeviceTable, nil).Doc("1-2-2"). - Receive(bacnetip.NewArgs((*bacnetip.ReadForeignDeviceTableAck)(nil)), bacnetip.NoKWArgs).Doc("1-2-3"). + Receive(bacgopes.NewArgs((*bacgopes.ReadForeignDeviceTableAck)(nil)), bacgopes.NoKWArgs).Doc("1-2-3"). Success("") // home sniffer node @@ -176,10 +175,10 @@ func TestForeign(t *testing.T) { // sniffer traffic homeSniffer.GetStartState().Doc("1-3-0"). - Receive(bacnetip.NewArgs((*bacnetip.RegisterForeignDevice)(nil)), bacnetip.NoKWArgs).Doc("1-3-1"). - Receive(bacnetip.NewArgs((*bacnetip.Result)(nil)), bacnetip.NoKWArgs).Doc("1-3-2"). - Receive(bacnetip.NewArgs((*bacnetip.ReadForeignDeviceTable)(nil)), bacnetip.NoKWArgs).Doc("1-3-3"). - Receive(bacnetip.NewArgs((*bacnetip.ReadForeignDeviceTableAck)(nil)), bacnetip.NoKWArgs).Doc("1-3-4"). + Receive(bacgopes.NewArgs((*bacgopes.RegisterForeignDevice)(nil)), bacgopes.NoKWArgs).Doc("1-3-1"). + Receive(bacgopes.NewArgs((*bacgopes.Result)(nil)), bacgopes.NoKWArgs).Doc("1-3-2"). + Receive(bacgopes.NewArgs((*bacgopes.ReadForeignDeviceTable)(nil)), bacgopes.NoKWArgs).Doc("1-3-3"). + Receive(bacgopes.NewArgs((*bacgopes.ReadForeignDeviceTableAck)(nil)), bacgopes.NoKWArgs).Doc("1-3-4"). Success("") // run the group @@ -194,9 +193,9 @@ func TestForeign(t *testing.T) { // tell the B/IP layer of the foreign device to register tnet.fd.GetStartState(). - Call(func(args bacnetip.Args, _ bacnetip.KWArgs) error { - return tnet.fd.bip.Register(args[0].(*bacnetip.Address), args[1].(int)) - }, bacnetip.NewArgs(tnet.bbmd.address, 10), bacnetip.NoKWArgs). + Call(func(args bacgopes.Args, _ bacgopes.KWArgs) error { + return tnet.fd.bip.Register(args[0].(*bacgopes.Address), args[1].(int)) + }, bacgopes.NewArgs(tnet.bbmd.address, 10), bacgopes.NoKWArgs). Success("") // the bbmd is idle @@ -209,10 +208,10 @@ func TestForeign(t *testing.T) { // sniffer traffic remoteSniffer.GetStartState().Doc("2-1-0"). - Receive(bacnetip.NewArgs((*bacnetip.RegisterForeignDevice)(nil)), bacnetip.NoKWArgs).Doc("2-1-1"). - Receive(bacnetip.NewArgs((*bacnetip.Result)(nil)), bacnetip.NoKWArgs).Doc("2-1-1"). - Receive(bacnetip.NewArgs((*bacnetip.RegisterForeignDevice)(nil)), bacnetip.NoKWArgs).Doc("2-1-3"). - Receive(bacnetip.NewArgs((*bacnetip.Result)(nil)), bacnetip.NoKWArgs).Doc("2-1-4"). + Receive(bacgopes.NewArgs((*bacgopes.RegisterForeignDevice)(nil)), bacgopes.NoKWArgs).Doc("2-1-1"). + Receive(bacgopes.NewArgs((*bacgopes.Result)(nil)), bacgopes.NoKWArgs).Doc("2-1-1"). + Receive(bacgopes.NewArgs((*bacgopes.RegisterForeignDevice)(nil)), bacgopes.NoKWArgs).Doc("2-1-3"). + Receive(bacgopes.NewArgs((*bacgopes.Result)(nil)), bacgopes.NoKWArgs).Doc("2-1-4"). Success("") // run the group @@ -226,27 +225,27 @@ func TestForeign(t *testing.T) { tnet := NewTFNetwork(t) //make a PDU from node 1 to node 2 - pduData, err := bacnetip.Xtob( + pduData, err := bacgopes.Xtob( //"dead.beef", // TODO: upstream is using invalid data to send around, so we just use a IAm "01.80" + // version, network layer message "13 0008 01", // message type, network, flag ) require.NoError(t, err) - pdu := bacnetip.NewPDU(bacnetip.NewMessageBridge(pduData...), bacnetip.WithPDUSource(tnet.fd.address), bacnetip.WithPDUDestination(tnet.bbmd.address)) + pdu := bacgopes.NewPDU(bacgopes.NewMessageBridge(pduData...), bacgopes.WithPDUSource(tnet.fd.address), bacgopes.WithPDUDestination(tnet.bbmd.address)) t.Logf("pdu: %v", pdu) // register, wait for ack, send some beef tnet.fd.GetStartState().Doc("3-1-0"). - Call(func(args bacnetip.Args, _ bacnetip.KWArgs) error { - return tnet.fd.bip.Register(args[0].(*bacnetip.Address), args[1].(int)) - }, bacnetip.NewArgs(tnet.bbmd.address, 60), bacnetip.NoKWArgs).Doc("3-1-1"). + Call(func(args bacgopes.Args, _ bacgopes.KWArgs) error { + return tnet.fd.bip.Register(args[0].(*bacgopes.Address), args[1].(int)) + }, bacgopes.NewArgs(tnet.bbmd.address, 60), bacgopes.NoKWArgs).Doc("3-1-1"). WaitEvent("3-registered", nil).Doc("3-1-2"). Send(pdu, nil).Doc("3-1-3"). Success("") // the bbmd is happy when it gets the pdu tnet.bbmd.GetStartState(). - Receive(bacnetip.NewArgs((bacnetip.PDU)(nil)), bacnetip.NewKWArgs(bacnetip.KWPPDUSource, tnet.fd.address, bacnetip.KWPDUData, pduData)). + Receive(bacgopes.NewArgs((bacgopes.PDU)(nil)), bacgopes.NewKWArgs(bacgopes.KWPPDUSource, tnet.fd.address, bacgopes.KWPDUData, pduData)). Success("") // remote sniffer node @@ -256,10 +255,10 @@ func TestForeign(t *testing.T) { // sniffer traffic remoteSniffer.GetStartState().Doc("3-2-0"). - Receive(bacnetip.NewArgs((*bacnetip.RegisterForeignDevice)(nil)), bacnetip.NoKWArgs).Doc("3-2-1"). - Receive(bacnetip.NewArgs((*bacnetip.Result)(nil)), bacnetip.NoKWArgs).Doc("3-2-2"). + Receive(bacgopes.NewArgs((*bacgopes.RegisterForeignDevice)(nil)), bacgopes.NoKWArgs).Doc("3-2-1"). + Receive(bacgopes.NewArgs((*bacgopes.Result)(nil)), bacgopes.NoKWArgs).Doc("3-2-2"). SetEvent("3-registered").Doc("3-2-3"). - Receive(bacnetip.NewArgs((*bacnetip.OriginalUnicastNPDU)(nil)), bacnetip.NoKWArgs).Doc("3-2-4"). + Receive(bacgopes.NewArgs((*bacgopes.OriginalUnicastNPDU)(nil)), bacgopes.NoKWArgs).Doc("3-2-4"). Success("") // run the group @@ -273,27 +272,27 @@ func TestForeign(t *testing.T) { tnet := NewTFNetwork(t) //make a PDU from node 1 to node 2 - pduData, err := bacnetip.Xtob( + pduData, err := bacgopes.Xtob( //"dead.beef", // TODO: upstream is using invalid data to send around, so we just use a IAm "01.80" + // version, network layer message "13 0008 01", // message type, network, flag ) require.NoError(t, err) - pdu := bacnetip.NewPDU(bacnetip.NewMessageBridge(pduData...), bacnetip.WithPDUSource(tnet.fd.address), bacnetip.WithPDUDestination(bacnetip.NewLocalBroadcast(nil))) + pdu := bacgopes.NewPDU(bacgopes.NewMessageBridge(pduData...), bacgopes.WithPDUSource(tnet.fd.address), bacgopes.WithPDUDestination(bacgopes.NewLocalBroadcast(nil))) t.Logf("pdu: %v", pdu) // register, wait for ack, send some beef tnet.fd.GetStartState().Doc("4-1-0"). - Call(func(args bacnetip.Args, _ bacnetip.KWArgs) error { - return tnet.fd.bip.Register(args[0].(*bacnetip.Address), args[1].(int)) - }, bacnetip.NewArgs(tnet.bbmd.address, 60), bacnetip.NoKWArgs).Doc("4-1-1"). + Call(func(args bacgopes.Args, _ bacgopes.KWArgs) error { + return tnet.fd.bip.Register(args[0].(*bacgopes.Address), args[1].(int)) + }, bacgopes.NewArgs(tnet.bbmd.address, 60), bacgopes.NoKWArgs).Doc("4-1-1"). WaitEvent("4-registered", nil).Doc("4-1-2"). Send(pdu, nil).Doc("4-1-3"). Success("") // the bbmd is happy when it gets the pdu tnet.bbmd.GetStartState(). - Receive(bacnetip.NewArgs((bacnetip.PDU)(nil)), bacnetip.NewKWArgs(bacnetip.KWPPDUSource, tnet.fd.address, bacnetip.KWPDUData, pduData)).Doc("4-2-1"). + Receive(bacgopes.NewArgs((bacgopes.PDU)(nil)), bacgopes.NewKWArgs(bacgopes.KWPPDUSource, tnet.fd.address, bacgopes.KWPDUData, pduData)).Doc("4-2-1"). Success("") // home simple node @@ -302,7 +301,7 @@ func TestForeign(t *testing.T) { // home node happy when getting the pdu, broadcast by the bbmd homeNode.GetStartState().Doc("4-3-0"). - Receive(bacnetip.NewArgs((bacnetip.PDU)(nil)), bacnetip.NewKWArgs(bacnetip.KWPPDUSource, tnet.fd.address, bacnetip.KWPDUData, pduData)).Doc("4-3-1"). + Receive(bacgopes.NewArgs((bacgopes.PDU)(nil)), bacgopes.NewKWArgs(bacgopes.KWPPDUSource, tnet.fd.address, bacgopes.KWPDUData, pduData)).Doc("4-3-1"). Success("") // remote sniffer node @@ -312,10 +311,10 @@ func TestForeign(t *testing.T) { // sniffer traffic remoteSniffer.GetStartState().Doc("4-4-0"). - Receive(bacnetip.NewArgs((*bacnetip.RegisterForeignDevice)(nil)), bacnetip.NoKWArgs).Doc("4-4-1"). - Receive(bacnetip.NewArgs((*bacnetip.Result)(nil)), bacnetip.NoKWArgs).Doc("4-4-2"). + Receive(bacgopes.NewArgs((*bacgopes.RegisterForeignDevice)(nil)), bacgopes.NoKWArgs).Doc("4-4-1"). + Receive(bacgopes.NewArgs((*bacgopes.Result)(nil)), bacgopes.NoKWArgs).Doc("4-4-2"). SetEvent("4-registered"). - Receive(bacnetip.NewArgs((*bacnetip.DistributeBroadcastToNetwork)(nil)), bacnetip.NoKWArgs).Doc("4-4-3"). + Receive(bacgopes.NewArgs((*bacgopes.DistributeBroadcastToNetwork)(nil)), bacgopes.NoKWArgs).Doc("4-4-3"). Success("") // run the group diff --git a/plc4go/internal/bacnetip/tests/test_bvll/test_simple_test.go b/plc4go/internal/bacnetip/bacgopes/tests/test_bvll/test_simple_test.go similarity index 75% rename from plc4go/internal/bacnetip/tests/test_bvll/test_simple_test.go rename to plc4go/internal/bacnetip/bacgopes/tests/test_bvll/test_simple_test.go index 0f1351ef8f0..7d83c2eedc2 100644 --- a/plc4go/internal/bacnetip/tests/test_bvll/test_simple_test.go +++ b/plc4go/internal/bacnetip/bacgopes/tests/test_bvll/test_simple_test.go @@ -27,15 +27,14 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/apache/plc4x/plc4go/internal/bacnetip/bacgopes" + "github.com/apache/plc4x/plc4go/internal/bacnetip/bacgopes/tests" "github.com/apache/plc4x/plc4go/spi/testutils" - - "github.com/apache/plc4x/plc4go/internal/bacnetip" - "github.com/apache/plc4x/plc4go/internal/bacnetip/tests" ) type TNetwork struct { *tests.StateMachineGroup - vlan *bacnetip.IPNetwork + vlan *bacgopes.IPNetwork td *BIPSimpleStateMachine iut *BIPSimpleStateMachine sniffer *SnifferStateMachine @@ -58,7 +57,7 @@ func NewTNetwork(t *testing.T) *TNetwork { localLog.Trace().Msg("time machine reset") // make a little LAN - tn.vlan = bacnetip.NewIPNetwork(localLog) + tn.vlan = bacgopes.NewIPNetwork(localLog) // Test devices var err error @@ -122,26 +121,26 @@ func TestSimple(t *testing.T) { tnet := NewTNetwork(t) //make a PDU from node 1 to node 2 - pduData, err := bacnetip.Xtob( + pduData, err := bacgopes.Xtob( //"dead.beef", // TODO: upstream is using invalid data to send around, so we just use a IAm "01.80" + // version, network layer message "02 0001 02", // message type, network, performance ) require.NoError(t, err) - pdu := bacnetip.NewPDU(bacnetip.NewMessageBridge(pduData...), bacnetip.WithPDUSource(tnet.td.address), bacnetip.WithPDUDestination(tnet.iut.address)) + pdu := bacgopes.NewPDU(bacgopes.NewMessageBridge(pduData...), bacgopes.WithPDUSource(tnet.td.address), bacgopes.WithPDUDestination(tnet.iut.address)) t.Logf("pdu: %v", pdu) // test device sends it, iut gets it tnet.td.GetStartState().Send(pdu, nil).Success("") - tnet.iut.GetStartState().Receive(bacnetip.NewArgs((bacnetip.PDU)(nil)), bacnetip.NewKWArgs( - bacnetip.KWPPDUSource, tnet.td.address, + tnet.iut.GetStartState().Receive(bacgopes.NewArgs((bacgopes.PDU)(nil)), bacgopes.NewKWArgs( + bacgopes.KWPPDUSource, tnet.td.address, )).Success("") // sniffer sees message on the wire - tnet.sniffer.GetStartState().Receive(bacnetip.NewArgs((bacnetip.PDU)(nil)), bacnetip.NewKWArgs( - bacnetip.KWPPDUSource, tnet.td.address.AddrTuple, - bacnetip.KWPDUDestination, tnet.iut.address.AddrTuple, - bacnetip.KWPDUData, pduData, + tnet.sniffer.GetStartState().Receive(bacgopes.NewArgs((bacgopes.PDU)(nil)), bacgopes.NewKWArgs( + bacgopes.KWPPDUSource, tnet.td.address.AddrTuple, + bacgopes.KWPDUDestination, tnet.iut.address.AddrTuple, + bacgopes.KWPDUData, pduData, )).Timeout(1.0*time.Millisecond, nil).Success("") // run the group @@ -152,26 +151,26 @@ func TestSimple(t *testing.T) { tnet := NewTNetwork(t) //make a PDU from node 1 to node 2 - pduData, err := bacnetip.Xtob( + pduData, err := bacgopes.Xtob( //"dead.beef", // TODO: upstream is using invalid data to send around, so we just use a IAm "01.80" + // version, network layer message "02 0001 02", // message type, network, performance ) require.NoError(t, err) - pdu := bacnetip.NewPDU(bacnetip.NewMessageBridge(pduData...), bacnetip.WithPDUSource(tnet.td.address), bacnetip.WithPDUDestination(tnet.iut.address)) + pdu := bacgopes.NewPDU(bacgopes.NewMessageBridge(pduData...), bacgopes.WithPDUSource(tnet.td.address), bacgopes.WithPDUDestination(tnet.iut.address)) t.Logf("pdu: %v", pdu) // test device sends it, iut gets it - tnet.td.GetStartState().Send(bacnetip.NewPDU(pdu, bacnetip.WithPDUSource(tnet.td.address), bacnetip.WithPDUDestination(bacnetip.NewLocalBroadcast(nil))), nil).Success("") - tnet.iut.GetStartState().Receive(bacnetip.NewArgs((bacnetip.PDU)(nil)), bacnetip.NewKWArgs( - bacnetip.KWPPDUSource, tnet.td.address, + tnet.td.GetStartState().Send(bacgopes.NewPDU(pdu, bacgopes.WithPDUSource(tnet.td.address), bacgopes.WithPDUDestination(bacgopes.NewLocalBroadcast(nil))), nil).Success("") + tnet.iut.GetStartState().Receive(bacgopes.NewArgs((bacgopes.PDU)(nil)), bacgopes.NewKWArgs( + bacgopes.KWPPDUSource, tnet.td.address, )).Success("") // sniffer sees message on the wire - tnet.sniffer.GetStartState().Receive(bacnetip.NewArgs((*bacnetip.OriginalBroadcastNPDU)(nil)), bacnetip.NewKWArgs( - bacnetip.KWPPDUSource, tnet.td.address.AddrTuple, - //bacnetip.KWPDUDestination, tnet.iut.address.AddrTuple, - bacnetip.KWPDUData, pduData, + tnet.sniffer.GetStartState().Receive(bacgopes.NewArgs((*bacgopes.OriginalBroadcastNPDU)(nil)), bacgopes.NewKWArgs( + bacgopes.KWPPDUSource, tnet.td.address.AddrTuple, + //bacgopes.KWPDUDestination, tnet.iut.address.AddrTuple, + bacgopes.KWPDUData, pduData, )).Timeout(1.0*time.Second, nil).Success("") // run the group diff --git a/plc4go/internal/bacnetip/tests/test_comm/test_capability_test.go b/plc4go/internal/bacnetip/bacgopes/tests/test_comm/test_capability_test.go similarity index 92% rename from plc4go/internal/bacnetip/tests/test_comm/test_capability_test.go rename to plc4go/internal/bacnetip/bacgopes/tests/test_comm/test_capability_test.go index 19e9cf6446b..55776d84e6b 100644 --- a/plc4go/internal/bacnetip/tests/test_comm/test_capability_test.go +++ b/plc4go/internal/bacnetip/bacgopes/tests/test_comm/test_capability_test.go @@ -25,20 +25,19 @@ import ( "github.com/rs/zerolog" "github.com/stretchr/testify/assert" + "github.com/apache/plc4x/plc4go/internal/bacnetip/bacgopes" "github.com/apache/plc4x/plc4go/spi/testutils" - - "github.com/apache/plc4x/plc4go/internal/bacnetip" ) // TODO: big WIP type BaseCollector struct { - *bacnetip.Collector + *bacgopes.Collector } func NewBaseCollector(localLog zerolog.Logger) *BaseCollector { b := &BaseCollector{} - b.Collector = bacnetip.NewCollector(localLog) + b.Collector = bacgopes.NewCollector(localLog) return b } @@ -48,12 +47,12 @@ func (b BaseCollector) transform(value any) any { } type PlusOne struct { - *bacnetip.Capability + *bacgopes.Capability } func NewPlusOne() *PlusOne { p := &PlusOne{} - p.Capability = bacnetip.NewCapability() + p.Capability = bacgopes.NewCapability() return p } @@ -62,12 +61,12 @@ func (p *PlusOne) transform(value any) any { } type TimesTen struct { - *bacnetip.Capability + *bacgopes.Capability } func NewTimesTen() *TimesTen { t := &TimesTen{} - t.Capability = bacnetip.NewCapability() + t.Capability = bacgopes.NewCapability() return t } @@ -76,7 +75,7 @@ func (p *TimesTen) transform(value any) any { } type MakeList struct { - *bacnetip.Capability + *bacgopes.Capability } //#################################### diff --git a/plc4go/internal/bacnetip/tests/test_comm/test_client_test.go b/plc4go/internal/bacnetip/bacgopes/tests/test_comm/test_client_test.go similarity index 100% rename from plc4go/internal/bacnetip/tests/test_comm/test_client_test.go rename to plc4go/internal/bacnetip/bacgopes/tests/test_comm/test_client_test.go diff --git a/plc4go/internal/bacnetip/tests/test_comm/test_pci_test.go b/plc4go/internal/bacnetip/bacgopes/tests/test_comm/test_pci_test.go similarity index 100% rename from plc4go/internal/bacnetip/tests/test_comm/test_pci_test.go rename to plc4go/internal/bacnetip/bacgopes/tests/test_comm/test_pci_test.go diff --git a/plc4go/internal/bacnetip/tests/test_comm/test_pdu_test.go b/plc4go/internal/bacnetip/bacgopes/tests/test_comm/test_pdu_test.go similarity index 100% rename from plc4go/internal/bacnetip/tests/test_comm/test_pdu_test.go rename to plc4go/internal/bacnetip/bacgopes/tests/test_comm/test_pdu_test.go diff --git a/plc4go/internal/bacnetip/tests/test_comm/test_pdudata_test.go b/plc4go/internal/bacnetip/bacgopes/tests/test_comm/test_pdudata_test.go similarity index 100% rename from plc4go/internal/bacnetip/tests/test_comm/test_pdudata_test.go rename to plc4go/internal/bacnetip/bacgopes/tests/test_comm/test_pdudata_test.go diff --git a/plc4go/internal/bacnetip/tests/test_comm/test_server_test.go b/plc4go/internal/bacnetip/bacgopes/tests/test_comm/test_server_test.go similarity index 100% rename from plc4go/internal/bacnetip/tests/test_comm/test_server_test.go rename to plc4go/internal/bacnetip/bacgopes/tests/test_comm/test_server_test.go diff --git a/plc4go/internal/bacnetip/tests/test_constructed_data/helpers.go b/plc4go/internal/bacnetip/bacgopes/tests/test_constructed_data/helpers.go similarity index 98% rename from plc4go/internal/bacnetip/tests/test_constructed_data/helpers.go rename to plc4go/internal/bacnetip/bacgopes/tests/test_constructed_data/helpers.go index 0cb0a78fc47..8fc8eb05627 100644 --- a/plc4go/internal/bacnetip/tests/test_constructed_data/helpers.go +++ b/plc4go/internal/bacnetip/bacgopes/tests/test_constructed_data/helpers.go @@ -22,7 +22,7 @@ package test_constructed_data import ( "github.com/pkg/errors" - . "github.com/apache/plc4x/plc4go/internal/bacnetip" + . "github.com/apache/plc4x/plc4go/internal/bacnetip/bacgopes" ) type SequenceEqualityRequirements interface { diff --git a/plc4go/internal/bacnetip/tests/test_constructed_data/test_any_atomic_test.go b/plc4go/internal/bacnetip/bacgopes/tests/test_constructed_data/test_any_atomic_test.go similarity index 100% rename from plc4go/internal/bacnetip/tests/test_constructed_data/test_any_atomic_test.go rename to plc4go/internal/bacnetip/bacgopes/tests/test_constructed_data/test_any_atomic_test.go diff --git a/plc4go/internal/bacnetip/tests/test_constructed_data/test_any_test.go b/plc4go/internal/bacnetip/bacgopes/tests/test_constructed_data/test_any_test.go similarity index 100% rename from plc4go/internal/bacnetip/tests/test_constructed_data/test_any_test.go rename to plc4go/internal/bacnetip/bacgopes/tests/test_constructed_data/test_any_test.go diff --git a/plc4go/internal/bacnetip/tests/test_constructed_data/test_array_of_test.go b/plc4go/internal/bacnetip/bacgopes/tests/test_constructed_data/test_array_of_test.go similarity index 100% rename from plc4go/internal/bacnetip/tests/test_constructed_data/test_array_of_test.go rename to plc4go/internal/bacnetip/bacgopes/tests/test_constructed_data/test_array_of_test.go diff --git a/plc4go/internal/bacnetip/tests/test_constructed_data/test_choice_test.go b/plc4go/internal/bacnetip/bacgopes/tests/test_constructed_data/test_choice_test.go similarity index 100% rename from plc4go/internal/bacnetip/tests/test_constructed_data/test_choice_test.go rename to plc4go/internal/bacnetip/bacgopes/tests/test_constructed_data/test_choice_test.go diff --git a/plc4go/internal/bacnetip/tests/test_constructed_data/test_sequence_test.go b/plc4go/internal/bacnetip/bacgopes/tests/test_constructed_data/test_sequence_test.go similarity index 98% rename from plc4go/internal/bacnetip/tests/test_constructed_data/test_sequence_test.go rename to plc4go/internal/bacnetip/bacgopes/tests/test_constructed_data/test_sequence_test.go index 1d506b8ac72..f9f1712de5e 100644 --- a/plc4go/internal/bacnetip/tests/test_constructed_data/test_sequence_test.go +++ b/plc4go/internal/bacnetip/bacgopes/tests/test_constructed_data/test_sequence_test.go @@ -24,7 +24,7 @@ import ( "github.com/stretchr/testify/require" - . "github.com/apache/plc4x/plc4go/internal/bacnetip" + . "github.com/apache/plc4x/plc4go/internal/bacnetip/bacgopes" ) func TestEmptySequence(t *testing.T) { diff --git a/plc4go/internal/bacnetip/tests/test_constructed_data/tests_sequence_of_test.go b/plc4go/internal/bacnetip/bacgopes/tests/test_constructed_data/tests_sequence_of_test.go similarity index 100% rename from plc4go/internal/bacnetip/tests/test_constructed_data/tests_sequence_of_test.go rename to plc4go/internal/bacnetip/bacgopes/tests/test_constructed_data/tests_sequence_of_test.go diff --git a/plc4go/internal/bacnetip/tests/test_iocb/test_clientcontroller_test.go b/plc4go/internal/bacnetip/bacgopes/tests/test_iocb/test_clientcontroller_test.go similarity index 100% rename from plc4go/internal/bacnetip/tests/test_iocb/test_clientcontroller_test.go rename to plc4go/internal/bacnetip/bacgopes/tests/test_iocb/test_clientcontroller_test.go diff --git a/plc4go/internal/bacnetip/tests/test_iocb/test_iocb_test.go b/plc4go/internal/bacnetip/bacgopes/tests/test_iocb/test_iocb_test.go similarity index 100% rename from plc4go/internal/bacnetip/tests/test_iocb/test_iocb_test.go rename to plc4go/internal/bacnetip/bacgopes/tests/test_iocb/test_iocb_test.go diff --git a/plc4go/internal/bacnetip/tests/test_iocb/test_iochain_test.go b/plc4go/internal/bacnetip/bacgopes/tests/test_iocb/test_iochain_test.go similarity index 100% rename from plc4go/internal/bacnetip/tests/test_iocb/test_iochain_test.go rename to plc4go/internal/bacnetip/bacgopes/tests/test_iocb/test_iochain_test.go diff --git a/plc4go/internal/bacnetip/tests/test_iocb/test_iocontroller_test.go b/plc4go/internal/bacnetip/bacgopes/tests/test_iocb/test_iocontroller_test.go similarity index 100% rename from plc4go/internal/bacnetip/tests/test_iocb/test_iocontroller_test.go rename to plc4go/internal/bacnetip/bacgopes/tests/test_iocb/test_iocontroller_test.go diff --git a/plc4go/internal/bacnetip/tests/test_iocb/test_iogroup_test.go b/plc4go/internal/bacnetip/bacgopes/tests/test_iocb/test_iogroup_test.go similarity index 100% rename from plc4go/internal/bacnetip/tests/test_iocb/test_iogroup_test.go rename to plc4go/internal/bacnetip/bacgopes/tests/test_iocb/test_iogroup_test.go diff --git a/plc4go/internal/bacnetip/tests/test_iocb/test_ioqcontroller_test.go b/plc4go/internal/bacnetip/bacgopes/tests/test_iocb/test_ioqcontroller_test.go similarity index 100% rename from plc4go/internal/bacnetip/tests/test_iocb/test_ioqcontroller_test.go rename to plc4go/internal/bacnetip/bacgopes/tests/test_iocb/test_ioqcontroller_test.go diff --git a/plc4go/internal/bacnetip/tests/test_iocb/test_ioqueue_test.go b/plc4go/internal/bacnetip/bacgopes/tests/test_iocb/test_ioqueue_test.go similarity index 100% rename from plc4go/internal/bacnetip/tests/test_iocb/test_ioqueue_test.go rename to plc4go/internal/bacnetip/bacgopes/tests/test_iocb/test_ioqueue_test.go diff --git a/plc4go/internal/bacnetip/tests/test_iocb/test_sieveclientcontroller_test.go b/plc4go/internal/bacnetip/bacgopes/tests/test_iocb/test_sieveclientcontroller_test.go similarity index 100% rename from plc4go/internal/bacnetip/tests/test_iocb/test_sieveclientcontroller_test.go rename to plc4go/internal/bacnetip/bacgopes/tests/test_iocb/test_sieveclientcontroller_test.go diff --git a/plc4go/internal/bacnetip/tests/test_local/test_local_schedule_1_test.go b/plc4go/internal/bacnetip/bacgopes/tests/test_local/test_local_schedule_1_test.go similarity index 100% rename from plc4go/internal/bacnetip/tests/test_local/test_local_schedule_1_test.go rename to plc4go/internal/bacnetip/bacgopes/tests/test_local/test_local_schedule_1_test.go diff --git a/plc4go/internal/bacnetip/tests/test_local/test_local_schedule_2_test.go b/plc4go/internal/bacnetip/bacgopes/tests/test_local/test_local_schedule_2_test.go similarity index 100% rename from plc4go/internal/bacnetip/tests/test_local/test_local_schedule_2_test.go rename to plc4go/internal/bacnetip/bacgopes/tests/test_local/test_local_schedule_2_test.go diff --git a/plc4go/internal/bacnetip/tests/test_network/helpers.go b/plc4go/internal/bacnetip/bacgopes/tests/test_network/helpers.go similarity index 74% rename from plc4go/internal/bacnetip/tests/test_network/helpers.go rename to plc4go/internal/bacnetip/bacgopes/tests/test_network/helpers.go index 4a99e9b4291..f998862a749 100644 --- a/plc4go/internal/bacnetip/tests/test_network/helpers.go +++ b/plc4go/internal/bacnetip/bacgopes/tests/test_network/helpers.go @@ -25,13 +25,13 @@ import ( "github.com/pkg/errors" "github.com/rs/zerolog" - "github.com/apache/plc4x/plc4go/internal/bacnetip" - . "github.com/apache/plc4x/plc4go/internal/bacnetip/constructors" - "github.com/apache/plc4x/plc4go/internal/bacnetip/tests" + "github.com/apache/plc4x/plc4go/internal/bacnetip/bacgopes" + . "github.com/apache/plc4x/plc4go/internal/bacnetip/bacgopes/constructors" + "github.com/apache/plc4x/plc4go/internal/bacnetip/bacgopes/tests" ) type _NetworkServiceElement struct { - *bacnetip.NetworkServiceElement + *bacgopes.NetworkServiceElement } func new_NetworkServiceElement(localLog zerolog.Logger) (*_NetworkServiceElement, error) { @@ -40,7 +40,7 @@ func new_NetworkServiceElement(localLog zerolog.Logger) (*_NetworkServiceElement // This class turns off the deferred startup function call that broadcasts // I-Am-Router-To-Network and Network-Number-Is messages. var err error - i.NetworkServiceElement, err = bacnetip.NewNetworkServiceElement(localLog, bacnetip.WithNetworkServiceElementStartupDisabled(true)) + i.NetworkServiceElement, err = bacgopes.NewNetworkServiceElement(localLog, bacgopes.WithNetworkServiceElementStartupDisabled(true)) if err != nil { return nil, errors.Wrap(err, "error creating network service element") } @@ -48,8 +48,8 @@ func new_NetworkServiceElement(localLog zerolog.Logger) (*_NetworkServiceElement } type NPDUCodec struct { - bacnetip.Client - bacnetip.Server + bacgopes.Client + bacgopes.Server log zerolog.Logger } @@ -59,24 +59,24 @@ func NewNPDUCodec(localLog zerolog.Logger) (*NPDUCodec, error) { log: localLog, } var err error - n.Client, err = bacnetip.NewClient(localLog, n) + n.Client, err = bacgopes.NewClient(localLog, n) if err != nil { return nil, errors.Wrap(err, "error creating client") } - n.Server, err = bacnetip.NewServer(localLog, n) + n.Server, err = bacgopes.NewServer(localLog, n) if err != nil { return nil, errors.Wrap(err, "error creating client") } return n, nil } -func (n *NPDUCodec) Indication(args bacnetip.Args, kwargs bacnetip.KWArgs) error { +func (n *NPDUCodec) Indication(args bacgopes.Args, kwargs bacgopes.KWArgs) error { n.log.Debug().Stringer("Args", args).Stringer("KWArgs", kwargs).Msg("Indication") npdu := args.Get0NPDU() // first a generic _NPDU - xpdu, err := bacnetip.NewNPDU(nil, nil) + xpdu, err := bacgopes.NewNPDU(nil, nil) if err != nil { return errors.Wrap(err, "error creating NPDU") } @@ -85,23 +85,23 @@ func (n *NPDUCodec) Indication(args bacnetip.Args, kwargs bacnetip.KWArgs) error } // Now as a vanilla PDU - ypdu := bacnetip.NewPDU(bacnetip.NewMessageBridge()) + ypdu := bacgopes.NewPDU(bacgopes.NewMessageBridge()) if err := xpdu.Encode(ypdu); err != nil { return errors.Wrap(err, "error decoding xpdu") } n.log.Debug().Stringer("ypdu", ypdu).Msg("encoded") // send it downstream - return n.Request(bacnetip.NewArgs(ypdu), bacnetip.NoKWArgs) + return n.Request(bacgopes.NewArgs(ypdu), bacgopes.NoKWArgs) } -func (n *NPDUCodec) Confirmation(args bacnetip.Args, kwargs bacnetip.KWArgs) error { +func (n *NPDUCodec) Confirmation(args bacgopes.Args, kwargs bacgopes.KWArgs) error { n.log.Debug().Stringer("Args", args).Stringer("KWArgs", kwargs).Msg("Indication") pdu := args.Get0PDU() // decode as generic _NPDU - xpdu, err := bacnetip.NewNPDU(nil, nil) + xpdu, err := bacgopes.NewNPDU(nil, nil) if err != nil { return errors.Wrap(err, "error creating NPDU") } @@ -116,12 +116,12 @@ func (n *NPDUCodec) Confirmation(args bacnetip.Args, kwargs bacnetip.KWArgs) err } // do a deeper decode of the _NPDU - ypdu := bacnetip.NPDUTypes[*xpdu.GetNPDUNetMessage()]() + ypdu := bacgopes.NPDUTypes[*xpdu.GetNPDUNetMessage()]() if err := ypdu.Decode(xpdu); err != nil { return errors.Wrap(err, "error decoding ypdu") } - return n.Response(bacnetip.NewArgs(ypdu), bacnetip.NoKWArgs) + return n.Response(bacgopes.NewArgs(ypdu), bacgopes.NoKWArgs) } func (n *NPDUCodec) String() string { @@ -131,13 +131,13 @@ func (n *NPDUCodec) String() string { type SnifferStateMachine struct { *tests.ClientStateMachine - address *bacnetip.Address - node *bacnetip.Node + address *bacgopes.Address + node *bacgopes.Node log zerolog.Logger } -func NewSnifferStateMachine(localLog zerolog.Logger, address string, vlan *bacnetip.Network) (*SnifferStateMachine, error) { +func NewSnifferStateMachine(localLog zerolog.Logger, address string, vlan *bacgopes.Network) (*SnifferStateMachine, error) { s := &SnifferStateMachine{ log: localLog, } @@ -148,20 +148,20 @@ func NewSnifferStateMachine(localLog zerolog.Logger, address string, vlan *bacne } // save the name and address - s.address, err = bacnetip.NewAddress(localLog, address) + s.address, err = bacgopes.NewAddress(localLog, address) if err != nil { return nil, errors.Wrap(err, "error creating address") } // create a promiscuous node, added to the network - s.node, err = bacnetip.NewNode(s.log, s.address, bacnetip.WithNodePromiscuous(true), bacnetip.WithNodeLan(vlan)) + s.node, err = bacgopes.NewNode(s.log, s.address, bacgopes.WithNodePromiscuous(true), bacgopes.WithNodeLan(vlan)) if err != nil { return nil, errors.Wrap(err, "error creating node") } s.log.Debug().Stringer("node", s.node).Msg("node") // bind the stack together - if err := bacnetip.Bind(localLog, s, s.node); err != nil { + if err := bacgopes.Bind(localLog, s, s.node); err != nil { return nil, errors.Wrap(err, "error binding") } @@ -171,14 +171,14 @@ func NewSnifferStateMachine(localLog zerolog.Logger, address string, vlan *bacne type NetworkLayerStateMachine struct { *tests.ClientStateMachine - address *bacnetip.Address + address *bacgopes.Address log zerolog.Logger codec *NPDUCodec - node *bacnetip.Node + node *bacgopes.Node } -func NewNetworkLayerStateMachine(localLog zerolog.Logger, address string, vlan *bacnetip.Network) (*NetworkLayerStateMachine, error) { +func NewNetworkLayerStateMachine(localLog zerolog.Logger, address string, vlan *bacgopes.Network) (*NetworkLayerStateMachine, error) { n := &NetworkLayerStateMachine{ log: localLog, } @@ -199,21 +199,21 @@ func NewNetworkLayerStateMachine(localLog zerolog.Logger, address string, vlan * n.log.Debug().Stringer("codec", n.codec).Msg("codec") // create a node, added to the network - n.node, err = bacnetip.NewNode(localLog, n.address, bacnetip.WithNodeLan(vlan)) + n.node, err = bacgopes.NewNode(localLog, n.address, bacgopes.WithNodeLan(vlan)) if err != nil { return nil, errors.Wrap(err, "error creating node") } n.log.Debug().Stringer("node", n.node).Msg("node") // bind this to the node - if err := bacnetip.Bind(localLog, n, n.codec, n.node); err != nil { + if err := bacgopes.Bind(localLog, n, n.codec, n.node); err != nil { return nil, errors.Wrap(err, "error binding") } return n, nil } type RouterNode struct { - nsap *bacnetip.NetworkServiceAccessPoint + nsap *bacgopes.NetworkServiceAccessPoint nse *_NetworkServiceElement log zerolog.Logger @@ -223,7 +223,7 @@ func NewRouterNode(localLog zerolog.Logger) (*RouterNode, error) { r := &RouterNode{log: localLog} var err error // a network service access point will be needed - r.nsap, err = bacnetip.NewNetworkServiceAccessPoint(localLog) + r.nsap, err = bacgopes.NewNetworkServiceAccessPoint(localLog) if err != nil { return nil, errors.Wrap(err, "error creating network service access point") } @@ -232,21 +232,21 @@ func NewRouterNode(localLog zerolog.Logger) (*RouterNode, error) { if err != nil { return nil, errors.Wrap(err, "error creating network service element") } - err = bacnetip.Bind(localLog, r.nse, r.nsap) + err = bacgopes.Bind(localLog, r.nse, r.nsap) if err != nil { return nil, errors.Wrap(err, "error binding") } return r, nil } -func (r *RouterNode) AddNetwork(address string, vlan *bacnetip.Network, net uint16) error { +func (r *RouterNode) AddNetwork(address string, vlan *bacgopes.Network, net uint16) error { r.log.Debug().Str("address", address).Stringer("vlan", vlan).Uint16("net", net).Msg("AddNetwork") // convert the address to an Address addr := Address(address) // create a node, add to the network - node, err := bacnetip.NewNode(r.log, addr, bacnetip.WithNodeLan(vlan)) + node, err := bacgopes.NewNode(r.log, addr, bacgopes.WithNodeLan(vlan)) if err != nil { return errors.Wrap(err, "error creating node") } @@ -277,7 +277,7 @@ func NewRouterStateMachine(localLog zerolog.Logger) (*RouterStateMachine, error) return r, nil } -func (r *RouterStateMachine) Send(args bacnetip.Args, kwargs bacnetip.KWArgs) error { +func (r *RouterStateMachine) Send(args bacgopes.Args, kwargs bacgopes.KWArgs) error { panic("not available") } @@ -286,26 +286,26 @@ func (r *RouterStateMachine) String() string { } type TestDeviceObject struct { - *bacnetip.LocalDeviceObject + *bacgopes.LocalDeviceObject } type ApplicationLayerStateMachine struct { - bacnetip.ApplicationServiceElementContract + bacgopes.ApplicationServiceElementContract *tests.ClientStateMachine name string - address *bacnetip.Address + address *bacgopes.Address - asap *bacnetip.ApplicationServiceAccessPoint - smap *bacnetip.StateMachineAccessPoint - nsap *bacnetip.NetworkServiceAccessPoint + asap *bacgopes.ApplicationServiceAccessPoint + smap *bacgopes.StateMachineAccessPoint + nsap *bacgopes.NetworkServiceAccessPoint nse *_NetworkServiceElement - node *bacnetip.Node + node *bacgopes.Node log zerolog.Logger } -func NewApplicationLayerStateMachine(localLog zerolog.Logger, address string, vlan *bacnetip.Network) (*ApplicationLayerStateMachine, error) { +func NewApplicationLayerStateMachine(localLog zerolog.Logger, address string, vlan *bacgopes.Network) (*ApplicationLayerStateMachine, error) { a := &ApplicationLayerStateMachine{ log: localLog, } @@ -316,7 +316,7 @@ func NewApplicationLayerStateMachine(localLog zerolog.Logger, address string, vl // build a local device object localDevice := TestDeviceObject{ - &bacnetip.LocalDeviceObject{ + &bacgopes.LocalDeviceObject{ ObjectName: a.name, ObjectIdentifier: "device:" + address, VendorIdentifier: 999, @@ -327,7 +327,7 @@ func NewApplicationLayerStateMachine(localLog zerolog.Logger, address string, vl var err error // continue with initialization - a.ApplicationServiceElementContract, err = bacnetip.NewApplicationServiceElement(a.log) + a.ApplicationServiceElementContract, err = bacgopes.NewApplicationServiceElement(a.log) if err != nil { return nil, errors.Wrap(err, "error creating application service") } @@ -337,7 +337,7 @@ func NewApplicationLayerStateMachine(localLog zerolog.Logger, address string, vl } // include a application decoder - a.asap, err = bacnetip.NewApplicationServiceAccessPoint(a.log) + a.asap, err = bacgopes.NewApplicationServiceAccessPoint(a.log) if err != nil { return nil, errors.Wrap(err, "error creating application service access point") } @@ -346,13 +346,13 @@ func NewApplicationLayerStateMachine(localLog zerolog.Logger, address string, vl // can know if it should support segmentation // the segmentation state machines need access to some device // information cache, usually shared with the application - a.smap, err = bacnetip.NewStateMachineAccessPoint(a.log, localDevice.LocalDeviceObject, bacnetip.WithStateMachineAccessPointDeviceInfoCache(bacnetip.NewDeviceInfoCache(a.log))) // TODO: this is not quite right as we unwrap here + a.smap, err = bacgopes.NewStateMachineAccessPoint(a.log, localDevice.LocalDeviceObject, bacgopes.WithStateMachineAccessPointDeviceInfoCache(bacgopes.NewDeviceInfoCache(a.log))) // TODO: this is not quite right as we unwrap here if err != nil { return nil, errors.Wrap(err, "error creating state machine access point") } // a network service access point will be needed - a.nsap, err = bacnetip.NewNetworkServiceAccessPoint(a.log) + a.nsap, err = bacgopes.NewNetworkServiceAccessPoint(a.log) if err != nil { return nil, errors.Wrap(err, "error creating network service access point") } @@ -362,19 +362,19 @@ func NewApplicationLayerStateMachine(localLog zerolog.Logger, address string, vl if err != nil { return nil, errors.Wrap(err, "error creating network service element") } - err = bacnetip.Bind(a.log, a.nse, a.nsap) + err = bacgopes.Bind(a.log, a.nse, a.nsap) if err != nil { return nil, errors.Wrap(err, "error binding") } // bind the top layers - err = bacnetip.Bind(a.log, a, a.asap, a.smap, a.nsap) + err = bacgopes.Bind(a.log, a, a.asap, a.smap, a.nsap) if err != nil { return nil, errors.Wrap(err, "error binding") } // create a node, added to the network - a.node, err = bacnetip.NewNode(a.log, a.address, bacnetip.WithNodeLan(vlan)) + a.node, err = bacgopes.NewNode(a.log, a.address, bacgopes.WithNodeLan(vlan)) if err != nil { return nil, errors.Wrap(err, "error creating node") } @@ -389,33 +389,33 @@ func NewApplicationLayerStateMachine(localLog zerolog.Logger, address string, vl return a, nil } -func (a *ApplicationLayerStateMachine) Indication(args bacnetip.Args, kwargs bacnetip.KWArgs) error { +func (a *ApplicationLayerStateMachine) Indication(args bacgopes.Args, kwargs bacgopes.KWArgs) error { a.log.Debug().Stringer("Args", args).Stringer("KWArgs", kwargs).Msg("Indication") - return a.Receive(args, bacnetip.NoKWArgs) + return a.Receive(args, bacgopes.NoKWArgs) } -func (a *ApplicationLayerStateMachine) Confirmation(args bacnetip.Args, kwargs bacnetip.KWArgs) error { +func (a *ApplicationLayerStateMachine) Confirmation(args bacgopes.Args, kwargs bacgopes.KWArgs) error { a.log.Debug().Stringer("Args", args).Stringer("KWArgs", kwargs).Msg("Confirmation") - return a.Receive(args, bacnetip.NoKWArgs) + return a.Receive(args, bacgopes.NoKWArgs) } type ApplicationNode struct { - *bacnetip.Application - *bacnetip.WhoIsIAmServices - *bacnetip.ReadWritePropertyServices + *bacgopes.Application + *bacgopes.WhoIsIAmServices + *bacgopes.ReadWritePropertyServices name string - address *bacnetip.Address - asap *bacnetip.ApplicationServiceAccessPoint - smap *bacnetip.StateMachineAccessPoint - nsap *bacnetip.NetworkServiceAccessPoint + address *bacgopes.Address + asap *bacgopes.ApplicationServiceAccessPoint + smap *bacgopes.StateMachineAccessPoint + nsap *bacgopes.NetworkServiceAccessPoint nse *_NetworkServiceElement - node *bacnetip.Node + node *bacgopes.Node log zerolog.Logger } -func NewApplicationNode(localLog zerolog.Logger, address string, vlan *bacnetip.Network) (*ApplicationNode, error) { +func NewApplicationNode(localLog zerolog.Logger, address string, vlan *bacgopes.Network) (*ApplicationNode, error) { a := &ApplicationNode{ log: localLog, } @@ -426,7 +426,7 @@ func NewApplicationNode(localLog zerolog.Logger, address string, vlan *bacnetip. // build a local device object localDevice := &TestDeviceObject{ - LocalDeviceObject: &bacnetip.LocalDeviceObject{ + LocalDeviceObject: &bacgopes.LocalDeviceObject{ ObjectName: a.name, ObjectIdentifier: "device:999", VendorIdentifier: 999, @@ -435,13 +435,13 @@ func NewApplicationNode(localLog zerolog.Logger, address string, vlan *bacnetip. var err error // continue with initialization - a.Application, err = bacnetip.NewApplication(localLog, localDevice.LocalDeviceObject) //TODO: this is a indirection that wasn't intended... we don't use the annotation yet so that might be fine + a.Application, err = bacgopes.NewApplication(localLog, localDevice.LocalDeviceObject) //TODO: this is a indirection that wasn't intended... we don't use the annotation yet so that might be fine if err != nil { return nil, errors.Wrap(err, "error building application") } // include a application decoder - a.asap, err = bacnetip.NewApplicationServiceAccessPoint(localLog) + a.asap, err = bacgopes.NewApplicationServiceAccessPoint(localLog) if err != nil { return nil, errors.Wrap(err, "error building application service access point") } @@ -450,13 +450,13 @@ func NewApplicationNode(localLog zerolog.Logger, address string, vlan *bacnetip. // can know if it should support segmentation // the segmentation state machines need access to the same device // information cache as the application - a.smap, err = bacnetip.NewStateMachineAccessPoint(localLog, localDevice.LocalDeviceObject, bacnetip.WithStateMachineAccessPointDeviceInfoCache(a.GetDeviceInfoCache())) //TODO: this is a indirection that wasn't intended... we don't use the annotation yet so that might be fine + a.smap, err = bacgopes.NewStateMachineAccessPoint(localLog, localDevice.LocalDeviceObject, bacgopes.WithStateMachineAccessPointDeviceInfoCache(a.GetDeviceInfoCache())) //TODO: this is a indirection that wasn't intended... we don't use the annotation yet so that might be fine if err != nil { return nil, errors.Wrap(err, "error building state machine access point") } // a network service access point will be needed - a.nsap, err = bacnetip.NewNetworkServiceAccessPoint(localLog) + a.nsap, err = bacgopes.NewNetworkServiceAccessPoint(localLog) if err != nil { return nil, errors.Wrap(err, "error creating network service access point") } @@ -466,19 +466,19 @@ func NewApplicationNode(localLog zerolog.Logger, address string, vlan *bacnetip. if err != nil { return nil, errors.Wrap(err, "error creating network service element") } - err = bacnetip.Bind(localLog, a.nse, a.nsap) + err = bacgopes.Bind(localLog, a.nse, a.nsap) if err != nil { return nil, errors.Wrap(err, "error binding") } // bind the top layers - err = bacnetip.Bind(localLog, a, a.asap, a.smap, a.nsap) + err = bacgopes.Bind(localLog, a, a.asap, a.smap, a.nsap) if err != nil { return nil, errors.Wrap(err, "error binding") } // create a node, added to the network - a.node, err = bacnetip.NewNode(a.log, a.address, bacnetip.WithNodeLan(vlan)) + a.node, err = bacgopes.NewNode(a.log, a.address, bacgopes.WithNodeLan(vlan)) if err != nil { return nil, errors.Wrap(err, "error creating node") } @@ -493,7 +493,7 @@ func NewApplicationNode(localLog zerolog.Logger, address string, vlan *bacnetip. } func xtob(s string) []byte { - bytes, err := bacnetip.Xtob(s) + bytes, err := bacgopes.Xtob(s) if err != nil { panic(err) } diff --git a/plc4go/internal/bacnetip/tests/test_network/test_net_1_test.go b/plc4go/internal/bacnetip/bacgopes/tests/test_network/test_net_1_test.go similarity index 98% rename from plc4go/internal/bacnetip/tests/test_network/test_net_1_test.go rename to plc4go/internal/bacnetip/bacgopes/tests/test_network/test_net_1_test.go index 69cc6c15330..eb22f981a77 100644 --- a/plc4go/internal/bacnetip/tests/test_network/test_net_1_test.go +++ b/plc4go/internal/bacnetip/bacgopes/tests/test_network/test_net_1_test.go @@ -27,10 +27,9 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + . "github.com/apache/plc4x/plc4go/internal/bacnetip/bacgopes" + "github.com/apache/plc4x/plc4go/internal/bacnetip/bacgopes/tests" "github.com/apache/plc4x/plc4go/spi/testutils" - - . "github.com/apache/plc4x/plc4go/internal/bacnetip" - "github.com/apache/plc4x/plc4go/internal/bacnetip/tests" ) type TNetwork1 struct { diff --git a/plc4go/internal/bacnetip/tests/test_network/test_net_2_test.go b/plc4go/internal/bacnetip/bacgopes/tests/test_network/test_net_2_test.go similarity index 98% rename from plc4go/internal/bacnetip/tests/test_network/test_net_2_test.go rename to plc4go/internal/bacnetip/bacgopes/tests/test_network/test_net_2_test.go index 81fc4e860ac..d2ea531d138 100644 --- a/plc4go/internal/bacnetip/tests/test_network/test_net_2_test.go +++ b/plc4go/internal/bacnetip/bacgopes/tests/test_network/test_net_2_test.go @@ -27,10 +27,9 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + . "github.com/apache/plc4x/plc4go/internal/bacnetip/bacgopes" + "github.com/apache/plc4x/plc4go/internal/bacnetip/bacgopes/tests" "github.com/apache/plc4x/plc4go/spi/testutils" - - . "github.com/apache/plc4x/plc4go/internal/bacnetip" - "github.com/apache/plc4x/plc4go/internal/bacnetip/tests" ) type TNetwork2 struct { diff --git a/plc4go/internal/bacnetip/tests/test_network/test_net_3_test.go b/plc4go/internal/bacnetip/bacgopes/tests/test_network/test_net_3_test.go similarity index 98% rename from plc4go/internal/bacnetip/tests/test_network/test_net_3_test.go rename to plc4go/internal/bacnetip/bacgopes/tests/test_network/test_net_3_test.go index 0561060eaca..a62efd5a1b7 100644 --- a/plc4go/internal/bacnetip/tests/test_network/test_net_3_test.go +++ b/plc4go/internal/bacnetip/bacgopes/tests/test_network/test_net_3_test.go @@ -27,10 +27,9 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + . "github.com/apache/plc4x/plc4go/internal/bacnetip/bacgopes" + "github.com/apache/plc4x/plc4go/internal/bacnetip/bacgopes/tests" "github.com/apache/plc4x/plc4go/spi/testutils" - - . "github.com/apache/plc4x/plc4go/internal/bacnetip" - "github.com/apache/plc4x/plc4go/internal/bacnetip/tests" ) type TNetwork3 struct { diff --git a/plc4go/internal/bacnetip/tests/test_network/test_net_4_test.go b/plc4go/internal/bacnetip/bacgopes/tests/test_network/test_net_4_test.go similarity index 100% rename from plc4go/internal/bacnetip/tests/test_network/test_net_4_test.go rename to plc4go/internal/bacnetip/bacgopes/tests/test_network/test_net_4_test.go diff --git a/plc4go/internal/bacnetip/tests/test_network/test_net_5_test.go b/plc4go/internal/bacnetip/bacgopes/tests/test_network/test_net_5_test.go similarity index 100% rename from plc4go/internal/bacnetip/tests/test_network/test_net_5_test.go rename to plc4go/internal/bacnetip/bacgopes/tests/test_network/test_net_5_test.go diff --git a/plc4go/internal/bacnetip/tests/test_network/test_net_6_test.go b/plc4go/internal/bacnetip/bacgopes/tests/test_network/test_net_6_test.go similarity index 100% rename from plc4go/internal/bacnetip/tests/test_network/test_net_6_test.go rename to plc4go/internal/bacnetip/bacgopes/tests/test_network/test_net_6_test.go diff --git a/plc4go/internal/bacnetip/tests/test_network/test_net_7_test.go b/plc4go/internal/bacnetip/bacgopes/tests/test_network/test_net_7_test.go similarity index 100% rename from plc4go/internal/bacnetip/tests/test_network/test_net_7_test.go rename to plc4go/internal/bacnetip/bacgopes/tests/test_network/test_net_7_test.go diff --git a/plc4go/internal/bacnetip/tests/test_npdu/helpers.go b/plc4go/internal/bacnetip/bacgopes/tests/test_npdu/helpers.go similarity index 78% rename from plc4go/internal/bacnetip/tests/test_npdu/helpers.go rename to plc4go/internal/bacnetip/bacgopes/tests/test_npdu/helpers.go index ca175adeb5e..c36c2321422 100644 --- a/plc4go/internal/bacnetip/tests/test_npdu/helpers.go +++ b/plc4go/internal/bacnetip/bacgopes/tests/test_npdu/helpers.go @@ -23,12 +23,12 @@ import ( "github.com/pkg/errors" "github.com/rs/zerolog" - "github.com/apache/plc4x/plc4go/internal/bacnetip" + "github.com/apache/plc4x/plc4go/internal/bacnetip/bacgopes" ) type NPDUCodec struct { - bacnetip.Client - bacnetip.Server + bacgopes.Client + bacgopes.Server log zerolog.Logger } @@ -38,24 +38,24 @@ func NewNPDUCodec(localLog zerolog.Logger) (*NPDUCodec, error) { log: localLog, } var err error - n.Client, err = bacnetip.NewClient(localLog, n) + n.Client, err = bacgopes.NewClient(localLog, n) if err != nil { return nil, errors.Wrap(err, "error creating client") } - n.Server, err = bacnetip.NewServer(localLog, n) + n.Server, err = bacgopes.NewServer(localLog, n) if err != nil { return nil, errors.Wrap(err, "error creating client") } return n, nil } -func (n *NPDUCodec) Indication(args bacnetip.Args, kwargs bacnetip.KWArgs) error { +func (n *NPDUCodec) Indication(args bacgopes.Args, kwargs bacgopes.KWArgs) error { n.log.Debug().Stringer("Args", args).Stringer("KWArgs", kwargs).Msg("Indication") npdu := args.Get0NPDU() // first a generic _NPDU - xpdu, err := bacnetip.NewNPDU(nil, nil) + xpdu, err := bacgopes.NewNPDU(nil, nil) if err != nil { return errors.Wrap(err, "error creating NPDU") } @@ -64,23 +64,23 @@ func (n *NPDUCodec) Indication(args bacnetip.Args, kwargs bacnetip.KWArgs) error } // Now as a vanilla PDU - ypdu := bacnetip.NewPDU(nil) + ypdu := bacgopes.NewPDU(nil) if err := xpdu.Encode(ypdu); err != nil { return errors.Wrap(err, "error decoding xpdu") } n.log.Debug().Stringer("ypdu", ypdu).Msg("encoded") // send it downstream - return n.Request(bacnetip.NewArgs(ypdu), bacnetip.NoKWArgs) + return n.Request(bacgopes.NewArgs(ypdu), bacgopes.NoKWArgs) } -func (n *NPDUCodec) Confirmation(args bacnetip.Args, kwargs bacnetip.KWArgs) error { +func (n *NPDUCodec) Confirmation(args bacgopes.Args, kwargs bacgopes.KWArgs) error { n.log.Debug().Stringer("Args", args).Stringer("KWArgs", kwargs).Msg("Indication") pdu := args.Get0PDU() // decode as generic _NPDU - xpdu, err := bacnetip.NewNPDU(nil, nil) + xpdu, err := bacgopes.NewNPDU(nil, nil) if err != nil { return errors.Wrap(err, "error creating NPDU") } @@ -95,12 +95,12 @@ func (n *NPDUCodec) Confirmation(args bacnetip.Args, kwargs bacnetip.KWArgs) err } // do a deeper decode of the _NPDU - ypdu := bacnetip.NPDUTypes[*xpdu.GetNPDUNetMessage()]() + ypdu := bacgopes.NPDUTypes[*xpdu.GetNPDUNetMessage()]() if err := ypdu.Decode(xpdu); err != nil { return errors.Wrap(err, "error decoding ypdu") } - return n.Response(bacnetip.NewArgs(ypdu), bacnetip.NoKWArgs) + return n.Response(bacgopes.NewArgs(ypdu), bacgopes.NoKWArgs) } func (n *NPDUCodec) String() string { diff --git a/plc4go/internal/bacnetip/tests/test_npdu/test_codec_test.go b/plc4go/internal/bacnetip/bacgopes/tests/test_npdu/test_codec_test.go similarity index 60% rename from plc4go/internal/bacnetip/tests/test_npdu/test_codec_test.go rename to plc4go/internal/bacnetip/bacgopes/tests/test_npdu/test_codec_test.go index d4b4307817e..d180fbec7a3 100644 --- a/plc4go/internal/bacnetip/tests/test_npdu/test_codec_test.go +++ b/plc4go/internal/bacnetip/bacgopes/tests/test_npdu/test_codec_test.go @@ -25,12 +25,11 @@ import ( "github.com/rs/zerolog" "github.com/stretchr/testify/suite" + "github.com/apache/plc4x/plc4go/internal/bacnetip/bacgopes" + . "github.com/apache/plc4x/plc4go/internal/bacnetip/bacgopes/constructors" + "github.com/apache/plc4x/plc4go/internal/bacnetip/bacgopes/tests" readWriteModel "github.com/apache/plc4x/plc4go/protocols/bacnetip/readwrite/model" "github.com/apache/plc4x/plc4go/spi/testutils" - - "github.com/apache/plc4x/plc4go/internal/bacnetip" - . "github.com/apache/plc4x/plc4go/internal/bacnetip/constructors" - "github.com/apache/plc4x/plc4go/internal/bacnetip/tests" ) type TestNPDUCodecSuite struct { @@ -52,19 +51,19 @@ func (suite *TestNPDUCodecSuite) SetupTest() { suite.Require().NoError(err) suite.server, err = tests.NewTrappedServer(suite.log) suite.Require().NoError(err) - err = bacnetip.Bind(suite.log, suite.client, suite.codec, suite.server) + err = bacgopes.Bind(suite.log, suite.client, suite.codec, suite.server) suite.Require().NoError(err) } // Pass the PDU to the client to send down the stack. -func (suite *TestNPDUCodecSuite) Request(args bacnetip.Args, kwargs bacnetip.KWArgs) error { +func (suite *TestNPDUCodecSuite) Request(args bacgopes.Args, kwargs bacgopes.KWArgs) error { suite.log.Debug().Stringer("Args", args).Stringer("KWArgs", kwargs).Msg("Request") return suite.client.Request(args, kwargs) } // Check what the server received. -func (suite *TestNPDUCodecSuite) Indication(args bacnetip.Args, kwargs bacnetip.KWArgs) error { +func (suite *TestNPDUCodecSuite) Indication(args bacgopes.Args, kwargs bacgopes.KWArgs) error { suite.log.Debug().Stringer("Args", args).Stringer("KWArgs", kwargs).Msg("Indication") var pduType any @@ -77,14 +76,14 @@ func (suite *TestNPDUCodecSuite) Indication(args bacnetip.Args, kwargs bacnetip. } // Check what the server received. -func (suite *TestNPDUCodecSuite) Response(args bacnetip.Args, kwargs bacnetip.KWArgs) error { +func (suite *TestNPDUCodecSuite) Response(args bacgopes.Args, kwargs bacgopes.KWArgs) error { suite.log.Debug().Stringer("Args", args).Stringer("KWArgs", kwargs).Msg("Response") return suite.server.Response(args, kwargs) } // Check what the server received. -func (suite *TestNPDUCodecSuite) Confirmation(args bacnetip.Args, kwargs bacnetip.KWArgs) error { +func (suite *TestNPDUCodecSuite) Confirmation(args bacgopes.Args, kwargs bacgopes.KWArgs) error { suite.log.Debug().Stringer("Args", args).Stringer("KWArgs", kwargs).Msg("Confirmation") pduType := args[0].(any) @@ -95,7 +94,7 @@ func (suite *TestNPDUCodecSuite) Confirmation(args bacnetip.Args, kwargs bacneti func (suite *TestNPDUCodecSuite) TestWhoIsRouterToNetwork() { // Test the Result encoding and decoding. // Request successful - pduBytes, err := bacnetip.Xtob( + pduBytes, err := bacgopes.Xtob( "01.80" + // version, network layer message "00 0001", // message type and network ) @@ -108,20 +107,20 @@ func (suite *TestNPDUCodecSuite) TestWhoIsRouterToNetwork() { // Test the Result } } - err = suite.Request(bacnetip.NewArgs(WhoIsRouterToNetwork(1)), bacnetip.NoKWArgs) + err = suite.Request(bacgopes.NewArgs(WhoIsRouterToNetwork(1)), bacgopes.NoKWArgs) suite.Assert().NoError(err) - err = suite.Indication(bacnetip.NoArgs, bacnetip.NewKWArgs(bacnetip.KWPDUData, pduBytes)) + err = suite.Indication(bacgopes.NoArgs, bacgopes.NewKWArgs(bacgopes.KWPDUData, pduBytes)) suite.Assert().NoError(err) - err = suite.Response(bacnetip.NewArgs(bacnetip.NewPDU(bacnetip.NewMessageBridge(pduBytes...))), bacnetip.NoKWArgs) + err = suite.Response(bacgopes.NewArgs(bacgopes.NewPDU(bacgopes.NewMessageBridge(pduBytes...))), bacgopes.NoKWArgs) suite.Assert().NoError(err) - err = suite.Confirmation(bacnetip.NewArgs(&bacnetip.WhoIsRouterToNetwork{}), bacnetip.NewKWArgs(bacnetip.KWWirtnNetwork, uint16(1))) + err = suite.Confirmation(bacgopes.NewArgs(&bacgopes.WhoIsRouterToNetwork{}), bacgopes.NewKWArgs(bacgopes.KWWirtnNetwork, uint16(1))) } func (suite *TestNPDUCodecSuite) TestIAMRouterToNetworkEmpty() { // Test the Result encoding and decoding. // Request successful networkList := []uint16{} - pduBytes, err := bacnetip.Xtob( + pduBytes, err := bacgopes.Xtob( "01.80" + // version, network layer message "01", // message type, no network ) @@ -134,20 +133,20 @@ func (suite *TestNPDUCodecSuite) TestIAMRouterToNetworkEmpty() { // Test the Res } } - err = suite.Request(bacnetip.NewArgs(IAmRouterToNetwork(networkList...)), bacnetip.NoKWArgs) + err = suite.Request(bacgopes.NewArgs(IAmRouterToNetwork(networkList...)), bacgopes.NoKWArgs) suite.Assert().NoError(err) - err = suite.Indication(bacnetip.NoArgs, bacnetip.NewKWArgs(bacnetip.KWPDUData, pduBytes)) + err = suite.Indication(bacgopes.NoArgs, bacgopes.NewKWArgs(bacgopes.KWPDUData, pduBytes)) suite.Assert().NoError(err) - err = suite.Response(bacnetip.NewArgs(bacnetip.NewPDU(bacnetip.NewMessageBridge(pduBytes...))), bacnetip.NoKWArgs) + err = suite.Response(bacgopes.NewArgs(bacgopes.NewPDU(bacgopes.NewMessageBridge(pduBytes...))), bacgopes.NoKWArgs) suite.Assert().NoError(err) - err = suite.Confirmation(bacnetip.NewArgs(&bacnetip.IAmRouterToNetwork{}), bacnetip.NewKWArgs(bacnetip.KWIartnNetworkList, networkList)) + err = suite.Confirmation(bacgopes.NewArgs(&bacgopes.IAmRouterToNetwork{}), bacgopes.NewKWArgs(bacgopes.KWIartnNetworkList, networkList)) } func (suite *TestNPDUCodecSuite) TestIAMRouterToNetworks() { // Test the Result encoding and decoding. // Request successful networkList := []uint16{1, 2, 3} - pduBytes, err := bacnetip.Xtob( + pduBytes, err := bacgopes.Xtob( "01.80" + // version, network layer message "01 0001 0002 0003", // message type and network list ) @@ -160,19 +159,19 @@ func (suite *TestNPDUCodecSuite) TestIAMRouterToNetworks() { // Test the Result } } - err = suite.Request(bacnetip.NewArgs(IAmRouterToNetwork(networkList...)), bacnetip.NoKWArgs) + err = suite.Request(bacgopes.NewArgs(IAmRouterToNetwork(networkList...)), bacgopes.NoKWArgs) suite.Assert().NoError(err) - err = suite.Indication(bacnetip.NoArgs, bacnetip.NewKWArgs(bacnetip.KWPDUData, pduBytes)) + err = suite.Indication(bacgopes.NoArgs, bacgopes.NewKWArgs(bacgopes.KWPDUData, pduBytes)) suite.Assert().NoError(err) - err = suite.Response(bacnetip.NewArgs(bacnetip.NewPDU(bacnetip.NewMessageBridge(pduBytes...))), bacnetip.NoKWArgs) + err = suite.Response(bacgopes.NewArgs(bacgopes.NewPDU(bacgopes.NewMessageBridge(pduBytes...))), bacgopes.NoKWArgs) suite.Assert().NoError(err) - err = suite.Confirmation(bacnetip.NewArgs(&bacnetip.IAmRouterToNetwork{}), bacnetip.NewKWArgs(bacnetip.KWIartnNetworkList, networkList)) + err = suite.Confirmation(bacgopes.NewArgs(&bacgopes.IAmRouterToNetwork{}), bacgopes.NewKWArgs(bacgopes.KWIartnNetworkList, networkList)) } func (suite *TestNPDUCodecSuite) TestICouldBeRouterToNetworks() { // Test the Result encoding and decoding. // Request successful - pduBytes, err := bacnetip.Xtob( + pduBytes, err := bacgopes.Xtob( "01.80" + // version, network layer message "02 0001 02", // message type, network, performance ) @@ -185,19 +184,19 @@ func (suite *TestNPDUCodecSuite) TestICouldBeRouterToNetworks() { // Test the Re } } - err = suite.Request(bacnetip.NewArgs(ICouldBeRouterToNetwork(1, 2)), bacnetip.NoKWArgs) + err = suite.Request(bacgopes.NewArgs(ICouldBeRouterToNetwork(1, 2)), bacgopes.NoKWArgs) suite.Assert().NoError(err) - err = suite.Indication(bacnetip.NoArgs, bacnetip.NewKWArgs(bacnetip.KWPDUData, pduBytes)) + err = suite.Indication(bacgopes.NoArgs, bacgopes.NewKWArgs(bacgopes.KWPDUData, pduBytes)) suite.Assert().NoError(err) - err = suite.Response(bacnetip.NewArgs(bacnetip.NewPDU(bacnetip.NewMessageBridge(pduBytes...))), bacnetip.NoKWArgs) + err = suite.Response(bacgopes.NewArgs(bacgopes.NewPDU(bacgopes.NewMessageBridge(pduBytes...))), bacgopes.NoKWArgs) suite.Assert().NoError(err) - err = suite.Confirmation(bacnetip.NewArgs(&bacnetip.ICouldBeRouterToNetwork{}), bacnetip.NewKWArgs(bacnetip.KWIcbrtnNetwork, uint16(1), bacnetip.KWIcbrtnPerformanceIndex, uint8(2))) + err = suite.Confirmation(bacgopes.NewArgs(&bacgopes.ICouldBeRouterToNetwork{}), bacgopes.NewKWArgs(bacgopes.KWIcbrtnNetwork, uint16(1), bacgopes.KWIcbrtnPerformanceIndex, uint8(2))) } func (suite *TestNPDUCodecSuite) TestRejectMessageToNetwork() { // Test the Result encoding and decoding. // Request successful - pduBytes, err := bacnetip.Xtob( + pduBytes, err := bacgopes.Xtob( "01.80" + // version, network layer message "03 01 0002", // message type, reason, performance ) @@ -210,20 +209,20 @@ func (suite *TestNPDUCodecSuite) TestRejectMessageToNetwork() { // Test the Resu } } - err = suite.Request(bacnetip.NewArgs(RejectMessageToNetwork(1, 2)), bacnetip.NoKWArgs) + err = suite.Request(bacgopes.NewArgs(RejectMessageToNetwork(1, 2)), bacgopes.NoKWArgs) suite.Assert().NoError(err) - err = suite.Indication(bacnetip.NoArgs, bacnetip.NewKWArgs(bacnetip.KWPDUData, pduBytes)) + err = suite.Indication(bacgopes.NoArgs, bacgopes.NewKWArgs(bacgopes.KWPDUData, pduBytes)) suite.Assert().NoError(err) - err = suite.Response(bacnetip.NewArgs(bacnetip.NewPDU(bacnetip.NewMessageBridge(pduBytes...))), bacnetip.NoKWArgs) + err = suite.Response(bacgopes.NewArgs(bacgopes.NewPDU(bacgopes.NewMessageBridge(pduBytes...))), bacgopes.NoKWArgs) suite.Assert().NoError(err) - err = suite.Confirmation(bacnetip.NewArgs(&bacnetip.RejectMessageToNetwork{}), bacnetip.NewKWArgs(bacnetip.KWRmtnRejectionReason, readWriteModel.NLMRejectMessageToNetworkRejectReason(1), bacnetip.KWRmtnDNET, uint16(2))) + err = suite.Confirmation(bacgopes.NewArgs(&bacgopes.RejectMessageToNetwork{}), bacgopes.NewKWArgs(bacgopes.KWRmtnRejectionReason, readWriteModel.NLMRejectMessageToNetworkRejectReason(1), bacgopes.KWRmtnDNET, uint16(2))) } func (suite *TestNPDUCodecSuite) TestRouterBusyToNetworkEmpty() { // Test the Result encoding and decoding. // Request successful networkList := []uint16{} - pduBytes, err := bacnetip.Xtob( + pduBytes, err := bacgopes.Xtob( "01.80" + // version, network layer message "04", // message type, no networks ) @@ -236,20 +235,20 @@ func (suite *TestNPDUCodecSuite) TestRouterBusyToNetworkEmpty() { // Test the Re } } - err = suite.Request(bacnetip.NewArgs(RouterBusyToNetwork(networkList...)), bacnetip.NoKWArgs) + err = suite.Request(bacgopes.NewArgs(RouterBusyToNetwork(networkList...)), bacgopes.NoKWArgs) suite.Assert().NoError(err) - err = suite.Indication(bacnetip.NoArgs, bacnetip.NewKWArgs(bacnetip.KWPDUData, pduBytes)) + err = suite.Indication(bacgopes.NoArgs, bacgopes.NewKWArgs(bacgopes.KWPDUData, pduBytes)) suite.Assert().NoError(err) - err = suite.Response(bacnetip.NewArgs(bacnetip.NewPDU(bacnetip.NewMessageBridge(pduBytes...))), bacnetip.NoKWArgs) + err = suite.Response(bacgopes.NewArgs(bacgopes.NewPDU(bacgopes.NewMessageBridge(pduBytes...))), bacgopes.NoKWArgs) suite.Assert().NoError(err) - err = suite.Confirmation(bacnetip.NewArgs(&bacnetip.RouterBusyToNetwork{}), bacnetip.NewKWArgs(bacnetip.KWRbtnNetworkList, networkList)) + err = suite.Confirmation(bacgopes.NewArgs(&bacgopes.RouterBusyToNetwork{}), bacgopes.NewKWArgs(bacgopes.KWRbtnNetworkList, networkList)) } func (suite *TestNPDUCodecSuite) TestRouterBusyToNetworkNetworks() { // Test the Result encoding and decoding. // Request successful networkList := []uint16{1, 2, 3} - pduBytes, err := bacnetip.Xtob( + pduBytes, err := bacgopes.Xtob( "01.80" + // version, network layer message "04 0001 0002 0003", // message type and network list ) @@ -262,20 +261,20 @@ func (suite *TestNPDUCodecSuite) TestRouterBusyToNetworkNetworks() { // Test the } } - err = suite.Request(bacnetip.NewArgs(RouterBusyToNetwork(networkList...)), bacnetip.NoKWArgs) + err = suite.Request(bacgopes.NewArgs(RouterBusyToNetwork(networkList...)), bacgopes.NoKWArgs) suite.Assert().NoError(err) - err = suite.Indication(bacnetip.NoArgs, bacnetip.NewKWArgs(bacnetip.KWPDUData, pduBytes)) + err = suite.Indication(bacgopes.NoArgs, bacgopes.NewKWArgs(bacgopes.KWPDUData, pduBytes)) suite.Assert().NoError(err) - err = suite.Response(bacnetip.NewArgs(bacnetip.NewPDU(bacnetip.NewMessageBridge(pduBytes...))), bacnetip.NoKWArgs) + err = suite.Response(bacgopes.NewArgs(bacgopes.NewPDU(bacgopes.NewMessageBridge(pduBytes...))), bacgopes.NoKWArgs) suite.Assert().NoError(err) - err = suite.Confirmation(bacnetip.NewArgs(&bacnetip.RouterBusyToNetwork{}), bacnetip.NewKWArgs(bacnetip.KWRbtnNetworkList, networkList)) + err = suite.Confirmation(bacgopes.NewArgs(&bacgopes.RouterBusyToNetwork{}), bacgopes.NewKWArgs(bacgopes.KWRbtnNetworkList, networkList)) } func (suite *TestNPDUCodecSuite) TestRouterAvailableToNetworkEmpty() { // Test the Result encoding and decoding. // Request successful networkList := []uint16{} - pduBytes, err := bacnetip.Xtob( + pduBytes, err := bacgopes.Xtob( "01.80" + // version, network layer message "05", // message type, no networks ) @@ -288,20 +287,20 @@ func (suite *TestNPDUCodecSuite) TestRouterAvailableToNetworkEmpty() { // Test t } } - err = suite.Request(bacnetip.NewArgs(RouterAvailableToNetwork(networkList...)), bacnetip.NoKWArgs) + err = suite.Request(bacgopes.NewArgs(RouterAvailableToNetwork(networkList...)), bacgopes.NoKWArgs) suite.Assert().NoError(err) - err = suite.Indication(bacnetip.NoArgs, bacnetip.NewKWArgs(bacnetip.KWPDUData, pduBytes)) + err = suite.Indication(bacgopes.NoArgs, bacgopes.NewKWArgs(bacgopes.KWPDUData, pduBytes)) suite.Assert().NoError(err) - err = suite.Response(bacnetip.NewArgs(bacnetip.NewPDU(bacnetip.NewMessageBridge(pduBytes...))), bacnetip.NoKWArgs) + err = suite.Response(bacgopes.NewArgs(bacgopes.NewPDU(bacgopes.NewMessageBridge(pduBytes...))), bacgopes.NoKWArgs) suite.Assert().NoError(err) - err = suite.Confirmation(bacnetip.NewArgs(&bacnetip.RouterAvailableToNetwork{}), bacnetip.NewKWArgs(bacnetip.KWRatnNetworkList, networkList)) + err = suite.Confirmation(bacgopes.NewArgs(&bacgopes.RouterAvailableToNetwork{}), bacgopes.NewKWArgs(bacgopes.KWRatnNetworkList, networkList)) } func (suite *TestNPDUCodecSuite) TestRouterAvailableToNetworkNetworks() { // Test the Result encoding and decoding. // Request successful networkList := []uint16{1, 2, 3} - pduBytes, err := bacnetip.Xtob( + pduBytes, err := bacgopes.Xtob( "01.80" + // version, network layer message "05 0001 0002 0003", // message type and network list ) @@ -314,19 +313,19 @@ func (suite *TestNPDUCodecSuite) TestRouterAvailableToNetworkNetworks() { // Tes } } - err = suite.Request(bacnetip.NewArgs(RouterAvailableToNetwork(networkList...)), bacnetip.NoKWArgs) + err = suite.Request(bacgopes.NewArgs(RouterAvailableToNetwork(networkList...)), bacgopes.NoKWArgs) suite.Assert().NoError(err) - err = suite.Indication(bacnetip.NoArgs, bacnetip.NewKWArgs(bacnetip.KWPDUData, pduBytes)) + err = suite.Indication(bacgopes.NoArgs, bacgopes.NewKWArgs(bacgopes.KWPDUData, pduBytes)) suite.Assert().NoError(err) - err = suite.Response(bacnetip.NewArgs(bacnetip.NewPDU(bacnetip.NewMessageBridge(pduBytes...))), bacnetip.NoKWArgs) + err = suite.Response(bacgopes.NewArgs(bacgopes.NewPDU(bacgopes.NewMessageBridge(pduBytes...))), bacgopes.NoKWArgs) suite.Assert().NoError(err) - err = suite.Confirmation(bacnetip.NewArgs(&bacnetip.RouterAvailableToNetwork{}), bacnetip.NewKWArgs(bacnetip.KWRatnNetworkList, networkList)) + err = suite.Confirmation(bacgopes.NewArgs(&bacgopes.RouterAvailableToNetwork{}), bacgopes.NewKWArgs(bacgopes.KWRatnNetworkList, networkList)) } func (suite *TestNPDUCodecSuite) TestInitializeRoutingTableEmpty() { // Test the Result encoding and decoding. // Request successful - pduBytes, err := bacnetip.Xtob( + pduBytes, err := bacgopes.Xtob( "01.80" + // version, network layer message "06 00", // message type and list length ) @@ -339,25 +338,25 @@ func (suite *TestNPDUCodecSuite) TestInitializeRoutingTableEmpty() { // Test the } } - err = suite.Request(bacnetip.NewArgs(InitializeRoutingTable()), bacnetip.NoKWArgs) + err = suite.Request(bacgopes.NewArgs(InitializeRoutingTable()), bacgopes.NoKWArgs) suite.Assert().NoError(err) - err = suite.Indication(bacnetip.NoArgs, bacnetip.NewKWArgs(bacnetip.KWPDUData, pduBytes)) + err = suite.Indication(bacgopes.NoArgs, bacgopes.NewKWArgs(bacgopes.KWPDUData, pduBytes)) suite.Assert().NoError(err) - err = suite.Response(bacnetip.NewArgs(bacnetip.NewPDU(bacnetip.NewMessageBridge(pduBytes...))), bacnetip.NoKWArgs) + err = suite.Response(bacgopes.NewArgs(bacgopes.NewPDU(bacgopes.NewMessageBridge(pduBytes...))), bacgopes.NoKWArgs) suite.Assert().NoError(err) - err = suite.Confirmation(bacnetip.NewArgs(&bacnetip.InitializeRoutingTable{}), bacnetip.NewKWArgs(bacnetip.KWIrtTable, []*bacnetip.RoutingTableEntry{})) + err = suite.Confirmation(bacgopes.NewArgs(&bacgopes.InitializeRoutingTable{}), bacgopes.NewKWArgs(bacgopes.KWIrtTable, []*bacgopes.RoutingTableEntry{})) } func (suite *TestNPDUCodecSuite) TestInitializeRoutingTable01() { // Test the Result encoding and decoding. // Request successful - xtob, err := bacnetip.Xtob("") + xtob, err := bacgopes.Xtob("") suite.Require().NoError(err) rte := RoutingTableEntry(1, 2, xtob) - rtEntries := []*bacnetip.RoutingTableEntry{rte} + rtEntries := []*bacgopes.RoutingTableEntry{rte} // Request successful - pduBytes, err := bacnetip.Xtob( + pduBytes, err := bacgopes.Xtob( "01.80" + // version, network layer message "06 01" + // message type and list length "0001 02 00", // network, port number, port info @@ -371,25 +370,25 @@ func (suite *TestNPDUCodecSuite) TestInitializeRoutingTable01() { // Test the Re } } - err = suite.Request(bacnetip.NewArgs(InitializeRoutingTable(rtEntries...)), bacnetip.NoKWArgs) + err = suite.Request(bacgopes.NewArgs(InitializeRoutingTable(rtEntries...)), bacgopes.NoKWArgs) suite.Assert().NoError(err) - err = suite.Indication(bacnetip.NoArgs, bacnetip.NewKWArgs(bacnetip.KWPDUData, pduBytes)) + err = suite.Indication(bacgopes.NoArgs, bacgopes.NewKWArgs(bacgopes.KWPDUData, pduBytes)) suite.Assert().NoError(err) - err = suite.Response(bacnetip.NewArgs(bacnetip.NewPDU(bacnetip.NewMessageBridge(pduBytes...))), bacnetip.NoKWArgs) + err = suite.Response(bacgopes.NewArgs(bacgopes.NewPDU(bacgopes.NewMessageBridge(pduBytes...))), bacgopes.NoKWArgs) suite.Assert().NoError(err) - err = suite.Confirmation(bacnetip.NewArgs(&bacnetip.InitializeRoutingTable{}), bacnetip.NewKWArgs(bacnetip.KWIrtTable, rtEntries)) + err = suite.Confirmation(bacgopes.NewArgs(&bacgopes.InitializeRoutingTable{}), bacgopes.NewKWArgs(bacgopes.KWIrtTable, rtEntries)) } func (suite *TestNPDUCodecSuite) TestInitializeRoutingTable02() { // Test the Result encoding and decoding. // Request successful - xtob, err := bacnetip.Xtob("deadbeef") + xtob, err := bacgopes.Xtob("deadbeef") suite.Require().NoError(err) rte := RoutingTableEntry(3, 4, xtob) - rtEntries := []*bacnetip.RoutingTableEntry{rte} + rtEntries := []*bacgopes.RoutingTableEntry{rte} // Request successful - pduBytes, err := bacnetip.Xtob( + pduBytes, err := bacgopes.Xtob( "01.80" + // version, network layer message "06 01" + // message type and list length "0003 04 04 DEADBEEF", // network, port number, port info @@ -403,25 +402,25 @@ func (suite *TestNPDUCodecSuite) TestInitializeRoutingTable02() { // Test the Re } } - err = suite.Request(bacnetip.NewArgs(InitializeRoutingTable(rtEntries...)), bacnetip.NoKWArgs) + err = suite.Request(bacgopes.NewArgs(InitializeRoutingTable(rtEntries...)), bacgopes.NoKWArgs) suite.Assert().NoError(err) - err = suite.Indication(bacnetip.NoArgs, bacnetip.NewKWArgs(bacnetip.KWPDUData, pduBytes)) + err = suite.Indication(bacgopes.NoArgs, bacgopes.NewKWArgs(bacgopes.KWPDUData, pduBytes)) suite.Assert().NoError(err) - err = suite.Response(bacnetip.NewArgs(bacnetip.NewPDU(bacnetip.NewMessageBridge(pduBytes...))), bacnetip.NoKWArgs) + err = suite.Response(bacgopes.NewArgs(bacgopes.NewPDU(bacgopes.NewMessageBridge(pduBytes...))), bacgopes.NoKWArgs) suite.Assert().NoError(err) - err = suite.Confirmation(bacnetip.NewArgs(&bacnetip.InitializeRoutingTable{}), bacnetip.NewKWArgs(bacnetip.KWIrtTable, rtEntries)) + err = suite.Confirmation(bacgopes.NewArgs(&bacgopes.InitializeRoutingTable{}), bacgopes.NewKWArgs(bacgopes.KWIrtTable, rtEntries)) } func (suite *TestNPDUCodecSuite) TestInitializeRoutingTableAck01() { // Test the Result encoding and decoding. // Request successful - xtob, err := bacnetip.Xtob("") + xtob, err := bacgopes.Xtob("") suite.Require().NoError(err) rte := RoutingTableEntry(1, 2, xtob) - rtEntries := []*bacnetip.RoutingTableEntry{rte} + rtEntries := []*bacgopes.RoutingTableEntry{rte} // Request successful - pduBytes, err := bacnetip.Xtob( + pduBytes, err := bacgopes.Xtob( "01.80" + // version, network layer message "07 01" + // message type and list length "0001 02 00", // network, port number, port info @@ -435,25 +434,25 @@ func (suite *TestNPDUCodecSuite) TestInitializeRoutingTableAck01() { // Test the } } - err = suite.Request(bacnetip.NewArgs(InitializeRoutingTableAck(rtEntries...)), bacnetip.NoKWArgs) + err = suite.Request(bacgopes.NewArgs(InitializeRoutingTableAck(rtEntries...)), bacgopes.NoKWArgs) suite.Assert().NoError(err) - err = suite.Indication(bacnetip.NoArgs, bacnetip.NewKWArgs(bacnetip.KWPDUData, pduBytes)) + err = suite.Indication(bacgopes.NoArgs, bacgopes.NewKWArgs(bacgopes.KWPDUData, pduBytes)) suite.Assert().NoError(err) - err = suite.Response(bacnetip.NewArgs(bacnetip.NewPDU(bacnetip.NewMessageBridge(pduBytes...))), bacnetip.NoKWArgs) + err = suite.Response(bacgopes.NewArgs(bacgopes.NewPDU(bacgopes.NewMessageBridge(pduBytes...))), bacgopes.NoKWArgs) suite.Assert().NoError(err) - err = suite.Confirmation(bacnetip.NewArgs(&bacnetip.InitializeRoutingTableAck{}), bacnetip.NewKWArgs(bacnetip.KWIrtaTable, rtEntries)) + err = suite.Confirmation(bacgopes.NewArgs(&bacgopes.InitializeRoutingTableAck{}), bacgopes.NewKWArgs(bacgopes.KWIrtaTable, rtEntries)) } func (suite *TestNPDUCodecSuite) TestInitializeRoutingTableAck02() { // Test the Result encoding and decoding. // Request successful - xtob, err := bacnetip.Xtob("deadbeef") + xtob, err := bacgopes.Xtob("deadbeef") suite.Require().NoError(err) rte := RoutingTableEntry(3, 4, xtob) - rtEntries := []*bacnetip.RoutingTableEntry{rte} + rtEntries := []*bacgopes.RoutingTableEntry{rte} // Request successful - pduBytes, err := bacnetip.Xtob( + pduBytes, err := bacgopes.Xtob( "01.80" + // version, network layer message "07 01" + // message type and list length "0003 04 04 DEADBEEF", // network, port number, port info @@ -467,19 +466,19 @@ func (suite *TestNPDUCodecSuite) TestInitializeRoutingTableAck02() { // Test the } } - err = suite.Request(bacnetip.NewArgs(InitializeRoutingTableAck(rtEntries...)), bacnetip.NoKWArgs) + err = suite.Request(bacgopes.NewArgs(InitializeRoutingTableAck(rtEntries...)), bacgopes.NoKWArgs) suite.Assert().NoError(err) - err = suite.Indication(bacnetip.NoArgs, bacnetip.NewKWArgs(bacnetip.KWPDUData, pduBytes)) + err = suite.Indication(bacgopes.NoArgs, bacgopes.NewKWArgs(bacgopes.KWPDUData, pduBytes)) suite.Assert().NoError(err) - err = suite.Response(bacnetip.NewArgs(bacnetip.NewPDU(bacnetip.NewMessageBridge(pduBytes...))), bacnetip.NoKWArgs) + err = suite.Response(bacgopes.NewArgs(bacgopes.NewPDU(bacgopes.NewMessageBridge(pduBytes...))), bacgopes.NoKWArgs) suite.Assert().NoError(err) - err = suite.Confirmation(bacnetip.NewArgs(&bacnetip.InitializeRoutingTableAck{}), bacnetip.NewKWArgs(bacnetip.KWIrtaTable, rtEntries)) + err = suite.Confirmation(bacgopes.NewArgs(&bacgopes.InitializeRoutingTableAck{}), bacgopes.NewKWArgs(bacgopes.KWIrtaTable, rtEntries)) } func (suite *TestNPDUCodecSuite) TestEstablishConnectionToNetworks() { // Test the Result encoding and decoding. // Request successful - pduBytes, err := bacnetip.Xtob( + pduBytes, err := bacgopes.Xtob( "01.80" + // version, network layer message "08 0005 06", // message type, network, terminationTime ) @@ -492,19 +491,19 @@ func (suite *TestNPDUCodecSuite) TestEstablishConnectionToNetworks() { // Test t } } - err = suite.Request(bacnetip.NewArgs(EstablishConnectionToNetwork(5, 6)), bacnetip.NoKWArgs) + err = suite.Request(bacgopes.NewArgs(EstablishConnectionToNetwork(5, 6)), bacgopes.NoKWArgs) suite.Assert().NoError(err) - err = suite.Indication(bacnetip.NoArgs, bacnetip.NewKWArgs(bacnetip.KWPDUData, pduBytes)) + err = suite.Indication(bacgopes.NoArgs, bacgopes.NewKWArgs(bacgopes.KWPDUData, pduBytes)) suite.Assert().NoError(err) - err = suite.Response(bacnetip.NewArgs(bacnetip.NewPDU(bacnetip.NewMessageBridge(pduBytes...))), bacnetip.NoKWArgs) + err = suite.Response(bacgopes.NewArgs(bacgopes.NewPDU(bacgopes.NewMessageBridge(pduBytes...))), bacgopes.NoKWArgs) suite.Assert().NoError(err) - err = suite.Confirmation(bacnetip.NewArgs(&bacnetip.EstablishConnectionToNetwork{}), bacnetip.NewKWArgs(bacnetip.KWEctnDNET, uint16(5), bacnetip.KWEctnTerminationTime, uint8(6))) + err = suite.Confirmation(bacgopes.NewArgs(&bacgopes.EstablishConnectionToNetwork{}), bacgopes.NewKWArgs(bacgopes.KWEctnDNET, uint16(5), bacgopes.KWEctnTerminationTime, uint8(6))) } func (suite *TestNPDUCodecSuite) TestDisconnectConnectionToNetwork() { // Test the Result encoding and decoding. // Request successful - pduBytes, err := bacnetip.Xtob( + pduBytes, err := bacgopes.Xtob( "01.80" + // version, network layer message "09 0007", // message type, network ) @@ -517,19 +516,19 @@ func (suite *TestNPDUCodecSuite) TestDisconnectConnectionToNetwork() { // Test t } } - err = suite.Request(bacnetip.NewArgs(DisconnectConnectionToNetwork(7)), bacnetip.NoKWArgs) + err = suite.Request(bacgopes.NewArgs(DisconnectConnectionToNetwork(7)), bacgopes.NoKWArgs) suite.Assert().NoError(err) - err = suite.Indication(bacnetip.NoArgs, bacnetip.NewKWArgs(bacnetip.KWPDUData, pduBytes)) + err = suite.Indication(bacgopes.NoArgs, bacgopes.NewKWArgs(bacgopes.KWPDUData, pduBytes)) suite.Assert().NoError(err) - err = suite.Response(bacnetip.NewArgs(bacnetip.NewPDU(bacnetip.NewMessageBridge(pduBytes...))), bacnetip.NoKWArgs) + err = suite.Response(bacgopes.NewArgs(bacgopes.NewPDU(bacgopes.NewMessageBridge(pduBytes...))), bacgopes.NoKWArgs) suite.Assert().NoError(err) - err = suite.Confirmation(bacnetip.NewArgs(&bacnetip.DisconnectConnectionToNetwork{}), bacnetip.NewKWArgs(bacnetip.KWDctnDNET, uint16(7))) + err = suite.Confirmation(bacgopes.NewArgs(&bacgopes.DisconnectConnectionToNetwork{}), bacgopes.NewKWArgs(bacgopes.KWDctnDNET, uint16(7))) } func (suite *TestNPDUCodecSuite) TestWhatIsNetworkNumber() { // Test the Result encoding and decoding. // Request successful - pduBytes, err := bacnetip.Xtob( + pduBytes, err := bacgopes.Xtob( "01.80" + // version, network layer message "12", // message type, network ) @@ -542,19 +541,19 @@ func (suite *TestNPDUCodecSuite) TestWhatIsNetworkNumber() { // Test the Result } } - err = suite.Request(bacnetip.NewArgs(WhatIsNetworkNumber(0)), bacnetip.NoKWArgs) + err = suite.Request(bacgopes.NewArgs(WhatIsNetworkNumber(0)), bacgopes.NoKWArgs) suite.Assert().NoError(err) - err = suite.Indication(bacnetip.NoArgs, bacnetip.NewKWArgs(bacnetip.KWPDUData, pduBytes)) + err = suite.Indication(bacgopes.NoArgs, bacgopes.NewKWArgs(bacgopes.KWPDUData, pduBytes)) suite.Assert().NoError(err) - err = suite.Response(bacnetip.NewArgs(bacnetip.NewPDU(bacnetip.NewMessageBridge(pduBytes...))), bacnetip.NoKWArgs) + err = suite.Response(bacgopes.NewArgs(bacgopes.NewPDU(bacgopes.NewMessageBridge(pduBytes...))), bacgopes.NoKWArgs) suite.Assert().NoError(err) - err = suite.Confirmation(bacnetip.NewArgs(&bacnetip.WhatIsNetworkNumber{}), bacnetip.NoKWArgs) + err = suite.Confirmation(bacgopes.NewArgs(&bacgopes.WhatIsNetworkNumber{}), bacgopes.NoKWArgs) } func (suite *TestNPDUCodecSuite) TestNetworkNumberIs() { // Test the Result encoding and decoding. // Request successful - pduBytes, err := bacnetip.Xtob( + pduBytes, err := bacgopes.Xtob( "01.80" + // version, network layer message "13 0008 01", // message type, network, flag ) @@ -567,14 +566,14 @@ func (suite *TestNPDUCodecSuite) TestNetworkNumberIs() { // Test the Result enco } } - err = suite.Request(bacnetip.NewArgs(NetworkNumberIs(8, true)), bacnetip.NoKWArgs) + err = suite.Request(bacgopes.NewArgs(NetworkNumberIs(8, true)), bacgopes.NoKWArgs) suite.Assert().NoError(err) - err = suite.Indication(bacnetip.NoArgs, bacnetip.NewKWArgs(bacnetip.KWPDUData, pduBytes)) + err = suite.Indication(bacgopes.NoArgs, bacgopes.NewKWArgs(bacgopes.KWPDUData, pduBytes)) suite.Assert().NoError(err) - err = suite.Response(bacnetip.NewArgs(bacnetip.NewPDU(bacnetip.NewMessageBridge(pduBytes...))), bacnetip.NoKWArgs) + err = suite.Response(bacgopes.NewArgs(bacgopes.NewPDU(bacgopes.NewMessageBridge(pduBytes...))), bacgopes.NoKWArgs) suite.Assert().NoError(err) - err = suite.Confirmation(bacnetip.NewArgs(&bacnetip.NetworkNumberIs{}), bacnetip.NewKWArgs(bacnetip.KWNniNet, uint16(8), bacnetip.KWNniFlag, true)) + err = suite.Confirmation(bacgopes.NewArgs(&bacgopes.NetworkNumberIs{}), bacgopes.NewKWArgs(bacgopes.KWNniNet, uint16(8), bacgopes.KWNniFlag, true)) } func TestNPDUCodec(t *testing.T) { diff --git a/plc4go/internal/bacnetip/tests/test_pdu/test_address_test.go b/plc4go/internal/bacnetip/bacgopes/tests/test_pdu/test_address_test.go similarity index 56% rename from plc4go/internal/bacnetip/tests/test_pdu/test_address_test.go rename to plc4go/internal/bacnetip/bacgopes/tests/test_pdu/test_address_test.go index f1a3db065b6..f953a1bda4c 100644 --- a/plc4go/internal/bacnetip/tests/test_pdu/test_address_test.go +++ b/plc4go/internal/bacnetip/bacgopes/tests/test_pdu/test_address_test.go @@ -26,9 +26,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/apache/plc4x/plc4go/internal/bacnetip/bacgopes" "github.com/apache/plc4x/plc4go/spi/testutils" - - "github.com/apache/plc4x/plc4go/internal/bacnetip" ) // Assert that the type, network, length, and address are what @@ -41,7 +40,7 @@ import ( // :param n: the network number // :param l: the address length // :param a: the address expressed as hex bytes -func matchAddress(_t *testing.T, addr *bacnetip.Address, t bacnetip.AddressType, n *uint16, l *uint8, a string) { +func matchAddress(_t *testing.T, addr *bacgopes.Address, t bacgopes.AddressType, n *uint16, l *uint8, a string) { _t.Helper() assert.Equal(_t, addr.AddrType, t) assert.Equal(_t, addr.AddrNet, n) @@ -56,37 +55,37 @@ func matchAddress(_t *testing.T, addr *bacnetip.Address, t bacnetip.AddressType, } func init() { // TODO: maybe put in a setupsuite - bacnetip.Settings.RouteAware = true + bacgopes.Settings.RouteAware = true } func TestAddress(t *testing.T) { testingLogger := testutils.ProduceTestingLogger(t) // null address - testAddr, err := bacnetip.NewAddress(testingLogger) + testAddr, err := bacgopes.NewAddress(testingLogger) require.NoError(t, err) - matchAddress(t, testAddr, bacnetip.NULL_ADDRESS, nil, nil, "") + matchAddress(t, testAddr, bacgopes.NULL_ADDRESS, nil, nil, "") } func TestAddressInt(t *testing.T) { testingLogger := testutils.ProduceTestingLogger(t) // test integer local station - testAddr, err := bacnetip.NewAddress(testingLogger, 1) + testAddr, err := bacgopes.NewAddress(testingLogger, 1) require.NoError(t, err) - matchAddress(t, testAddr, bacnetip.LOCAL_STATION_ADDRESS, nil, l(1), "01") + matchAddress(t, testAddr, bacgopes.LOCAL_STATION_ADDRESS, nil, l(1), "01") assert.Equal(t, "1", testAddr.String()) - testAddr, err = bacnetip.NewAddress(testingLogger, 254) + testAddr, err = bacgopes.NewAddress(testingLogger, 254) require.NoError(t, err) - matchAddress(t, testAddr, bacnetip.LOCAL_STATION_ADDRESS, nil, l(1), "fe") + matchAddress(t, testAddr, bacgopes.LOCAL_STATION_ADDRESS, nil, l(1), "fe") assert.Equal(t, "254", testAddr.String()) // Test bad integer - _, err = bacnetip.NewAddress(testingLogger, -1) + _, err = bacgopes.NewAddress(testingLogger, -1) assert.Error(t, err) - _, err = bacnetip.NewAddress(testingLogger, 256) + _, err = bacgopes.NewAddress(testingLogger, 256) assert.Error(t, err) } @@ -94,21 +93,21 @@ func TestAddressIpv4Str(t *testing.T) { testingLogger := testutils.ProduceTestingLogger(t) // test IPv4 local station address - testAddr, err := bacnetip.NewAddress(testingLogger, "1.2.3.4") + testAddr, err := bacgopes.NewAddress(testingLogger, "1.2.3.4") require.NoError(t, err) - matchAddress(t, testAddr, bacnetip.LOCAL_STATION_ADDRESS, nil, l(6), "01020304BAC0") + matchAddress(t, testAddr, bacgopes.LOCAL_STATION_ADDRESS, nil, l(6), "01020304BAC0") assert.Equal(t, "1.2.3.4", testAddr.String()) // test IPv4 local station address with non-standard port - testAddr, err = bacnetip.NewAddress(testingLogger, "1.2.3.4:47809") + testAddr, err = bacgopes.NewAddress(testingLogger, "1.2.3.4:47809") require.NoError(t, err) - matchAddress(t, testAddr, bacnetip.LOCAL_STATION_ADDRESS, nil, l(6), "01020304BAC1") + matchAddress(t, testAddr, bacgopes.LOCAL_STATION_ADDRESS, nil, l(6), "01020304BAC1") assert.Equal(t, "1.2.3.4:47809", testAddr.String()) // test IPv4 local station address with unrecognized port - testAddr, err = bacnetip.NewAddress(testingLogger, "1.2.3.4:47999") + testAddr, err = bacgopes.NewAddress(testingLogger, "1.2.3.4:47999") require.NoError(t, err) - matchAddress(t, testAddr, bacnetip.LOCAL_STATION_ADDRESS, nil, l(6), "01020304bb7f") + matchAddress(t, testAddr, bacgopes.LOCAL_STATION_ADDRESS, nil, l(6), "01020304bb7f") assert.Equal(t, "0x01020304bb7f", testAddr.String()) } @@ -116,9 +115,9 @@ func TestAddressEthStr(t *testing.T) { testingLogger := testutils.ProduceTestingLogger(t) // test IPv4 local station address - testAddr, err := bacnetip.NewAddress(testingLogger, "01:02:03:04:05:06") + testAddr, err := bacgopes.NewAddress(testingLogger, "01:02:03:04:05:06") require.NoError(t, err) - matchAddress(t, testAddr, bacnetip.LOCAL_STATION_ADDRESS, nil, l(6), "010203040506") + matchAddress(t, testAddr, bacgopes.LOCAL_STATION_ADDRESS, nil, l(6), "010203040506") assert.Equal(t, "0x010203040506", testAddr.String()) } @@ -126,38 +125,38 @@ func TestAddressLocalStationStr(t *testing.T) { testingLogger := testutils.ProduceTestingLogger(t) // test integer local station - testAddr, err := bacnetip.NewAddress(testingLogger, "1") + testAddr, err := bacgopes.NewAddress(testingLogger, "1") require.NoError(t, err) assert.Equal(t, "1", testAddr.String()) - testAddr, err = bacnetip.NewAddress(testingLogger, "254") + testAddr, err = bacgopes.NewAddress(testingLogger, "254") require.NoError(t, err) assert.Equal(t, "254", testAddr.String()) // Test bad integer - _, err = bacnetip.NewAddress(testingLogger, 256) + _, err = bacgopes.NewAddress(testingLogger, 256) assert.Error(t, err) // test modern hex string - testAddr, err = bacnetip.NewAddress(testingLogger, "0x01") + testAddr, err = bacgopes.NewAddress(testingLogger, "0x01") require.NoError(t, err) - matchAddress(t, testAddr, bacnetip.LOCAL_STATION_ADDRESS, nil, l(1), "01") + matchAddress(t, testAddr, bacgopes.LOCAL_STATION_ADDRESS, nil, l(1), "01") assert.Equal(t, "1", testAddr.String()) - testAddr, err = bacnetip.NewAddress(testingLogger, "0x0102") + testAddr, err = bacgopes.NewAddress(testingLogger, "0x0102") require.NoError(t, err) - matchAddress(t, testAddr, bacnetip.LOCAL_STATION_ADDRESS, nil, l(2), "0102") + matchAddress(t, testAddr, bacgopes.LOCAL_STATION_ADDRESS, nil, l(2), "0102") assert.Equal(t, "0x0102", testAddr.String()) // test old school hex string - testAddr, err = bacnetip.NewAddress(testingLogger, "X'01'") + testAddr, err = bacgopes.NewAddress(testingLogger, "X'01'") require.NoError(t, err) - matchAddress(t, testAddr, bacnetip.LOCAL_STATION_ADDRESS, nil, l(1), "01") + matchAddress(t, testAddr, bacgopes.LOCAL_STATION_ADDRESS, nil, l(1), "01") assert.Equal(t, "1", testAddr.String()) - testAddr, err = bacnetip.NewAddress(testingLogger, "X'0102'") + testAddr, err = bacgopes.NewAddress(testingLogger, "X'0102'") require.NoError(t, err) - matchAddress(t, testAddr, bacnetip.LOCAL_STATION_ADDRESS, nil, l(2), "0102") + matchAddress(t, testAddr, bacgopes.LOCAL_STATION_ADDRESS, nil, l(2), "0102") assert.Equal(t, "0x0102", testAddr.String()) } @@ -165,7 +164,7 @@ func TestAddressLocalBroadcastStr(t *testing.T) { testingLogger := testutils.ProduceTestingLogger(t) // test IPv4 local station address - testAddr, err := bacnetip.NewAddress(testingLogger, "*") + testAddr, err := bacgopes.NewAddress(testingLogger, "*") require.NoError(t, err) assert.Equal(t, "*", testAddr.String()) } @@ -174,7 +173,7 @@ func TestAddressRemoteBroadcastStr(t *testing.T) { testingLogger := testutils.ProduceTestingLogger(t) // test IPv4 local station address - testAddr, err := bacnetip.NewAddress(testingLogger, "1:*") + testAddr, err := bacgopes.NewAddress(testingLogger, "1:*") require.NoError(t, err) assert.Equal(t, "1:*", testAddr.String()) } @@ -183,49 +182,49 @@ func TestAddressRemoteStationStr(t *testing.T) { testingLogger := testutils.ProduceTestingLogger(t) // test IPv4 local station address - testAddr, err := bacnetip.NewAddress(testingLogger, "1:2") + testAddr, err := bacgopes.NewAddress(testingLogger, "1:2") require.NoError(t, err) - matchAddress(t, testAddr, bacnetip.REMOTE_STATION_ADDRESS, n(1), l(1), "02") + matchAddress(t, testAddr, bacgopes.REMOTE_STATION_ADDRESS, n(1), l(1), "02") assert.Equal(t, "1:2", testAddr.String()) - testAddr, err = bacnetip.NewAddress(testingLogger, "1:254") + testAddr, err = bacgopes.NewAddress(testingLogger, "1:254") require.NoError(t, err) - matchAddress(t, testAddr, bacnetip.REMOTE_STATION_ADDRESS, n(1), l(1), "fe") + matchAddress(t, testAddr, bacgopes.REMOTE_STATION_ADDRESS, n(1), l(1), "fe") assert.Equal(t, "1:254", testAddr.String()) // test bad network and mode - _, err = bacnetip.NewAddress(testingLogger, "65536:2") + _, err = bacgopes.NewAddress(testingLogger, "65536:2") assert.Error(t, err) - _, err = bacnetip.NewAddress(testingLogger, "1:256") + _, err = bacgopes.NewAddress(testingLogger, "1:256") assert.Error(t, err) // test moder hex string - testAddr, err = bacnetip.NewAddress(testingLogger, "1:0x02") + testAddr, err = bacgopes.NewAddress(testingLogger, "1:0x02") require.NoError(t, err) - matchAddress(t, testAddr, bacnetip.REMOTE_STATION_ADDRESS, n(1), l(1), "02") + matchAddress(t, testAddr, bacgopes.REMOTE_STATION_ADDRESS, n(1), l(1), "02") assert.Equal(t, "1:2", testAddr.String()) // test bad network - _, err = bacnetip.NewAddress(testingLogger, "65536:0x02") + _, err = bacgopes.NewAddress(testingLogger, "65536:0x02") assert.Error(t, err) - testAddr, err = bacnetip.NewAddress(testingLogger, "1:0x0203") + testAddr, err = bacgopes.NewAddress(testingLogger, "1:0x0203") require.NoError(t, err) - matchAddress(t, testAddr, bacnetip.REMOTE_STATION_ADDRESS, n(1), l(2), "0203") + matchAddress(t, testAddr, bacgopes.REMOTE_STATION_ADDRESS, n(1), l(2), "0203") assert.Equal(t, "1:0x0203", testAddr.String()) // test old school hex - testAddr, err = bacnetip.NewAddress(testingLogger, "1:X'02'") + testAddr, err = bacgopes.NewAddress(testingLogger, "1:X'02'") require.NoError(t, err) - matchAddress(t, testAddr, bacnetip.REMOTE_STATION_ADDRESS, n(1), l(1), "02") + matchAddress(t, testAddr, bacgopes.REMOTE_STATION_ADDRESS, n(1), l(1), "02") assert.Equal(t, "1:2", testAddr.String()) - testAddr, err = bacnetip.NewAddress(testingLogger, "1:X'0203'") + testAddr, err = bacgopes.NewAddress(testingLogger, "1:X'0203'") require.NoError(t, err) - matchAddress(t, testAddr, bacnetip.REMOTE_STATION_ADDRESS, n(1), l(2), "0203") + matchAddress(t, testAddr, bacgopes.REMOTE_STATION_ADDRESS, n(1), l(2), "0203") assert.Equal(t, "1:0x0203", testAddr.String()) - _, err = bacnetip.NewAddress(testingLogger, "65536:X'02'") + _, err = bacgopes.NewAddress(testingLogger, "65536:X'02'") assert.Error(t, err) } @@ -233,9 +232,9 @@ func TestAddressGlobalBroadcastStr(t *testing.T) { testingLogger := testutils.ProduceTestingLogger(t) // test IPv4 local station address - testAddr, err := bacnetip.NewAddress(testingLogger, "*:*") + testAddr, err := bacgopes.NewAddress(testingLogger, "*:*") require.NoError(t, err) - matchAddress(t, testAddr, bacnetip.GLOBAL_BROADCAST_ADDRESS, nil, nil, "") + matchAddress(t, testAddr, bacgopes.GLOBAL_BROADCAST_ADDRESS, nil, nil, "") assert.Equal(t, "*:*", testAddr.String()) } @@ -243,61 +242,61 @@ func TestLocalStation(t *testing.T) { testingLogger := testutils.ProduceTestingLogger(t) // one Parameter - _, err := bacnetip.NewLocalStation(testingLogger, nil, nil) + _, err := bacgopes.NewLocalStation(testingLogger, nil, nil) require.Error(t, err) // test integer - testAddr, err := bacnetip.NewLocalStation(testingLogger, 1, nil) + testAddr, err := bacgopes.NewLocalStation(testingLogger, 1, nil) require.NoError(t, err) - matchAddress(t, testAddr, bacnetip.LOCAL_STATION_ADDRESS, nil, l(1), "01") + matchAddress(t, testAddr, bacgopes.LOCAL_STATION_ADDRESS, nil, l(1), "01") assert.Equal(t, "1", testAddr.String()) - testAddr, err = bacnetip.NewLocalStation(testingLogger, 254, nil) + testAddr, err = bacgopes.NewLocalStation(testingLogger, 254, nil) require.NoError(t, err) - matchAddress(t, testAddr, bacnetip.LOCAL_STATION_ADDRESS, nil, l(1), "fe") + matchAddress(t, testAddr, bacgopes.LOCAL_STATION_ADDRESS, nil, l(1), "fe") assert.Equal(t, "254", testAddr.String()) // Test bad integer - _, err = bacnetip.NewLocalStation(testingLogger, -1, nil) + _, err = bacgopes.NewLocalStation(testingLogger, -1, nil) require.Error(t, err) - _, err = bacnetip.NewLocalStation(testingLogger, 256, nil) + _, err = bacgopes.NewLocalStation(testingLogger, 256, nil) require.Error(t, err) // Test bytes - xtob, err := bacnetip.Xtob("01") + xtob, err := bacgopes.Xtob("01") require.NoError(t, err) - testAddr, err = bacnetip.NewLocalStation(testingLogger, xtob, nil) + testAddr, err = bacgopes.NewLocalStation(testingLogger, xtob, nil) require.NoError(t, err) - matchAddress(t, testAddr, bacnetip.LOCAL_STATION_ADDRESS, nil, l(1), "01") + matchAddress(t, testAddr, bacgopes.LOCAL_STATION_ADDRESS, nil, l(1), "01") assert.Equal(t, "1", testAddr.String()) - xtob, err = bacnetip.Xtob("fe") + xtob, err = bacgopes.Xtob("fe") require.NoError(t, err) - testAddr, err = bacnetip.NewLocalStation(testingLogger, xtob, nil) + testAddr, err = bacgopes.NewLocalStation(testingLogger, xtob, nil) require.NoError(t, err) - matchAddress(t, testAddr, bacnetip.LOCAL_STATION_ADDRESS, nil, l(1), "fe") + matchAddress(t, testAddr, bacgopes.LOCAL_STATION_ADDRESS, nil, l(1), "fe") assert.Equal(t, "254", testAddr.String()) // multi-byte strings are hex encoded - xtob, err = bacnetip.Xtob("0102") + xtob, err = bacgopes.Xtob("0102") require.NoError(t, err) - testAddr, err = bacnetip.NewLocalStation(testingLogger, xtob, nil) + testAddr, err = bacgopes.NewLocalStation(testingLogger, xtob, nil) require.NoError(t, err) - matchAddress(t, testAddr, bacnetip.LOCAL_STATION_ADDRESS, nil, l(2), "0102") + matchAddress(t, testAddr, bacgopes.LOCAL_STATION_ADDRESS, nil, l(2), "0102") assert.Equal(t, "0x0102", testAddr.String()) - xtob, err = bacnetip.Xtob("010203") + xtob, err = bacgopes.Xtob("010203") require.NoError(t, err) - testAddr, err = bacnetip.NewLocalStation(testingLogger, xtob, nil) + testAddr, err = bacgopes.NewLocalStation(testingLogger, xtob, nil) require.NoError(t, err) - matchAddress(t, testAddr, bacnetip.LOCAL_STATION_ADDRESS, nil, l(3), "010203") + matchAddress(t, testAddr, bacgopes.LOCAL_STATION_ADDRESS, nil, l(3), "010203") assert.Equal(t, "0x010203", testAddr.String()) // match and IP address - xtob, err = bacnetip.Xtob("01020304bac0") + xtob, err = bacgopes.Xtob("01020304bac0") require.NoError(t, err) - testAddr, err = bacnetip.NewLocalStation(testingLogger, xtob, nil) + testAddr, err = bacgopes.NewLocalStation(testingLogger, xtob, nil) require.NoError(t, err) - matchAddress(t, testAddr, bacnetip.LOCAL_STATION_ADDRESS, nil, l(6), "01020304bac0") + matchAddress(t, testAddr, bacgopes.LOCAL_STATION_ADDRESS, nil, l(6), "01020304bac0") assert.Equal(t, "1.2.3.4", testAddr.String()) } @@ -305,11 +304,11 @@ func TestRemoteStation(t *testing.T) { testingLogger := testutils.ProduceTestingLogger(t) // two Parameters, correct types - _, err := bacnetip.NewRemoteStation(testingLogger, nil, nil, nil) + _, err := bacgopes.NewRemoteStation(testingLogger, nil, nil, nil) require.Error(t, err) // test bad network - _, err = bacnetip.NewRemoteStation(testingLogger, nil, -11, nil) + _, err = bacgopes.NewRemoteStation(testingLogger, nil, -11, nil) require.Error(t, err) } @@ -321,20 +320,20 @@ func TestRemoteStationInts(t *testing.T) { } // testInteger - testAddr, err := bacnetip.NewRemoteStation(testingLogger, net(1), 1, nil) + testAddr, err := bacgopes.NewRemoteStation(testingLogger, net(1), 1, nil) require.NoError(t, err) - matchAddress(t, testAddr, bacnetip.REMOTE_STATION_ADDRESS, n(1), l(1), "01") + matchAddress(t, testAddr, bacgopes.REMOTE_STATION_ADDRESS, n(1), l(1), "01") assert.Equal(t, "1:1", testAddr.String()) - testAddr, err = bacnetip.NewRemoteStation(testingLogger, net(1), 254, nil) + testAddr, err = bacgopes.NewRemoteStation(testingLogger, net(1), 254, nil) require.NoError(t, err) - matchAddress(t, testAddr, bacnetip.REMOTE_STATION_ADDRESS, n(1), l(1), "fe") + matchAddress(t, testAddr, bacgopes.REMOTE_STATION_ADDRESS, n(1), l(1), "fe") assert.Equal(t, "1:254", testAddr.String()) // test station address - _, err = bacnetip.NewRemoteStation(testingLogger, nil, -1, nil) + _, err = bacgopes.NewRemoteStation(testingLogger, nil, -1, nil) require.Error(t, err) - _, err = bacnetip.NewRemoteStation(testingLogger, nil, 256, nil) + _, err = bacgopes.NewRemoteStation(testingLogger, nil, 256, nil) require.Error(t, err) } @@ -346,33 +345,33 @@ func TestRemoteStationBytes(t *testing.T) { } // multi-byte strings are hex encoded - xtob, err := bacnetip.Xtob("0102") + xtob, err := bacgopes.Xtob("0102") require.NoError(t, err) - testAddr, err := bacnetip.NewRemoteStation(testingLogger, net(1), xtob, nil) + testAddr, err := bacgopes.NewRemoteStation(testingLogger, net(1), xtob, nil) require.NoError(t, err) - matchAddress(t, testAddr, bacnetip.REMOTE_STATION_ADDRESS, n(1), l(2), "0102") + matchAddress(t, testAddr, bacgopes.REMOTE_STATION_ADDRESS, n(1), l(2), "0102") assert.Equal(t, "1:0x0102", testAddr.String()) - xtob, err = bacnetip.Xtob("010203") + xtob, err = bacgopes.Xtob("010203") require.NoError(t, err) - testAddr, err = bacnetip.NewRemoteStation(testingLogger, net(1), xtob, nil) + testAddr, err = bacgopes.NewRemoteStation(testingLogger, net(1), xtob, nil) require.NoError(t, err) - matchAddress(t, testAddr, bacnetip.REMOTE_STATION_ADDRESS, n(1), l(3), "010203") + matchAddress(t, testAddr, bacgopes.REMOTE_STATION_ADDRESS, n(1), l(3), "010203") assert.Equal(t, "1:0x010203", testAddr.String()) // match with IPv4 address - xtob, err = bacnetip.Xtob("01020304bac0") + xtob, err = bacgopes.Xtob("01020304bac0") require.NoError(t, err) - testAddr, err = bacnetip.NewRemoteStation(testingLogger, net(1), xtob, nil) + testAddr, err = bacgopes.NewRemoteStation(testingLogger, net(1), xtob, nil) require.NoError(t, err) - matchAddress(t, testAddr, bacnetip.REMOTE_STATION_ADDRESS, n(1), l(6), "01020304bac0") + matchAddress(t, testAddr, bacgopes.REMOTE_STATION_ADDRESS, n(1), l(6), "01020304bac0") assert.Equal(t, "1:1.2.3.4", testAddr.String()) - xtob, err = bacnetip.Xtob("01020304bac1") + xtob, err = bacgopes.Xtob("01020304bac1") require.NoError(t, err) - testAddr, err = bacnetip.NewRemoteStation(testingLogger, net(1), xtob, nil) + testAddr, err = bacgopes.NewRemoteStation(testingLogger, net(1), xtob, nil) require.NoError(t, err) - matchAddress(t, testAddr, bacnetip.REMOTE_STATION_ADDRESS, n(1), l(6), "01020304bac1") + matchAddress(t, testAddr, bacgopes.REMOTE_STATION_ADDRESS, n(1), l(6), "01020304bac1") assert.Equal(t, "1:1.2.3.4:47809", testAddr.String()) } @@ -383,42 +382,42 @@ func TestRemoteStationIntsRouted(t *testing.T) { return &i } - Address := func(a string) *bacnetip.Address { - address, err := bacnetip.NewAddress(testingLogger, a) + Address := func(a string) *bacgopes.Address { + address, err := bacgopes.NewAddress(testingLogger, a) require.NoError(t, err) return address } // testInteger - testAddr, err := bacnetip.NewRemoteStation(testingLogger, net(1), 1, Address("1.2.3.4")) + testAddr, err := bacgopes.NewRemoteStation(testingLogger, net(1), 1, Address("1.2.3.4")) require.NoError(t, err) - matchAddress(t, testAddr, bacnetip.REMOTE_STATION_ADDRESS, n(1), l(1), "01") + matchAddress(t, testAddr, bacgopes.REMOTE_STATION_ADDRESS, n(1), l(1), "01") assert.Equal(t, "1:1@1.2.3.4", testAddr.String()) - testAddr, err = bacnetip.NewRemoteStation(testingLogger, net(1), 254, Address("1.2.3.4")) + testAddr, err = bacgopes.NewRemoteStation(testingLogger, net(1), 254, Address("1.2.3.4")) require.NoError(t, err) - matchAddress(t, testAddr, bacnetip.REMOTE_STATION_ADDRESS, n(1), l(1), "fe") + matchAddress(t, testAddr, bacgopes.REMOTE_STATION_ADDRESS, n(1), l(1), "fe") assert.Equal(t, "1:254@1.2.3.4", testAddr.String()) - testAddr, err = bacnetip.NewRemoteStation(testingLogger, net(1), 254, Address("1.2.3.4:47809")) + testAddr, err = bacgopes.NewRemoteStation(testingLogger, net(1), 254, Address("1.2.3.4:47809")) require.NoError(t, err) - matchAddress(t, testAddr, bacnetip.REMOTE_STATION_ADDRESS, n(1), l(1), "fe") + matchAddress(t, testAddr, bacgopes.REMOTE_STATION_ADDRESS, n(1), l(1), "fe") assert.Equal(t, "1:254@1.2.3.4:47809", testAddr.String()) - testAddr, err = bacnetip.NewRemoteStation(testingLogger, net(1), 254, Address("0x01020304BAC0")) + testAddr, err = bacgopes.NewRemoteStation(testingLogger, net(1), 254, Address("0x01020304BAC0")) require.NoError(t, err) - matchAddress(t, testAddr, bacnetip.REMOTE_STATION_ADDRESS, n(1), l(1), "fe") + matchAddress(t, testAddr, bacgopes.REMOTE_STATION_ADDRESS, n(1), l(1), "fe") assert.Equal(t, "1:254@1.2.3.4", testAddr.String()) - testAddr, err = bacnetip.NewRemoteStation(testingLogger, net(1), 254, Address("0x01020304BAC1")) + testAddr, err = bacgopes.NewRemoteStation(testingLogger, net(1), 254, Address("0x01020304BAC1")) require.NoError(t, err) - matchAddress(t, testAddr, bacnetip.REMOTE_STATION_ADDRESS, n(1), l(1), "fe") + matchAddress(t, testAddr, bacgopes.REMOTE_STATION_ADDRESS, n(1), l(1), "fe") assert.Equal(t, "1:254@1.2.3.4:47809", testAddr.String()) // test station address - _, err = bacnetip.NewRemoteStation(testingLogger, nil, -1, nil) + _, err = bacgopes.NewRemoteStation(testingLogger, nil, -1, nil) require.Error(t, err) - _, err = bacnetip.NewRemoteStation(testingLogger, nil, 256, nil) + _, err = bacgopes.NewRemoteStation(testingLogger, nil, 256, nil) require.Error(t, err) } @@ -429,166 +428,166 @@ func TestRemoteStationBytesRouted(t *testing.T) { return &i } - Address := func(a string) *bacnetip.Address { - address, err := bacnetip.NewAddress(testingLogger, a) + Address := func(a string) *bacgopes.Address { + address, err := bacgopes.NewAddress(testingLogger, a) require.NoError(t, err) return address } // multi-byte strings are hex encoded - xtob, err := bacnetip.Xtob("0102") + xtob, err := bacgopes.Xtob("0102") require.NoError(t, err) - testAddr, err := bacnetip.NewRemoteStation(testingLogger, net(1), xtob, Address("1.2.3.4")) + testAddr, err := bacgopes.NewRemoteStation(testingLogger, net(1), xtob, Address("1.2.3.4")) require.NoError(t, err) - matchAddress(t, testAddr, bacnetip.REMOTE_STATION_ADDRESS, n(1), l(2), "0102") + matchAddress(t, testAddr, bacgopes.REMOTE_STATION_ADDRESS, n(1), l(2), "0102") assert.Equal(t, "1:0x0102@1.2.3.4", testAddr.String()) - xtob, err = bacnetip.Xtob("010203") + xtob, err = bacgopes.Xtob("010203") require.NoError(t, err) - testAddr, err = bacnetip.NewRemoteStation(testingLogger, net(1), xtob, Address("1.2.3.4")) + testAddr, err = bacgopes.NewRemoteStation(testingLogger, net(1), xtob, Address("1.2.3.4")) require.NoError(t, err) - matchAddress(t, testAddr, bacnetip.REMOTE_STATION_ADDRESS, n(1), l(3), "010203") + matchAddress(t, testAddr, bacgopes.REMOTE_STATION_ADDRESS, n(1), l(3), "010203") assert.Equal(t, "1:0x010203@1.2.3.4", testAddr.String()) - xtob, err = bacnetip.Xtob("010203") + xtob, err = bacgopes.Xtob("010203") require.NoError(t, err) - testAddr, err = bacnetip.NewRemoteStation(testingLogger, net(1), xtob, Address("1.2.3.4:47809")) + testAddr, err = bacgopes.NewRemoteStation(testingLogger, net(1), xtob, Address("1.2.3.4:47809")) require.NoError(t, err) - matchAddress(t, testAddr, bacnetip.REMOTE_STATION_ADDRESS, n(1), l(3), "010203") + matchAddress(t, testAddr, bacgopes.REMOTE_STATION_ADDRESS, n(1), l(3), "010203") assert.Equal(t, "1:0x010203@1.2.3.4:47809", testAddr.String()) - xtob, err = bacnetip.Xtob("010203") + xtob, err = bacgopes.Xtob("010203") require.NoError(t, err) - testAddr, err = bacnetip.NewRemoteStation(testingLogger, net(1), xtob, Address("0x01020304BAC0")) + testAddr, err = bacgopes.NewRemoteStation(testingLogger, net(1), xtob, Address("0x01020304BAC0")) require.NoError(t, err) - matchAddress(t, testAddr, bacnetip.REMOTE_STATION_ADDRESS, n(1), l(3), "010203") + matchAddress(t, testAddr, bacgopes.REMOTE_STATION_ADDRESS, n(1), l(3), "010203") assert.Equal(t, "1:0x010203@1.2.3.4", testAddr.String()) - xtob, err = bacnetip.Xtob("010203") + xtob, err = bacgopes.Xtob("010203") require.NoError(t, err) - testAddr, err = bacnetip.NewRemoteStation(testingLogger, net(1), xtob, Address("0x01020304BAC1")) + testAddr, err = bacgopes.NewRemoteStation(testingLogger, net(1), xtob, Address("0x01020304BAC1")) require.NoError(t, err) - matchAddress(t, testAddr, bacnetip.REMOTE_STATION_ADDRESS, n(1), l(3), "010203") + matchAddress(t, testAddr, bacgopes.REMOTE_STATION_ADDRESS, n(1), l(3), "010203") assert.Equal(t, "1:0x010203@1.2.3.4:47809", testAddr.String()) // match with an IPv4 address - xtob, err = bacnetip.Xtob("01020304bac0") + xtob, err = bacgopes.Xtob("01020304bac0") require.NoError(t, err) - testAddr, err = bacnetip.NewRemoteStation(testingLogger, net(1), xtob, Address("1.2.3.4")) + testAddr, err = bacgopes.NewRemoteStation(testingLogger, net(1), xtob, Address("1.2.3.4")) require.NoError(t, err) - matchAddress(t, testAddr, bacnetip.REMOTE_STATION_ADDRESS, n(1), l(6), "01020304bac0") + matchAddress(t, testAddr, bacgopes.REMOTE_STATION_ADDRESS, n(1), l(6), "01020304bac0") assert.Equal(t, "1:1.2.3.4@1.2.3.4", testAddr.String()) - xtob, err = bacnetip.Xtob("01020304bac0") + xtob, err = bacgopes.Xtob("01020304bac0") require.NoError(t, err) - testAddr, err = bacnetip.NewRemoteStation(testingLogger, net(1), xtob, Address("1.2.3.4:47809")) + testAddr, err = bacgopes.NewRemoteStation(testingLogger, net(1), xtob, Address("1.2.3.4:47809")) require.NoError(t, err) - matchAddress(t, testAddr, bacnetip.REMOTE_STATION_ADDRESS, n(1), l(6), "01020304bac0") + matchAddress(t, testAddr, bacgopes.REMOTE_STATION_ADDRESS, n(1), l(6), "01020304bac0") assert.Equal(t, "1:1.2.3.4@1.2.3.4:47809", testAddr.String()) - xtob, err = bacnetip.Xtob("01020304bac0") + xtob, err = bacgopes.Xtob("01020304bac0") require.NoError(t, err) - testAddr, err = bacnetip.NewRemoteStation(testingLogger, net(1), xtob, Address("0x01020304BAC0")) + testAddr, err = bacgopes.NewRemoteStation(testingLogger, net(1), xtob, Address("0x01020304BAC0")) require.NoError(t, err) - matchAddress(t, testAddr, bacnetip.REMOTE_STATION_ADDRESS, n(1), l(6), "01020304bac0") + matchAddress(t, testAddr, bacgopes.REMOTE_STATION_ADDRESS, n(1), l(6), "01020304bac0") assert.Equal(t, "1:1.2.3.4@1.2.3.4", testAddr.String()) - xtob, err = bacnetip.Xtob("01020304bac0") + xtob, err = bacgopes.Xtob("01020304bac0") require.NoError(t, err) - testAddr, err = bacnetip.NewRemoteStation(testingLogger, net(1), xtob, Address("0x01020304BAC1")) + testAddr, err = bacgopes.NewRemoteStation(testingLogger, net(1), xtob, Address("0x01020304BAC1")) require.NoError(t, err) - matchAddress(t, testAddr, bacnetip.REMOTE_STATION_ADDRESS, n(1), l(6), "01020304bac0") + matchAddress(t, testAddr, bacgopes.REMOTE_STATION_ADDRESS, n(1), l(6), "01020304bac0") assert.Equal(t, "1:1.2.3.4@1.2.3.4:47809", testAddr.String()) } func TestLocalBroadcast(t *testing.T) { - testAddr := bacnetip.NewLocalBroadcast(nil) - matchAddress(t, testAddr, bacnetip.LOCAL_BROADCAST_ADDRESS, nil, nil, "") + testAddr := bacgopes.NewLocalBroadcast(nil) + matchAddress(t, testAddr, bacgopes.LOCAL_BROADCAST_ADDRESS, nil, nil, "") assert.Equal(t, "*", testAddr.String()) } func TestLocalBroadcastRouted(t *testing.T) { testingLogger := testutils.ProduceTestingLogger(t) - Address := func(a string) *bacnetip.Address { - address, err := bacnetip.NewAddress(testingLogger, a) + Address := func(a string) *bacgopes.Address { + address, err := bacgopes.NewAddress(testingLogger, a) require.NoError(t, err) return address } - testAddr := bacnetip.NewLocalBroadcast(Address("1.2.3.4")) - matchAddress(t, testAddr, bacnetip.LOCAL_BROADCAST_ADDRESS, nil, nil, "") + testAddr := bacgopes.NewLocalBroadcast(Address("1.2.3.4")) + matchAddress(t, testAddr, bacgopes.LOCAL_BROADCAST_ADDRESS, nil, nil, "") assert.Equal(t, "*@1.2.3.4", testAddr.String()) } func TestRemoteBroadcast(t *testing.T) { - testAddr := bacnetip.NewRemoteBroadcast(1, nil) - matchAddress(t, testAddr, bacnetip.REMOTE_BROADCAST_ADDRESS, n(1), nil, "") + testAddr := bacgopes.NewRemoteBroadcast(1, nil) + matchAddress(t, testAddr, bacgopes.REMOTE_BROADCAST_ADDRESS, n(1), nil, "") assert.Equal(t, "1:*", testAddr.String()) } func TestRemoteBroadcastRouted(t *testing.T) { testingLogger := testutils.ProduceTestingLogger(t) - Address := func(a string) *bacnetip.Address { - address, err := bacnetip.NewAddress(testingLogger, a) + Address := func(a string) *bacgopes.Address { + address, err := bacgopes.NewAddress(testingLogger, a) require.NoError(t, err) return address } - testAddr := bacnetip.NewRemoteBroadcast(1, Address("1.2.3.4")) - matchAddress(t, testAddr, bacnetip.REMOTE_BROADCAST_ADDRESS, n(1), nil, "") + testAddr := bacgopes.NewRemoteBroadcast(1, Address("1.2.3.4")) + matchAddress(t, testAddr, bacgopes.REMOTE_BROADCAST_ADDRESS, n(1), nil, "") assert.Equal(t, "1:*@1.2.3.4", testAddr.String()) } func TestGlobalBroadcast(t *testing.T) { - testAddr := bacnetip.NewGlobalBroadcast(nil) - matchAddress(t, testAddr, bacnetip.GLOBAL_BROADCAST_ADDRESS, nil, nil, "") + testAddr := bacgopes.NewGlobalBroadcast(nil) + matchAddress(t, testAddr, bacgopes.GLOBAL_BROADCAST_ADDRESS, nil, nil, "") assert.Equal(t, "*:*", testAddr.String()) } func TestGlobalBroadcastRouted(t *testing.T) { testingLogger := testutils.ProduceTestingLogger(t) - Address := func(a string) *bacnetip.Address { - address, err := bacnetip.NewAddress(testingLogger, a) + Address := func(a string) *bacgopes.Address { + address, err := bacgopes.NewAddress(testingLogger, a) require.NoError(t, err) return address } - testAddr := bacnetip.NewGlobalBroadcast(Address("1.2.3.4")) - matchAddress(t, testAddr, bacnetip.GLOBAL_BROADCAST_ADDRESS, nil, nil, "") + testAddr := bacgopes.NewGlobalBroadcast(Address("1.2.3.4")) + matchAddress(t, testAddr, bacgopes.GLOBAL_BROADCAST_ADDRESS, nil, nil, "") assert.Equal(t, "*:*@1.2.3.4", testAddr.String()) - testAddr = bacnetip.NewGlobalBroadcast(Address("1.2.3.4:47809")) - matchAddress(t, testAddr, bacnetip.GLOBAL_BROADCAST_ADDRESS, nil, nil, "") + testAddr = bacgopes.NewGlobalBroadcast(Address("1.2.3.4:47809")) + matchAddress(t, testAddr, bacgopes.GLOBAL_BROADCAST_ADDRESS, nil, nil, "") assert.Equal(t, "*:*@1.2.3.4:47809", testAddr.String()) } func TestAddressEquality(t *testing.T) { testingLogger := testutils.ProduceTestingLogger(t) - Address := func(a any) *bacnetip.Address { - address, err := bacnetip.NewAddress(testingLogger, a) + Address := func(a any) *bacgopes.Address { + address, err := bacgopes.NewAddress(testingLogger, a) require.NoError(t, err) return address } - LocalStation := func(addr any) *bacnetip.Address { - station, err := bacnetip.NewLocalStation(testingLogger, addr, nil) + LocalStation := func(addr any) *bacgopes.Address { + station, err := bacgopes.NewLocalStation(testingLogger, addr, nil) require.NoError(t, err) return station } - RemoteStation := func(net uint16, addr any) *bacnetip.Address { - station, err := bacnetip.NewRemoteStation(testingLogger, &net, addr, nil) + RemoteStation := func(net uint16, addr any) *bacgopes.Address { + station, err := bacgopes.NewRemoteStation(testingLogger, &net, addr, nil) require.NoError(t, err) return station } - LocalBroadcast := func() *bacnetip.Address { - broadcast := bacnetip.NewLocalBroadcast(nil) + LocalBroadcast := func() *bacgopes.Address { + broadcast := bacgopes.NewLocalBroadcast(nil) return broadcast } - RemoteBroadcast := func(net uint16) *bacnetip.Address { - broadcast := bacnetip.NewRemoteBroadcast(net, nil) + RemoteBroadcast := func(net uint16) *bacgopes.Address { + broadcast := bacgopes.NewRemoteBroadcast(net, nil) return broadcast } - GlobalBroadcast := func() *bacnetip.Address { - broadcast := bacnetip.NewGlobalBroadcast(nil) + GlobalBroadcast := func() *bacgopes.Address { + broadcast := bacgopes.NewGlobalBroadcast(nil) return broadcast } @@ -603,22 +602,22 @@ func TestAddressEquality(t *testing.T) { func TestAddressEqualityRouted(t *testing.T) { testingLogger := testutils.ProduceTestingLogger(t) - Address := func(a any) *bacnetip.Address { - address, err := bacnetip.NewAddress(testingLogger, a) + Address := func(a any) *bacgopes.Address { + address, err := bacgopes.NewAddress(testingLogger, a) require.NoError(t, err) return address } - RemoteStation := func(net uint16, addr any, route *bacnetip.Address) *bacnetip.Address { - station, err := bacnetip.NewRemoteStation(testingLogger, &net, addr, route) + RemoteStation := func(net uint16, addr any, route *bacgopes.Address) *bacgopes.Address { + station, err := bacgopes.NewRemoteStation(testingLogger, &net, addr, route) require.NoError(t, err) return station } - RemoteBroadcast := func(net uint16, route *bacnetip.Address) *bacnetip.Address { - broadcast := bacnetip.NewRemoteBroadcast(net, route) + RemoteBroadcast := func(net uint16, route *bacgopes.Address) *bacgopes.Address { + broadcast := bacgopes.NewRemoteBroadcast(net, route) return broadcast } - GlobalBroadcast := func(route *bacnetip.Address) *bacnetip.Address { - broadcast := bacnetip.NewGlobalBroadcast(route) + GlobalBroadcast := func(route *bacgopes.Address) *bacgopes.Address { + broadcast := bacgopes.NewGlobalBroadcast(route) return broadcast } diff --git a/plc4go/internal/bacnetip/tests/test_pdu/test_pci_test.go b/plc4go/internal/bacnetip/bacgopes/tests/test_pdu/test_pci_test.go similarity index 100% rename from plc4go/internal/bacnetip/tests/test_pdu/test_pci_test.go rename to plc4go/internal/bacnetip/bacgopes/tests/test_pdu/test_pci_test.go diff --git a/plc4go/internal/bacnetip/tests/test_pdu/test_pdu_test.go b/plc4go/internal/bacnetip/bacgopes/tests/test_pdu/test_pdu_test.go similarity index 100% rename from plc4go/internal/bacnetip/tests/test_pdu/test_pdu_test.go rename to plc4go/internal/bacnetip/bacgopes/tests/test_pdu/test_pdu_test.go diff --git a/plc4go/internal/bacnetip/tests/test_primitive_data/common_test.go b/plc4go/internal/bacnetip/bacgopes/tests/test_primitive_data/common_test.go similarity index 84% rename from plc4go/internal/bacnetip/tests/test_primitive_data/common_test.go rename to plc4go/internal/bacnetip/bacgopes/tests/test_primitive_data/common_test.go index 31b6558fb7b..75f1c258c12 100644 --- a/plc4go/internal/bacnetip/tests/test_primitive_data/common_test.go +++ b/plc4go/internal/bacnetip/bacgopes/tests/test_primitive_data/common_test.go @@ -19,10 +19,10 @@ package test_primitive_data -import "github.com/apache/plc4x/plc4go/internal/bacnetip" +import "github.com/apache/plc4x/plc4go/internal/bacnetip/bacgopes" -func Tag(args ...any) bacnetip.Tag { - tag, err := bacnetip.NewTag(args) +func Tag(args ...any) bacgopes.Tag { + tag, err := bacgopes.NewTag(args) if err != nil { panic(err) } @@ -30,7 +30,7 @@ func Tag(args ...any) bacnetip.Tag { } func xtob(hexString string) []byte { - bytes, err := bacnetip.Xtob(hexString) + bytes, err := bacgopes.Xtob(hexString) if err != nil { panic(err) } diff --git a/plc4go/internal/bacnetip/tests/test_primitive_data/test_bit_string_test.go b/plc4go/internal/bacnetip/bacgopes/tests/test_primitive_data/test_bit_string_test.go similarity index 82% rename from plc4go/internal/bacnetip/tests/test_primitive_data/test_bit_string_test.go rename to plc4go/internal/bacnetip/bacgopes/tests/test_primitive_data/test_bit_string_test.go index db71229d883..c822eac3c2e 100644 --- a/plc4go/internal/bacnetip/tests/test_primitive_data/test_bit_string_test.go +++ b/plc4go/internal/bacnetip/bacgopes/tests/test_primitive_data/test_bit_string_test.go @@ -25,14 +25,13 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/apache/plc4x/plc4go/internal/bacnetip/bacgopes" + . "github.com/apache/plc4x/plc4go/internal/bacnetip/bacgopes/constructors" "github.com/apache/plc4x/plc4go/protocols/bacnetip/readwrite/model" - - "github.com/apache/plc4x/plc4go/internal/bacnetip" - . "github.com/apache/plc4x/plc4go/internal/bacnetip/constructors" ) type sampleBitString struct { - *bacnetip.BitString + *bacgopes.BitString bitLen int bitNames map[string]int } @@ -50,7 +49,7 @@ func SampleBitString(args ...any) *sampleBitString { //nolint:all }, } var err error - s.BitString, err = bacnetip.NewBitStringWithExtension(s, args) + s.BitString, err = bacgopes.NewBitStringWithExtension(s, args) if err != nil { panic(err) } @@ -70,22 +69,22 @@ func (s *sampleBitString) String() string { } // Convert a hex string to a bit_string application tag. -func bitStringTag(t *testing.T, x string) bacnetip.Tag { +func bitStringTag(t *testing.T, x string) bacgopes.Tag { t.Helper() - b, err := bacnetip.Xtob(x) + b, err := bacgopes.Xtob(x) require.NoError(t, err) - tag, err := bacnetip.NewTag(bacnetip.NewArgs(model.TagClass_APPLICATION_TAGS, bacnetip.TagBitStringAppTag, len(b), b)) + tag, err := bacgopes.NewTag(bacgopes.NewArgs(model.TagClass_APPLICATION_TAGS, bacgopes.TagBitStringAppTag, len(b), b)) require.NoError(t, err) return tag } -func bitStringEncode(obj *bacnetip.BitString) bacnetip.Tag { +func bitStringEncode(obj *bacgopes.BitString) bacgopes.Tag { tag := Tag() obj.Encode(tag) return tag } -func bitStringDecode(tag bacnetip.Tag) *bacnetip.BitString { +func bitStringDecode(tag bacgopes.Tag) *bacgopes.BitString { obj := BitString(tag) return obj } @@ -141,25 +140,25 @@ func TestBitStringSample(t *testing.T) { } func TestBitStringTag(t *testing.T) { - tag := Tag(bacnetip.TagApplicationTagClass, bacnetip.TagBitStringAppTag, 1, xtob("08")) + tag := Tag(bacgopes.TagApplicationTagClass, bacgopes.TagBitStringAppTag, 1, xtob("08")) obj := BitString(tag) assert.Len(t, obj.GetValue(), 0) - tag = Tag(bacnetip.TagApplicationTagClass, bacnetip.TagBitStringAppTag, 1, xtob("0102")) + tag = Tag(bacgopes.TagApplicationTagClass, bacgopes.TagBitStringAppTag, 1, xtob("0102")) obj = BitString(tag) assert.Equal(t, []bool{false, false, false, false, false, false, true}, obj.GetValue()) - tag = Tag(bacnetip.TagApplicationTagClass, bacnetip.TagBitStringAppTag, 1, xtob("")) + tag = Tag(bacgopes.TagApplicationTagClass, bacgopes.TagBitStringAppTag, 1, xtob("")) assert.Panics(t, func() { BitString(tag) }) - tag = Tag(bacnetip.TagContextTagClass, 0, 1, xtob("ff")) + tag = Tag(bacgopes.TagContextTagClass, 0, 1, xtob("ff")) assert.Panics(t, func() { BitString(tag) }) - tag = Tag(bacnetip.TagApplicationTagClass, 0) + tag = Tag(bacgopes.TagApplicationTagClass, 0) assert.Panics(t, func() { BitString(tag) }) diff --git a/plc4go/internal/bacnetip/tests/test_primitive_data/test_boolean_test.go b/plc4go/internal/bacnetip/bacgopes/tests/test_primitive_data/test_boolean_test.go similarity index 89% rename from plc4go/internal/bacnetip/tests/test_primitive_data/test_boolean_test.go rename to plc4go/internal/bacnetip/bacgopes/tests/test_primitive_data/test_boolean_test.go index 8dbb09e1f03..63bf6da8cec 100644 --- a/plc4go/internal/bacnetip/tests/test_primitive_data/test_boolean_test.go +++ b/plc4go/internal/bacnetip/bacgopes/tests/test_primitive_data/test_boolean_test.go @@ -24,13 +24,12 @@ import ( "github.com/stretchr/testify/assert" + "github.com/apache/plc4x/plc4go/internal/bacnetip/bacgopes" + . "github.com/apache/plc4x/plc4go/internal/bacnetip/bacgopes/constructors" "github.com/apache/plc4x/plc4go/protocols/bacnetip/readwrite/model" - - "github.com/apache/plc4x/plc4go/internal/bacnetip" - . "github.com/apache/plc4x/plc4go/internal/bacnetip/constructors" ) -func booleanTag(value bool) bacnetip.Tag { +func booleanTag(value bool) bacgopes.Tag { intValue := 0 if value { intValue = 1 @@ -40,14 +39,14 @@ func booleanTag(value bool) bacnetip.Tag { } // Encode a Boolean object into a tag. -func booleanEncode(obj *bacnetip.Boolean) bacnetip.Tag { +func booleanEncode(obj *bacgopes.Boolean) bacgopes.Tag { tag := Tag() obj.Encode(tag) return tag } // Decode a boolean application tag into a boolean. -func booleanDecode(tag bacnetip.Tag) *bacnetip.Boolean { +func booleanDecode(tag bacgopes.Tag) *bacgopes.Boolean { obj := Boolean(tag) return obj @@ -102,7 +101,7 @@ func TestBooleanTag(t *testing.T) { Boolean(tag) }) - tag = Tag(bacnetip.TagOpeningTagClass, 0) + tag = Tag(bacgopes.TagOpeningTagClass, 0) assert.Panics(t, func() { Boolean(tag) }) diff --git a/plc4go/internal/bacnetip/tests/test_primitive_data/test_character_string_test.go b/plc4go/internal/bacnetip/bacgopes/tests/test_primitive_data/test_character_string_test.go similarity index 91% rename from plc4go/internal/bacnetip/tests/test_primitive_data/test_character_string_test.go rename to plc4go/internal/bacnetip/bacgopes/tests/test_primitive_data/test_character_string_test.go index 507d5803808..54f1a6ff823 100644 --- a/plc4go/internal/bacnetip/tests/test_primitive_data/test_character_string_test.go +++ b/plc4go/internal/bacnetip/bacgopes/tests/test_primitive_data/test_character_string_test.go @@ -25,30 +25,29 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/apache/plc4x/plc4go/internal/bacnetip/bacgopes" + . "github.com/apache/plc4x/plc4go/internal/bacnetip/bacgopes/constructors" "github.com/apache/plc4x/plc4go/protocols/bacnetip/readwrite/model" - - "github.com/apache/plc4x/plc4go/internal/bacnetip" - . "github.com/apache/plc4x/plc4go/internal/bacnetip/constructors" ) const foxMessage = "the quick brown fox jumped over the lazy dog" // Convert a hex string to a character_string application tag. -func CharacterStringTag(x string) bacnetip.Tag { +func CharacterStringTag(x string) bacgopes.Tag { b := xtob(x) tag := Tag(model.TagClass_APPLICATION_TAGS, model.BACnetDataType_CHARACTER_STRING, len(b), b) return tag } // Encode a CharacterString object into a tag. -func CharacterStringEncode(obj *bacnetip.CharacterString) bacnetip.Tag { +func CharacterStringEncode(obj *bacgopes.CharacterString) bacgopes.Tag { tag := Tag() obj.Encode(tag) return tag } // Decode a CharacterString application tag into a CharacterString. -func CharacterStringDecode(tag bacnetip.Tag) *bacnetip.CharacterString { +func CharacterStringDecode(tag bacgopes.Tag) *bacgopes.CharacterString { obj := CharacterString(tag) return obj @@ -118,7 +117,7 @@ func TestCharacterStringTag(t *testing.T) { CharacterString(tag) }) - tag = Tag(bacnetip.TagOpeningTagClass, 0) + tag = Tag(bacgopes.TagOpeningTagClass, 0) assert.Panics(t, func() { CharacterString(tag) }) diff --git a/plc4go/internal/bacnetip/tests/test_primitive_data/test_date_test.go b/plc4go/internal/bacnetip/bacgopes/tests/test_primitive_data/test_date_test.go similarity index 81% rename from plc4go/internal/bacnetip/tests/test_primitive_data/test_date_test.go rename to plc4go/internal/bacnetip/bacgopes/tests/test_primitive_data/test_date_test.go index 5d08d417d98..78958478bbd 100644 --- a/plc4go/internal/bacnetip/tests/test_primitive_data/test_date_test.go +++ b/plc4go/internal/bacnetip/bacgopes/tests/test_primitive_data/test_date_test.go @@ -24,28 +24,27 @@ import ( "github.com/stretchr/testify/assert" + "github.com/apache/plc4x/plc4go/internal/bacnetip/bacgopes" + . "github.com/apache/plc4x/plc4go/internal/bacnetip/bacgopes/constructors" "github.com/apache/plc4x/plc4go/protocols/bacnetip/readwrite/model" - - "github.com/apache/plc4x/plc4go/internal/bacnetip" - . "github.com/apache/plc4x/plc4go/internal/bacnetip/constructors" ) // Convert a hex string to a character_string application tag. -func DateTag(x string) bacnetip.Tag { +func DateTag(x string) bacgopes.Tag { b := xtob(x) tag := Tag(model.TagClass_APPLICATION_TAGS, model.BACnetDataType_DATE, len(b), b) return tag } // Encode a Date object into a tag. -func DateEncode(obj *bacnetip.Date) bacnetip.Tag { +func DateEncode(obj *bacgopes.Date) bacgopes.Tag { tag := Tag() obj.Encode(tag) return tag } // Decode a Date application tag into a Date. -func DateDecode(tag bacnetip.Tag) *bacnetip.Date { +func DateDecode(tag bacgopes.Tag) *bacgopes.Date { obj := Date(tag) return obj @@ -65,7 +64,7 @@ func DateEndec(t *testing.T, v string, x string) { func TestDate(t *testing.T) { obj := Date() - assert.Equal(t, bacnetip.DateTuple{Year: 0xff, Month: 0xff, Day: 0xff, DayOfWeek: 0xff}, obj.GetValue()) + assert.Equal(t, bacgopes.DateTuple{Year: 0xff, Month: 0xff, Day: 0xff, DayOfWeek: 0xff}, obj.GetValue()) assert.Panics(t, func() { Date("some string") @@ -73,15 +72,15 @@ func TestDate(t *testing.T) { } func TestDateTuple(t *testing.T) { - obj := Date(bacnetip.DateTuple{Year: 1, Month: 2, Day: 3, DayOfWeek: 4}) - assert.Equal(t, bacnetip.DateTuple{Year: 1, Month: 2, Day: 3, DayOfWeek: 4}, obj.GetValue()) + obj := Date(bacgopes.DateTuple{Year: 1, Month: 2, Day: 3, DayOfWeek: 4}) + assert.Equal(t, bacgopes.DateTuple{Year: 1, Month: 2, Day: 3, DayOfWeek: 4}, obj.GetValue()) assert.Equal(t, "Date(1901-2-3 thu)", obj.String()) } func TestDateTag(t *testing.T) { tag := Tag(model.TagClass_APPLICATION_TAGS, model.BACnetDataType_DATE, 4, xtob("01020304")) obj := Date(tag) - assert.Equal(t, bacnetip.DateTuple{Year: 1, Month: 2, Day: 3, DayOfWeek: 4}, obj.GetValue()) + assert.Equal(t, bacgopes.DateTuple{Year: 1, Month: 2, Day: 3, DayOfWeek: 4}, obj.GetValue()) tag = Tag(model.TagClass_APPLICATION_TAGS, model.BACnetDataType_BOOLEAN, 0, xtob("")) assert.Panics(t, func() { @@ -93,14 +92,14 @@ func TestDateTag(t *testing.T) { Date(tag) }) - tag = Tag(bacnetip.TagOpeningTagClass, 0) + tag = Tag(bacgopes.TagOpeningTagClass, 0) assert.Panics(t, func() { Date(tag) }) } func TestDateCopy(t *testing.T) { - obj1 := Date(bacnetip.DateTuple{Year: 1, Month: 2, Day: 3, DayOfWeek: 4}) + obj1 := Date(bacgopes.DateTuple{Year: 1, Month: 2, Day: 3, DayOfWeek: 4}) obj2 := Date(obj1) assert.Equal(t, obj1, obj2) } diff --git a/plc4go/internal/bacnetip/tests/test_primitive_data/test_double_test.go b/plc4go/internal/bacnetip/bacgopes/tests/test_primitive_data/test_double_test.go similarity index 89% rename from plc4go/internal/bacnetip/tests/test_primitive_data/test_double_test.go rename to plc4go/internal/bacnetip/bacgopes/tests/test_primitive_data/test_double_test.go index b479325f074..a3a0e4cf9d7 100644 --- a/plc4go/internal/bacnetip/tests/test_primitive_data/test_double_test.go +++ b/plc4go/internal/bacnetip/bacgopes/tests/test_primitive_data/test_double_test.go @@ -24,27 +24,26 @@ import ( "github.com/stretchr/testify/assert" + "github.com/apache/plc4x/plc4go/internal/bacnetip/bacgopes" + . "github.com/apache/plc4x/plc4go/internal/bacnetip/bacgopes/constructors" "github.com/apache/plc4x/plc4go/protocols/bacnetip/readwrite/model" - - "github.com/apache/plc4x/plc4go/internal/bacnetip" - . "github.com/apache/plc4x/plc4go/internal/bacnetip/constructors" ) -func DoubleTag(x string) bacnetip.Tag { +func DoubleTag(x string) bacgopes.Tag { b := xtob(x) tag := Tag(model.TagClass_APPLICATION_TAGS, model.BACnetDataType_DOUBLE, len(b), b) return tag } // Encode a Double object into a tag. -func DoubleEncode(obj *bacnetip.Double) bacnetip.Tag { +func DoubleEncode(obj *bacgopes.Double) bacgopes.Tag { tag := Tag() obj.Encode(tag) return tag } // Decode a Double application tag into a Double. -func DoubleDecode(tag bacnetip.Tag) *bacnetip.Double { +func DoubleDecode(tag bacgopes.Tag) *bacgopes.Double { obj := Double(tag) return obj @@ -96,7 +95,7 @@ func TestDoubleTag(t *testing.T) { Double(tag) }) - tag = Tag(bacnetip.TagOpeningTagClass, 0) + tag = Tag(bacgopes.TagOpeningTagClass, 0) assert.Panics(t, func() { Double(tag) }) diff --git a/plc4go/internal/bacnetip/tests/test_primitive_data/test_enumerated_test.go b/plc4go/internal/bacnetip/bacgopes/tests/test_primitive_data/test_enumerated_test.go similarity index 88% rename from plc4go/internal/bacnetip/tests/test_primitive_data/test_enumerated_test.go rename to plc4go/internal/bacnetip/bacgopes/tests/test_primitive_data/test_enumerated_test.go index 53d73fcf6c3..54c623dbad5 100644 --- a/plc4go/internal/bacnetip/tests/test_primitive_data/test_enumerated_test.go +++ b/plc4go/internal/bacnetip/bacgopes/tests/test_primitive_data/test_enumerated_test.go @@ -24,14 +24,13 @@ import ( "github.com/stretchr/testify/assert" + "github.com/apache/plc4x/plc4go/internal/bacnetip/bacgopes" + . "github.com/apache/plc4x/plc4go/internal/bacnetip/bacgopes/constructors" "github.com/apache/plc4x/plc4go/protocols/bacnetip/readwrite/model" - - "github.com/apache/plc4x/plc4go/internal/bacnetip" - . "github.com/apache/plc4x/plc4go/internal/bacnetip/constructors" ) type quickBrownFox struct { - *bacnetip.Enumerated + *bacgopes.Enumerated } func (q *quickBrownFox) GetEnumerations() map[string]uint64 { @@ -42,35 +41,35 @@ func (q *quickBrownFox) GetEnumerations() map[string]uint64 { } } -func (q *quickBrownFox) SetEnumerated(enumerated *bacnetip.Enumerated) { +func (q *quickBrownFox) SetEnumerated(enumerated *bacgopes.Enumerated) { q.Enumerated = enumerated } func QuickBrownFox(args ...any) *quickBrownFox { q := &quickBrownFox{} var err error - q.Enumerated, err = bacnetip.NewEnumerated(append([]any{q}, args...)...) + q.Enumerated, err = bacgopes.NewEnumerated(append([]any{q}, args...)...) if err != nil { panic(err) } return q } -func EnumeratedTag(x string) bacnetip.Tag { +func EnumeratedTag(x string) bacgopes.Tag { b := xtob(x) tag := Tag(model.TagClass_APPLICATION_TAGS, model.BACnetDataType_ENUMERATED, len(b), b) return tag } // Encode a Enumerated object into a tag. -func EnumeratedEncode(obj *bacnetip.Enumerated) bacnetip.Tag { +func EnumeratedEncode(obj *bacgopes.Enumerated) bacgopes.Tag { tag := Tag() obj.Encode(tag) return tag } // Decode a Enumerated application tag into a Enumerated. -func EnumeratedDecode(tag bacnetip.Tag) *bacnetip.Enumerated { +func EnumeratedDecode(tag bacgopes.Tag) *bacgopes.Enumerated { obj := Enumerated(tag) return obj @@ -141,7 +140,7 @@ func TestEnumeratedTag(t *testing.T) { Enumerated(tag) }) - tag = Tag(bacnetip.TagOpeningTagClass, 0) + tag = Tag(bacgopes.TagOpeningTagClass, 0) assert.Panics(t, func() { Enumerated(tag) }) diff --git a/plc4go/internal/bacnetip/tests/test_primitive_data/test_integer_test.go b/plc4go/internal/bacnetip/bacgopes/tests/test_primitive_data/test_integer_test.go similarity index 90% rename from plc4go/internal/bacnetip/tests/test_primitive_data/test_integer_test.go rename to plc4go/internal/bacnetip/bacgopes/tests/test_primitive_data/test_integer_test.go index e47f5d081fa..b558641e61d 100644 --- a/plc4go/internal/bacnetip/tests/test_primitive_data/test_integer_test.go +++ b/plc4go/internal/bacnetip/bacgopes/tests/test_primitive_data/test_integer_test.go @@ -25,14 +25,13 @@ import ( "github.com/stretchr/testify/assert" + "github.com/apache/plc4x/plc4go/internal/bacnetip/bacgopes" + . "github.com/apache/plc4x/plc4go/internal/bacnetip/bacgopes/constructors" "github.com/apache/plc4x/plc4go/protocols/bacnetip/readwrite/model" - - "github.com/apache/plc4x/plc4go/internal/bacnetip" - . "github.com/apache/plc4x/plc4go/internal/bacnetip/constructors" ) -func IntegerTag(x string) bacnetip.Tag { - b, err := bacnetip.Xtob(x) +func IntegerTag(x string) bacgopes.Tag { + b, err := bacgopes.Xtob(x) if err != nil { panic(err) } @@ -41,14 +40,14 @@ func IntegerTag(x string) bacnetip.Tag { } // Encode a Integer object into a tag. -func IntegerEncode(obj *bacnetip.Integer) bacnetip.Tag { +func IntegerEncode(obj *bacgopes.Integer) bacgopes.Tag { tag := Tag() obj.Encode(tag) return tag } // Decode a Integer application tag into a Integer. -func IntegerDecode(tag bacnetip.Tag) *bacnetip.Integer { +func IntegerDecode(tag bacgopes.Tag) *bacgopes.Integer { obj := Integer(tag) return obj @@ -110,7 +109,7 @@ func TestIntegerTag(t *testing.T) { Integer(tag) }) - tag = Tag(bacnetip.TagOpeningTagClass, 0) + tag = Tag(bacgopes.TagOpeningTagClass, 0) assert.Panics(t, func() { Integer(tag) }) diff --git a/plc4go/internal/bacnetip/tests/test_primitive_data/test_null_test.go b/plc4go/internal/bacnetip/bacgopes/tests/test_primitive_data/test_null_test.go similarity index 88% rename from plc4go/internal/bacnetip/tests/test_primitive_data/test_null_test.go rename to plc4go/internal/bacnetip/bacgopes/tests/test_primitive_data/test_null_test.go index 303cda921fb..ccb8500a18c 100644 --- a/plc4go/internal/bacnetip/tests/test_primitive_data/test_null_test.go +++ b/plc4go/internal/bacnetip/bacgopes/tests/test_primitive_data/test_null_test.go @@ -24,27 +24,26 @@ import ( "github.com/stretchr/testify/assert" + "github.com/apache/plc4x/plc4go/internal/bacnetip/bacgopes" + . "github.com/apache/plc4x/plc4go/internal/bacnetip/bacgopes/constructors" "github.com/apache/plc4x/plc4go/protocols/bacnetip/readwrite/model" - - "github.com/apache/plc4x/plc4go/internal/bacnetip" - . "github.com/apache/plc4x/plc4go/internal/bacnetip/constructors" ) -func NullTag(x string) bacnetip.Tag { +func NullTag(x string) bacgopes.Tag { b := xtob(x) tag := Tag(model.TagClass_APPLICATION_TAGS, model.BACnetDataType_NULL, len(b), b) return tag } // Encode a Null object into a tag. -func NullEncode(obj *bacnetip.Null) bacnetip.Tag { +func NullEncode(obj *bacgopes.Null) bacgopes.Tag { tag := Tag() obj.Encode(tag) return tag } // Decode a Null application tag into a Null. -func NullDecode(tag bacnetip.Tag) *bacnetip.Null { +func NullDecode(tag bacgopes.Tag) *bacgopes.Null { obj := Null(tag) return obj @@ -93,7 +92,7 @@ func TestNullTag(t *testing.T) { Null(tag) }) - tag = Tag(bacnetip.TagOpeningTagClass, 0) + tag = Tag(bacgopes.TagOpeningTagClass, 0) assert.Panics(t, func() { Null(tag) }) diff --git a/plc4go/internal/bacnetip/tests/test_primitive_data/test_object_identifier_test.go b/plc4go/internal/bacnetip/bacgopes/tests/test_primitive_data/test_object_identifier_test.go similarity index 76% rename from plc4go/internal/bacnetip/tests/test_primitive_data/test_object_identifier_test.go rename to plc4go/internal/bacnetip/bacgopes/tests/test_primitive_data/test_object_identifier_test.go index 6951f2fa3bf..ca412f6f8dc 100644 --- a/plc4go/internal/bacnetip/tests/test_primitive_data/test_object_identifier_test.go +++ b/plc4go/internal/bacnetip/bacgopes/tests/test_primitive_data/test_object_identifier_test.go @@ -24,27 +24,26 @@ import ( "github.com/stretchr/testify/assert" + "github.com/apache/plc4x/plc4go/internal/bacnetip/bacgopes" + . "github.com/apache/plc4x/plc4go/internal/bacnetip/bacgopes/constructors" "github.com/apache/plc4x/plc4go/protocols/bacnetip/readwrite/model" - - "github.com/apache/plc4x/plc4go/internal/bacnetip" - . "github.com/apache/plc4x/plc4go/internal/bacnetip/constructors" ) -func ObjectIdentifierTag(x string) bacnetip.Tag { +func ObjectIdentifierTag(x string) bacgopes.Tag { b := xtob(x) tag := Tag(model.TagClass_APPLICATION_TAGS, model.BACnetDataType_BACNET_OBJECT_IDENTIFIER, len(b), b) return tag } // Encode a ObjectIdentifier object into a tag. -func ObjectIdentifierEncode(obj *bacnetip.ObjectIdentifier) bacnetip.Tag { +func ObjectIdentifierEncode(obj *bacgopes.ObjectIdentifier) bacgopes.Tag { tag := Tag() obj.Encode(tag) return tag } // Decode a ObjectIdentifier application tag into a ObjectIdentifier. -func ObjectIdentifierDecode(tag bacnetip.Tag) *bacnetip.ObjectIdentifier { +func ObjectIdentifierDecode(tag bacgopes.Tag) *bacgopes.ObjectIdentifier { obj := ObjectIdentifier(tag) return obj @@ -64,7 +63,7 @@ func ObjectIdentifierEndec(t *testing.T, v any, x string) { func TestObjectIdentifier(t *testing.T) { obj := ObjectIdentifier() - assert.Equal(t, bacnetip.ObjectIdentifierTuple{Left: "analogInput"}, obj.GetValue()) + assert.Equal(t, bacgopes.ObjectIdentifierTuple{Left: "analogInput"}, obj.GetValue()) assert.Panics(t, func() { ObjectIdentifier(1.0) @@ -73,21 +72,21 @@ func TestObjectIdentifier(t *testing.T) { func TestObjectIdentifierInt(t *testing.T) { obj := ObjectIdentifier(1) - assert.Equal(t, bacnetip.ObjectIdentifierTuple{Left: "analogInput", Right: 1}, obj.GetValue()) + assert.Equal(t, bacgopes.ObjectIdentifierTuple{Left: "analogInput", Right: 1}, obj.GetValue()) assert.Equal(t, "ObjectIdentifier(analogInput,1)", obj.String()) obj = ObjectIdentifier(0x0400002) - assert.Equal(t, bacnetip.ObjectIdentifierTuple{Left: "analogOutput", Right: 2}, obj.GetValue()) + assert.Equal(t, bacgopes.ObjectIdentifierTuple{Left: "analogOutput", Right: 2}, obj.GetValue()) assert.Equal(t, "ObjectIdentifier(analogOutput,2)", obj.String()) } func TestObjectIdentifierStr(t *testing.T) { obj := ObjectIdentifier("analogInput:1") - assert.Equal(t, bacnetip.ObjectIdentifierTuple{Left: "analogInput", Right: 1}, obj.GetValue()) + assert.Equal(t, bacgopes.ObjectIdentifierTuple{Left: "analogInput", Right: 1}, obj.GetValue()) assert.Equal(t, "ObjectIdentifier(analogInput,1)", obj.String()) obj = ObjectIdentifier("8:123") - assert.Equal(t, bacnetip.ObjectIdentifierTuple{Left: "device", Right: 123}, obj.GetValue()) + assert.Equal(t, bacgopes.ObjectIdentifierTuple{Left: "device", Right: 123}, obj.GetValue()) assert.Equal(t, "ObjectIdentifier(device,123)", obj.String()) assert.Panics(t, func() { @@ -105,22 +104,22 @@ func TestObjectIdentifierStr(t *testing.T) { } func TestObjectIdentifierTuple(t *testing.T) { - obj := ObjectIdentifier(bacnetip.ObjectIdentifierTuple{Left: "analogInput", Right: 1}) - assert.Equal(t, bacnetip.ObjectIdentifierTuple{Left: "analogInput", Right: 1}, obj.GetValue()) + obj := ObjectIdentifier(bacgopes.ObjectIdentifierTuple{Left: "analogInput", Right: 1}) + assert.Equal(t, bacgopes.ObjectIdentifierTuple{Left: "analogInput", Right: 1}, obj.GetValue()) assert.Equal(t, "ObjectIdentifier(analogInput,1)", obj.String()) assert.Panics(t, func() { - ObjectIdentifier(bacnetip.ObjectIdentifierTuple{Left: 0, Right: -1}) + ObjectIdentifier(bacgopes.ObjectIdentifierTuple{Left: 0, Right: -1}) }) assert.Panics(t, func() { - ObjectIdentifier(bacnetip.ObjectIdentifierTuple{Left: 0, Right: 0x003FFFFF + 1}) + ObjectIdentifier(bacgopes.ObjectIdentifierTuple{Left: 0, Right: 0x003FFFFF + 1}) }) } func TestObjectIdentifierTag(t *testing.T) { tag := Tag(model.TagClass_APPLICATION_TAGS, model.BACnetDataType_BACNET_OBJECT_IDENTIFIER, 1, xtob("06000003")) obj := ObjectIdentifier(tag) - assert.Equal(t, bacnetip.ObjectIdentifierTuple{Left: "pulseConverter", Right: 3}, obj.GetValue()) + assert.Equal(t, bacgopes.ObjectIdentifierTuple{Left: "pulseConverter", Right: 3}, obj.GetValue()) tag = Tag(model.TagClass_APPLICATION_TAGS, model.BACnetDataType_BOOLEAN, 0, xtob("")) assert.Panics(t, func() { @@ -132,16 +131,16 @@ func TestObjectIdentifierTag(t *testing.T) { ObjectIdentifier(tag) }) - tag = Tag(bacnetip.TagOpeningTagClass, 0) + tag = Tag(bacgopes.TagOpeningTagClass, 0) assert.Panics(t, func() { ObjectIdentifier(tag) }) } func TestObjectIdentifierCopy(t *testing.T) { - obj1 := ObjectIdentifier(bacnetip.ObjectIdentifierTuple{Left: "pulseConverter", Right: 3}) + obj1 := ObjectIdentifier(bacgopes.ObjectIdentifierTuple{Left: "pulseConverter", Right: 3}) obj2 := ObjectIdentifier(obj1) - assert.Equal(t, bacnetip.ObjectIdentifierTuple{Left: "pulseConverter", Right: 3}, obj2.GetValue()) + assert.Equal(t, bacgopes.ObjectIdentifierTuple{Left: "pulseConverter", Right: 3}, obj2.GetValue()) assert.Equal(t, obj1, obj2) } @@ -149,5 +148,5 @@ func TestObjectIdentifierEndec(t *testing.T) { assert.Panics(t, func() { ObjectIdentifier(ObjectIdentifierTag("")) }) - ObjectIdentifierEndec(t, bacnetip.ObjectIdentifierTuple{Left: "analogInput", Right: 0}, "00000000") + ObjectIdentifierEndec(t, bacgopes.ObjectIdentifierTuple{Left: "analogInput", Right: 0}, "00000000") } diff --git a/plc4go/internal/bacnetip/tests/test_primitive_data/test_object_type_test.go b/plc4go/internal/bacnetip/bacgopes/tests/test_primitive_data/test_object_type_test.go similarity index 89% rename from plc4go/internal/bacnetip/tests/test_primitive_data/test_object_type_test.go rename to plc4go/internal/bacnetip/bacgopes/tests/test_primitive_data/test_object_type_test.go index f715a4f4b98..fce6c86bc71 100644 --- a/plc4go/internal/bacnetip/tests/test_primitive_data/test_object_type_test.go +++ b/plc4go/internal/bacnetip/bacgopes/tests/test_primitive_data/test_object_type_test.go @@ -26,14 +26,13 @@ import ( "github.com/stretchr/testify/assert" + "github.com/apache/plc4x/plc4go/internal/bacnetip/bacgopes" + . "github.com/apache/plc4x/plc4go/internal/bacnetip/bacgopes/constructors" "github.com/apache/plc4x/plc4go/protocols/bacnetip/readwrite/model" - - "github.com/apache/plc4x/plc4go/internal/bacnetip" - . "github.com/apache/plc4x/plc4go/internal/bacnetip/constructors" ) type myObjectType struct { - *bacnetip.ObjectType + *bacgopes.ObjectType enumerations map[string]uint64 } @@ -42,7 +41,7 @@ func (m *myObjectType) GetEnumerations() map[string]uint64 { return m.enumerations } -func (m *myObjectType) SetObjectType(objectType *bacnetip.ObjectType) { +func (m *myObjectType) SetObjectType(objectType *bacgopes.ObjectType) { m.ObjectType = objectType } @@ -63,28 +62,28 @@ func MyObjectType(args ...any) *myObjectType { }, } var err error - o.ObjectType, err = bacnetip.NewObjectType(append([]any{o}, args...)) + o.ObjectType, err = bacgopes.NewObjectType(append([]any{o}, args...)) if err != nil { panic(err) } return o } -func ObjectTypeTag(x string) bacnetip.Tag { +func ObjectTypeTag(x string) bacgopes.Tag { b := xtob(x) tag := Tag(model.TagClass_APPLICATION_TAGS, model.BACnetDataType_ENUMERATED, len(b), b) return tag } // Encode a ObjectType object into a tag. -func ObjectTypeEncode(obj *bacnetip.ObjectType) bacnetip.Tag { +func ObjectTypeEncode(obj *bacgopes.ObjectType) bacgopes.Tag { tag := Tag() obj.Encode(tag) return tag } // Decode a ObjectType application tag into a ObjectType. -func ObjectTypeDecode(tag bacnetip.Tag) *bacnetip.ObjectType { +func ObjectTypeDecode(tag bacgopes.Tag) *bacgopes.ObjectType { obj := ObjectType(tag) return obj @@ -158,7 +157,7 @@ func TestObjectTypeTag(t *testing.T) { ObjectType(tag) }) - tag = Tag(bacnetip.TagOpeningTagClass, 0) + tag = Tag(bacgopes.TagOpeningTagClass, 0) assert.Panics(t, func() { ObjectType(tag) }) diff --git a/plc4go/internal/bacnetip/tests/test_primitive_data/test_octet_string_test.go b/plc4go/internal/bacnetip/bacgopes/tests/test_primitive_data/test_octet_string_test.go similarity index 89% rename from plc4go/internal/bacnetip/tests/test_primitive_data/test_octet_string_test.go rename to plc4go/internal/bacnetip/bacgopes/tests/test_primitive_data/test_octet_string_test.go index d6187d4c431..c70ea8719c1 100644 --- a/plc4go/internal/bacnetip/tests/test_primitive_data/test_octet_string_test.go +++ b/plc4go/internal/bacnetip/bacgopes/tests/test_primitive_data/test_octet_string_test.go @@ -24,27 +24,26 @@ import ( "github.com/stretchr/testify/assert" + "github.com/apache/plc4x/plc4go/internal/bacnetip/bacgopes" + . "github.com/apache/plc4x/plc4go/internal/bacnetip/bacgopes/constructors" "github.com/apache/plc4x/plc4go/protocols/bacnetip/readwrite/model" - - "github.com/apache/plc4x/plc4go/internal/bacnetip" - . "github.com/apache/plc4x/plc4go/internal/bacnetip/constructors" ) -func OctetStringTag(x string) bacnetip.Tag { +func OctetStringTag(x string) bacgopes.Tag { b := xtob(x) tag := Tag(model.TagClass_APPLICATION_TAGS, model.BACnetDataType_OCTET_STRING, len(b), b) return tag } // Encode a OctetString object into a tag. -func OctetStringEncode(obj *bacnetip.OctetString) bacnetip.Tag { +func OctetStringEncode(obj *bacgopes.OctetString) bacgopes.Tag { tag := Tag() obj.Encode(tag) return tag } // Decode a OctetString application tag into a OctetString. -func OctetStringDecode(tag bacnetip.Tag) *bacnetip.OctetString { +func OctetStringDecode(tag bacgopes.Tag) *bacgopes.OctetString { obj := OctetString(tag) return obj @@ -96,7 +95,7 @@ func TestOctetStringTag(t *testing.T) { OctetString(tag) }) - tag = Tag(bacnetip.TagOpeningTagClass, 0) + tag = Tag(bacgopes.TagOpeningTagClass, 0) assert.Panics(t, func() { OctetString(tag) }) diff --git a/plc4go/internal/bacnetip/tests/test_primitive_data/test_real_test.go b/plc4go/internal/bacnetip/bacgopes/tests/test_primitive_data/test_real_test.go similarity index 90% rename from plc4go/internal/bacnetip/tests/test_primitive_data/test_real_test.go rename to plc4go/internal/bacnetip/bacgopes/tests/test_primitive_data/test_real_test.go index ff7a8fabdfe..1610d303afa 100644 --- a/plc4go/internal/bacnetip/tests/test_primitive_data/test_real_test.go +++ b/plc4go/internal/bacnetip/bacgopes/tests/test_primitive_data/test_real_test.go @@ -25,27 +25,26 @@ import ( "github.com/stretchr/testify/assert" + "github.com/apache/plc4x/plc4go/internal/bacnetip/bacgopes" + . "github.com/apache/plc4x/plc4go/internal/bacnetip/bacgopes/constructors" "github.com/apache/plc4x/plc4go/protocols/bacnetip/readwrite/model" - - "github.com/apache/plc4x/plc4go/internal/bacnetip" - . "github.com/apache/plc4x/plc4go/internal/bacnetip/constructors" ) -func RealTag(x string) bacnetip.Tag { +func RealTag(x string) bacgopes.Tag { b := xtob(x) tag := Tag(model.TagClass_APPLICATION_TAGS, model.BACnetDataType_REAL, len(b), b) return tag } // Encode a Real object into a tag. -func RealEncode(obj *bacnetip.Real) bacnetip.Tag { +func RealEncode(obj *bacgopes.Real) bacgopes.Tag { tag := Tag() obj.Encode(tag) return tag } // Decode a Real application tag into a Real. -func RealDecode(tag bacnetip.Tag) *bacnetip.Real { +func RealDecode(tag bacgopes.Tag) *bacgopes.Real { obj := Real(tag) return obj @@ -97,7 +96,7 @@ func TestRealTag(t *testing.T) { Real(tag) }) - tag = Tag(bacnetip.TagOpeningTagClass, 0) + tag = Tag(bacgopes.TagOpeningTagClass, 0) assert.Panics(t, func() { Real(tag) }) diff --git a/plc4go/internal/bacnetip/tests/test_primitive_data/test_tag_test.go b/plc4go/internal/bacnetip/bacgopes/tests/test_primitive_data/test_tag_test.go similarity index 87% rename from plc4go/internal/bacnetip/tests/test_primitive_data/test_tag_test.go rename to plc4go/internal/bacnetip/bacgopes/tests/test_primitive_data/test_tag_test.go index b95a45f7998..3fa1e0bc72a 100644 --- a/plc4go/internal/bacnetip/tests/test_primitive_data/test_tag_test.go +++ b/plc4go/internal/bacnetip/bacgopes/tests/test_primitive_data/test_tag_test.go @@ -25,13 +25,12 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/apache/plc4x/plc4go/internal/bacnetip/bacgopes" + . "github.com/apache/plc4x/plc4go/internal/bacnetip/bacgopes/constructors" "github.com/apache/plc4x/plc4go/protocols/bacnetip/readwrite/model" - - "github.com/apache/plc4x/plc4go/internal/bacnetip" - . "github.com/apache/plc4x/plc4go/internal/bacnetip/constructors" ) -func TagTuple(tag bacnetip.Tag) (tagClass model.TagClass, tagNumber uint, tagLVT int, tagData []byte) { +func TagTuple(tag bacgopes.Tag) (tagClass model.TagClass, tagNumber uint, tagLVT int, tagData []byte) { return tag.GetTagClass(), tag.GetTagNumber(), tag.GetTagLvt(), tag.GetTagData() } @@ -49,7 +48,7 @@ func objDecode(blob []byte) any { // Encode the object into a tag, encode it in a PDU, return the data. func objEncode(obj any) []byte { tag := Tag() - err := obj.(interface{ Encode(arg bacnetip.Arg) error }).Encode(tag) + err := obj.(interface{ Encode(arg bacgopes.Arg) error }).Encode(tag) if err != nil { panic(err) } @@ -79,14 +78,14 @@ func objEndec(t *testing.T, obj any, x string) { } // Build PDU from the string, decode the tag, convert to an object. -func contextDecode(blob []byte) *bacnetip.ContextTag { +func contextDecode(blob []byte) *bacgopes.ContextTag { data := PDUData(blob) tag := ContextTag(data) return tag } // Encode the object into a tag, encode it in a PDU, return the data. -func contextEncode(tag *bacnetip.ContextTag) []byte { +func contextEncode(tag *bacgopes.ContextTag) []byte { data := PDUData() tag.Encode(data) return data.GetPduData() @@ -116,14 +115,14 @@ func contextEndec(t *testing.T, tnum int, x string, y string) { } // Build PDU from the string, decode the tag, convert to an object. -func openingDecode(blob []byte) *bacnetip.OpeningTag { +func openingDecode(blob []byte) *bacgopes.OpeningTag { data := PDUData(blob) tag := OpeningTag(data) return tag } // Encode the object into a tag, encode it in a PDU, return the data. -func openingEncode(tag *bacnetip.OpeningTag) []byte { +func openingEncode(tag *bacgopes.OpeningTag) []byte { data := PDUData() tag.Encode(data) return data.GetPduData() @@ -152,14 +151,14 @@ func openingEndec(t *testing.T, tnum int, x string) { } // Build PDU from the string, decode the tag, convert to an object. -func closingDecode(blob []byte) *bacnetip.ClosingTag { +func closingDecode(blob []byte) *bacgopes.ClosingTag { data := PDUData(blob) tag := ClosingTag(data) return tag } // Encode the object into a tag, encode it in a PDU, return the data. -func closingEncode(tag *bacnetip.ClosingTag) []byte { +func closingEncode(tag *bacgopes.ClosingTag) []byte { data := PDUData() tag.Encode(data) return data.GetPduData() @@ -329,18 +328,18 @@ func TestBooleanApplicationToObject(t *testing.T) { objEndec(t, Enumerated(128), "9180") // date - objEndec(t, Date(bacnetip.DateTuple{1, 2, 3, 4}), "A401020304") - objEndec(t, Date(bacnetip.DateTuple{255, 2, 3, 4}), "A4FF020304") - objEndec(t, Date(bacnetip.DateTuple{1, 255, 3, 4}), "A401FF0304") - objEndec(t, Date(bacnetip.DateTuple{1, 2, 255, 4}), "A40102FF04") - objEndec(t, Date(bacnetip.DateTuple{1, 2, 3, 255}), "A4010203FF") + objEndec(t, Date(bacgopes.DateTuple{1, 2, 3, 4}), "A401020304") + objEndec(t, Date(bacgopes.DateTuple{255, 2, 3, 4}), "A4FF020304") + objEndec(t, Date(bacgopes.DateTuple{1, 255, 3, 4}), "A401FF0304") + objEndec(t, Date(bacgopes.DateTuple{1, 2, 255, 4}), "A40102FF04") + objEndec(t, Date(bacgopes.DateTuple{1, 2, 3, 255}), "A4010203FF") // time - objEndec(t, Time(bacnetip.TimeTuple{1, 2, 3, 4}), "B401020304") - objEndec(t, Time(bacnetip.TimeTuple{255, 2, 3, 4}), "B4FF020304") - objEndec(t, Time(bacnetip.TimeTuple{1, 255, 3, 4}), "B401FF0304") - objEndec(t, Time(bacnetip.TimeTuple{1, 2, 255, 4}), "B40102FF04") - objEndec(t, Time(bacnetip.TimeTuple{1, 2, 3, 255}), "B4010203FF") + objEndec(t, Time(bacgopes.TimeTuple{1, 2, 3, 4}), "B401020304") + objEndec(t, Time(bacgopes.TimeTuple{255, 2, 3, 4}), "B4FF020304") + objEndec(t, Time(bacgopes.TimeTuple{1, 255, 3, 4}), "B401FF0304") + objEndec(t, Time(bacgopes.TimeTuple{1, 2, 255, 4}), "B40102FF04") + objEndec(t, Time(bacgopes.TimeTuple{1, 2, 3, 255}), "B4010203FF") // object identifier objEndec(t, ObjectIdentifier(0, 0), "C400000000") @@ -397,16 +396,16 @@ func TestPeek(t *testing.T) { // pop of the front tag1 := taglist.Pop() - var emptyList = make([]bacnetip.Tag, 0) + var emptyList = make([]bacgopes.Tag, 0) assert.Equal(t, emptyList, taglist.GetTagList()) // push if back to the front taglist.Push(tag1) - assert.Equal(t, []bacnetip.Tag{tag1}, taglist.GetTagList()) + assert.Equal(t, []bacgopes.Tag{tag1}, taglist.GetTagList()) } func TestGetContext(t *testing.T) { - tagListData := []bacnetip.Tag{ + tagListData := []bacgopes.Tag{ ContextTag(0, xtob("00")), ContextTag(1, xtob("01")), OpeningTag(2), @@ -426,7 +425,7 @@ func TestGetContext(t *testing.T) { // known to be a simple context encoded list of element(s) context2, err := taglist.GetContext(2) require.NoError(t, err) - assert.Equal(t, tagListData[3:7], context2.(*bacnetip.TagList).GetTagList()) + assert.Equal(t, tagListData[3:7], context2.(*bacgopes.TagList).GetTagList()) // known missing context context3, err := taglist.GetContext(3) @@ -444,7 +443,7 @@ func TestEndec0(t *testing.T) { // Test bracketed application tagged integer enc tagList = TagList() err := tagList.Decode(data) assert.NoError(t, err) - var noItems []bacnetip.Tag + var noItems []bacgopes.Tag assert.Equal(t, noItems, tagList.GetTagList()) } @@ -460,7 +459,7 @@ func TestEndec1(t *testing.T) { // Test bracketed application tagged integer enc tagList = TagList() err := tagList.Decode(data) assert.NoError(t, err) - assert.Equal(t, []bacnetip.Tag{tag0, tag1}, tagList.GetTagList()) + assert.Equal(t, []bacgopes.Tag{tag0, tag1}, tagList.GetTagList()) } func TestEndec2(t *testing.T) { // Test bracketed application tagged integer encoding and decoding. @@ -475,7 +474,7 @@ func TestEndec2(t *testing.T) { // Test bracketed application tagged integer enc tagList = TagList() err := tagList.Decode(data) assert.NoError(t, err) - assert.Equal(t, []bacnetip.Tag{tag0, tag1}, tagList.GetTagList()) + assert.Equal(t, []bacgopes.Tag{tag0, tag1}, tagList.GetTagList()) } func TestEndec3(t *testing.T) { // Test bracketed application tagged integer encoding and decoding. @@ -491,5 +490,5 @@ func TestEndec3(t *testing.T) { // Test bracketed application tagged integer enc tagList = TagList() err := tagList.Decode(data) assert.NoError(t, err) - assert.Equal(t, []bacnetip.Tag{tag0, tag1, tag2}, tagList.GetTagList()) + assert.Equal(t, []bacgopes.Tag{tag0, tag1, tag2}, tagList.GetTagList()) } diff --git a/plc4go/internal/bacnetip/tests/test_primitive_data/test_time_test.go b/plc4go/internal/bacnetip/bacgopes/tests/test_primitive_data/test_time_test.go similarity index 67% rename from plc4go/internal/bacnetip/tests/test_primitive_data/test_time_test.go rename to plc4go/internal/bacnetip/bacgopes/tests/test_primitive_data/test_time_test.go index dc829a1b4f0..fe832e99744 100644 --- a/plc4go/internal/bacnetip/tests/test_primitive_data/test_time_test.go +++ b/plc4go/internal/bacnetip/bacgopes/tests/test_primitive_data/test_time_test.go @@ -24,28 +24,27 @@ import ( "github.com/stretchr/testify/assert" + "github.com/apache/plc4x/plc4go/internal/bacnetip/bacgopes" + . "github.com/apache/plc4x/plc4go/internal/bacnetip/bacgopes/constructors" "github.com/apache/plc4x/plc4go/protocols/bacnetip/readwrite/model" - - "github.com/apache/plc4x/plc4go/internal/bacnetip" - . "github.com/apache/plc4x/plc4go/internal/bacnetip/constructors" ) // Convert a hex string to a character_string application tag. -func timeTag(x string) bacnetip.Tag { +func timeTag(x string) bacgopes.Tag { b := xtob(x) tag := Tag(model.TagClass_APPLICATION_TAGS, model.BACnetDataType_TIME, len(b), b) return tag } // Encode a Time object into a tag. -func timeEncode(obj *bacnetip.Time) bacnetip.Tag { +func timeEncode(obj *bacgopes.Time) bacgopes.Tag { tag := Tag() obj.Encode(tag) return tag } // Decode a Time application tag into a Time. -func timeDecode(tag bacnetip.Tag) *bacnetip.Time { +func timeDecode(tag bacgopes.Tag) *bacgopes.Time { obj := Time(tag) return obj @@ -54,7 +53,7 @@ func timeDecode(tag bacnetip.Tag) *bacnetip.Time { // Pass the value to Time, construct a tag from the hex string, // // and compare results of encode and decoding each other. -func timeEndec(t *testing.T, v bacnetip.TimeTuple, x string) { +func timeEndec(t *testing.T, v bacgopes.TimeTuple, x string) { tag := timeTag(x) obj := Time(v) @@ -65,7 +64,7 @@ func timeEndec(t *testing.T, v bacnetip.TimeTuple, x string) { func TestTime(t *testing.T) { obj := Time() - assert.Equal(t, bacnetip.TimeTuple{Hour: 0xff, Minute: 0xff, Second: 0xff, Hundredth: 0xff}, obj.GetValue()) + assert.Equal(t, bacgopes.TimeTuple{Hour: 0xff, Minute: 0xff, Second: 0xff, Hundredth: 0xff}, obj.GetValue()) assert.Panics(t, func() { Time("some string") @@ -73,22 +72,22 @@ func TestTime(t *testing.T) { } func TestTimeTuple(t *testing.T) { - obj := Time(bacnetip.TimeTuple{Hour: 1, Minute: 2, Second: 3, Hundredth: 4}) - assert.Equal(t, bacnetip.TimeTuple{Hour: 1, Minute: 2, Second: 3, Hundredth: 4}, obj.GetValue()) + obj := Time(bacgopes.TimeTuple{Hour: 1, Minute: 2, Second: 3, Hundredth: 4}) + assert.Equal(t, bacgopes.TimeTuple{Hour: 1, Minute: 2, Second: 3, Hundredth: 4}, obj.GetValue()) assert.Equal(t, "Time(01:02:03.04)", obj.String()) - assert.Equal(t, bacnetip.TimeTuple{Hour: 1, Minute: 2, Second: 0, Hundredth: 0}, Time("1:2").GetValue()) - assert.Equal(t, bacnetip.TimeTuple{Hour: 1, Minute: 2, Second: 3, Hundredth: 0}, Time("1:2:3").GetValue()) - assert.Equal(t, bacnetip.TimeTuple{Hour: 1, Minute: 2, Second: 3, Hundredth: 40}, Time("1:2:3.4").GetValue()) - assert.Equal(t, bacnetip.TimeTuple{Hour: 1, Minute: 255, Second: 255, Hundredth: 255}, Time("1:*").GetValue()) - assert.Equal(t, bacnetip.TimeTuple{Hour: 1, Minute: 2, Second: 255, Hundredth: 255}, Time("1:2:*").GetValue()) - assert.Equal(t, bacnetip.TimeTuple{Hour: 1, Minute: 2, Second: 3, Hundredth: 255}, Time("1:2:3.*").GetValue()) + assert.Equal(t, bacgopes.TimeTuple{Hour: 1, Minute: 2, Second: 0, Hundredth: 0}, Time("1:2").GetValue()) + assert.Equal(t, bacgopes.TimeTuple{Hour: 1, Minute: 2, Second: 3, Hundredth: 0}, Time("1:2:3").GetValue()) + assert.Equal(t, bacgopes.TimeTuple{Hour: 1, Minute: 2, Second: 3, Hundredth: 40}, Time("1:2:3.4").GetValue()) + assert.Equal(t, bacgopes.TimeTuple{Hour: 1, Minute: 255, Second: 255, Hundredth: 255}, Time("1:*").GetValue()) + assert.Equal(t, bacgopes.TimeTuple{Hour: 1, Minute: 2, Second: 255, Hundredth: 255}, Time("1:2:*").GetValue()) + assert.Equal(t, bacgopes.TimeTuple{Hour: 1, Minute: 2, Second: 3, Hundredth: 255}, Time("1:2:3.*").GetValue()) } func TestTimeTag(t *testing.T) { tag := Tag(model.TagClass_APPLICATION_TAGS, model.BACnetDataType_TIME, 4, xtob("01020304")) obj := Time(tag) - assert.Equal(t, bacnetip.TimeTuple{Hour: 1, Minute: 2, Second: 3, Hundredth: 4}, obj.GetValue()) + assert.Equal(t, bacgopes.TimeTuple{Hour: 1, Minute: 2, Second: 3, Hundredth: 4}, obj.GetValue()) tag = Tag(model.TagClass_APPLICATION_TAGS, model.BACnetDataType_BOOLEAN, 0, xtob("")) assert.Panics(t, func() { @@ -100,14 +99,14 @@ func TestTimeTag(t *testing.T) { Time(tag) }) - tag = Tag(bacnetip.TagOpeningTagClass, 0) + tag = Tag(bacgopes.TagOpeningTagClass, 0) assert.Panics(t, func() { Time(tag) }) } func TestTimeCopy(t *testing.T) { - obj1 := Time(bacnetip.TimeTuple{Hour: 1, Minute: 2, Second: 3, Hundredth: 4}) + obj1 := Time(bacgopes.TimeTuple{Hour: 1, Minute: 2, Second: 3, Hundredth: 4}) obj2 := Time(obj1) assert.Equal(t, obj1, obj2) } @@ -121,9 +120,9 @@ func TestTimeEndec(t *testing.T) { Time(timeTag("")) }) - timeEndec(t, bacnetip.TimeTuple{0, 0, 0, 0}, "00000000") - timeEndec(t, bacnetip.TimeTuple{1, 0, 0, 0}, "01000000") - timeEndec(t, bacnetip.TimeTuple{0, 2, 0, 0}, "00020000") - timeEndec(t, bacnetip.TimeTuple{0, 0, 3, 0}, "00000300") - timeEndec(t, bacnetip.TimeTuple{0, 0, 0, 4}, "00000004") + timeEndec(t, bacgopes.TimeTuple{0, 0, 0, 0}, "00000000") + timeEndec(t, bacgopes.TimeTuple{1, 0, 0, 0}, "01000000") + timeEndec(t, bacgopes.TimeTuple{0, 2, 0, 0}, "00020000") + timeEndec(t, bacgopes.TimeTuple{0, 0, 3, 0}, "00000300") + timeEndec(t, bacgopes.TimeTuple{0, 0, 0, 4}, "00000004") } diff --git a/plc4go/internal/bacnetip/tests/test_primitive_data/test_unsigned_test.go b/plc4go/internal/bacnetip/bacgopes/tests/test_primitive_data/test_unsigned_test.go similarity index 91% rename from plc4go/internal/bacnetip/tests/test_primitive_data/test_unsigned_test.go rename to plc4go/internal/bacnetip/bacgopes/tests/test_primitive_data/test_unsigned_test.go index b7ca8df785c..9ae5361d76a 100644 --- a/plc4go/internal/bacnetip/tests/test_primitive_data/test_unsigned_test.go +++ b/plc4go/internal/bacnetip/bacgopes/tests/test_primitive_data/test_unsigned_test.go @@ -25,27 +25,26 @@ import ( "github.com/stretchr/testify/assert" + "github.com/apache/plc4x/plc4go/internal/bacnetip/bacgopes" + . "github.com/apache/plc4x/plc4go/internal/bacnetip/bacgopes/constructors" "github.com/apache/plc4x/plc4go/protocols/bacnetip/readwrite/model" - - "github.com/apache/plc4x/plc4go/internal/bacnetip" - . "github.com/apache/plc4x/plc4go/internal/bacnetip/constructors" ) -func UnsignedTag(x string) bacnetip.Tag { +func UnsignedTag(x string) bacgopes.Tag { b := xtob(x) tag := Tag(model.TagClass_APPLICATION_TAGS, model.BACnetDataType_UNSIGNED_INTEGER, len(b), b) return tag } // Encode a Unsigned object into a tag. -func UnsignedEncode(obj *bacnetip.Unsigned) bacnetip.Tag { +func UnsignedEncode(obj *bacgopes.Unsigned) bacgopes.Tag { tag := Tag() obj.Encode(tag) return tag } // Decode a Unsigned application tag into a Unsigned. -func UnsignedDecode(tag bacnetip.Tag) *bacnetip.Unsigned { +func UnsignedDecode(tag bacgopes.Tag) *bacgopes.Unsigned { obj := Unsigned(tag) return obj @@ -128,7 +127,7 @@ func TestUnsignedTag(t *testing.T) { Unsigned(tag) }) - tag = Tag(bacnetip.TagOpeningTagClass, 0) + tag = Tag(bacgopes.TagOpeningTagClass, 0) assert.Panics(t, func() { Unsigned(tag) }) diff --git a/plc4go/internal/bacnetip/tests/test_segmentation/test_1_test.go b/plc4go/internal/bacnetip/bacgopes/tests/test_segmentation/test_1_test.go similarity index 81% rename from plc4go/internal/bacnetip/tests/test_segmentation/test_1_test.go rename to plc4go/internal/bacnetip/bacgopes/tests/test_segmentation/test_1_test.go index 1df4a8cc7d0..a2e2f080236 100644 --- a/plc4go/internal/bacnetip/tests/test_segmentation/test_1_test.go +++ b/plc4go/internal/bacnetip/bacgopes/tests/test_segmentation/test_1_test.go @@ -28,26 +28,25 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/apache/plc4x/plc4go/internal/bacnetip/bacgopes" + . "github.com/apache/plc4x/plc4go/internal/bacnetip/bacgopes/constructors" + "github.com/apache/plc4x/plc4go/internal/bacnetip/bacgopes/tests" "github.com/apache/plc4x/plc4go/protocols/bacnetip/readwrite/model" "github.com/apache/plc4x/plc4go/spi/testutils" "github.com/apache/plc4x/plc4go/spi/utils" - - "github.com/apache/plc4x/plc4go/internal/bacnetip" - . "github.com/apache/plc4x/plc4go/internal/bacnetip/constructors" - "github.com/apache/plc4x/plc4go/internal/bacnetip/tests" ) // This struct turns off the deferred startup function call that broadcasts I-Am-Router-To-Network and Network-Number-Is // // messages. type _NetworkServiceElement struct { - *bacnetip.NetworkServiceElement + *bacgopes.NetworkServiceElement } func new_NetworkServiceElement(localLog zerolog.Logger) (*_NetworkServiceElement, error) { n := &_NetworkServiceElement{} var err error - n.NetworkServiceElement, err = bacnetip.NewNetworkServiceElement(localLog, bacnetip.WithNetworkServiceElementStartupDisabled(true)) + n.NetworkServiceElement, err = bacgopes.NewNetworkServiceElement(localLog, bacgopes.WithNetworkServiceElementStartupDisabled(true)) if err != nil { return nil, errors.Wrap(err, "error creating network service element") } @@ -58,7 +57,7 @@ type ApplicationNetwork struct { *tests.StateMachineGroup trafficLog *tests.TrafficLog - vlan *bacnetip.Network + vlan *bacgopes.Network sniffer *SnifferNode td *ApplicationStateMachine iut *ApplicationStateMachine @@ -66,7 +65,7 @@ type ApplicationNetwork struct { log zerolog.Logger } -func NewApplicationNetwork(localLog zerolog.Logger, tdDeviceObject, iutDeviceObject *bacnetip.LocalDeviceObject) (*ApplicationNetwork, error) { +func NewApplicationNetwork(localLog zerolog.Logger, tdDeviceObject, iutDeviceObject *bacgopes.LocalDeviceObject) (*ApplicationNetwork, error) { a := &ApplicationNetwork{ log: localLog, } @@ -79,7 +78,7 @@ func NewApplicationNetwork(localLog zerolog.Logger, tdDeviceObject, iutDeviceObj a.trafficLog = new(tests.TrafficLog) // make a little LAN - a.vlan = bacnetip.NewNetwork(a.log, bacnetip.WithNetworkBroadcastAddress(bacnetip.NewLocalBroadcast(nil)), bacnetip.WithNetworkTrafficLogger(a.trafficLog)) + a.vlan = bacgopes.NewNetwork(a.log, bacgopes.WithNetworkBroadcastAddress(bacgopes.NewLocalBroadcast(nil)), bacgopes.WithNetworkTrafficLogger(a.trafficLog)) // sniffer var err error @@ -142,53 +141,53 @@ func (a *ApplicationNetwork) Run(timeLimit time.Duration) error { return nil } -func (a *ApplicationNetwork) _debug(format string, args bacnetip.Args) { +func (a *ApplicationNetwork) _debug(format string, args bacgopes.Args) { a.log.Debug().Msgf(format, args) } type SnifferNode struct { - bacnetip.Client + bacgopes.Client name string - address *bacnetip.Address - node *bacnetip.Node + address *bacgopes.Address + node *bacgopes.Node log zerolog.Logger } -func NewSnifferNode(localLog zerolog.Logger, vlan *bacnetip.Network) (*SnifferNode, error) { +func NewSnifferNode(localLog zerolog.Logger, vlan *bacgopes.Network) (*SnifferNode, error) { s := &SnifferNode{ name: "sniffer", log: localLog, } - s.address, _ = bacnetip.NewAddress(localLog) + s.address, _ = bacgopes.NewAddress(localLog) var err error - s.Client, err = bacnetip.NewClient(localLog, s) + s.Client, err = bacgopes.NewClient(localLog, s) if err != nil { return nil, errors.Wrap(err, "error creating client") } // create a promiscuous node, added to the network - s.node, err = bacnetip.NewNode(localLog, s.address, bacnetip.WithNodeLan(vlan), bacnetip.WithNodePromiscuous(true)) + s.node, err = bacgopes.NewNode(localLog, s.address, bacgopes.WithNodeLan(vlan), bacgopes.WithNodePromiscuous(true)) if err != nil { return nil, errors.Wrap(err, "error creating node") } s.log.Debug().Stringer("node", s.node).Msg("node") // bind the node - err = bacnetip.Bind(s.log, s, s.node) + err = bacgopes.Bind(s.log, s, s.node) if err != nil { return nil, errors.Wrap(err, "error binding node") } return s, nil } -func (s *SnifferNode) Request(args bacnetip.Args, kwargs bacnetip.KWArgs) error { +func (s *SnifferNode) Request(args bacgopes.Args, kwargs bacgopes.KWArgs) error { s.log.Debug().Stringer("args", args).Stringer("kwargs", kwargs).Msg("request") return errors.New("sniffers don't request") } -func (s *SnifferNode) Confirmation(args bacnetip.Args, kwargs bacnetip.KWArgs) error { +func (s *SnifferNode) Confirmation(args bacgopes.Args, kwargs bacgopes.KWArgs) error { s.log.Debug().Stringer("args", args).Stringer("kwargs", kwargs).Msg("confirmation") pdu := args.Get0PDU() @@ -224,22 +223,22 @@ func (s *SnifferNode) Confirmation(args bacnetip.Args, kwargs bacnetip.KWArgs) e } type ApplicationStateMachine struct { - *bacnetip.Application + *bacgopes.Application tests.StateMachineContract - address *bacnetip.Address - asap *bacnetip.ApplicationServiceAccessPoint - smap *bacnetip.StateMachineAccessPoint - nsap *bacnetip.NetworkServiceAccessPoint + address *bacgopes.Address + asap *bacgopes.ApplicationServiceAccessPoint + smap *bacgopes.StateMachineAccessPoint + nsap *bacgopes.NetworkServiceAccessPoint nse *_NetworkServiceElement - node *bacnetip.Node + node *bacgopes.Node confirmedPrivateResult any log zerolog.Logger } -func NewApplicationStateMachine(localLog zerolog.Logger, localDevice *bacnetip.LocalDeviceObject, vlan *bacnetip.Network, opts ...func(*ApplicationStateMachine)) (*ApplicationStateMachine, error) { +func NewApplicationStateMachine(localLog zerolog.Logger, localDevice *bacgopes.LocalDeviceObject, vlan *bacgopes.Network, opts ...func(*ApplicationStateMachine)) (*ApplicationStateMachine, error) { a := &ApplicationStateMachine{ log: localLog, } @@ -247,16 +246,16 @@ func NewApplicationStateMachine(localLog zerolog.Logger, localDevice *bacnetip.L opt(a) } // build and address and save it - _, instance := bacnetip.ObjectIdentifierStringToTuple(localDevice.ObjectIdentifier) + _, instance := bacgopes.ObjectIdentifierStringToTuple(localDevice.ObjectIdentifier) var err error - a.address, err = bacnetip.NewAddress(a.log, instance) + a.address, err = bacgopes.NewAddress(a.log, instance) if err != nil { return nil, errors.Wrap(err, "error creating address") } a.log.Debug().Stringer("address", a.address).Msg("address") // continue with initialization - a.Application, err = bacnetip.NewApplication(a.log, localDevice) + a.Application, err = bacgopes.NewApplication(a.log, localDevice) if err != nil { return nil, errors.Wrap(err, "error creating application io controller") } @@ -265,7 +264,7 @@ func NewApplicationStateMachine(localLog zerolog.Logger, localDevice *bacnetip.L init() // include a application decoder - a.asap, err = bacnetip.NewApplicationServiceAccessPoint(a.log) + a.asap, err = bacgopes.NewApplicationServiceAccessPoint(a.log) if err != nil { return nil, errors.Wrap(err, "error creating application service access point") } @@ -276,13 +275,13 @@ func NewApplicationStateMachine(localLog zerolog.Logger, localDevice *bacnetip.L // the segmentation state machines need access to the same device // information cache as the application deviceInfoCache := a.GetDeviceInfoCache() - a.smap, err = bacnetip.NewStateMachineAccessPoint(a.log, localDevice, bacnetip.WithStateMachineAccessPointDeviceInfoCache(deviceInfoCache)) + a.smap, err = bacgopes.NewStateMachineAccessPoint(a.log, localDevice, bacgopes.WithStateMachineAccessPointDeviceInfoCache(deviceInfoCache)) if err != nil { return nil, errors.Wrap(err, "error creating state machine access point") } // a network service access point will be needed - a.nsap, err = bacnetip.NewNetworkServiceAccessPoint(a.log) + a.nsap, err = bacgopes.NewNetworkServiceAccessPoint(a.log) if err != nil { return nil, errors.Wrap(err, "error creating network service access point") } @@ -292,19 +291,19 @@ func NewApplicationStateMachine(localLog zerolog.Logger, localDevice *bacnetip.L if err != nil { return nil, errors.Wrap(err, "error creating network service element") } - err = bacnetip.Bind(a.log, a.nse, a.nsap) + err = bacgopes.Bind(a.log, a.nse, a.nsap) if err != nil { return nil, errors.Wrap(err, "error binding network service element") } // bind the top layers - err = bacnetip.Bind(a.log, a, a.asap, a.smap, a.nsap) + err = bacgopes.Bind(a.log, a, a.asap, a.smap, a.nsap) if err != nil { return nil, errors.Wrap(err, "error binding top layers") } // create a node, added to the network - a.node, err = bacnetip.NewNode(a.log, a.address, bacnetip.WithNodeLan(vlan)) + a.node, err = bacgopes.NewNode(a.log, a.address, bacgopes.WithNodeLan(vlan)) if err != nil { return nil, errors.Wrap(err, "error creating node") } @@ -321,18 +320,18 @@ func (a *ApplicationStateMachine) String() string { return "ApplicationStateMachine" //TODO: } -func (a *ApplicationStateMachine) Send(args bacnetip.Args, kwargs bacnetip.KWArgs) error { +func (a *ApplicationStateMachine) Send(args bacgopes.Args, kwargs bacgopes.KWArgs) error { a.log.Debug().Stringer("args", args).Stringer("kwargs", kwargs).Msg("Send") // send the apdu down the stack return a.Request(args, kwargs) } -func (a *ApplicationStateMachine) Indication(args bacnetip.Args, kwargs bacnetip.KWArgs) error { +func (a *ApplicationStateMachine) Indication(args bacgopes.Args, kwargs bacgopes.KWArgs) error { a.log.Debug().Stringer("args", args).Stringer("kwargs", kwargs).Msg("Indication") // let the state machine know the request was received - err := a.Receive(args, bacnetip.NoKWArgs) + err := a.Receive(args, bacgopes.NoKWArgs) if err != nil { return errors.Wrap(err, "error receiving indication") } @@ -341,7 +340,7 @@ func (a *ApplicationStateMachine) Indication(args bacnetip.Args, kwargs bacnetip return a.Application.Indication(args, kwargs) } -func (a *ApplicationStateMachine) Confirmation(args bacnetip.Args, kwargs bacnetip.KWArgs) error { +func (a *ApplicationStateMachine) Confirmation(args bacgopes.Args, kwargs bacgopes.KWArgs) error { a.log.Debug().Stringer("args", args).Stringer("kwargs", kwargs).Msg("Confirmation") // forward the confirmation to the state machine @@ -362,7 +361,7 @@ func SegmentationTest(t *testing.T, prefix string, cLen, sLen int) { octets206 := model.MaxApduLengthAccepted_NUM_OCTETS_206 segmentation := model.BACnetSegmentation_SEGMENTED_BOTH maxSegmentsAccepted := model.MaxSegmentsAccepted_NUM_SEGMENTS_04 - tdDeviceObject := &bacnetip.LocalDeviceObject{ + tdDeviceObject := &bacgopes.LocalDeviceObject{ ObjectName: "td", ObjectIdentifier: "device:10", MaximumApduLengthAccepted: &octets206, @@ -373,7 +372,7 @@ func SegmentationTest(t *testing.T, prefix string, cLen, sLen int) { // server device object maxSegmentsAccepted = model.MaxSegmentsAccepted_NUM_SEGMENTS_64 - iutDeviceObject := &bacnetip.LocalDeviceObject{ + iutDeviceObject := &bacgopes.LocalDeviceObject{ ObjectName: "td", ObjectIdentifier: "device:10", MaximumApduLengthAccepted: &octets206, @@ -423,12 +422,12 @@ func SegmentationTest(t *testing.T, prefix string, cLen, sLen int) { var trq model.BACnetServiceAckConfirmedPrivateTransfer // send the request, get it acked anet.td.GetStartState().Doc(prefix+"-0"). - Send(bacnetip.NewPDU(ConfirmedPrivateTransferRequest(bacnetip.NewKWArgs( + Send(bacgopes.NewPDU(ConfirmedPrivateTransferRequest(bacgopes.NewKWArgs( "vendorId", 999, "serviceNumber", 1, "serviceParameters", requestString, "destination", anet.iut.address, )), nil), nil).Doc(prefix+"-1"). - Receive(bacnetip.NewArgs(trq), bacnetip.NoKWArgs).Doc(prefix + "-2"). + Receive(bacgopes.NewArgs(trq), bacgopes.NoKWArgs).Doc(prefix + "-2"). Success("") // no IUT application layer matching diff --git a/plc4go/internal/bacnetip/tests/test_service/helpers.go b/plc4go/internal/bacnetip/bacgopes/tests/test_service/helpers.go similarity index 76% rename from plc4go/internal/bacnetip/tests/test_service/helpers.go rename to plc4go/internal/bacnetip/bacgopes/tests/test_service/helpers.go index 3120d78067b..d2c1500f3ba 100644 --- a/plc4go/internal/bacnetip/tests/test_service/helpers.go +++ b/plc4go/internal/bacnetip/bacgopes/tests/test_service/helpers.go @@ -25,23 +25,22 @@ import ( "github.com/pkg/errors" "github.com/rs/zerolog" + "github.com/apache/plc4x/plc4go/internal/bacnetip/bacgopes" + "github.com/apache/plc4x/plc4go/internal/bacnetip/bacgopes/tests" "github.com/apache/plc4x/plc4go/protocols/bacnetip/readwrite/model" - - "github.com/apache/plc4x/plc4go/internal/bacnetip" - "github.com/apache/plc4x/plc4go/internal/bacnetip/tests" ) // This struct turns off the deferred startup function call that broadcasts I-Am-Router-To-Network and Network-Number-Is // // messages. type _NetworkServiceElement struct { - *bacnetip.NetworkServiceElement + *bacgopes.NetworkServiceElement } func new_NetworkServiceElement(localLog zerolog.Logger) (*_NetworkServiceElement, error) { n := &_NetworkServiceElement{} var err error - n.NetworkServiceElement, err = bacnetip.NewNetworkServiceElement(localLog, bacnetip.WithNetworkServiceElementStartupDisabled(true)) + n.NetworkServiceElement, err = bacgopes.NewNetworkServiceElement(localLog, bacgopes.WithNetworkServiceElementStartupDisabled(true)) if err != nil { return nil, errors.Wrap(err, "error creating network service element") } @@ -52,10 +51,10 @@ type ApplicationNetwork struct { *tests.StateMachineGroup trafficLog *tests.TrafficLog - vlan *bacnetip.Network - tdDeviceObject *bacnetip.LocalDeviceObject + vlan *bacgopes.Network + tdDeviceObject *bacgopes.LocalDeviceObject td *ApplicationStateMachine - iutDeviceObject *bacnetip.LocalDeviceObject + iutDeviceObject *bacgopes.LocalDeviceObject iut *ApplicationStateMachine log zerolog.Logger @@ -74,12 +73,12 @@ func NewApplicationNetwork(localLog zerolog.Logger) (*ApplicationNetwork, error) a.trafficLog = new(tests.TrafficLog) // make a little LAN - a.vlan = bacnetip.NewNetwork(localLog, bacnetip.WithNetworkBroadcastAddress(bacnetip.NewLocalBroadcast(nil)), bacnetip.WithNetworkTrafficLogger(a.trafficLog)) + a.vlan = bacgopes.NewNetwork(localLog, bacgopes.WithNetworkBroadcastAddress(bacgopes.NewLocalBroadcast(nil)), bacgopes.WithNetworkTrafficLogger(a.trafficLog)) // test device object octets1024 := model.MaxApduLengthAccepted_NUM_OCTETS_1024 segmentation := model.BACnetSegmentation_NO_SEGMENTATION - a.tdDeviceObject = &bacnetip.LocalDeviceObject{ + a.tdDeviceObject = &bacgopes.LocalDeviceObject{ ObjectName: "td", ObjectIdentifier: "device:10", MaximumApduLengthAccepted: &octets1024, @@ -98,7 +97,7 @@ func NewApplicationNetwork(localLog zerolog.Logger) (*ApplicationNetwork, error) // implementation under test device object octets1024 = model.MaxApduLengthAccepted_NUM_OCTETS_1024 segmentation = model.BACnetSegmentation_NO_SEGMENTATION - a.iutDeviceObject = &bacnetip.LocalDeviceObject{ + a.iutDeviceObject = &bacgopes.LocalDeviceObject{ ObjectName: "iut", ObjectIdentifier: "device:20", MaximumApduLengthAccepted: &octets1024, @@ -153,7 +152,7 @@ func (a *ApplicationNetwork) Run(timeLimit time.Duration) error { return nil } -func (a *ApplicationNetwork) _debug(format string, args bacnetip.Args) { +func (a *ApplicationNetwork) _debug(format string, args bacgopes.Args) { a.log.Debug().Msgf(format, args) } @@ -168,48 +167,48 @@ func (a *ApplicationNetwork) Close() error { } type SnifferNode struct { - bacnetip.Client + bacgopes.Client name string - address *bacnetip.Address - node *bacnetip.Node + address *bacgopes.Address + node *bacgopes.Node log zerolog.Logger } -func NewSnifferNode(localLog zerolog.Logger, vlan *bacnetip.Network) (*SnifferNode, error) { +func NewSnifferNode(localLog zerolog.Logger, vlan *bacgopes.Network) (*SnifferNode, error) { s := &SnifferNode{ name: "sniffer", log: localLog, } - s.address, _ = bacnetip.NewAddress(localLog) + s.address, _ = bacgopes.NewAddress(localLog) var err error - s.Client, err = bacnetip.NewClient(localLog, s) + s.Client, err = bacgopes.NewClient(localLog, s) if err != nil { return nil, errors.Wrap(err, "error creating client") } // create a promiscuous node, added to the network - s.node, err = bacnetip.NewNode(localLog, s.address, bacnetip.WithNodeLan(vlan), bacnetip.WithNodePromiscuous(true)) + s.node, err = bacgopes.NewNode(localLog, s.address, bacgopes.WithNodeLan(vlan), bacgopes.WithNodePromiscuous(true)) if err != nil { return nil, errors.Wrap(err, "error creating node") } s.log.Debug().Stringer("node", s.node).Msg("node") // bind the node - err = bacnetip.Bind(s.log, s, s.node) + err = bacgopes.Bind(s.log, s, s.node) if err != nil { return nil, errors.Wrap(err, "error binding node") } return s, nil } -func (s *SnifferNode) Request(args bacnetip.Args, kwargs bacnetip.KWArgs) error { +func (s *SnifferNode) Request(args bacgopes.Args, kwargs bacgopes.KWArgs) error { s.log.Debug().Stringer("args", args).Stringer("kwargs", kwargs).Msg("request") return errors.New("sniffers don't request") } -func (s *SnifferNode) Confirmation(args bacnetip.Args, kwargs bacnetip.KWArgs) error { +func (s *SnifferNode) Confirmation(args bacgopes.Args, kwargs bacgopes.KWArgs) error { s.log.Debug().Stringer("args", args).Stringer("kwargs", kwargs).Msg("confirmation") pdu := args.Get0PDU() @@ -245,26 +244,26 @@ func (s *SnifferNode) Confirmation(args bacnetip.Args, kwargs bacnetip.KWArgs) e } type SnifferStateMachine struct { - bacnetip.Client + bacgopes.Client tests.StateMachineContract name string - address *bacnetip.Address - node *bacnetip.Node + address *bacgopes.Address + node *bacgopes.Node log zerolog.Logger } -func NewSnifferStateMachine(localLog zerolog.Logger, vlan *bacnetip.Network) (*SnifferStateMachine, error) { +func NewSnifferStateMachine(localLog zerolog.Logger, vlan *bacgopes.Network) (*SnifferStateMachine, error) { s := &SnifferStateMachine{ name: "sniffer", log: localLog, } - s.address, _ = bacnetip.NewAddress(localLog) + s.address, _ = bacgopes.NewAddress(localLog) // continue with initialization var err error - s.Client, err = bacnetip.NewClient(localLog, s) + s.Client, err = bacgopes.NewClient(localLog, s) if err != nil { return nil, errors.Wrap(err, "error creating client") } @@ -273,26 +272,26 @@ func NewSnifferStateMachine(localLog zerolog.Logger, vlan *bacnetip.Network) (*S init() // create a promiscuous node, added to the network - s.node, err = bacnetip.NewNode(localLog, s.address, bacnetip.WithNodeLan(vlan), bacnetip.WithNodePromiscuous(true)) + s.node, err = bacgopes.NewNode(localLog, s.address, bacgopes.WithNodeLan(vlan), bacgopes.WithNodePromiscuous(true)) if err != nil { return nil, errors.Wrap(err, "error creating node") } s.log.Debug().Stringer("node", s.node).Msg("node") // bind the node - err = bacnetip.Bind(s.log, s, s.node) + err = bacgopes.Bind(s.log, s, s.node) if err != nil { return nil, errors.Wrap(err, "error binding node") } return s, nil } -func (s *SnifferStateMachine) Send(args bacnetip.Args, kwargs bacnetip.KWArgs) error { +func (s *SnifferStateMachine) Send(args bacgopes.Args, kwargs bacgopes.KWArgs) error { s.log.Debug().Stringer("args", args).Stringer("kwargs", kwargs).Msg("request") return errors.New("sniffers don't send") } -func (s *SnifferStateMachine) Confirmation(args bacnetip.Args, kwargs bacnetip.KWArgs) error { +func (s *SnifferStateMachine) Confirmation(args bacgopes.Args, kwargs bacgopes.KWArgs) error { s.log.Debug().Stringer("args", args).Stringer("kwargs", kwargs).Msg("confirmation") pdu := args.Get0PDU() @@ -325,7 +324,7 @@ func (s *SnifferStateMachine) Confirmation(args bacnetip.Args, kwargs bacnetip.K // TODO: print etc // pass to the state machine - return s.Receive(args, bacnetip.NoKWArgs) + return s.Receive(args, bacgopes.NoKWArgs) } func (s *SnifferStateMachine) String() string { @@ -333,35 +332,35 @@ func (s *SnifferStateMachine) String() string { } type ApplicationStateMachine struct { - *bacnetip.ApplicationIOController + *bacgopes.ApplicationIOController tests.StateMachineContract - address *bacnetip.Address - asap *bacnetip.ApplicationServiceAccessPoint - smap *bacnetip.StateMachineAccessPoint - nsap *bacnetip.NetworkServiceAccessPoint + address *bacgopes.Address + asap *bacgopes.ApplicationServiceAccessPoint + smap *bacgopes.StateMachineAccessPoint + nsap *bacgopes.NetworkServiceAccessPoint nse *_NetworkServiceElement - node *bacnetip.Node + node *bacgopes.Node log zerolog.Logger } -func NewApplicationStateMachine(localLog zerolog.Logger, localDevice *bacnetip.LocalDeviceObject, vlan *bacnetip.Network) (*ApplicationStateMachine, error) { +func NewApplicationStateMachine(localLog zerolog.Logger, localDevice *bacgopes.LocalDeviceObject, vlan *bacgopes.Network) (*ApplicationStateMachine, error) { a := &ApplicationStateMachine{ log: localLog, } // build and address and save it - _, instance := bacnetip.ObjectIdentifierStringToTuple(localDevice.ObjectIdentifier) + _, instance := bacgopes.ObjectIdentifierStringToTuple(localDevice.ObjectIdentifier) var err error - a.address, err = bacnetip.NewAddress(a.log, instance) + a.address, err = bacgopes.NewAddress(a.log, instance) if err != nil { return nil, errors.Wrap(err, "error creating address") } a.log.Debug().Stringer("address", a.address).Msg("address") // continue with initialization - a.ApplicationIOController, err = bacnetip.NewApplicationIOController(a.log, localDevice) + a.ApplicationIOController, err = bacgopes.NewApplicationIOController(a.log, localDevice) if err != nil { return nil, errors.Wrap(err, "error creating application io controller") } @@ -370,7 +369,7 @@ func NewApplicationStateMachine(localLog zerolog.Logger, localDevice *bacnetip.L init() // include a application decoder - a.asap, err = bacnetip.NewApplicationServiceAccessPoint(a.log) + a.asap, err = bacgopes.NewApplicationServiceAccessPoint(a.log) if err != nil { return nil, errors.Wrap(err, "error creating application service access point") } @@ -381,13 +380,13 @@ func NewApplicationStateMachine(localLog zerolog.Logger, localDevice *bacnetip.L // the segmentation state machines need access to the same device // information cache as the application deviceInfoCache := a.GetDeviceInfoCache() - a.smap, err = bacnetip.NewStateMachineAccessPoint(a.log, localDevice, bacnetip.WithStateMachineAccessPointDeviceInfoCache(deviceInfoCache)) + a.smap, err = bacgopes.NewStateMachineAccessPoint(a.log, localDevice, bacgopes.WithStateMachineAccessPointDeviceInfoCache(deviceInfoCache)) if err != nil { return nil, errors.Wrap(err, "error creating state machine access point") } // a network service access point will be needed - a.nsap, err = bacnetip.NewNetworkServiceAccessPoint(a.log) + a.nsap, err = bacgopes.NewNetworkServiceAccessPoint(a.log) if err != nil { return nil, errors.Wrap(err, "error creating network service access point") } @@ -397,19 +396,19 @@ func NewApplicationStateMachine(localLog zerolog.Logger, localDevice *bacnetip.L if err != nil { return nil, errors.Wrap(err, "error creating network service element") } - err = bacnetip.Bind(a.log, a.nse, a.nsap) + err = bacgopes.Bind(a.log, a.nse, a.nsap) if err != nil { return nil, errors.Wrap(err, "error binding network service element") } // bind the top layers - err = bacnetip.Bind(a.log, a, a.asap, a.smap, a.nsap) + err = bacgopes.Bind(a.log, a, a.asap, a.smap, a.nsap) if err != nil { return nil, errors.Wrap(err, "error binding top layers") } // create a node, added to the network - a.node, err = bacnetip.NewNode(a.log, a.address, bacnetip.WithNodeLan(vlan)) + a.node, err = bacgopes.NewNode(a.log, a.address, bacgopes.WithNodeLan(vlan)) if err != nil { return nil, errors.Wrap(err, "error creating node") } @@ -426,23 +425,23 @@ func (a *ApplicationStateMachine) String() string { return "ApplicationStateMachine" //TODO: } -func (a *ApplicationStateMachine) Send(args bacnetip.Args, kwargs bacnetip.KWArgs) error { +func (a *ApplicationStateMachine) Send(args bacgopes.Args, kwargs bacgopes.KWArgs) error { a.log.Debug().Stringer("args", args).Stringer("kwargs", kwargs).Msg("Send") pdu := args.Get0PDU() // build a IOCB to wrap the request - iocb, err := bacnetip.NewIOCB(a.log, pdu, nil) + iocb, err := bacgopes.NewIOCB(a.log, pdu, nil) if err != nil { return errors.Wrap(err, "error creating iocb") } - return a.Request(bacnetip.NewArgs(iocb), bacnetip.NoKWArgs) + return a.Request(bacgopes.NewArgs(iocb), bacgopes.NoKWArgs) } -func (a *ApplicationStateMachine) Indication(args bacnetip.Args, kwargs bacnetip.KWArgs) error { +func (a *ApplicationStateMachine) Indication(args bacgopes.Args, kwargs bacgopes.KWArgs) error { a.log.Debug().Stringer("args", args).Stringer("kwargs", kwargs).Msg("Indication") // let the state machine know the request was received - err := a.Receive(args, bacnetip.NoKWArgs) + err := a.Receive(args, bacgopes.NoKWArgs) if err != nil { return errors.Wrap(err, "error receiving indication") } @@ -451,11 +450,11 @@ func (a *ApplicationStateMachine) Indication(args bacnetip.Args, kwargs bacnetip return a.Application.Indication(args, kwargs) } -func (a *ApplicationStateMachine) Confirmation(args bacnetip.Args, kwargs bacnetip.KWArgs) error { +func (a *ApplicationStateMachine) Confirmation(args bacgopes.Args, kwargs bacgopes.KWArgs) error { a.log.Debug().Stringer("args", args).Stringer("kwargs", kwargs).Msg("Confirmation") // forward the confirmation to the state machine - err := a.Receive(args, bacnetip.NoKWArgs) + err := a.Receive(args, bacgopes.NoKWArgs) if err != nil { return errors.Wrap(err, "error receiving indication") } @@ -469,19 +468,19 @@ type COVTestClientServicesRequirements interface { type COVTestClientServices struct { COVTestClientServicesRequirements - *bacnetip.Capability + *bacgopes.Capability log zerolog.Logger } -func (c *COVTestClientServices) doConfirmedCOVNotificationRequest(args bacnetip.Args, kwargs bacnetip.KWArgs) error { +func (c *COVTestClientServices) doConfirmedCOVNotificationRequest(args bacgopes.Args, kwargs bacgopes.KWArgs) error { c.log.Debug().Stringer("args", args).Stringer("kwargs", kwargs).Msg("doConfirmedCOVNotificationRequest") panic("TODO: implement me") // TODO:implement me return nil } -func (c *COVTestClientServices) doUnconfirmedCOVNotificationRequest(args bacnetip.Args, kwargs bacnetip.KWArgs) error { +func (c *COVTestClientServices) doUnconfirmedCOVNotificationRequest(args bacgopes.Args, kwargs bacgopes.KWArgs) error { c.log.Debug().Stringer("args", args).Stringer("kwargs", kwargs).Msg("doUnconfirmedCOVNotificationRequest") panic("TODO: implement me") // TODO:implement me diff --git a/plc4go/internal/bacnetip/tests/test_service/test_cov_av_test.go b/plc4go/internal/bacnetip/bacgopes/tests/test_service/test_cov_av_test.go similarity index 100% rename from plc4go/internal/bacnetip/tests/test_service/test_cov_av_test.go rename to plc4go/internal/bacnetip/bacgopes/tests/test_service/test_cov_av_test.go diff --git a/plc4go/internal/bacnetip/tests/test_service/test_cov_bv_test.go b/plc4go/internal/bacnetip/bacgopes/tests/test_service/test_cov_bv_test.go similarity index 100% rename from plc4go/internal/bacnetip/tests/test_service/test_cov_bv_test.go rename to plc4go/internal/bacnetip/bacgopes/tests/test_service/test_cov_bv_test.go diff --git a/plc4go/internal/bacnetip/tests/test_service/test_cov_pc_test.go b/plc4go/internal/bacnetip/bacgopes/tests/test_service/test_cov_pc_test.go similarity index 100% rename from plc4go/internal/bacnetip/tests/test_service/test_cov_pc_test.go rename to plc4go/internal/bacnetip/bacgopes/tests/test_service/test_cov_pc_test.go diff --git a/plc4go/internal/bacnetip/tests/test_service/test_cov_test.go b/plc4go/internal/bacnetip/bacgopes/tests/test_service/test_cov_test.go similarity index 92% rename from plc4go/internal/bacnetip/tests/test_service/test_cov_test.go rename to plc4go/internal/bacnetip/bacgopes/tests/test_service/test_cov_test.go index d9887beee27..15a0cccf819 100644 --- a/plc4go/internal/bacnetip/tests/test_service/test_cov_test.go +++ b/plc4go/internal/bacnetip/bacgopes/tests/test_service/test_cov_test.go @@ -25,10 +25,9 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/apache/plc4x/plc4go/internal/bacnetip/bacgopes/service" + "github.com/apache/plc4x/plc4go/internal/bacnetip/bacgopes/tests" "github.com/apache/plc4x/plc4go/spi/testutils" - - "github.com/apache/plc4x/plc4go/internal/bacnetip/service" - "github.com/apache/plc4x/plc4go/internal/bacnetip/tests" ) func TestBasic(t *testing.T) { diff --git a/plc4go/internal/bacnetip/tests/test_service/test_device_2_test.go b/plc4go/internal/bacnetip/bacgopes/tests/test_service/test_device_2_test.go similarity index 100% rename from plc4go/internal/bacnetip/tests/test_service/test_device_2_test.go rename to plc4go/internal/bacnetip/bacgopes/tests/test_service/test_device_2_test.go diff --git a/plc4go/internal/bacnetip/tests/test_service/test_device_test.go b/plc4go/internal/bacnetip/bacgopes/tests/test_service/test_device_test.go similarity index 100% rename from plc4go/internal/bacnetip/tests/test_service/test_device_test.go rename to plc4go/internal/bacnetip/bacgopes/tests/test_service/test_device_test.go diff --git a/plc4go/internal/bacnetip/tests/test_service/test_file_test.go b/plc4go/internal/bacnetip/bacgopes/tests/test_service/test_file_test.go similarity index 100% rename from plc4go/internal/bacnetip/tests/test_service/test_file_test.go rename to plc4go/internal/bacnetip/bacgopes/tests/test_service/test_file_test.go diff --git a/plc4go/internal/bacnetip/tests/test_service/test_object_test.go b/plc4go/internal/bacnetip/bacgopes/tests/test_service/test_object_test.go similarity index 100% rename from plc4go/internal/bacnetip/tests/test_service/test_object_test.go rename to plc4go/internal/bacnetip/bacgopes/tests/test_service/test_object_test.go diff --git a/plc4go/internal/bacnetip/tests/test_utilities/test_client_state_machine_test.go b/plc4go/internal/bacnetip/bacgopes/tests/test_utilities/test_client_state_machine_test.go similarity index 89% rename from plc4go/internal/bacnetip/tests/test_utilities/test_client_state_machine_test.go rename to plc4go/internal/bacnetip/bacgopes/tests/test_utilities/test_client_state_machine_test.go index ce065772400..6bd0ad47773 100644 --- a/plc4go/internal/bacnetip/tests/test_utilities/test_client_state_machine_test.go +++ b/plc4go/internal/bacnetip/bacgopes/tests/test_utilities/test_client_state_machine_test.go @@ -25,10 +25,9 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/apache/plc4x/plc4go/internal/bacnetip/bacgopes" + "github.com/apache/plc4x/plc4go/internal/bacnetip/bacgopes/tests" "github.com/apache/plc4x/plc4go/spi/testutils" - - "github.com/apache/plc4x/plc4go/internal/bacnetip" - "github.com/apache/plc4x/plc4go/internal/bacnetip/tests" ) func TestClientStateMachine(t *testing.T) { @@ -38,11 +37,11 @@ func TestClientStateMachine(t *testing.T) { require.NoError(t, err) server, err := tests.NewTrappedServer(testingLogger) require.NoError(t, err) - err = bacnetip.Bind(testingLogger, client, server) + err = bacgopes.Bind(testingLogger, client, server) require.NoError(t, err) // make pdu object - pdu := bacnetip.NewPDU(tests.NewDummyMessage()) + pdu := bacgopes.NewPDU(tests.NewDummyMessage()) // make a send transition from start to success, run the machine client.GetStartState().Send(pdu, nil).Success("") diff --git a/plc4go/internal/bacnetip/tests/test_utilities/test_server_state_machine_test.go b/plc4go/internal/bacnetip/bacgopes/tests/test_utilities/test_server_state_machine_test.go similarity index 89% rename from plc4go/internal/bacnetip/tests/test_utilities/test_server_state_machine_test.go rename to plc4go/internal/bacnetip/bacgopes/tests/test_utilities/test_server_state_machine_test.go index 9212630af23..b67a43563b1 100644 --- a/plc4go/internal/bacnetip/tests/test_utilities/test_server_state_machine_test.go +++ b/plc4go/internal/bacnetip/bacgopes/tests/test_utilities/test_server_state_machine_test.go @@ -25,10 +25,9 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/apache/plc4x/plc4go/internal/bacnetip/bacgopes" + "github.com/apache/plc4x/plc4go/internal/bacnetip/bacgopes/tests" "github.com/apache/plc4x/plc4go/spi/testutils" - - "github.com/apache/plc4x/plc4go/internal/bacnetip" - "github.com/apache/plc4x/plc4go/internal/bacnetip/tests" ) func TestServerStateMachine(t *testing.T) { @@ -38,11 +37,11 @@ func TestServerStateMachine(t *testing.T) { require.NoError(t, err) server, err := tests.NewServerStateMachine(testingLogger) require.NoError(t, err) - err = bacnetip.Bind(testingLogger, client, server) + err = bacgopes.Bind(testingLogger, client, server) require.NoError(t, err) // make pdu object - pdu := bacnetip.NewPDU(tests.NewDummyMessage()) + pdu := bacgopes.NewPDU(tests.NewDummyMessage()) // make a send transition from start to success, run the machine server.GetStartState().Send(pdu, nil).Success("") diff --git a/plc4go/internal/bacnetip/tests/test_utilities/test_service_access_point_test.go b/plc4go/internal/bacnetip/bacgopes/tests/test_utilities/test_service_access_point_test.go similarity index 74% rename from plc4go/internal/bacnetip/tests/test_utilities/test_service_access_point_test.go rename to plc4go/internal/bacnetip/bacgopes/tests/test_utilities/test_service_access_point_test.go index a7e59fd6f50..c3c747f008a 100644 --- a/plc4go/internal/bacnetip/tests/test_utilities/test_service_access_point_test.go +++ b/plc4go/internal/bacnetip/bacgopes/tests/test_utilities/test_service_access_point_test.go @@ -26,14 +26,13 @@ import ( "github.com/rs/zerolog" "github.com/stretchr/testify/suite" + "github.com/apache/plc4x/plc4go/internal/bacnetip/bacgopes" + "github.com/apache/plc4x/plc4go/internal/bacnetip/bacgopes/tests" "github.com/apache/plc4x/plc4go/spi/testutils" - - "github.com/apache/plc4x/plc4go/internal/bacnetip" - "github.com/apache/plc4x/plc4go/internal/bacnetip/tests" ) type EchoAccessPointRequirements interface { - SapResponse(args bacnetip.Args, kwArgs bacnetip.KWArgs) error + SapResponse(args bacgopes.Args, kwArgs bacgopes.KWArgs) error } type EchoAccessPoint struct { @@ -51,12 +50,12 @@ func NewEchoAccessPoint(localLog zerolog.Logger, requirements EchoAccessPointReq return e } -func (e *EchoAccessPoint) SapIndication(args bacnetip.Args, kwargs bacnetip.KWArgs) error { +func (e *EchoAccessPoint) SapIndication(args bacgopes.Args, kwargs bacgopes.KWArgs) error { e.log.Debug().Stringer("args", args).Stringer("kwargs", kwargs).Msg("SapIndication") - return e.requirements.SapResponse(args, bacnetip.NoKWArgs) + return e.requirements.SapResponse(args, bacgopes.NoKWArgs) } -func (e *EchoAccessPoint) SapConfirmation(args bacnetip.Args, kwargs bacnetip.KWArgs) error { +func (e *EchoAccessPoint) SapConfirmation(args bacgopes.Args, kwargs bacgopes.KWArgs) error { e.log.Debug().Stringer("args", args).Stringer("kwargs", kwargs).Msg("SapConfirmation") return nil } @@ -66,7 +65,7 @@ type TrappedEchoAccessPoint struct { *EchoAccessPoint } -var _ bacnetip.ServiceAccessPoint = (*TrappedEchoAccessPoint)(nil) +var _ bacgopes.ServiceAccessPoint = (*TrappedEchoAccessPoint)(nil) func NewTrappedEchoAccessPoint(localLog zerolog.Logger) (*TrappedEchoAccessPoint, error) { t := &TrappedEchoAccessPoint{} @@ -79,19 +78,19 @@ func NewTrappedEchoAccessPoint(localLog zerolog.Logger) (*TrappedEchoAccessPoint return t, nil } -func (t *TrappedEchoAccessPoint) SapRequest(args bacnetip.Args, kwargs bacnetip.KWArgs) error { +func (t *TrappedEchoAccessPoint) SapRequest(args bacgopes.Args, kwargs bacgopes.KWArgs) error { return t.TrappedServiceAccessPoint.SapRequest(args, kwargs) } -func (t *TrappedEchoAccessPoint) SapIndication(args bacnetip.Args, kwargs bacnetip.KWArgs) error { +func (t *TrappedEchoAccessPoint) SapIndication(args bacgopes.Args, kwargs bacgopes.KWArgs) error { return t.TrappedServiceAccessPoint.SapIndication(args, kwargs) } -func (t *TrappedEchoAccessPoint) SapResponse(args bacnetip.Args, kwargs bacnetip.KWArgs) error { +func (t *TrappedEchoAccessPoint) SapResponse(args bacgopes.Args, kwargs bacgopes.KWArgs) error { return t.TrappedServiceAccessPoint.SapResponse(args, kwargs) } -func (t *TrappedEchoAccessPoint) SapConfirmation(args bacnetip.Args, kwargs bacnetip.KWArgs) error { +func (t *TrappedEchoAccessPoint) SapConfirmation(args bacgopes.Args, kwargs bacgopes.KWArgs) error { return t.TrappedServiceAccessPoint.SapConfirmation(args, kwargs) } @@ -100,7 +99,7 @@ func (t *TrappedEchoAccessPoint) String() string { } type EchoServiceElementRequirements interface { - Response(args bacnetip.Args, kwArgs bacnetip.KWArgs) error + Response(args bacgopes.Args, kwArgs bacgopes.KWArgs) error } type EchoServiceElement struct { @@ -117,12 +116,12 @@ func NewEchoServiceElement(localLog zerolog.Logger, requirements EchoServiceElem return e } -func (e *EchoServiceElement) Indication(args bacnetip.Args, kwargs bacnetip.KWArgs) error { +func (e *EchoServiceElement) Indication(args bacgopes.Args, kwargs bacgopes.KWArgs) error { e.log.Debug().Stringer("args", args).Stringer("kwargs", kwargs).Msg("Indication") - return e.requirements.Response(args, bacnetip.NoKWArgs) + return e.requirements.Response(args, bacgopes.NoKWArgs) } -func (e *EchoServiceElement) Confirmation(args bacnetip.Args, kwargs bacnetip.KWArgs) error { +func (e *EchoServiceElement) Confirmation(args bacgopes.Args, kwargs bacgopes.KWArgs) error { e.log.Debug().Stringer("args", args).Stringer("kwargs", kwargs).Msg("Confirmation") return nil } @@ -147,19 +146,19 @@ func NewTrappedEchoServiceElement(localLog zerolog.Logger) (*TrappedEchoServiceE return t, nil } -func (t *TrappedEchoServiceElement) Request(args bacnetip.Args, kwargs bacnetip.KWArgs) error { +func (t *TrappedEchoServiceElement) Request(args bacgopes.Args, kwargs bacgopes.KWArgs) error { return t.TrappedApplicationServiceElement.Request(args, kwargs) } -func (t *TrappedEchoServiceElement) Indication(args bacnetip.Args, kwargs bacnetip.KWArgs) error { +func (t *TrappedEchoServiceElement) Indication(args bacgopes.Args, kwargs bacgopes.KWArgs) error { return t.TrappedApplicationServiceElement.Indication(args, kwargs) } -func (t *TrappedEchoServiceElement) Response(args bacnetip.Args, kwargs bacnetip.KWArgs) error { +func (t *TrappedEchoServiceElement) Response(args bacgopes.Args, kwargs bacgopes.KWArgs) error { return t.TrappedApplicationServiceElement.Response(args, kwargs) } -func (t *TrappedEchoServiceElement) Confirmation(args bacnetip.Args, kwargs bacnetip.KWArgs) error { +func (t *TrappedEchoServiceElement) Confirmation(args bacgopes.Args, kwargs bacgopes.KWArgs) error { return t.TrappedApplicationServiceElement.Confirmation(args, kwargs) } @@ -186,7 +185,7 @@ func (suite *TestApplicationSuite) SetupSuite() { suite.ase, err = NewTrappedEchoServiceElement(suite.log) suite.Require().NoError(err) - err = bacnetip.Bind(suite.log, suite.ase, suite.sap) + err = bacgopes.Bind(suite.log, suite.ase, suite.sap) suite.Require().NoError(err) } @@ -195,10 +194,10 @@ func (suite *TestApplicationSuite) TearDownSuite() { func (suite *TestApplicationSuite) TestSapRequest() { // make a pdu - pdu := bacnetip.NewPDU(tests.NewDummyMessage()) + pdu := bacgopes.NewPDU(tests.NewDummyMessage()) // service access point is going to request something - err := suite.sap.SapRequest(bacnetip.NewArgs(pdu), bacnetip.NoKWArgs) + err := suite.sap.SapRequest(bacgopes.NewArgs(pdu), bacgopes.NoKWArgs) suite.Assert().NoError(err) // make sure the request was sent and received @@ -212,10 +211,10 @@ func (suite *TestApplicationSuite) TestSapRequest() { func (suite *TestApplicationSuite) TestAseRequest() { // make a pdu - pdu := bacnetip.NewPDU(tests.NewDummyMessage()) + pdu := bacgopes.NewPDU(tests.NewDummyMessage()) // service access point is going to request something - err := suite.ase.Request(bacnetip.NewArgs(pdu), bacnetip.NoKWArgs) + err := suite.ase.Request(bacgopes.NewArgs(pdu), bacgopes.NoKWArgs) suite.Assert().NoError(err) // make sure the request was sent and received diff --git a/plc4go/internal/bacnetip/tests/test_utilities/test_state_machine_test.go b/plc4go/internal/bacnetip/bacgopes/tests/test_utilities/test_state_machine_test.go similarity index 91% rename from plc4go/internal/bacnetip/tests/test_utilities/test_state_machine_test.go rename to plc4go/internal/bacnetip/bacgopes/tests/test_utilities/test_state_machine_test.go index 9064cb5f262..1ae9f0b18aa 100644 --- a/plc4go/internal/bacnetip/tests/test_utilities/test_state_machine_test.go +++ b/plc4go/internal/bacnetip/bacgopes/tests/test_utilities/test_state_machine_test.go @@ -28,13 +28,12 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/apache/plc4x/plc4go/internal/bacnetip/bacgopes" + "github.com/apache/plc4x/plc4go/internal/bacnetip/bacgopes/tests" readWriteModel "github.com/apache/plc4x/plc4go/protocols/bacnetip/readwrite/model" "github.com/apache/plc4x/plc4go/spi" "github.com/apache/plc4x/plc4go/spi/testutils" "github.com/apache/plc4x/plc4go/spi/utils" - - "github.com/apache/plc4x/plc4go/internal/bacnetip" - "github.com/apache/plc4x/plc4go/internal/bacnetip/tests" ) type TPDU struct { @@ -42,7 +41,7 @@ type TPDU struct { a, b int } -var _ bacnetip.PDU = TPDU{} +var _ bacgopes.PDU = TPDU{} func (t TPDU) X() []byte { return t.x @@ -80,19 +79,19 @@ func (t TPDU) SetPDUUserData(message spi.Message) { panic("implement me") } -func (t TPDU) GetPDUSource() *bacnetip.Address { +func (t TPDU) GetPDUSource() *bacgopes.Address { panic("implement me") } -func (t TPDU) SetPDUSource(source *bacnetip.Address) { +func (t TPDU) SetPDUSource(source *bacgopes.Address) { panic("implement me") } -func (t TPDU) GetPDUDestination() *bacnetip.Address { +func (t TPDU) GetPDUDestination() *bacgopes.Address { panic("implement me") } -func (t TPDU) SetPDUDestination(address *bacnetip.Address) { +func (t TPDU) SetPDUDestination(address *bacgopes.Address) { panic("implement me") } @@ -136,7 +135,7 @@ func (t TPDU) GetPDUUserData() spi.Message { panic("implement me") } -func (t TPDU) Update(pci bacnetip.Arg) error { +func (t TPDU) Update(pci bacgopes.Arg) error { //TODO implement me panic("implement me") } @@ -191,7 +190,7 @@ func (t TPDU) PutLong(i uint32) { panic("implement me") } -func (t TPDU) GetPCI() bacnetip.PCI { +func (t TPDU) GetPCI() bacgopes.PCI { //TODO implement me panic("implement me") } @@ -220,16 +219,16 @@ func TestMatchPdu(t *testing.T) { // Note the other testcase is irrelevant as we don't have dynamic types // matching/not matching attributes - assert.True(t, tests.MatchPdu(testingLogger, tpdu, nil, map[bacnetip.KnownKey]any{"x": []byte{1}})) - assert.False(t, tests.MatchPdu(testingLogger, tpdu, nil, map[bacnetip.KnownKey]any{"x": []byte{2}})) - assert.False(t, tests.MatchPdu(testingLogger, tpdu, nil, map[bacnetip.KnownKey]any{"y": []byte{1}})) - assert.False(t, tests.MatchPdu(testingLogger, anon, nil, map[bacnetip.KnownKey]any{"x": []byte{1}})) + assert.True(t, tests.MatchPdu(testingLogger, tpdu, nil, map[bacgopes.KnownKey]any{"x": []byte{1}})) + assert.False(t, tests.MatchPdu(testingLogger, tpdu, nil, map[bacgopes.KnownKey]any{"x": []byte{2}})) + assert.False(t, tests.MatchPdu(testingLogger, tpdu, nil, map[bacgopes.KnownKey]any{"y": []byte{1}})) + assert.False(t, tests.MatchPdu(testingLogger, anon, nil, map[bacgopes.KnownKey]any{"x": []byte{1}})) // matching/not matching types and attributes - assert.True(t, tests.MatchPdu(testingLogger, tpdu, TPDU{}, map[bacnetip.KnownKey]any{"x": []byte{1}})) - assert.False(t, tests.MatchPdu(testingLogger, tpdu, TPDU{}, map[bacnetip.KnownKey]any{"x": []byte{2}})) - assert.False(t, tests.MatchPdu(testingLogger, tpdu, TPDU{}, map[bacnetip.KnownKey]any{"y": []byte{1}})) - assert.False(t, tests.MatchPdu(testingLogger, anon, Anon{}, map[bacnetip.KnownKey]any{"x": []byte{1}})) + assert.True(t, tests.MatchPdu(testingLogger, tpdu, TPDU{}, map[bacgopes.KnownKey]any{"x": []byte{1}})) + assert.False(t, tests.MatchPdu(testingLogger, tpdu, TPDU{}, map[bacgopes.KnownKey]any{"x": []byte{2}})) + assert.False(t, tests.MatchPdu(testingLogger, tpdu, TPDU{}, map[bacgopes.KnownKey]any{"y": []byte{1}})) + assert.False(t, tests.MatchPdu(testingLogger, anon, Anon{}, map[bacgopes.KnownKey]any{"x": []byte{1}})) } func TestState(t *testing.T) { @@ -330,7 +329,7 @@ func TestStateMachine(t *testing.T) { tsm := tests.NewTrappedStateMachine(testingLogger) // Make a pdu object - pdu := bacnetip.NewPDU(nil) + pdu := bacgopes.NewPDU(nil) // make a send transition from start to success, run the machine tsm.GetStartState().Send(pdu, nil).Success("") @@ -342,8 +341,8 @@ func TestStateMachine(t *testing.T) { assert.True(t, tsm.GetCurrentState().IsSuccessState()) // check the callbacks - assert.IsType(t, bacnetip.NewPDU(nil), tsm.GetBeforeSendPdu()) - assert.IsType(t, bacnetip.NewPDU(nil), tsm.GetAfterSendPdu()) + assert.IsType(t, bacgopes.NewPDU(nil), tsm.GetBeforeSendPdu()) + assert.IsType(t, bacgopes.NewPDU(nil), tsm.GetAfterSendPdu()) // make sure pdu was sent assert.Same(t, pdu, tsm.GetSent()) @@ -362,7 +361,7 @@ func TestStateMachine(t *testing.T) { pdu := TPDU{} // make a send transition from start to success, run the machine - tsm.GetStartState().Receive(bacnetip.NewArgs(pdu), bacnetip.NoKWArgs).Success("") + tsm.GetStartState().Receive(bacgopes.NewArgs(pdu), bacgopes.NoKWArgs).Success("") err := tsm.Run() assert.NoError(t, err) @@ -370,7 +369,7 @@ func TestStateMachine(t *testing.T) { assert.True(t, tsm.IsRunning()) // tell the machine it is receiving the pdu - err = tsm.Receive(bacnetip.NewArgs(pdu), bacnetip.NoKWArgs) + err = tsm.Receive(bacgopes.NewArgs(pdu), bacgopes.NoKWArgs) require.NoError(t, err) // check for success @@ -397,7 +396,7 @@ func TestStateMachine(t *testing.T) { badPdu := TPDU{b: 2} // make a send transition from start to success, run the machine - tsm.GetStartState().Receive(bacnetip.NewArgs(TPDU{}), bacnetip.NewKWArgs(bacnetip.KnownKey("a"), 1)).Success("") + tsm.GetStartState().Receive(bacgopes.NewArgs(TPDU{}), bacgopes.NewKWArgs(bacgopes.KnownKey("a"), 1)).Success("") err := tsm.Run() assert.NoError(t, err) @@ -405,7 +404,7 @@ func TestStateMachine(t *testing.T) { assert.True(t, tsm.IsRunning()) // give the machine a bad pdu - err = tsm.Receive(bacnetip.NewArgs(badPdu), bacnetip.NoKWArgs) + err = tsm.Receive(bacgopes.NewArgs(badPdu), bacgopes.NoKWArgs) require.NoError(t, err) // check for fail @@ -425,7 +424,7 @@ func TestStateMachine(t *testing.T) { // simpleHook called := false - _called := func(args bacnetip.Args, kwArgs bacnetip.KWArgs) error { + _called := func(args bacgopes.Args, kwArgs bacgopes.KWArgs) error { called = args[0].(bool) return nil } @@ -434,7 +433,7 @@ func TestStateMachine(t *testing.T) { tsm := tests.NewTrappedStateMachine(testingLogger) // make a send transition from start to success, run the machine - tsm.GetStartState().Call(_called, bacnetip.NewArgs(true), bacnetip.NoKWArgs).Success("") + tsm.GetStartState().Call(_called, bacgopes.NewArgs(true), bacgopes.NoKWArgs).Success("") err := tsm.Run() assert.NoError(t, err) @@ -450,7 +449,7 @@ func TestStateMachine(t *testing.T) { // simpleHook called := false - _called := func(args bacnetip.Args, kwArgs bacnetip.KWArgs) error { + _called := func(args bacgopes.Args, kwArgs bacgopes.KWArgs) error { called = args[0].(bool) return tests.AssertionError{Message: "error"} } @@ -459,7 +458,7 @@ func TestStateMachine(t *testing.T) { tsm := tests.NewTrappedStateMachine(testingLogger) // make a send transition from start to success, run the machine - tsm.GetStartState().Call(_called, bacnetip.NewArgs(true), bacnetip.NoKWArgs) + tsm.GetStartState().Call(_called, bacgopes.NewArgs(true), bacgopes.NoKWArgs) err := tsm.Run() assert.NoError(t, err) @@ -485,7 +484,7 @@ func TestStateMachine(t *testing.T) { // after sending the first pdu, wait for the second s0 := tsm.GetStartState() s1 := s0.Send(firstPdu, nil) - s2 := s1.Receive(bacnetip.NewArgs(TPDU{}), bacnetip.NewKWArgs(bacnetip.KnownKey("a"), 2)) + s2 := s1.Receive(bacgopes.NewArgs(TPDU{}), bacgopes.NewKWArgs(bacgopes.KnownKey("a"), 2)) s2.Success("") // run the machine @@ -497,7 +496,7 @@ func TestStateMachine(t *testing.T) { assert.Same(t, s1, tsm.GetCurrentState()) // give the machine the second pdu - err = tsm.Receive(bacnetip.NewArgs(secondPdu), bacnetip.NoKWArgs) + err = tsm.Receive(bacgopes.NewArgs(secondPdu), bacgopes.NoKWArgs) require.NoError(t, err) // check for success @@ -530,7 +529,7 @@ func TestStateMachine(t *testing.T) { // when the first pdu is received, send the second s0 := tsm.GetStartState() - s1 := s0.Receive(bacnetip.NewArgs(TPDU{}), bacnetip.NewKWArgs(bacnetip.KnownKey("a"), 1)) + s1 := s0.Receive(bacgopes.NewArgs(TPDU{}), bacgopes.NewKWArgs(bacgopes.KnownKey("a"), 1)) s2 := s1.Send(secondPdu, nil) s2.Success("") @@ -542,7 +541,7 @@ func TestStateMachine(t *testing.T) { assert.True(t, tsm.IsRunning()) // give the machine the first pdu - err = tsm.Receive(bacnetip.NewArgs(firstPdu), bacnetip.NoKWArgs) + err = tsm.Receive(bacgopes.NewArgs(firstPdu), bacgopes.NoKWArgs) require.NoError(t, err) // check for success diff --git a/plc4go/internal/bacnetip/tests/test_utilities/test_time_machine_test.go b/plc4go/internal/bacnetip/bacgopes/tests/test_utilities/test_time_machine_test.go similarity index 89% rename from plc4go/internal/bacnetip/tests/test_utilities/test_time_machine_test.go rename to plc4go/internal/bacnetip/bacgopes/tests/test_utilities/test_time_machine_test.go index 5710849873b..98f400886ff 100644 --- a/plc4go/internal/bacnetip/tests/test_utilities/test_time_machine_test.go +++ b/plc4go/internal/bacnetip/bacgopes/tests/test_utilities/test_time_machine_test.go @@ -28,10 +28,9 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/suite" + "github.com/apache/plc4x/plc4go/internal/bacnetip/bacgopes" + "github.com/apache/plc4x/plc4go/internal/bacnetip/bacgopes/tests" "github.com/apache/plc4x/plc4go/spi/testutils" - - "github.com/apache/plc4x/plc4go/internal/bacnetip" - "github.com/apache/plc4x/plc4go/internal/bacnetip/tests" ) type TimeMachineSuite struct { @@ -55,7 +54,7 @@ func (suite *TimeMachineSuite) TearDownTest() { } type SampleOneShotTask struct { - *bacnetip.OneShotTask + *bacgopes.OneShotTask processTaskCalled []time.Time @@ -66,7 +65,7 @@ func NewSampleOneShotTask(localLog zerolog.Logger) *SampleOneShotTask { s := &SampleOneShotTask{ log: localLog, } - s.OneShotTask = bacnetip.NewOneShotTask(s, nil) + s.OneShotTask = bacgopes.NewOneShotTask(s, nil) return s } @@ -78,8 +77,8 @@ func (s *SampleOneShotTask) ProcessTask() error { return nil } -func (suite *TimeMachineSuite) SampleTaskFunction() func(args bacnetip.Args, kwArgs bacnetip.KWArgs) error { - return func(args bacnetip.Args, kwArgs bacnetip.KWArgs) error { +func (suite *TimeMachineSuite) SampleTaskFunction() func(args bacgopes.Args, kwArgs bacgopes.KWArgs) error { + return func(args bacgopes.Args, kwArgs bacgopes.KWArgs) error { currentTime := tests.GlobalTimeMachineCurrentTime() suite.log.Debug().Stringer("args", args).Stringer("kwArgs", kwArgs).Time("current_time", currentTime).Msg("sample_task_function") @@ -89,7 +88,7 @@ func (suite *TimeMachineSuite) SampleTaskFunction() func(args bacnetip.Args, kwA } type SampleRecurringTask struct { - *bacnetip.RecurringTask + *bacgopes.RecurringTask processTaskCalled []time.Time @@ -100,7 +99,7 @@ func NewSampleRecurringTask(localLog zerolog.Logger) *SampleRecurringTask { s := &SampleRecurringTask{ log: localLog, } - s.RecurringTask = bacnetip.NewRecurringTask(localLog, s) + s.RecurringTask = bacgopes.NewRecurringTask(localLog, s) return s } @@ -138,7 +137,7 @@ func (suite *TimeMachineSuite) TestOneShotImmediate1() { // Reset time machine tests.ResetTimeMachine(tests.StartTime) var startTime time.Time - ft.InstallTask(bacnetip.WithInstallTaskOptionsWhen(startTime)) + ft.InstallTask(bacgopes.WithInstallTaskOptionsWhen(startTime)) tests.RunTimeMachine(suite.log, 60*time.Second, time.Time{}) // function called, 60 seconds passed @@ -159,7 +158,7 @@ func (suite *TimeMachineSuite) TestOneShotImmediate2() { startTime, err := time.Parse("2006-01-02", "2000-01-01") suite.Require().NoError(err) tests.ResetTimeMachine(startTime) - ft.InstallTask(bacnetip.WithInstallTaskOptionsWhen(t1)) + ft.InstallTask(bacgopes.WithInstallTaskOptionsWhen(t1)) stopTime, err := time.Parse("2006-01-02", "2001-01-01") suite.Require().NoError(err) tests.RunTimeMachine(suite.log, 0, stopTime) @@ -170,13 +169,13 @@ func (suite *TimeMachineSuite) TestOneShotImmediate2() { func (suite *TimeMachineSuite) TestFunctionTaskImmediate() { // create a function task - ft := bacnetip.FunctionTask(suite.SampleTaskFunction(), bacnetip.NoArgs, bacnetip.NoKWArgs) + ft := bacgopes.FunctionTask(suite.SampleTaskFunction(), bacgopes.NoArgs, bacgopes.NoKWArgs) suite.sampleTaskFunctionCalled = nil // reset the time machine to midnight, install the task, let it run tests.ResetTimeMachine(tests.StartTime) var now time.Time - ft.InstallTask(bacnetip.WithInstallTaskOptionsWhen(now)) + ft.InstallTask(bacgopes.WithInstallTaskOptionsWhen(now)) tests.RunTimeMachine(suite.log, 60*time.Second, time.Time{}) // function called, 60 seconds passed @@ -188,14 +187,14 @@ func (suite *TimeMachineSuite) TestFunctionTaskDelay() { sampleDelay := 10 * time.Second // create a function task - ft := bacnetip.FunctionTask(suite.SampleTaskFunction(), bacnetip.NoArgs, bacnetip.NoKWArgs) + ft := bacgopes.FunctionTask(suite.SampleTaskFunction(), bacgopes.NoArgs, bacgopes.NoKWArgs) suite.sampleTaskFunctionCalled = nil // reset the time machine to midnight, install the task, let it run tests.ResetTimeMachine(tests.StartTime) var now time.Time when := now.Add(sampleDelay) - ft.InstallTask(bacnetip.WithInstallTaskOptionsWhen(when)) + ft.InstallTask(bacgopes.WithInstallTaskOptionsWhen(when)) tests.RunTimeMachine(suite.log, 60*time.Second, time.Time{}) // function called, 60 seconds passed @@ -210,7 +209,7 @@ func (suite *TimeMachineSuite) TestRecurringTask1() { // reset the time machine to midnight, install the task, let it run now := tests.StartTime tests.ResetTimeMachine(now) - ft.InstallTask(bacnetip.WithInstallTaskOptionsInterval(1 * time.Second)) + ft.InstallTask(bacgopes.WithInstallTaskOptionsInterval(1 * time.Second)) tests.RunTimeMachine(suite.log, 5*time.Second, time.Time{}) // function called, 60 seconds passed @@ -230,8 +229,8 @@ func (suite *TimeMachineSuite) TestRecurringTask2() { // reset the time machine to midnight, install the task, let it run tests.ResetTimeMachine(tests.StartTime) - ft1.InstallTask(bacnetip.WithInstallTaskOptionsInterval(1000 * time.Millisecond)) - ft2.InstallTask(bacnetip.WithInstallTaskOptionsInterval(1500 * time.Millisecond)) + ft1.InstallTask(bacgopes.WithInstallTaskOptionsInterval(1000 * time.Millisecond)) + ft2.InstallTask(bacgopes.WithInstallTaskOptionsInterval(1500 * time.Millisecond)) tests.RunTimeMachine(suite.log, 5*time.Second, time.Time{}) // function called, 60 seconds passed @@ -254,7 +253,7 @@ func (suite *TimeMachineSuite) TestRecurringTask3() { // reset the time machine to midnight, install the task, let it run startTime := time.Time{}.Add(1 * time.Hour) // We add an hour to avoid underflow tests.ResetTimeMachine(startTime) - ft.InstallTask(bacnetip.WithInstallTaskOptionsInterval(1000 * time.Millisecond).WithOffset(100 * time.Millisecond)) + ft.InstallTask(bacgopes.WithInstallTaskOptionsInterval(1000 * time.Millisecond).WithOffset(100 * time.Millisecond)) tests.RunTimeMachine(suite.log, 5*time.Second, time.Time{}) // function called, 60 seconds passed @@ -272,7 +271,7 @@ func (suite *TimeMachineSuite) TestRecurringTask4() { // reset the time machine to midnight, install the task, let it run tests.ResetTimeMachine(tests.StartTime) - ft.InstallTask(bacnetip.WithInstallTaskOptionsInterval(1000 * time.Millisecond).WithOffset(-100 * time.Millisecond)) + ft.InstallTask(bacgopes.WithInstallTaskOptionsInterval(1000 * time.Millisecond).WithOffset(-100 * time.Millisecond)) tests.RunTimeMachine(suite.log, 5*time.Second, time.Time{}) // function called, 60 seconds passed @@ -292,7 +291,7 @@ func (suite *TimeMachineSuite) TestRecurringTask5() { now, err := time.Parse("2006-01-02", "2000-01-01") suite.Require().NoError(err) tests.ResetTimeMachine(now) - ft.InstallTask(bacnetip.WithInstallTaskOptionsInterval(86400 * time.Second)) + ft.InstallTask(bacgopes.WithInstallTaskOptionsInterval(86400 * time.Second)) stopTime, err := time.Parse("2006-01-02", "2000-02-01") suite.Require().NoError(err) tests.RunTimeMachine(suite.log, 0, stopTime) diff --git a/plc4go/internal/bacnetip/tests/test_vlan/test_ipnetwork_test.go b/plc4go/internal/bacnetip/bacgopes/tests/test_vlan/test_ipnetwork_test.go similarity index 72% rename from plc4go/internal/bacnetip/tests/test_vlan/test_ipnetwork_test.go rename to plc4go/internal/bacnetip/bacgopes/tests/test_vlan/test_ipnetwork_test.go index adac9e31512..879420421a0 100644 --- a/plc4go/internal/bacnetip/tests/test_vlan/test_ipnetwork_test.go +++ b/plc4go/internal/bacnetip/bacgopes/tests/test_vlan/test_ipnetwork_test.go @@ -31,17 +31,16 @@ import ( "github.com/stretchr/testify/require" "github.com/stretchr/testify/suite" + "github.com/apache/plc4x/plc4go/internal/bacnetip/bacgopes" + . "github.com/apache/plc4x/plc4go/internal/bacnetip/bacgopes/constructors" + "github.com/apache/plc4x/plc4go/internal/bacnetip/bacgopes/tests" "github.com/apache/plc4x/plc4go/spi/testutils" - - "github.com/apache/plc4x/plc4go/internal/bacnetip" - . "github.com/apache/plc4x/plc4go/internal/bacnetip/constructors" - "github.com/apache/plc4x/plc4go/internal/bacnetip/tests" ) type TIPNetwork struct { *tests.StateMachineGroup - vlan *bacnetip.IPNetwork + vlan *bacgopes.IPNetwork t *testing.T @@ -57,19 +56,19 @@ func NewTIPNetwork(t *testing.T, nodeCount int, addressPattern string, promiscuo tn.StateMachineGroup = tests.NewStateMachineGroup(localLog) // make a little LAN - tn.vlan = bacnetip.NewIPNetwork(localLog) + tn.vlan = bacgopes.NewIPNetwork(localLog) for i := range nodeCount { - nodeAddress, err := bacnetip.NewAddress(localLog, fmt.Sprintf(addressPattern, i+1)) + nodeAddress, err := bacgopes.NewAddress(localLog, fmt.Sprintf(addressPattern, i+1)) require.NoError(t, err) - node, err := bacnetip.NewIPNode(localLog, nodeAddress, tn.vlan, bacnetip.WithNodePromiscuous(promiscuous), bacnetip.WithNodeSpoofing(spoofing), bacnetip.WithNodeName("node"+strconv.Itoa(i+1))) + node, err := bacgopes.NewIPNode(localLog, nodeAddress, tn.vlan, bacgopes.WithNodePromiscuous(promiscuous), bacgopes.WithNodeSpoofing(spoofing), bacgopes.WithNodeName("node"+strconv.Itoa(i+1))) require.NoError(t, err) // bind a client state machine to the ndoe csm, err := tests.NewClientStateMachine(localLog) require.NoError(t, err) - err = bacnetip.Bind(localLog, csm, node) + err = bacgopes.Bind(localLog, csm, node) require.NoError(t, err) // add it to this group @@ -135,16 +134,16 @@ func TestIPVLAN(t *testing.T) { tnode1, tnode2 := stateMachines[0], stateMachines[1] // make a PDU from node 1 to node 2 - pdu := bacnetip.NewPDU(tests.NewDummyMessage([]byte("data")...), - bacnetip.WithPDUSource(Address("192.168.2.1:47808")), - bacnetip.WithPDUDestination(Address("192.168.2.2:47808")), + pdu := bacgopes.NewPDU(tests.NewDummyMessage([]byte("data")...), + bacgopes.WithPDUSource(Address("192.168.2.1:47808")), + bacgopes.WithPDUDestination(Address("192.168.2.2:47808")), ) t.Log(pdu) // node 1 sends the pdu, mode 2 gets it tnode1.GetStartState().Send(pdu, nil).Success("") - tnode2.GetStartState().Receive(bacnetip.NewArgs((bacnetip.PDU)(nil)), bacnetip.NewKWArgs( - bacnetip.KWPPDUSource, AddressTuple("192.168.2.1", 47808), + tnode2.GetStartState().Receive(bacgopes.NewArgs((bacgopes.PDU)(nil)), bacgopes.NewKWArgs( + bacgopes.KWPPDUSource, AddressTuple("192.168.2.1", 47808), )).Success("") // run the group @@ -161,19 +160,19 @@ func TestIPVLAN(t *testing.T) { tnode1, tnode2, tnode3 := stateMachines[0], stateMachines[1], stateMachines[2] // make a broadcast PDU - pdu := bacnetip.NewPDU(tests.NewDummyMessage([]byte("data")...), - bacnetip.WithPDUSource(Address("192.168.3.1:47808")), - bacnetip.WithPDUDestination(Address("192.168.3.255:47808")), + pdu := bacgopes.NewPDU(tests.NewDummyMessage([]byte("data")...), + bacgopes.WithPDUSource(Address("192.168.3.1:47808")), + bacgopes.WithPDUDestination(Address("192.168.3.255:47808")), ) t.Log(pdu) // node 1 sends the pdu, node 2 and 3 each get it tnode1.GetStartState().Send(pdu, nil).Success("") - tnode2.GetStartState().Receive(bacnetip.NewArgs(bacnetip.NewPDU(nil)), bacnetip.NewKWArgs( - bacnetip.KWPPDUSource, AddressTuple("192.168.3.1", 47808), + tnode2.GetStartState().Receive(bacgopes.NewArgs(bacgopes.NewPDU(nil)), bacgopes.NewKWArgs( + bacgopes.KWPPDUSource, AddressTuple("192.168.3.1", 47808), )).Success("") - tnode3.GetStartState().Receive(bacnetip.NewArgs(bacnetip.NewPDU(nil)), bacnetip.NewKWArgs( - bacnetip.KWPPDUSource, AddressTuple("192.168.3.1", 47808), + tnode3.GetStartState().Receive(bacgopes.NewArgs(bacgopes.NewPDU(nil)), bacgopes.NewKWArgs( + bacgopes.KWPPDUSource, AddressTuple("192.168.3.1", 47808), )).Success("") // run the group @@ -190,9 +189,9 @@ func TestIPVLAN(t *testing.T) { tnode1 := stateMachines[0] // make an unicast PDU with the wrong source - pdu := bacnetip.NewPDU(tests.NewDummyMessage([]byte("data")...), - bacnetip.WithPDUSource(Address("192.168.4.2:47808")), - bacnetip.WithPDUDestination(Address("192.168.4.3:47808")), + pdu := bacgopes.NewPDU(tests.NewDummyMessage([]byte("data")...), + bacgopes.WithPDUSource(Address("192.168.4.2:47808")), + bacgopes.WithPDUDestination(Address("192.168.4.3:47808")), ) t.Log(pdu) @@ -213,17 +212,17 @@ func TestIPVLAN(t *testing.T) { tnode1 := stateMachines[0] // make an unicast PDU from a fictitious node - pdu := bacnetip.NewPDU(tests.NewDummyMessage([]byte("data")...), - bacnetip.WithPDUSource(Address("192.168.5.3:47808")), - bacnetip.WithPDUDestination(Address("192.168.5.1:47808")), + pdu := bacgopes.NewPDU(tests.NewDummyMessage([]byte("data")...), + bacgopes.WithPDUSource(Address("192.168.5.3:47808")), + bacgopes.WithPDUDestination(Address("192.168.5.1:47808")), ) t.Log(pdu) // node 1 sends the pdu, but gets it back as if it was from node 3 tnode1.GetStartState(). Send(pdu, nil). - Receive(bacnetip.NewArgs(bacnetip.NewPDU(nil)), bacnetip.NewKWArgs( - bacnetip.KWPPDUSource, AddressTuple("192.168.5.3", 47808), + Receive(bacgopes.NewArgs(bacgopes.NewPDU(nil)), bacgopes.NewKWArgs( + bacgopes.KWPPDUSource, AddressTuple("192.168.5.3", 47808), )). Success("") @@ -242,20 +241,20 @@ func TestIPVLAN(t *testing.T) { tnode1, tnode2, tnode3 := stateMachines[0], stateMachines[1], stateMachines[2] // make a PDU from node 1 to node 2 - src, err := bacnetip.NewAddress(testingLogger, "192.168.6.1:47808") + src, err := bacgopes.NewAddress(testingLogger, "192.168.6.1:47808") require.NoError(t, err) - dest, err := bacnetip.NewAddress(testingLogger, "192.168.6.2:47808") + dest, err := bacgopes.NewAddress(testingLogger, "192.168.6.2:47808") require.NoError(t, err) - pdu := bacnetip.NewPDU(nil, bacnetip.WithPDUSource(src), bacnetip.WithPDUDestination(dest)) + pdu := bacgopes.NewPDU(nil, bacgopes.WithPDUSource(src), bacgopes.WithPDUDestination(dest)) t.Log(pdu) // node 1 sends the pdu, node 2 and 3 each get it tnode1.GetStartState().Send(pdu, nil).Success("") - tnode2.GetStartState().Receive(bacnetip.NewArgs(bacnetip.NewPDU(nil)), bacnetip.NewKWArgs( - bacnetip.KWPPDUSource, src, + tnode2.GetStartState().Receive(bacgopes.NewArgs(bacgopes.NewPDU(nil)), bacgopes.NewKWArgs( + bacgopes.KWPPDUSource, src, )).Success("") - tnode3.GetStartState().Receive(bacnetip.NewArgs(bacnetip.NewPDU(nil)), bacnetip.NewKWArgs( - bacnetip.KWPDUDestination, dest, + tnode3.GetStartState().Receive(bacgopes.NewArgs(bacgopes.NewPDU(nil)), bacgopes.NewKWArgs( + bacgopes.KWPDUDestination, dest, )).Success("") // run the group @@ -272,13 +271,13 @@ func TestIPVLAN(t *testing.T) { tnode1, tnode2, tnode3 := stateMachines[0], stateMachines[1], stateMachines[2] // make a PDU from node 1 to node 2 - pdu := bacnetip.NewPDU(nil, bacnetip.WithPDUSource(Address("192.168.7.1:47808")), bacnetip.WithPDUDestination(Address("192.168.7.2:47808"))) + pdu := bacgopes.NewPDU(nil, bacgopes.WithPDUSource(Address("192.168.7.1:47808")), bacgopes.WithPDUDestination(Address("192.168.7.2:47808"))) t.Log(pdu) // node 1 sends the pdu to node 2, node 3 waits and gets nothing tnode1.GetStartState().Send(pdu, nil).Success("") - tnode2.GetStartState().Receive(bacnetip.NewArgs(bacnetip.NewPDU(nil)), bacnetip.NewKWArgs( - bacnetip.KWPPDUSource, AddressTuple("192.168.7.1", 47808), + tnode2.GetStartState().Receive(bacgopes.NewArgs(bacgopes.NewPDU(nil)), bacgopes.NewKWArgs( + bacgopes.KWPPDUSource, AddressTuple("192.168.7.1", 47808), )).Success("") // if node 3 receives anything it will trigger unexpected receive and fail @@ -306,29 +305,29 @@ func (suite *RouterSuite) SetupTest() { suite.smg = tests.NewStateMachineGroup(suite.log) // make some networks - vlan10 := bacnetip.NewIPNetwork(suite.log) - vlan20 := bacnetip.NewIPNetwork(suite.log) + vlan10 := bacgopes.NewIPNetwork(suite.log) + vlan20 := bacgopes.NewIPNetwork(suite.log) // make a router and add the networks - trouter := bacnetip.NewIPRouter(suite.log) + trouter := bacgopes.NewIPRouter(suite.log) trouter.AddNetwork(Address("192.168.10.1/24"), vlan10) trouter.AddNetwork(Address("192.168.20.1/24"), vlan20) - for pattern, lan := range map[string]*bacnetip.IPNetwork{ + for pattern, lan := range map[string]*bacgopes.IPNetwork{ "192.168.10.%d/24": vlan10, "192.168.20.%d/24": vlan20, } { for i := range 2 { - nodeAddress, err := bacnetip.NewAddress(suite.log, fmt.Sprintf(pattern, i+2)) + nodeAddress, err := bacgopes.NewAddress(suite.log, fmt.Sprintf(pattern, i+2)) suite.NoError(err) - node, err := bacnetip.NewIPNode(suite.log, nodeAddress, lan) + node, err := bacgopes.NewIPNode(suite.log, nodeAddress, lan) suite.NoError(err) t.Logf("Node: %v", node) // bind a client state machine to the node csm, err := tests.NewClientStateMachine(suite.log) suite.NoError(err) - err = bacnetip.Bind(suite.log, csm, node) + err = bacgopes.Bind(suite.log, csm, node) suite.NoError(err) // add it to the group @@ -369,15 +368,15 @@ func (suite *RouterSuite) TestSendReceive() { // Test that a node can send a mes csm_10_2, csm_10_3, csm_20_2, csm_20_3 := stateMachines[0], stateMachines[1], stateMachines[2], stateMachines[3] // make a PDU from network 10 node 1 to network 20 node 2 - pdu := bacnetip.NewPDU(tests.NewDummyMessage([]byte("data")...), - bacnetip.WithPDUSource(Address("192.168.10.2:47808")), - bacnetip.WithPDUDestination(Address("192.168.20.3:47808"))) + pdu := bacgopes.NewPDU(tests.NewDummyMessage([]byte("data")...), + bacgopes.WithPDUSource(Address("192.168.10.2:47808")), + bacgopes.WithPDUDestination(Address("192.168.20.3:47808"))) suite.T().Log(pdu) // node 1 sends the pdu, mode 2 gets it csm_10_2.GetStartState().Send(pdu, nil).Success("") - csm_20_3.GetStartState().Receive(bacnetip.NewArgs(bacnetip.NewPDU(nil)), bacnetip.NewKWArgs( - bacnetip.KWPPDUSource, AddressTuple("192.168.10.2", 47808), + csm_20_3.GetStartState().Receive(bacgopes.NewArgs(bacgopes.NewPDU(nil)), bacgopes.NewKWArgs( + bacgopes.KWPPDUSource, AddressTuple("192.168.10.2", 47808), )).Success("") // other nodes get nothing @@ -390,17 +389,17 @@ func (suite *RouterSuite) TestLocalBroadcast() { // Test that a node can send a csm_10_2, csm_10_3, csm_20_2, csm_20_3 := stateMachines[0], stateMachines[1], stateMachines[2], stateMachines[3] // make a PDU from network 10 node 1 to network 20 node 2 - src, err := bacnetip.NewAddress(suite.log, "192.168.10.2:47808") + src, err := bacgopes.NewAddress(suite.log, "192.168.10.2:47808") suite.Require().NoError(err) - dest, err := bacnetip.NewAddress(suite.log, "192.168.10.255:47808") + dest, err := bacgopes.NewAddress(suite.log, "192.168.10.255:47808") suite.Require().NoError(err) - pdu := bacnetip.NewPDU(nil, bacnetip.WithPDUSource(src), bacnetip.WithPDUDestination(dest)) + pdu := bacgopes.NewPDU(nil, bacgopes.WithPDUSource(src), bacgopes.WithPDUDestination(dest)) suite.T().Log(pdu) // node 10-2 sends the pdu, node 10-3 gets pdu, nodes 20-2 and 20-3 dont csm_10_2.GetStartState().Send(pdu, nil).Success("") - csm_10_3.GetStartState().Receive(bacnetip.NewArgs(bacnetip.NewPDU(nil)), bacnetip.NewKWArgs( - bacnetip.KWPPDUSource, src, + csm_10_3.GetStartState().Receive(bacgopes.NewArgs(bacgopes.NewPDU(nil)), bacgopes.NewKWArgs( + bacgopes.KWPPDUSource, src, )).Success("") csm_20_3.GetStartState().Timeout(1*time.Second, nil).Success("") csm_20_2.GetStartState().Timeout(1*time.Second, nil).Success("") @@ -413,21 +412,21 @@ func (suite *RouterSuite) TestRemoteBroadcast() { // Test that a node can send a csm_10_2, csm_10_3, csm_20_2, csm_20_3 := stateMachines[0], stateMachines[1], stateMachines[2], stateMachines[3] // make a PDU from network 10 node 1 to network 20 node 2 - src, err := bacnetip.NewAddress(suite.log, "192.168.10.2:47808") + src, err := bacgopes.NewAddress(suite.log, "192.168.10.2:47808") require.NoError(t, err) - dest, err := bacnetip.NewAddress(suite.log, "192.168.20.255:47808") + dest, err := bacgopes.NewAddress(suite.log, "192.168.20.255:47808") require.NoError(t, err) - pdu := bacnetip.NewPDU(nil, bacnetip.WithPDUSource(src), bacnetip.WithPDUDestination(dest)) + pdu := bacgopes.NewPDU(nil, bacgopes.WithPDUSource(src), bacgopes.WithPDUDestination(dest)) t.Log(pdu) // node 10-2 sends the pdu, node 10-3 gets pdu, nodes 20-2 and 20-3 dont csm_10_2.GetStartState().Send(pdu, nil).Success("") csm_10_3.GetStartState().Timeout(1*time.Second, nil).Success("") - csm_20_2.GetStartState().Receive(bacnetip.NewArgs(bacnetip.NewPDU(nil)), bacnetip.NewKWArgs( - bacnetip.KWPPDUSource, src, + csm_20_2.GetStartState().Receive(bacgopes.NewArgs(bacgopes.NewPDU(nil)), bacgopes.NewKWArgs( + bacgopes.KWPPDUSource, src, )).Success("") - csm_20_3.GetStartState().Receive(bacnetip.NewArgs(bacnetip.NewPDU(nil)), bacnetip.NewKWArgs( - bacnetip.KWPPDUSource, src, + csm_20_3.GetStartState().Receive(bacgopes.NewArgs(bacgopes.NewPDU(nil)), bacgopes.NewKWArgs( + bacgopes.KWPPDUSource, src, )).Success("") } diff --git a/plc4go/internal/bacnetip/tests/test_vlan/test_network_test.go b/plc4go/internal/bacnetip/bacgopes/tests/test_vlan/test_network_test.go similarity index 72% rename from plc4go/internal/bacnetip/tests/test_vlan/test_network_test.go rename to plc4go/internal/bacnetip/bacgopes/tests/test_vlan/test_network_test.go index 04616389139..c93fc3411fc 100644 --- a/plc4go/internal/bacnetip/tests/test_vlan/test_network_test.go +++ b/plc4go/internal/bacnetip/bacgopes/tests/test_vlan/test_network_test.go @@ -28,17 +28,16 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/apache/plc4x/plc4go/internal/bacnetip/bacgopes" + . "github.com/apache/plc4x/plc4go/internal/bacnetip/bacgopes/constructors" + "github.com/apache/plc4x/plc4go/internal/bacnetip/bacgopes/tests" "github.com/apache/plc4x/plc4go/spi/testutils" - - "github.com/apache/plc4x/plc4go/internal/bacnetip" - . "github.com/apache/plc4x/plc4go/internal/bacnetip/constructors" - "github.com/apache/plc4x/plc4go/internal/bacnetip/tests" ) type TNetwork struct { *tests.StateMachineGroup - vlan *bacnetip.Network + vlan *bacgopes.Network t *testing.T @@ -53,22 +52,22 @@ func NewTNetwork(t *testing.T, nodeCount int, promiscuous bool, spoofing bool) * } tn.StateMachineGroup = tests.NewStateMachineGroup(localLog) - broadcastAddress, err := bacnetip.NewAddress(localLog, 0) + broadcastAddress, err := bacgopes.NewAddress(localLog, 0) require.NoError(t, err) // make a little LAN - tn.vlan = bacnetip.NewNetwork(localLog, bacnetip.WithNetworkBroadcastAddress(broadcastAddress)) + tn.vlan = bacgopes.NewNetwork(localLog, bacgopes.WithNetworkBroadcastAddress(broadcastAddress)) for i := range nodeCount { - nodeAddress, err := bacnetip.NewAddress(localLog, i+1) + nodeAddress, err := bacgopes.NewAddress(localLog, i+1) require.NoError(t, err) - node, err := bacnetip.NewNode(localLog, nodeAddress, bacnetip.WithNodeLan(tn.vlan), bacnetip.WithNodePromiscuous(promiscuous), bacnetip.WithNodeSpoofing(spoofing)) + node, err := bacgopes.NewNode(localLog, nodeAddress, bacgopes.WithNodeLan(tn.vlan), bacgopes.WithNodePromiscuous(promiscuous), bacgopes.WithNodeSpoofing(spoofing)) require.NoError(t, err) // bind a client state machine to the ndoe csm, err := tests.NewClientStateMachine(localLog) require.NoError(t, err) - err = bacnetip.Bind(localLog, csm, node) + err = bacgopes.Bind(localLog, csm, node) require.NoError(t, err) // add it to this group @@ -137,17 +136,17 @@ func TestVLAN(t *testing.T) { tnode1, tnode2 := stateMachines[0], stateMachines[1] // make a PDU from node 1 to node 2 - src, err := bacnetip.NewAddress(testingLogger, 1) + src, err := bacgopes.NewAddress(testingLogger, 1) require.NoError(t, err) - dest, err := bacnetip.NewAddress(testingLogger, 2) + dest, err := bacgopes.NewAddress(testingLogger, 2) require.NoError(t, err) - pdu := bacnetip.NewPDU(nil, bacnetip.WithPDUSource(src), bacnetip.WithPDUDestination(dest)) + pdu := bacgopes.NewPDU(nil, bacgopes.WithPDUSource(src), bacgopes.WithPDUDestination(dest)) t.Log(pdu) // node 1 sends the pdu, mode 2 gets it tnode1.GetStartState().Send(pdu, nil).Success("") - tnode2.GetStartState().Receive(bacnetip.NewArgs(bacnetip.NewPDU(nil)), bacnetip.NewKWArgs( - bacnetip.KWPPDUSource, src, + tnode2.GetStartState().Receive(bacgopes.NewArgs(bacgopes.NewPDU(nil)), bacgopes.NewKWArgs( + bacgopes.KWPPDUSource, src, )).Success("") // run the group @@ -165,20 +164,20 @@ func TestVLAN(t *testing.T) { tnode1, tnode2, tnode3 := stateMachines[0], stateMachines[1], stateMachines[2] // make a PDU from node 1 to node 2 - src, err := bacnetip.NewAddress(testingLogger, 1) + src, err := bacgopes.NewAddress(testingLogger, 1) require.NoError(t, err) - dest, err := bacnetip.NewAddress(testingLogger, 0) + dest, err := bacgopes.NewAddress(testingLogger, 0) require.NoError(t, err) - pdu := bacnetip.NewPDU(nil, bacnetip.WithPDUSource(src), bacnetip.WithPDUDestination(dest)) + pdu := bacgopes.NewPDU(nil, bacgopes.WithPDUSource(src), bacgopes.WithPDUDestination(dest)) t.Log(pdu) // node 1 sends the pdu, node 2 and 3 each get it tnode1.GetStartState().Send(pdu, nil).Success("") - tnode2.GetStartState().Receive(bacnetip.NewArgs(bacnetip.NewPDU(nil)), bacnetip.NewKWArgs( - bacnetip.KWPPDUSource, src, + tnode2.GetStartState().Receive(bacgopes.NewArgs(bacgopes.NewPDU(nil)), bacgopes.NewKWArgs( + bacgopes.KWPPDUSource, src, )).Success("") - tnode3.GetStartState().Receive(bacnetip.NewArgs(bacnetip.NewPDU(nil)), bacnetip.NewKWArgs( - bacnetip.KWPPDUSource, src, + tnode3.GetStartState().Receive(bacgopes.NewArgs(bacgopes.NewPDU(nil)), bacgopes.NewKWArgs( + bacgopes.KWPPDUSource, src, )).Success("") // run the group @@ -196,11 +195,11 @@ func TestVLAN(t *testing.T) { tnode1 := stateMachines[0] // make an unicast PDU with the wrong source - src, err := bacnetip.NewAddress(testingLogger, 2) + src, err := bacgopes.NewAddress(testingLogger, 2) require.NoError(t, err) - dest, err := bacnetip.NewAddress(testingLogger, 3) + dest, err := bacgopes.NewAddress(testingLogger, 3) require.NoError(t, err) - pdu := bacnetip.NewPDU(nil, bacnetip.WithPDUSource(src), bacnetip.WithPDUDestination(dest)) + pdu := bacgopes.NewPDU(nil, bacgopes.WithPDUSource(src), bacgopes.WithPDUDestination(dest)) t.Log(pdu) // node 1 sends the pdu, node 2 and 3 each get it @@ -221,18 +220,18 @@ func TestVLAN(t *testing.T) { tnode1 := stateMachines[0] // make an unicast PDU with the wrong source - src, err := bacnetip.NewAddress(testingLogger, 3) + src, err := bacgopes.NewAddress(testingLogger, 3) require.NoError(t, err) - dest, err := bacnetip.NewAddress(testingLogger, 1) + dest, err := bacgopes.NewAddress(testingLogger, 1) require.NoError(t, err) - pdu := bacnetip.NewPDU(nil, bacnetip.WithPDUSource(src), bacnetip.WithPDUDestination(dest)) + pdu := bacgopes.NewPDU(nil, bacgopes.WithPDUSource(src), bacgopes.WithPDUDestination(dest)) t.Log(pdu) // node 1 sends the pdu, but gets it back as if it was from node 3 tnode1.GetStartState(). Send(pdu, nil). - Receive(bacnetip.NewArgs(bacnetip.NewPDU(nil)), bacnetip.NewKWArgs( - bacnetip.KWPPDUSource, src, + Receive(bacgopes.NewArgs(bacgopes.NewPDU(nil)), bacgopes.NewKWArgs( + bacgopes.KWPPDUSource, src, )). Success("") @@ -251,20 +250,20 @@ func TestVLAN(t *testing.T) { tnode1, tnode2, tnode3 := stateMachines[0], stateMachines[1], stateMachines[2] // make a PDU from node 1 to node 2 - src, err := bacnetip.NewAddress(testingLogger, 1) + src, err := bacgopes.NewAddress(testingLogger, 1) require.NoError(t, err) - dest, err := bacnetip.NewAddress(testingLogger, 2) + dest, err := bacgopes.NewAddress(testingLogger, 2) require.NoError(t, err) - pdu := bacnetip.NewPDU(nil, bacnetip.WithPDUSource(src), bacnetip.WithPDUDestination(dest)) + pdu := bacgopes.NewPDU(nil, bacgopes.WithPDUSource(src), bacgopes.WithPDUDestination(dest)) t.Log(pdu) // node 1 sends the pdu, node 2 and 3 each get it tnode1.GetStartState().Send(pdu, nil).Success("") - tnode2.GetStartState().Receive(bacnetip.NewArgs(bacnetip.NewPDU(nil)), bacnetip.NewKWArgs( - bacnetip.KWPPDUSource, src, + tnode2.GetStartState().Receive(bacgopes.NewArgs(bacgopes.NewPDU(nil)), bacgopes.NewKWArgs( + bacgopes.KWPPDUSource, src, )).Success("") - tnode3.GetStartState().Receive(bacnetip.NewArgs(bacnetip.NewPDU(nil)), bacnetip.NewKWArgs( - bacnetip.KWPDUDestination, dest, + tnode3.GetStartState().Receive(bacgopes.NewArgs(bacgopes.NewPDU(nil)), bacgopes.NewKWArgs( + bacgopes.KWPDUDestination, dest, )).Success("") // run the group @@ -281,13 +280,13 @@ func TestVLAN(t *testing.T) { tnode1, tnode2, tnode3 := stateMachines[0], stateMachines[1], stateMachines[2] // make a PDU from node 1 to node 2 - pdu := bacnetip.NewPDU(nil, bacnetip.WithPDUSource(Address(1)), bacnetip.WithPDUDestination(Address(1))) + pdu := bacgopes.NewPDU(nil, bacgopes.WithPDUSource(Address(1)), bacgopes.WithPDUDestination(Address(1))) t.Log(pdu) // node 1 sends the pdu to node 2, node 3 waits and gets nothing tnode1.GetStartState().Send(pdu, nil).Success("") - tnode2.GetStartState().Receive(bacnetip.NewArgs(bacnetip.NewPDU(nil)), bacnetip.NewKWArgs( - bacnetip.KWPPDUSource, Address(1), + tnode2.GetStartState().Receive(bacgopes.NewArgs(bacgopes.NewPDU(nil)), bacgopes.NewKWArgs( + bacgopes.KWPPDUSource, Address(1), )).Success("") // if node 3 receives anything it will trigger unexpected receive and fail @@ -311,16 +310,16 @@ func TestVLANEvents(t *testing.T) { tnode1, tnode2 := stateMachines[0], stateMachines[1] // make a PDU from node 1 to node 2 - src, err := bacnetip.NewAddress(testingLogger, 1) + src, err := bacgopes.NewAddress(testingLogger, 1) require.NoError(t, err) - dest, err := bacnetip.NewAddress(testingLogger, 2) + dest, err := bacgopes.NewAddress(testingLogger, 2) require.NoError(t, err) - deadPDU := bacnetip.NewPDU(tests.NewDummyMessage(0xde, 0xad), bacnetip.WithPDUSource(src), bacnetip.WithPDUDestination(dest)) + deadPDU := bacgopes.NewPDU(tests.NewDummyMessage(0xde, 0xad), bacgopes.WithPDUSource(src), bacgopes.WithPDUDestination(dest)) t.Log(deadPDU) // make a PDU from node 1 to node 2 - beefPDU := bacnetip.NewPDU(tests.NewDummyMessage(0xbe, 0xef), bacnetip.WithPDUSource(src), bacnetip.WithPDUDestination(dest)) + beefPDU := bacgopes.NewPDU(tests.NewDummyMessage(0xbe, 0xef), bacgopes.WithPDUSource(src), bacgopes.WithPDUDestination(dest)) t.Log(beefPDU) // node 1 sends dead_pdu, waits for event, sends beef_pdu @@ -330,11 +329,11 @@ func TestVLANEvents(t *testing.T) { // node 2 receives dead_pdu, sets event, waits for beef_pdu tnode2.GetStartState(). - Receive(bacnetip.NewArgs(bacnetip.NewPDU(nil)), bacnetip.NewKWArgs( - bacnetip.KWPDUData, tests.NewDummyMessage(0xde, 0xad), + Receive(bacgopes.NewArgs(bacgopes.NewPDU(nil)), bacgopes.NewKWArgs( + bacgopes.KWPDUData, tests.NewDummyMessage(0xde, 0xad), )).SetEvent("e"). - Receive(bacnetip.NewArgs(bacnetip.NewPDU(nil)), bacnetip.NewKWArgs( - bacnetip.KWPDUData, tests.NewDummyMessage(0xbe, 0xef), + Receive(bacgopes.NewArgs(bacgopes.NewPDU(nil)), bacgopes.NewKWArgs( + bacgopes.KWPDUData, tests.NewDummyMessage(0xbe, 0xef), )).Success("") // run the group diff --git a/plc4go/internal/bacnetip/tests/time_machine.go b/plc4go/internal/bacnetip/bacgopes/tests/time_machine.go similarity index 90% rename from plc4go/internal/bacnetip/tests/time_machine.go rename to plc4go/internal/bacnetip/bacgopes/tests/time_machine.go index dda458e0edd..ccc1f0c67a3 100644 --- a/plc4go/internal/bacnetip/tests/time_machine.go +++ b/plc4go/internal/bacnetip/bacgopes/tests/time_machine.go @@ -27,9 +27,8 @@ import ( "github.com/rs/zerolog" + "github.com/apache/plc4x/plc4go/internal/bacnetip/bacgopes" "github.com/apache/plc4x/plc4go/spi/testutils" - - "github.com/apache/plc4x/plc4go/internal/bacnetip" ) var globalTimeMachine *TimeMachine @@ -49,12 +48,12 @@ func NewGlobalTimeMachine(t *testing.T) { testingLogger.Trace().Msg("creating new global time machine") globalTimeMachine = NewTimeMachine(testingLogger) testingLogger.Trace().Msg("overwriting global task manager") - oldManager := bacnetip.OverwriteTaskManager(testingLogger, globalTimeMachine) + oldManager := bacgopes.OverwriteTaskManager(testingLogger, globalTimeMachine) t.Cleanup(func() { testingLogger.Trace().Msg("clearing task manager") - bacnetip.ClearTaskManager(testingLogger) + bacgopes.ClearTaskManager(testingLogger) testingLogger.Trace().Msg("Restoring old manager") - bacnetip.OverwriteTaskManager(testingLogger, oldManager) + bacgopes.OverwriteTaskManager(testingLogger, oldManager) }) } @@ -67,7 +66,7 @@ func ClearGlobalTimeMachine(t *testing.T) { testingLogger.Warn().Msg("global time machine not set") } globalTimeMachine = nil - bacnetip.ClearTaskManager(testingLogger) + bacgopes.ClearTaskManager(testingLogger) } // LockGlobalTimeMachine locks the global time machine during the test duration. @@ -87,7 +86,7 @@ func ExclusiveGlobalTimeMachine(t *testing.T) { } type TimeMachine struct { - bacnetip.TaskManager + bacgopes.TaskManager currentTime time.Time timeLimit time.Time @@ -100,7 +99,7 @@ func NewTimeMachine(localLog zerolog.Logger) *TimeMachine { t := &TimeMachine{ log: localLog, } - t.TaskManager = bacnetip.NewTaskManager(localLog) + t.TaskManager = bacgopes.NewTaskManager(localLog) return t } @@ -109,24 +108,24 @@ func (t *TimeMachine) GetTime() time.Time { return t.currentTime } -func (t *TimeMachine) InstallTask(task bacnetip.TaskRequirements) { +func (t *TimeMachine) InstallTask(task bacgopes.TaskRequirements) { t.log.Debug().Time("currentTime", t.currentTime).Stringer("task", task).Msg("InstallTask") t.TaskManager.InstallTask(task) } -func (t *TimeMachine) SuspendTask(task bacnetip.TaskRequirements) { +func (t *TimeMachine) SuspendTask(task bacgopes.TaskRequirements) { t.log.Debug().Time("currentTime", t.currentTime).Stringer("task", task).Msg("SuspendTask") t.TaskManager.SuspendTask(task) } -func (t *TimeMachine) ResumeTask(task bacnetip.TaskRequirements) { +func (t *TimeMachine) ResumeTask(task bacgopes.TaskRequirements) { t.log.Debug().Time("currentTime", t.currentTime).Stringer("task", task).Msg("ResumeTask") t.TaskManager.ResumeTask(task) } func (t *TimeMachine) MoreToDo() bool { t.log.Debug().Time("currentTime", t.currentTime).Msg("MoreToDo") - if len(bacnetip.DeferredFunctions) > 0 { + if len(bacgopes.DeferredFunctions) > 0 { t.log.Trace().Msg("deferredFunctions") return true } @@ -160,7 +159,7 @@ func (t *TimeMachine) MoreToDo() bool { return true } -func (t *TimeMachine) GetNextTask() (bacnetip.TaskRequirements, *time.Duration) { +func (t *TimeMachine) GetNextTask() (bacgopes.TaskRequirements, *time.Duration) { t.log.Debug().Time("currentTime", t.currentTime).Msg("GetNextTask") t.log.Debug().Time("timeLimit", t.timeLimit).Msg("timeLimit") if t.log.Debug().Enabled() { @@ -171,7 +170,7 @@ func (t *TimeMachine) GetNextTask() (bacnetip.TaskRequirements, *time.Duration) t.log.Debug().Stringers("tasks", stringers).Msg("tasks") } - var task bacnetip.TaskRequirements + var task bacgopes.TaskRequirements var delta *time.Duration if !t.timeLimit.IsZero() && t.currentTime.After(t.timeLimit) { @@ -203,7 +202,7 @@ func (t *TimeMachine) GetNextTask() (bacnetip.TaskRequirements, *time.Duration) return task, delta } -func (t *TimeMachine) ProcessTask(task bacnetip.TaskRequirements) { +func (t *TimeMachine) ProcessTask(task bacgopes.TaskRequirements) { t.log.Debug().Time("currentTime", t.currentTime).Stringer("task", task).Msg("ProcessTask") t.TaskManager.ProcessTask(task) } @@ -247,12 +246,12 @@ func RunTimeMachine(localLog zerolog.Logger, duration time.Duration, stopTime ti panic("duration or stopTime is required") } - if len(bacnetip.DeferredFunctions) > 0 { + if len(bacgopes.DeferredFunctions) > 0 { localLog.Debug().Msg("deferredFunctions") } for { - bacnetip.RunOnce(localLog) + bacgopes.RunOnce(localLog) localLog.Trace().Msg("ran once") if !globalTimeMachine.MoreToDo() { localLog.Trace().Msg("no more to do") diff --git a/plc4go/internal/bacnetip/tests/trapped_classes.go b/plc4go/internal/bacnetip/bacgopes/tests/trapped_classes.go similarity index 100% rename from plc4go/internal/bacnetip/tests/trapped_classes.go rename to plc4go/internal/bacnetip/bacgopes/tests/trapped_classes.go diff --git a/plc4go/internal/bacnetip/tests/trapped_classes_TrappedApplicationServiceElement.go b/plc4go/internal/bacnetip/bacgopes/tests/trapped_classes_TrappedApplicationServiceElement.go similarity index 78% rename from plc4go/internal/bacnetip/tests/trapped_classes_TrappedApplicationServiceElement.go rename to plc4go/internal/bacnetip/bacgopes/tests/trapped_classes_TrappedApplicationServiceElement.go index c44d9c1b6db..175c4607262 100644 --- a/plc4go/internal/bacnetip/tests/trapped_classes_TrappedApplicationServiceElement.go +++ b/plc4go/internal/bacnetip/bacgopes/tests/trapped_classes_TrappedApplicationServiceElement.go @@ -25,12 +25,12 @@ import ( "github.com/pkg/errors" "github.com/rs/zerolog" - "github.com/apache/plc4x/plc4go/internal/bacnetip" + "github.com/apache/plc4x/plc4go/internal/bacnetip/bacgopes" ) type TrappedApplicationServiceElementRequirements interface { - Indication(args bacnetip.Args, kwargs bacnetip.KWArgs) error - Confirmation(args bacnetip.Args, kwargs bacnetip.KWArgs) error + Indication(args bacgopes.Args, kwargs bacgopes.KWArgs) error + Confirmation(args bacgopes.Args, kwargs bacgopes.KWArgs) error } // TrappedApplicationServiceElement Note that while this class inherits from ApplicationServiceElement, it @@ -51,18 +51,18 @@ type TrappedApplicationServiceElementRequirements interface { // // The Snort functions will be called after the PDU is trapped. type TrappedApplicationServiceElement struct { - bacnetip.ApplicationServiceElementContract + bacgopes.ApplicationServiceElementContract requirements TrappedApplicationServiceElementRequirements - requestSent bacnetip.PDU - indicationReceived bacnetip.PDU - responseSent bacnetip.PDU - confirmationReceived bacnetip.PDU + requestSent bacgopes.PDU + indicationReceived bacgopes.PDU + responseSent bacgopes.PDU + confirmationReceived bacgopes.PDU log zerolog.Logger } -var _ bacnetip.ApplicationServiceElement = (*TrappedApplicationServiceElement)(nil) +var _ bacgopes.ApplicationServiceElement = (*TrappedApplicationServiceElement)(nil) func NewTrappedApplicationServiceElement(localLog zerolog.Logger, requirements TrappedApplicationServiceElementRequirements) (*TrappedApplicationServiceElement, error) { t := &TrappedApplicationServiceElement{ @@ -70,26 +70,26 @@ func NewTrappedApplicationServiceElement(localLog zerolog.Logger, requirements T log: localLog, } var err error - t.ApplicationServiceElementContract, err = bacnetip.NewApplicationServiceElement(localLog) + t.ApplicationServiceElementContract, err = bacgopes.NewApplicationServiceElement(localLog) if err != nil { return nil, errors.Wrap(err, "error creating SAP") } return t, nil } -func (s *TrappedApplicationServiceElement) GetRequestSent() bacnetip.PDU { +func (s *TrappedApplicationServiceElement) GetRequestSent() bacgopes.PDU { return s.requestSent } -func (s *TrappedApplicationServiceElement) GetIndicationReceived() bacnetip.PDU { +func (s *TrappedApplicationServiceElement) GetIndicationReceived() bacgopes.PDU { return s.indicationReceived } -func (s *TrappedApplicationServiceElement) GetResponseSent() bacnetip.PDU { +func (s *TrappedApplicationServiceElement) GetResponseSent() bacgopes.PDU { return s.responseSent } -func (s *TrappedApplicationServiceElement) GetConfirmationReceived() bacnetip.PDU { +func (s *TrappedApplicationServiceElement) GetConfirmationReceived() bacgopes.PDU { return s.confirmationReceived } @@ -97,25 +97,25 @@ func (s *TrappedApplicationServiceElement) String() string { return fmt.Sprintf("TrappedApplicationServiceElement(TBD...)") // TODO: fill some info here } -func (s *TrappedApplicationServiceElement) Request(args bacnetip.Args, kwargs bacnetip.KWArgs) error { +func (s *TrappedApplicationServiceElement) Request(args bacgopes.Args, kwargs bacgopes.KWArgs) error { s.log.Debug().Stringer("args", args).Stringer("kwargs", kwargs).Msg("Request") s.requestSent = args.Get0PDU() return s.ApplicationServiceElementContract.Request(args, kwargs) } -func (s *TrappedApplicationServiceElement) Indication(args bacnetip.Args, kwargs bacnetip.KWArgs) error { +func (s *TrappedApplicationServiceElement) Indication(args bacgopes.Args, kwargs bacgopes.KWArgs) error { s.log.Debug().Stringer("args", args).Stringer("kwargs", kwargs).Msg("Indication") s.indicationReceived = args.Get0PDU() return s.requirements.Indication(args, kwargs) } -func (s *TrappedApplicationServiceElement) Response(args bacnetip.Args, kwargs bacnetip.KWArgs) error { +func (s *TrappedApplicationServiceElement) Response(args bacgopes.Args, kwargs bacgopes.KWArgs) error { s.log.Debug().Stringer("args", args).Stringer("kwargs", kwargs).Msg("Response") s.responseSent = args.Get0PDU() return s.ApplicationServiceElementContract.Response(args, kwargs) } -func (s *TrappedApplicationServiceElement) Confirmation(args bacnetip.Args, kwargs bacnetip.KWArgs) error { +func (s *TrappedApplicationServiceElement) Confirmation(args bacgopes.Args, kwargs bacgopes.KWArgs) error { s.log.Debug().Stringer("args", args).Stringer("kwargs", kwargs).Msg("Confirmation") s.confirmationReceived = args.Get0PDU() return s.requirements.Confirmation(args, kwargs) diff --git a/plc4go/internal/bacnetip/tests/trapped_classes_TrappedClient.go b/plc4go/internal/bacnetip/bacgopes/tests/trapped_classes_TrappedClient.go similarity index 79% rename from plc4go/internal/bacnetip/tests/trapped_classes_TrappedClient.go rename to plc4go/internal/bacnetip/bacgopes/tests/trapped_classes_TrappedClient.go index 544ee5fe9f9..82d495a200b 100644 --- a/plc4go/internal/bacnetip/tests/trapped_classes_TrappedClient.go +++ b/plc4go/internal/bacnetip/bacgopes/tests/trapped_classes_TrappedClient.go @@ -25,22 +25,22 @@ import ( "github.com/pkg/errors" "github.com/rs/zerolog" - "github.com/apache/plc4x/plc4go/internal/bacnetip" + "github.com/apache/plc4x/plc4go/internal/bacnetip/bacgopes" ) // TrappedClientContract provides a set of functions which can be overwritten by a sub struct type TrappedClientContract interface { - Request(bacnetip.Args, bacnetip.KWArgs) error - Confirmation(args bacnetip.Args, kwargs bacnetip.KWArgs) error + Request(bacgopes.Args, bacgopes.KWArgs) error + Confirmation(args bacgopes.Args, kwargs bacgopes.KWArgs) error } // TrappedClient An instance of this class sits at the top of a stack. type TrappedClient struct { TrappedClientContract - bacnetip.Client + bacgopes.Client - requestSent bacnetip.PDU - confirmationReceived bacnetip.PDU + requestSent bacgopes.PDU + confirmationReceived bacgopes.PDU log zerolog.Logger } @@ -54,7 +54,7 @@ func NewTrappedClient(localLog zerolog.Logger, opts ...func(*TrappedClient)) (*T opt(t) } var err error - t.Client, err = bacnetip.NewClient(localLog, t) + t.Client, err = bacgopes.NewClient(localLog, t) if err != nil { return nil, errors.Wrap(err, "error building client") } @@ -67,15 +67,15 @@ func WithTrappedClientContract(trappedClientContract TrappedClientContract) func } } -func (t *TrappedClient) GetRequestSent() bacnetip.PDU { +func (t *TrappedClient) GetRequestSent() bacgopes.PDU { return t.requestSent } -func (t *TrappedClient) GetConfirmationReceived() bacnetip.PDU { +func (t *TrappedClient) GetConfirmationReceived() bacgopes.PDU { return t.confirmationReceived } -func (t *TrappedClient) Request(args bacnetip.Args, kwargs bacnetip.KWArgs) error { +func (t *TrappedClient) Request(args bacgopes.Args, kwargs bacgopes.KWArgs) error { t.log.Debug().Stringer("args", args).Stringer("kwargs", kwargs).Msg("Request") // a reference for checking t.requestSent = args.Get0PDU() @@ -84,7 +84,7 @@ func (t *TrappedClient) Request(args bacnetip.Args, kwargs bacnetip.KWArgs) erro return t.Client.Request(args, kwargs) } -func (t *TrappedClient) Confirmation(args bacnetip.Args, kwargs bacnetip.KWArgs) error { +func (t *TrappedClient) Confirmation(args bacgopes.Args, kwargs bacgopes.KWArgs) error { t.log.Debug().Stringer("args", args).Stringer("kwargs", kwargs).Msg("Confirmation") // a reference for checking t.confirmationReceived = args.Get0PDU() diff --git a/plc4go/internal/bacnetip/tests/trapped_classes_TrappedServer.go b/plc4go/internal/bacnetip/bacgopes/tests/trapped_classes_TrappedServer.go similarity index 79% rename from plc4go/internal/bacnetip/tests/trapped_classes_TrappedServer.go rename to plc4go/internal/bacnetip/bacgopes/tests/trapped_classes_TrappedServer.go index 6a45095a923..3fdc831bf33 100644 --- a/plc4go/internal/bacnetip/tests/trapped_classes_TrappedServer.go +++ b/plc4go/internal/bacnetip/bacgopes/tests/trapped_classes_TrappedServer.go @@ -25,22 +25,22 @@ import ( "github.com/pkg/errors" "github.com/rs/zerolog" - "github.com/apache/plc4x/plc4go/internal/bacnetip" + "github.com/apache/plc4x/plc4go/internal/bacnetip/bacgopes" ) // TrappedServerContract provides a set of functions which can be overwritten by a sub struct type TrappedServerContract interface { - Indication(args bacnetip.Args, kwargs bacnetip.KWArgs) error - Response(bacnetip.Args, bacnetip.KWArgs) error + Indication(args bacgopes.Args, kwargs bacgopes.KWArgs) error + Response(bacgopes.Args, bacgopes.KWArgs) error } // TrappedServer An instance of this class sits at the bottom of a stack. type TrappedServer struct { TrappedServerContract - bacnetip.Server + bacgopes.Server - indicationReceived bacnetip.PDU - responseSent bacnetip.PDU + indicationReceived bacgopes.PDU + responseSent bacgopes.PDU log zerolog.Logger } @@ -54,7 +54,7 @@ func NewTrappedServer(localLog zerolog.Logger, opts ...func(*TrappedServer)) (*T opt(t) } var err error - t.Server, err = bacnetip.NewServer(localLog, t) + t.Server, err = bacgopes.NewServer(localLog, t) if err != nil { return nil, errors.Wrap(err, "error building server") } @@ -67,15 +67,15 @@ func WithTrappedServerContract(trappedServerContract TrappedServerContract) func } } -func (t *TrappedServer) GetIndicationReceived() bacnetip.PDU { +func (t *TrappedServer) GetIndicationReceived() bacgopes.PDU { return t.indicationReceived } -func (t *TrappedServer) GetResponseSent() bacnetip.PDU { +func (t *TrappedServer) GetResponseSent() bacgopes.PDU { return t.responseSent } -func (t *TrappedServer) Indication(args bacnetip.Args, kwargs bacnetip.KWArgs) error { +func (t *TrappedServer) Indication(args bacgopes.Args, kwargs bacgopes.KWArgs) error { t.log.Debug().Stringer("args", args).Stringer("kwargs", kwargs).Msg("Indication") // a reference for checking t.indicationReceived = args.Get0PDU() @@ -83,7 +83,7 @@ func (t *TrappedServer) Indication(args bacnetip.Args, kwargs bacnetip.KWArgs) e return nil } -func (t *TrappedServer) Response(args bacnetip.Args, kwargs bacnetip.KWArgs) error { +func (t *TrappedServer) Response(args bacgopes.Args, kwargs bacgopes.KWArgs) error { t.log.Debug().Stringer("args", args).Stringer("kwargs", kwargs).Msg("Response") // a reference for checking t.responseSent = args.Get0PDU() diff --git a/plc4go/internal/bacnetip/tests/trapped_classes_TrappedServerStateMachine.go b/plc4go/internal/bacnetip/bacgopes/tests/trapped_classes_TrappedServerStateMachine.go similarity index 86% rename from plc4go/internal/bacnetip/tests/trapped_classes_TrappedServerStateMachine.go rename to plc4go/internal/bacnetip/bacgopes/tests/trapped_classes_TrappedServerStateMachine.go index 88e2eeaf60a..ee9bc527163 100644 --- a/plc4go/internal/bacnetip/tests/trapped_classes_TrappedServerStateMachine.go +++ b/plc4go/internal/bacnetip/bacgopes/tests/trapped_classes_TrappedServerStateMachine.go @@ -23,7 +23,7 @@ import ( "github.com/pkg/errors" "github.com/rs/zerolog" - "github.com/apache/plc4x/plc4go/internal/bacnetip" + "github.com/apache/plc4x/plc4go/internal/bacnetip/bacgopes" ) type TrappedServerStateMachine struct { @@ -44,12 +44,12 @@ func NewTrappedServerStateMachine(localLog zerolog.Logger) (*TrappedServerStateM return t, nil } -func (t *TrappedServerStateMachine) Send(args bacnetip.Args, kwargs bacnetip.KWArgs) error { +func (t *TrappedServerStateMachine) Send(args bacgopes.Args, kwargs bacgopes.KWArgs) error { t.log.Debug().Stringer("args", args).Stringer("kwargs", kwargs).Msg("Send") return t.Response(args, kwargs) } -func (t *TrappedServerStateMachine) Indication(args bacnetip.Args, kwargs bacnetip.KWArgs) error { +func (t *TrappedServerStateMachine) Indication(args bacgopes.Args, kwargs bacgopes.KWArgs) error { t.log.Debug().Stringer("args", args).Stringer("kwargs", kwargs).Msg("Indication") return t.Receive(args, kwargs) } diff --git a/plc4go/internal/bacnetip/tests/trapped_classes_TrappedServiceAccessPoint.go b/plc4go/internal/bacnetip/bacgopes/tests/trapped_classes_TrappedServiceAccessPoint.go similarity index 75% rename from plc4go/internal/bacnetip/tests/trapped_classes_TrappedServiceAccessPoint.go rename to plc4go/internal/bacnetip/bacgopes/tests/trapped_classes_TrappedServiceAccessPoint.go index 02dc167dbbe..d249520db5b 100644 --- a/plc4go/internal/bacnetip/tests/trapped_classes_TrappedServiceAccessPoint.go +++ b/plc4go/internal/bacnetip/bacgopes/tests/trapped_classes_TrappedServiceAccessPoint.go @@ -23,12 +23,12 @@ import ( "github.com/pkg/errors" "github.com/rs/zerolog" - "github.com/apache/plc4x/plc4go/internal/bacnetip" + "github.com/apache/plc4x/plc4go/internal/bacnetip/bacgopes" ) type TrappedServiceAccessPointRequirements interface { - SapIndication(args bacnetip.Args, kwargs bacnetip.KWArgs) error - SapConfirmation(args bacnetip.Args, kwargs bacnetip.KWArgs) error + SapIndication(args bacgopes.Args, kwargs bacgopes.KWArgs) error + SapConfirmation(args bacgopes.Args, kwargs bacgopes.KWArgs) error } // TrappedServiceAccessPoint Note that while this class inherits from ServiceAccessPoint, it doesn't @@ -51,13 +51,13 @@ type TrappedServiceAccessPointRequirements interface { // // The Snort functions will be called after the PDU is trapped. type TrappedServiceAccessPoint struct { - bacnetip.ServiceAccessPointContract + bacgopes.ServiceAccessPointContract requirements TrappedServiceAccessPointRequirements - sapRequestSent bacnetip.PDU - sapIndicationReceived bacnetip.PDU - sapResponseSent bacnetip.PDU - sapConfirmationReceived bacnetip.PDU + sapRequestSent bacgopes.PDU + sapIndicationReceived bacgopes.PDU + sapResponseSent bacgopes.PDU + sapConfirmationReceived bacgopes.PDU log zerolog.Logger } @@ -68,48 +68,48 @@ func NewTrappedServiceAccessPoint(localLog zerolog.Logger, requirements TrappedS log: localLog, } var err error - t.ServiceAccessPointContract, err = bacnetip.NewServiceAccessPoint(localLog) + t.ServiceAccessPointContract, err = bacgopes.NewServiceAccessPoint(localLog) if err != nil { return nil, errors.Wrap(err, "error creating SAP") } return t, nil } -func (s *TrappedServiceAccessPoint) GetSapRequestSent() bacnetip.PDU { +func (s *TrappedServiceAccessPoint) GetSapRequestSent() bacgopes.PDU { return s.sapRequestSent } -func (s *TrappedServiceAccessPoint) GetSapIndicationReceived() bacnetip.PDU { +func (s *TrappedServiceAccessPoint) GetSapIndicationReceived() bacgopes.PDU { return s.sapIndicationReceived } -func (s *TrappedServiceAccessPoint) GetSapResponseSent() bacnetip.PDU { +func (s *TrappedServiceAccessPoint) GetSapResponseSent() bacgopes.PDU { return s.sapResponseSent } -func (s *TrappedServiceAccessPoint) GetSapConfirmationReceived() bacnetip.PDU { +func (s *TrappedServiceAccessPoint) GetSapConfirmationReceived() bacgopes.PDU { return s.sapConfirmationReceived } -func (s *TrappedServiceAccessPoint) SapRequest(args bacnetip.Args, kwargs bacnetip.KWArgs) error { +func (s *TrappedServiceAccessPoint) SapRequest(args bacgopes.Args, kwargs bacgopes.KWArgs) error { s.log.Debug().Stringer("args", args).Stringer("kwargs", kwargs).Msg("SapRequest") s.sapRequestSent = args.Get0PDU() return s.ServiceAccessPointContract.SapRequest(args, kwargs) } -func (s *TrappedServiceAccessPoint) SapIndication(args bacnetip.Args, kwargs bacnetip.KWArgs) error { +func (s *TrappedServiceAccessPoint) SapIndication(args bacgopes.Args, kwargs bacgopes.KWArgs) error { s.log.Debug().Stringer("args", args).Stringer("kwargs", kwargs).Msg("SapIndication") s.sapIndicationReceived = args.Get0PDU() return s.requirements.SapIndication(args, kwargs) } -func (s *TrappedServiceAccessPoint) SapResponse(args bacnetip.Args, kwargs bacnetip.KWArgs) error { +func (s *TrappedServiceAccessPoint) SapResponse(args bacgopes.Args, kwargs bacgopes.KWArgs) error { s.log.Debug().Stringer("args", args).Stringer("kwargs", kwargs).Msg("SapResponse") s.sapResponseSent = args.Get0PDU() return s.ServiceAccessPointContract.SapResponse(args, kwargs) } -func (s *TrappedServiceAccessPoint) SapConfirmation(args bacnetip.Args, kwargs bacnetip.KWArgs) error { +func (s *TrappedServiceAccessPoint) SapConfirmation(args bacgopes.Args, kwargs bacgopes.KWArgs) error { s.log.Debug().Stringer("args", args).Stringer("kwargs", kwargs).Msg("SapConfirmation") s.sapConfirmationReceived = args.Get0PDU() return s.requirements.SapConfirmation(args, kwargs) diff --git a/plc4go/internal/bacnetip/tests/trapped_classes_TrappedState.go b/plc4go/internal/bacnetip/bacgopes/tests/trapped_classes_TrappedState.go similarity index 84% rename from plc4go/internal/bacnetip/tests/trapped_classes_TrappedState.go rename to plc4go/internal/bacnetip/bacgopes/tests/trapped_classes_TrappedState.go index 882df904c9c..fb1c18a2777 100644 --- a/plc4go/internal/bacnetip/tests/trapped_classes_TrappedState.go +++ b/plc4go/internal/bacnetip/bacgopes/tests/trapped_classes_TrappedState.go @@ -22,7 +22,7 @@ package tests import ( "fmt" - "github.com/apache/plc4x/plc4go/internal/bacnetip" + "github.com/apache/plc4x/plc4go/internal/bacnetip/bacgopes" ) // TrappedState This class is a simple wrapper around the state class that keeps the latest copy of the pdu parameter in @@ -54,23 +54,23 @@ func (t *TrappedState) String() string { return fmt.Sprintf("TrappedState(%v)", t.State) } -func (t *TrappedState) BeforeSend(pdu bacnetip.PDU) { +func (t *TrappedState) BeforeSend(pdu bacgopes.PDU) { t.Trapper.BeforeSend(pdu) } -func (t *TrappedState) AfterSend(pdu bacnetip.PDU) { +func (t *TrappedState) AfterSend(pdu bacgopes.PDU) { t.Trapper.AfterSend(pdu) } -func (t *TrappedState) BeforeReceive(pdu bacnetip.PDU) { +func (t *TrappedState) BeforeReceive(pdu bacgopes.PDU) { t.Trapper.BeforeReceive(pdu) } -func (t *TrappedState) AfterReceive(pdu bacnetip.PDU) { +func (t *TrappedState) AfterReceive(pdu bacgopes.PDU) { t.Trapper.AfterReceive(pdu) } -func (t *TrappedState) UnexpectedReceive(pdu bacnetip.PDU) { +func (t *TrappedState) UnexpectedReceive(pdu bacgopes.PDU) { t.Trapper.UnexpectedReceive(pdu) } diff --git a/plc4go/internal/bacnetip/tests/trapped_classes_TrappedStateMachine.go b/plc4go/internal/bacnetip/bacgopes/tests/trapped_classes_TrappedStateMachine.go similarity index 80% rename from plc4go/internal/bacnetip/tests/trapped_classes_TrappedStateMachine.go rename to plc4go/internal/bacnetip/bacgopes/tests/trapped_classes_TrappedStateMachine.go index 5a94249bd5b..7a19f881c89 100644 --- a/plc4go/internal/bacnetip/tests/trapped_classes_TrappedStateMachine.go +++ b/plc4go/internal/bacnetip/bacgopes/tests/trapped_classes_TrappedStateMachine.go @@ -22,7 +22,7 @@ package tests import ( "github.com/rs/zerolog" - "github.com/apache/plc4x/plc4go/internal/bacnetip" + "github.com/apache/plc4x/plc4go/internal/bacnetip/bacgopes" ) // TrappedStateMachine This class is a simple wrapper around the stateMachine class that keeps the @@ -35,7 +35,7 @@ type TrappedStateMachine struct { *Trapper StateMachineContract - sent bacnetip.PDU + sent bacgopes.PDU log zerolog.Logger } @@ -51,34 +51,34 @@ func NewTrappedStateMachine(localLog zerolog.Logger) *TrappedStateMachine { return t } -func (t *TrappedStateMachine) GetSent() bacnetip.PDU { +func (t *TrappedStateMachine) GetSent() bacgopes.PDU { return t.sent } -func (t *TrappedStateMachine) BeforeSend(pdu bacnetip.PDU) { +func (t *TrappedStateMachine) BeforeSend(pdu bacgopes.PDU) { t.StateMachineContract.BeforeSend(pdu) } -func (t *TrappedStateMachine) Send(args bacnetip.Args, kwargs bacnetip.KWArgs) error { +func (t *TrappedStateMachine) Send(args bacgopes.Args, kwargs bacgopes.KWArgs) error { t.log.Debug().Stringer("args", args).Stringer("kwargs", kwargs).Msg("Send") // keep a copy t.sent = args.Get0PDU() return nil } -func (t *TrappedStateMachine) AfterSend(pdu bacnetip.PDU) { +func (t *TrappedStateMachine) AfterSend(pdu bacgopes.PDU) { t.StateMachineContract.AfterSend(pdu) } -func (t *TrappedStateMachine) BeforeReceive(pdu bacnetip.PDU) { +func (t *TrappedStateMachine) BeforeReceive(pdu bacgopes.PDU) { t.StateMachineContract.BeforeReceive(pdu) } -func (t *TrappedStateMachine) AfterReceive(pdu bacnetip.PDU) { +func (t *TrappedStateMachine) AfterReceive(pdu bacgopes.PDU) { t.StateMachineContract.AfterReceive(pdu) } -func (t *TrappedStateMachine) UnexpectedReceive(pdu bacnetip.PDU) { +func (t *TrappedStateMachine) UnexpectedReceive(pdu bacgopes.PDU) { t.StateMachineContract.UnexpectedReceive(pdu) } diff --git a/plc4go/internal/bacnetip/tests/trapped_classes_Trapper.go b/plc4go/internal/bacnetip/bacgopes/tests/trapped_classes_Trapper.go similarity index 75% rename from plc4go/internal/bacnetip/tests/trapped_classes_Trapper.go rename to plc4go/internal/bacnetip/bacgopes/tests/trapped_classes_Trapper.go index 14c5006e005..cbfc87e3b2a 100644 --- a/plc4go/internal/bacnetip/tests/trapped_classes_Trapper.go +++ b/plc4go/internal/bacnetip/bacgopes/tests/trapped_classes_Trapper.go @@ -22,15 +22,15 @@ package tests import ( "github.com/rs/zerolog" - "github.com/apache/plc4x/plc4go/internal/bacnetip" + "github.com/apache/plc4x/plc4go/internal/bacnetip/bacgopes" ) type TrapperRequirements interface { - BeforeSend(pdu bacnetip.PDU) - AfterSend(pdu bacnetip.PDU) - BeforeReceive(pdu bacnetip.PDU) - AfterReceive(pdu bacnetip.PDU) - UnexpectedReceive(pdu bacnetip.PDU) + BeforeSend(pdu bacgopes.PDU) + AfterSend(pdu bacgopes.PDU) + BeforeReceive(pdu bacgopes.PDU) + AfterReceive(pdu bacgopes.PDU) + UnexpectedReceive(pdu bacgopes.PDU) } // Trapper This class provides a set of utility functions that keeps the latest copy of the pdu parameter in the @@ -38,11 +38,11 @@ type TrapperRequirements interface { type Trapper struct { TrapperRequirements - beforeSendPdu bacnetip.PDU - afterSendPdu bacnetip.PDU - beforeReceivePdu bacnetip.PDU - afterReceivePdu bacnetip.PDU - unexpectedReceivePdu bacnetip.PDU + beforeSendPdu bacgopes.PDU + afterSendPdu bacgopes.PDU + beforeReceivePdu bacgopes.PDU + afterReceivePdu bacgopes.PDU + unexpectedReceivePdu bacgopes.PDU log zerolog.Logger } @@ -68,7 +68,7 @@ func (t *Trapper) reset() { } // BeforeSend is Called before each PDU about to be sent. -func (t *Trapper) BeforeSend(pdu bacnetip.PDU) { +func (t *Trapper) BeforeSend(pdu bacgopes.PDU) { t.log.Debug().Stringer("pdu", pdu).Msg("BeforeSend") //keep a copy t.beforeSendPdu = pdu @@ -77,12 +77,12 @@ func (t *Trapper) BeforeSend(pdu bacnetip.PDU) { t.TrapperRequirements.BeforeSend(pdu) } -func (t *Trapper) GetBeforeSendPdu() bacnetip.PDU { +func (t *Trapper) GetBeforeSendPdu() bacgopes.PDU { return t.beforeSendPdu } // AfterSend is Called after each PDU sent. -func (t *Trapper) AfterSend(pdu bacnetip.PDU) { +func (t *Trapper) AfterSend(pdu bacgopes.PDU) { t.log.Debug().Stringer("pdu", pdu).Msg("AfterSend") //keep a copy t.afterSendPdu = pdu @@ -91,12 +91,12 @@ func (t *Trapper) AfterSend(pdu bacnetip.PDU) { t.TrapperRequirements.AfterSend(pdu) } -func (t *Trapper) GetAfterSendPdu() bacnetip.PDU { +func (t *Trapper) GetAfterSendPdu() bacgopes.PDU { return t.afterSendPdu } // BeforeReceive is Called with each PDU received before matching. -func (t *Trapper) BeforeReceive(pdu bacnetip.PDU) { +func (t *Trapper) BeforeReceive(pdu bacgopes.PDU) { t.log.Debug().Stringer("pdu", pdu).Msg("BeforeReceive") //keep a copy t.beforeReceivePdu = pdu @@ -105,12 +105,12 @@ func (t *Trapper) BeforeReceive(pdu bacnetip.PDU) { t.TrapperRequirements.BeforeReceive(pdu) } -func (t *Trapper) GetBeforeReceivePdu() bacnetip.PDU { +func (t *Trapper) GetBeforeReceivePdu() bacgopes.PDU { return t.beforeReceivePdu } // AfterReceive is Called with PDU received after match. -func (t *Trapper) AfterReceive(pdu bacnetip.PDU) { +func (t *Trapper) AfterReceive(pdu bacgopes.PDU) { t.log.Debug().Stringer("pdu", pdu).Msg("AfterReceive") //keep a copy t.afterReceivePdu = pdu @@ -119,12 +119,12 @@ func (t *Trapper) AfterReceive(pdu bacnetip.PDU) { t.TrapperRequirements.AfterReceive(pdu) } -func (t *Trapper) GetAfterReceivePdu() bacnetip.PDU { +func (t *Trapper) GetAfterReceivePdu() bacgopes.PDU { return t.afterReceivePdu } // UnexpectedReceive is Called with PDU that did not match. Unless this is trapped by the state, the default behaviour is to fail. -func (t *Trapper) UnexpectedReceive(pdu bacnetip.PDU) { +func (t *Trapper) UnexpectedReceive(pdu bacgopes.PDU) { t.log.Debug().Stringer("pdu", pdu).Msg("UnexpectedReceive") //keep a copy t.unexpectedReceivePdu = pdu @@ -133,6 +133,6 @@ func (t *Trapper) UnexpectedReceive(pdu bacnetip.PDU) { t.TrapperRequirements.UnexpectedReceive(pdu) } -func (t *Trapper) GetUnexpectedReceivePDU() bacnetip.PDU { +func (t *Trapper) GetUnexpectedReceivePDU() bacgopes.PDU { return t.unexpectedReceivePdu } diff --git a/plc4go/internal/bacnetip/tests/util.go b/plc4go/internal/bacnetip/bacgopes/tests/util.go similarity index 88% rename from plc4go/internal/bacnetip/tests/util.go rename to plc4go/internal/bacnetip/bacgopes/tests/util.go index 5f97ad9914a..2f8498f7a29 100644 --- a/plc4go/internal/bacnetip/tests/util.go +++ b/plc4go/internal/bacnetip/bacgopes/tests/util.go @@ -23,17 +23,17 @@ import ( "fmt" "time" - "github.com/apache/plc4x/plc4go/internal/bacnetip" + "github.com/apache/plc4x/plc4go/internal/bacnetip/bacgopes" ) var StartTime = time.Time{} type DummyMessage struct { - bacnetip.MessageBridge + bacgopes.MessageBridge } func NewDummyMessage(data ...byte) *DummyMessage { - return &DummyMessage{bacnetip.NewMessageBridge(data...)} + return &DummyMessage{bacgopes.NewMessageBridge(data...)} } type AssertionError struct { diff --git a/plc4go/internal/bacnetip/udp.go b/plc4go/internal/bacnetip/bacgopes/udp.go similarity index 97% rename from plc4go/internal/bacnetip/udp.go rename to plc4go/internal/bacnetip/bacgopes/udp.go index 1c9b86f6c6d..b3432951fdd 100644 --- a/plc4go/internal/bacnetip/udp.go +++ b/plc4go/internal/bacnetip/bacgopes/udp.go @@ -17,4 +17,4 @@ * under the License. */ -package bacnetip +package bacgopes diff --git a/plc4go/internal/bacnetip/udp_UDPActor.go b/plc4go/internal/bacnetip/bacgopes/udp_UDPActor.go similarity index 96% rename from plc4go/internal/bacnetip/udp_UDPActor.go rename to plc4go/internal/bacnetip/bacgopes/udp_UDPActor.go index b224ee775d1..0d152ebe9a2 100644 --- a/plc4go/internal/bacnetip/udp_UDPActor.go +++ b/plc4go/internal/bacnetip/bacgopes/udp_UDPActor.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes import ( "time" @@ -25,7 +25,7 @@ import ( "github.com/rs/zerolog" ) -//go:generate go run ../../tools/plc4xgenerator/gen.go -type=UDPActor +//go:generate go run ../../../tools/plc4xgenerator/gen.go -type=UDPActor type UDPActor struct { director *UDPDirector timeout uint32 diff --git a/plc4go/internal/bacnetip/udp_UDPDirector.go b/plc4go/internal/bacnetip/bacgopes/udp_UDPDirector.go similarity index 99% rename from plc4go/internal/bacnetip/udp_UDPDirector.go rename to plc4go/internal/bacnetip/bacgopes/udp_UDPDirector.go index 6b39922d074..b6586870a97 100644 --- a/plc4go/internal/bacnetip/udp_UDPDirector.go +++ b/plc4go/internal/bacnetip/bacgopes/udp_UDPDirector.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes import ( "context" diff --git a/plc4go/internal/bacnetip/vlan.go b/plc4go/internal/bacnetip/bacgopes/vlan.go similarity index 97% rename from plc4go/internal/bacnetip/vlan.go rename to plc4go/internal/bacnetip/bacgopes/vlan.go index 1c9b86f6c6d..b3432951fdd 100644 --- a/plc4go/internal/bacnetip/vlan.go +++ b/plc4go/internal/bacnetip/bacgopes/vlan.go @@ -17,4 +17,4 @@ * under the License. */ -package bacnetip +package bacgopes diff --git a/plc4go/internal/bacnetip/vlan_IPNetwork.go b/plc4go/internal/bacnetip/bacgopes/vlan_IPNetwork.go similarity index 99% rename from plc4go/internal/bacnetip/vlan_IPNetwork.go rename to plc4go/internal/bacnetip/bacgopes/vlan_IPNetwork.go index c692f0d0cf0..957e2fb6a31 100644 --- a/plc4go/internal/bacnetip/vlan_IPNetwork.go +++ b/plc4go/internal/bacnetip/bacgopes/vlan_IPNetwork.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes import "github.com/rs/zerolog" diff --git a/plc4go/internal/bacnetip/vlan_IPNode.go b/plc4go/internal/bacnetip/bacgopes/vlan_IPNode.go similarity index 99% rename from plc4go/internal/bacnetip/vlan_IPNode.go rename to plc4go/internal/bacnetip/bacgopes/vlan_IPNode.go index 7d7e3a2a61a..70a83bb51c6 100644 --- a/plc4go/internal/bacnetip/vlan_IPNode.go +++ b/plc4go/internal/bacnetip/bacgopes/vlan_IPNode.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes import ( "fmt" diff --git a/plc4go/internal/bacnetip/vlan_IPRouter.go b/plc4go/internal/bacnetip/bacgopes/vlan_IPRouter.go similarity index 99% rename from plc4go/internal/bacnetip/vlan_IPRouter.go rename to plc4go/internal/bacnetip/bacgopes/vlan_IPRouter.go index 7b400171b41..8c502076213 100644 --- a/plc4go/internal/bacnetip/vlan_IPRouter.go +++ b/plc4go/internal/bacnetip/bacgopes/vlan_IPRouter.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes import "github.com/rs/zerolog" diff --git a/plc4go/internal/bacnetip/vlan_IPRouterNode.go b/plc4go/internal/bacnetip/bacgopes/vlan_IPRouterNode.go similarity index 99% rename from plc4go/internal/bacnetip/vlan_IPRouterNode.go rename to plc4go/internal/bacnetip/bacgopes/vlan_IPRouterNode.go index c0176e0ae6d..03b7cdadea1 100644 --- a/plc4go/internal/bacnetip/vlan_IPRouterNode.go +++ b/plc4go/internal/bacnetip/bacgopes/vlan_IPRouterNode.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes import ( "fmt" diff --git a/plc4go/internal/bacnetip/vlan_Network.go b/plc4go/internal/bacnetip/bacgopes/vlan_Network.go similarity index 99% rename from plc4go/internal/bacnetip/vlan_Network.go rename to plc4go/internal/bacnetip/bacgopes/vlan_Network.go index 4280beee41f..6673d17a592 100644 --- a/plc4go/internal/bacnetip/vlan_Network.go +++ b/plc4go/internal/bacnetip/bacgopes/vlan_Network.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes import ( "fmt" diff --git a/plc4go/internal/bacnetip/vlan_Node.go b/plc4go/internal/bacnetip/bacgopes/vlan_Node.go similarity index 97% rename from plc4go/internal/bacnetip/vlan_Node.go rename to plc4go/internal/bacnetip/bacgopes/vlan_Node.go index 5f4ac97b43b..67352ec7538 100644 --- a/plc4go/internal/bacnetip/vlan_Node.go +++ b/plc4go/internal/bacnetip/bacgopes/vlan_Node.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes import ( "fmt" @@ -25,7 +25,7 @@ import ( "github.com/pkg/errors" "github.com/rs/zerolog" - "github.com/apache/plc4x/plc4go/internal/bacnetip/globals" + "github.com/apache/plc4x/plc4go/internal/bacnetip/bacgopes/globals" ) // NodeNetworkReference allows Network and IPNetwork to be used from Node. diff --git a/plc4go/internal/bacnetip/vlan_TrafficLogger.go b/plc4go/internal/bacnetip/bacgopes/vlan_TrafficLogger.go similarity index 98% rename from plc4go/internal/bacnetip/vlan_TrafficLogger.go rename to plc4go/internal/bacnetip/bacgopes/vlan_TrafficLogger.go index 643e0d1d899..1f0d6373cf6 100644 --- a/plc4go/internal/bacnetip/vlan_TrafficLogger.go +++ b/plc4go/internal/bacnetip/bacgopes/vlan_TrafficLogger.go @@ -17,7 +17,7 @@ * under the License. */ -package bacnetip +package bacgopes type TrafficLogger interface { Call(args Args) diff --git a/plc4go/internal/bacnetip/constructors/bvll.go b/plc4go/internal/bacnetip/constructors/bvll.go deleted file mode 100644 index 008e8d767ce..00000000000 --- a/plc4go/internal/bacnetip/constructors/bvll.go +++ /dev/null @@ -1,126 +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 - * - * https://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 constructors - -import ( - readWriteModel "github.com/apache/plc4x/plc4go/protocols/bacnetip/readwrite/model" - - "github.com/apache/plc4x/plc4go/internal/bacnetip" -) - -func Result(i uint16) *bacnetip.Result { - result, err := bacnetip.NewResult(bacnetip.WithResultBvlciResultCode(readWriteModel.BVLCResultCode(i))) - if err != nil { - panic(err) - } - return result -} - -func WriteBroadcastDistributionTable(bdt ...*bacnetip.Address) *bacnetip.WriteBroadcastDistributionTable { - writeBroadcastDistributionTable, err := bacnetip.NewWriteBroadcastDistributionTable(bacnetip.WithWriteBroadcastDistributionTableBDT(bdt...)) - if err != nil { - panic(err) - } - return writeBroadcastDistributionTable -} - -func ReadBroadcastDistributionTable() *bacnetip.ReadBroadcastDistributionTable { - readBroadcastDistributionTable, err := bacnetip.NewReadBroadcastDistributionTable() - if err != nil { - panic(err) - } - return readBroadcastDistributionTable -} - -func ReadBroadcastDistributionTableAck(bdt ...*bacnetip.Address) *bacnetip.ReadBroadcastDistributionTableAck { - readBroadcastDistributionTable, err := bacnetip.NewReadBroadcastDistributionTableAck(bacnetip.WithReadBroadcastDistributionTableAckBDT(bdt...)) - if err != nil { - panic(err) - } - return readBroadcastDistributionTable -} - -func ForwardedNPDU(addr *bacnetip.Address, pduBytes []byte) *bacnetip.ForwardedNPDU { - npdu, err := bacnetip.NewForwardedNPDU(bacnetip.NewPDU(bacnetip.NewMessageBridge(pduBytes...)), bacnetip.WithForwardedNPDUAddress(addr)) - if err != nil { - panic(err) - } - return npdu -} - -func RegisterForeignDevice(ttl uint16) *bacnetip.RegisterForeignDevice { - registerForeignDevice, err := bacnetip.NewRegisterForeignDevice(bacnetip.WithRegisterForeignDeviceBvlciTimeToLive(ttl)) - if err != nil { - panic(err) - } - return registerForeignDevice -} - -func ReadForeignDeviceTable() *bacnetip.ReadForeignDeviceTable { - readForeignDeviceTable, err := bacnetip.NewReadForeignDeviceTable() - if err != nil { - panic(err) - } - return readForeignDeviceTable -} - -func FDTEntry() (entry *bacnetip.FDTEntry) { - return &bacnetip.FDTEntry{} -} - -func ReadForeignDeviceTableAck(fdts ...*bacnetip.FDTEntry) *bacnetip.ReadForeignDeviceTableAck { - readForeignDeviceTableAck, err := bacnetip.NewReadForeignDeviceTableAck(bacnetip.WithReadForeignDeviceTableAckFDT(fdts...)) - if err != nil { - panic(err) - } - return readForeignDeviceTableAck -} - -func DeleteForeignDeviceTableEntry(address *bacnetip.Address) *bacnetip.DeleteForeignDeviceTableEntry { - deleteForeignDeviceTableEntry, err := bacnetip.NewDeleteForeignDeviceTableEntry(bacnetip.WithDeleteForeignDeviceTableEntryAddress(address)) - if err != nil { - panic(err) - } - return deleteForeignDeviceTableEntry -} - -func DistributeBroadcastToNetwork(pduBytes []byte) *bacnetip.DistributeBroadcastToNetwork { - distributeBroadcastToNetwork, err := bacnetip.NewDistributeBroadcastToNetwork(bacnetip.NewPDU(bacnetip.NewMessageBridge(pduBytes...))) - if err != nil { - panic(err) - } - return distributeBroadcastToNetwork -} - -func OriginalUnicastNPDU(pduBytes []byte) *bacnetip.OriginalUnicastNPDU { - npdu, err := bacnetip.NewOriginalUnicastNPDU(bacnetip.NewPDU(bacnetip.NewMessageBridge(pduBytes...))) - if err != nil { - panic(err) - } - return npdu -} - -func OriginalBroadcastNPDU(pduBytes []byte) *bacnetip.OriginalBroadcastNPDU { - npdu, err := bacnetip.NewOriginalBroadcastNPDU(bacnetip.NewPDU(bacnetip.NewMessageBridge(pduBytes...))) - if err != nil { - panic(err) - } - return npdu -} diff --git a/plc4go/internal/bacnetip/mock_APCI_test.go b/plc4go/internal/bacnetip/mock_APCI_test.go deleted file mode 100644 index f552d84ae82..00000000000 --- a/plc4go/internal/bacnetip/mock_APCI_test.go +++ /dev/null @@ -1,1009 +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 - * - * https://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. - */ - -// Code generated by mockery v2.42.2. DO NOT EDIT. - -package bacnetip - -import ( - context "context" - - model "github.com/apache/plc4x/plc4go/protocols/bacnetip/readwrite/model" - mock "github.com/stretchr/testify/mock" - - spi "github.com/apache/plc4x/plc4go/spi" - - utils "github.com/apache/plc4x/plc4go/spi/utils" -) - -// MockAPCI is an autogenerated mock type for the APCI type -type MockAPCI struct { - mock.Mock -} - -type MockAPCI_Expecter struct { - mock *mock.Mock -} - -func (_m *MockAPCI) EXPECT() *MockAPCI_Expecter { - return &MockAPCI_Expecter{mock: &_m.Mock} -} - -// Decode provides a mock function with given fields: pdu -func (_m *MockAPCI) Decode(pdu Arg) error { - ret := _m.Called(pdu) - - if len(ret) == 0 { - panic("no return value specified for Decode") - } - - var r0 error - if rf, ok := ret.Get(0).(func(Arg) error); ok { - r0 = rf(pdu) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockAPCI_Decode_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Decode' -type MockAPCI_Decode_Call struct { - *mock.Call -} - -// Decode is a helper method to define mock.On call -// - pdu Arg -func (_e *MockAPCI_Expecter) Decode(pdu interface{}) *MockAPCI_Decode_Call { - return &MockAPCI_Decode_Call{Call: _e.mock.On("Decode", pdu)} -} - -func (_c *MockAPCI_Decode_Call) Run(run func(pdu Arg)) *MockAPCI_Decode_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(Arg)) - }) - return _c -} - -func (_c *MockAPCI_Decode_Call) Return(_a0 error) *MockAPCI_Decode_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockAPCI_Decode_Call) RunAndReturn(run func(Arg) error) *MockAPCI_Decode_Call { - _c.Call.Return(run) - return _c -} - -// Encode provides a mock function with given fields: pdu -func (_m *MockAPCI) Encode(pdu Arg) error { - ret := _m.Called(pdu) - - if len(ret) == 0 { - panic("no return value specified for Encode") - } - - var r0 error - if rf, ok := ret.Get(0).(func(Arg) error); ok { - r0 = rf(pdu) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockAPCI_Encode_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Encode' -type MockAPCI_Encode_Call struct { - *mock.Call -} - -// Encode is a helper method to define mock.On call -// - pdu Arg -func (_e *MockAPCI_Expecter) Encode(pdu interface{}) *MockAPCI_Encode_Call { - return &MockAPCI_Encode_Call{Call: _e.mock.On("Encode", pdu)} -} - -func (_c *MockAPCI_Encode_Call) Run(run func(pdu Arg)) *MockAPCI_Encode_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(Arg)) - }) - return _c -} - -func (_c *MockAPCI_Encode_Call) Return(_a0 error) *MockAPCI_Encode_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockAPCI_Encode_Call) RunAndReturn(run func(Arg) error) *MockAPCI_Encode_Call { - _c.Call.Return(run) - return _c -} - -// GetApduInvokeID provides a mock function with given fields: -func (_m *MockAPCI) GetApduInvokeID() *uint8 { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetApduInvokeID") - } - - var r0 *uint8 - if rf, ok := ret.Get(0).(func() *uint8); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*uint8) - } - } - - return r0 -} - -// MockAPCI_GetApduInvokeID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetApduInvokeID' -type MockAPCI_GetApduInvokeID_Call struct { - *mock.Call -} - -// GetApduInvokeID is a helper method to define mock.On call -func (_e *MockAPCI_Expecter) GetApduInvokeID() *MockAPCI_GetApduInvokeID_Call { - return &MockAPCI_GetApduInvokeID_Call{Call: _e.mock.On("GetApduInvokeID")} -} - -func (_c *MockAPCI_GetApduInvokeID_Call) Run(run func()) *MockAPCI_GetApduInvokeID_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockAPCI_GetApduInvokeID_Call) Return(_a0 *uint8) *MockAPCI_GetApduInvokeID_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockAPCI_GetApduInvokeID_Call) RunAndReturn(run func() *uint8) *MockAPCI_GetApduInvokeID_Call { - _c.Call.Return(run) - return _c -} - -// GetExpectingReply provides a mock function with given fields: -func (_m *MockAPCI) GetExpectingReply() bool { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetExpectingReply") - } - - var r0 bool - if rf, ok := ret.Get(0).(func() bool); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(bool) - } - - return r0 -} - -// MockAPCI_GetExpectingReply_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetExpectingReply' -type MockAPCI_GetExpectingReply_Call struct { - *mock.Call -} - -// GetExpectingReply is a helper method to define mock.On call -func (_e *MockAPCI_Expecter) GetExpectingReply() *MockAPCI_GetExpectingReply_Call { - return &MockAPCI_GetExpectingReply_Call{Call: _e.mock.On("GetExpectingReply")} -} - -func (_c *MockAPCI_GetExpectingReply_Call) Run(run func()) *MockAPCI_GetExpectingReply_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockAPCI_GetExpectingReply_Call) Return(_a0 bool) *MockAPCI_GetExpectingReply_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockAPCI_GetExpectingReply_Call) RunAndReturn(run func() bool) *MockAPCI_GetExpectingReply_Call { - _c.Call.Return(run) - return _c -} - -// GetLengthInBits provides a mock function with given fields: ctx -func (_m *MockAPCI) GetLengthInBits(ctx context.Context) uint16 { - ret := _m.Called(ctx) - - if len(ret) == 0 { - panic("no return value specified for GetLengthInBits") - } - - var r0 uint16 - if rf, ok := ret.Get(0).(func(context.Context) uint16); ok { - r0 = rf(ctx) - } else { - r0 = ret.Get(0).(uint16) - } - - return r0 -} - -// MockAPCI_GetLengthInBits_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetLengthInBits' -type MockAPCI_GetLengthInBits_Call struct { - *mock.Call -} - -// GetLengthInBits is a helper method to define mock.On call -// - ctx context.Context -func (_e *MockAPCI_Expecter) GetLengthInBits(ctx interface{}) *MockAPCI_GetLengthInBits_Call { - return &MockAPCI_GetLengthInBits_Call{Call: _e.mock.On("GetLengthInBits", ctx)} -} - -func (_c *MockAPCI_GetLengthInBits_Call) Run(run func(ctx context.Context)) *MockAPCI_GetLengthInBits_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context)) - }) - return _c -} - -func (_c *MockAPCI_GetLengthInBits_Call) Return(_a0 uint16) *MockAPCI_GetLengthInBits_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockAPCI_GetLengthInBits_Call) RunAndReturn(run func(context.Context) uint16) *MockAPCI_GetLengthInBits_Call { - _c.Call.Return(run) - return _c -} - -// GetLengthInBytes provides a mock function with given fields: ctx -func (_m *MockAPCI) GetLengthInBytes(ctx context.Context) uint16 { - ret := _m.Called(ctx) - - if len(ret) == 0 { - panic("no return value specified for GetLengthInBytes") - } - - var r0 uint16 - if rf, ok := ret.Get(0).(func(context.Context) uint16); ok { - r0 = rf(ctx) - } else { - r0 = ret.Get(0).(uint16) - } - - return r0 -} - -// MockAPCI_GetLengthInBytes_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetLengthInBytes' -type MockAPCI_GetLengthInBytes_Call struct { - *mock.Call -} - -// GetLengthInBytes is a helper method to define mock.On call -// - ctx context.Context -func (_e *MockAPCI_Expecter) GetLengthInBytes(ctx interface{}) *MockAPCI_GetLengthInBytes_Call { - return &MockAPCI_GetLengthInBytes_Call{Call: _e.mock.On("GetLengthInBytes", ctx)} -} - -func (_c *MockAPCI_GetLengthInBytes_Call) Run(run func(ctx context.Context)) *MockAPCI_GetLengthInBytes_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context)) - }) - return _c -} - -func (_c *MockAPCI_GetLengthInBytes_Call) Return(_a0 uint16) *MockAPCI_GetLengthInBytes_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockAPCI_GetLengthInBytes_Call) RunAndReturn(run func(context.Context) uint16) *MockAPCI_GetLengthInBytes_Call { - _c.Call.Return(run) - return _c -} - -// GetNetworkPriority provides a mock function with given fields: -func (_m *MockAPCI) GetNetworkPriority() model.NPDUNetworkPriority { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetNetworkPriority") - } - - var r0 model.NPDUNetworkPriority - if rf, ok := ret.Get(0).(func() model.NPDUNetworkPriority); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(model.NPDUNetworkPriority) - } - - return r0 -} - -// MockAPCI_GetNetworkPriority_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetNetworkPriority' -type MockAPCI_GetNetworkPriority_Call struct { - *mock.Call -} - -// GetNetworkPriority is a helper method to define mock.On call -func (_e *MockAPCI_Expecter) GetNetworkPriority() *MockAPCI_GetNetworkPriority_Call { - return &MockAPCI_GetNetworkPriority_Call{Call: _e.mock.On("GetNetworkPriority")} -} - -func (_c *MockAPCI_GetNetworkPriority_Call) Run(run func()) *MockAPCI_GetNetworkPriority_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockAPCI_GetNetworkPriority_Call) Return(_a0 model.NPDUNetworkPriority) *MockAPCI_GetNetworkPriority_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockAPCI_GetNetworkPriority_Call) RunAndReturn(run func() model.NPDUNetworkPriority) *MockAPCI_GetNetworkPriority_Call { - _c.Call.Return(run) - return _c -} - -// GetPDUDestination provides a mock function with given fields: -func (_m *MockAPCI) GetPDUDestination() *Address { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetPDUDestination") - } - - var r0 *Address - if rf, ok := ret.Get(0).(func() *Address); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*Address) - } - } - - return r0 -} - -// MockAPCI_GetPDUDestination_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPDUDestination' -type MockAPCI_GetPDUDestination_Call struct { - *mock.Call -} - -// GetPDUDestination is a helper method to define mock.On call -func (_e *MockAPCI_Expecter) GetPDUDestination() *MockAPCI_GetPDUDestination_Call { - return &MockAPCI_GetPDUDestination_Call{Call: _e.mock.On("GetPDUDestination")} -} - -func (_c *MockAPCI_GetPDUDestination_Call) Run(run func()) *MockAPCI_GetPDUDestination_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockAPCI_GetPDUDestination_Call) Return(_a0 *Address) *MockAPCI_GetPDUDestination_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockAPCI_GetPDUDestination_Call) RunAndReturn(run func() *Address) *MockAPCI_GetPDUDestination_Call { - _c.Call.Return(run) - return _c -} - -// GetPDUSource provides a mock function with given fields: -func (_m *MockAPCI) GetPDUSource() *Address { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetPDUSource") - } - - var r0 *Address - if rf, ok := ret.Get(0).(func() *Address); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*Address) - } - } - - return r0 -} - -// MockAPCI_GetPDUSource_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPDUSource' -type MockAPCI_GetPDUSource_Call struct { - *mock.Call -} - -// GetPDUSource is a helper method to define mock.On call -func (_e *MockAPCI_Expecter) GetPDUSource() *MockAPCI_GetPDUSource_Call { - return &MockAPCI_GetPDUSource_Call{Call: _e.mock.On("GetPDUSource")} -} - -func (_c *MockAPCI_GetPDUSource_Call) Run(run func()) *MockAPCI_GetPDUSource_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockAPCI_GetPDUSource_Call) Return(_a0 *Address) *MockAPCI_GetPDUSource_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockAPCI_GetPDUSource_Call) RunAndReturn(run func() *Address) *MockAPCI_GetPDUSource_Call { - _c.Call.Return(run) - return _c -} - -// GetPDUUserData provides a mock function with given fields: -func (_m *MockAPCI) GetPDUUserData() spi.Message { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetPDUUserData") - } - - var r0 spi.Message - if rf, ok := ret.Get(0).(func() spi.Message); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(spi.Message) - } - } - - return r0 -} - -// MockAPCI_GetPDUUserData_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPDUUserData' -type MockAPCI_GetPDUUserData_Call struct { - *mock.Call -} - -// GetPDUUserData is a helper method to define mock.On call -func (_e *MockAPCI_Expecter) GetPDUUserData() *MockAPCI_GetPDUUserData_Call { - return &MockAPCI_GetPDUUserData_Call{Call: _e.mock.On("GetPDUUserData")} -} - -func (_c *MockAPCI_GetPDUUserData_Call) Run(run func()) *MockAPCI_GetPDUUserData_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockAPCI_GetPDUUserData_Call) Return(_a0 spi.Message) *MockAPCI_GetPDUUserData_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockAPCI_GetPDUUserData_Call) RunAndReturn(run func() spi.Message) *MockAPCI_GetPDUUserData_Call { - _c.Call.Return(run) - return _c -} - -// GetRootMessage provides a mock function with given fields: -func (_m *MockAPCI) GetRootMessage() spi.Message { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetRootMessage") - } - - var r0 spi.Message - if rf, ok := ret.Get(0).(func() spi.Message); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(spi.Message) - } - } - - return r0 -} - -// MockAPCI_GetRootMessage_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRootMessage' -type MockAPCI_GetRootMessage_Call struct { - *mock.Call -} - -// GetRootMessage is a helper method to define mock.On call -func (_e *MockAPCI_Expecter) GetRootMessage() *MockAPCI_GetRootMessage_Call { - return &MockAPCI_GetRootMessage_Call{Call: _e.mock.On("GetRootMessage")} -} - -func (_c *MockAPCI_GetRootMessage_Call) Run(run func()) *MockAPCI_GetRootMessage_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockAPCI_GetRootMessage_Call) Return(_a0 spi.Message) *MockAPCI_GetRootMessage_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockAPCI_GetRootMessage_Call) RunAndReturn(run func() spi.Message) *MockAPCI_GetRootMessage_Call { - _c.Call.Return(run) - return _c -} - -// Serialize provides a mock function with given fields: -func (_m *MockAPCI) Serialize() ([]byte, error) { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Serialize") - } - - var r0 []byte - var r1 error - if rf, ok := ret.Get(0).(func() ([]byte, error)); ok { - return rf() - } - if rf, ok := ret.Get(0).(func() []byte); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]byte) - } - } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockAPCI_Serialize_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Serialize' -type MockAPCI_Serialize_Call struct { - *mock.Call -} - -// Serialize is a helper method to define mock.On call -func (_e *MockAPCI_Expecter) Serialize() *MockAPCI_Serialize_Call { - return &MockAPCI_Serialize_Call{Call: _e.mock.On("Serialize")} -} - -func (_c *MockAPCI_Serialize_Call) Run(run func()) *MockAPCI_Serialize_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockAPCI_Serialize_Call) Return(_a0 []byte, _a1 error) *MockAPCI_Serialize_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockAPCI_Serialize_Call) RunAndReturn(run func() ([]byte, error)) *MockAPCI_Serialize_Call { - _c.Call.Return(run) - return _c -} - -// SerializeWithWriteBuffer provides a mock function with given fields: ctx, writeBuffer -func (_m *MockAPCI) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { - ret := _m.Called(ctx, writeBuffer) - - if len(ret) == 0 { - panic("no return value specified for SerializeWithWriteBuffer") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, utils.WriteBuffer) error); ok { - r0 = rf(ctx, writeBuffer) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockAPCI_SerializeWithWriteBuffer_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SerializeWithWriteBuffer' -type MockAPCI_SerializeWithWriteBuffer_Call struct { - *mock.Call -} - -// SerializeWithWriteBuffer is a helper method to define mock.On call -// - ctx context.Context -// - writeBuffer utils.WriteBuffer -func (_e *MockAPCI_Expecter) SerializeWithWriteBuffer(ctx interface{}, writeBuffer interface{}) *MockAPCI_SerializeWithWriteBuffer_Call { - return &MockAPCI_SerializeWithWriteBuffer_Call{Call: _e.mock.On("SerializeWithWriteBuffer", ctx, writeBuffer)} -} - -func (_c *MockAPCI_SerializeWithWriteBuffer_Call) Run(run func(ctx context.Context, writeBuffer utils.WriteBuffer)) *MockAPCI_SerializeWithWriteBuffer_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(utils.WriteBuffer)) - }) - return _c -} - -func (_c *MockAPCI_SerializeWithWriteBuffer_Call) Return(_a0 error) *MockAPCI_SerializeWithWriteBuffer_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockAPCI_SerializeWithWriteBuffer_Call) RunAndReturn(run func(context.Context, utils.WriteBuffer) error) *MockAPCI_SerializeWithWriteBuffer_Call { - _c.Call.Return(run) - return _c -} - -// SetExpectingReply provides a mock function with given fields: _a0 -func (_m *MockAPCI) SetExpectingReply(_a0 bool) { - _m.Called(_a0) -} - -// MockAPCI_SetExpectingReply_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetExpectingReply' -type MockAPCI_SetExpectingReply_Call struct { - *mock.Call -} - -// SetExpectingReply is a helper method to define mock.On call -// - _a0 bool -func (_e *MockAPCI_Expecter) SetExpectingReply(_a0 interface{}) *MockAPCI_SetExpectingReply_Call { - return &MockAPCI_SetExpectingReply_Call{Call: _e.mock.On("SetExpectingReply", _a0)} -} - -func (_c *MockAPCI_SetExpectingReply_Call) Run(run func(_a0 bool)) *MockAPCI_SetExpectingReply_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(bool)) - }) - return _c -} - -func (_c *MockAPCI_SetExpectingReply_Call) Return() *MockAPCI_SetExpectingReply_Call { - _c.Call.Return() - return _c -} - -func (_c *MockAPCI_SetExpectingReply_Call) RunAndReturn(run func(bool)) *MockAPCI_SetExpectingReply_Call { - _c.Call.Return(run) - return _c -} - -// SetNetworkPriority provides a mock function with given fields: _a0 -func (_m *MockAPCI) SetNetworkPriority(_a0 model.NPDUNetworkPriority) { - _m.Called(_a0) -} - -// MockAPCI_SetNetworkPriority_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetNetworkPriority' -type MockAPCI_SetNetworkPriority_Call struct { - *mock.Call -} - -// SetNetworkPriority is a helper method to define mock.On call -// - _a0 model.NPDUNetworkPriority -func (_e *MockAPCI_Expecter) SetNetworkPriority(_a0 interface{}) *MockAPCI_SetNetworkPriority_Call { - return &MockAPCI_SetNetworkPriority_Call{Call: _e.mock.On("SetNetworkPriority", _a0)} -} - -func (_c *MockAPCI_SetNetworkPriority_Call) Run(run func(_a0 model.NPDUNetworkPriority)) *MockAPCI_SetNetworkPriority_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(model.NPDUNetworkPriority)) - }) - return _c -} - -func (_c *MockAPCI_SetNetworkPriority_Call) Return() *MockAPCI_SetNetworkPriority_Call { - _c.Call.Return() - return _c -} - -func (_c *MockAPCI_SetNetworkPriority_Call) RunAndReturn(run func(model.NPDUNetworkPriority)) *MockAPCI_SetNetworkPriority_Call { - _c.Call.Return(run) - return _c -} - -// SetPDUDestination provides a mock function with given fields: _a0 -func (_m *MockAPCI) SetPDUDestination(_a0 *Address) { - _m.Called(_a0) -} - -// MockAPCI_SetPDUDestination_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetPDUDestination' -type MockAPCI_SetPDUDestination_Call struct { - *mock.Call -} - -// SetPDUDestination is a helper method to define mock.On call -// - _a0 *Address -func (_e *MockAPCI_Expecter) SetPDUDestination(_a0 interface{}) *MockAPCI_SetPDUDestination_Call { - return &MockAPCI_SetPDUDestination_Call{Call: _e.mock.On("SetPDUDestination", _a0)} -} - -func (_c *MockAPCI_SetPDUDestination_Call) Run(run func(_a0 *Address)) *MockAPCI_SetPDUDestination_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(*Address)) - }) - return _c -} - -func (_c *MockAPCI_SetPDUDestination_Call) Return() *MockAPCI_SetPDUDestination_Call { - _c.Call.Return() - return _c -} - -func (_c *MockAPCI_SetPDUDestination_Call) RunAndReturn(run func(*Address)) *MockAPCI_SetPDUDestination_Call { - _c.Call.Return(run) - return _c -} - -// SetPDUSource provides a mock function with given fields: source -func (_m *MockAPCI) SetPDUSource(source *Address) { - _m.Called(source) -} - -// MockAPCI_SetPDUSource_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetPDUSource' -type MockAPCI_SetPDUSource_Call struct { - *mock.Call -} - -// SetPDUSource is a helper method to define mock.On call -// - source *Address -func (_e *MockAPCI_Expecter) SetPDUSource(source interface{}) *MockAPCI_SetPDUSource_Call { - return &MockAPCI_SetPDUSource_Call{Call: _e.mock.On("SetPDUSource", source)} -} - -func (_c *MockAPCI_SetPDUSource_Call) Run(run func(source *Address)) *MockAPCI_SetPDUSource_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(*Address)) - }) - return _c -} - -func (_c *MockAPCI_SetPDUSource_Call) Return() *MockAPCI_SetPDUSource_Call { - _c.Call.Return() - return _c -} - -func (_c *MockAPCI_SetPDUSource_Call) RunAndReturn(run func(*Address)) *MockAPCI_SetPDUSource_Call { - _c.Call.Return(run) - return _c -} - -// SetPDUUserData provides a mock function with given fields: _a0 -func (_m *MockAPCI) SetPDUUserData(_a0 spi.Message) { - _m.Called(_a0) -} - -// MockAPCI_SetPDUUserData_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetPDUUserData' -type MockAPCI_SetPDUUserData_Call struct { - *mock.Call -} - -// SetPDUUserData is a helper method to define mock.On call -// - _a0 spi.Message -func (_e *MockAPCI_Expecter) SetPDUUserData(_a0 interface{}) *MockAPCI_SetPDUUserData_Call { - return &MockAPCI_SetPDUUserData_Call{Call: _e.mock.On("SetPDUUserData", _a0)} -} - -func (_c *MockAPCI_SetPDUUserData_Call) Run(run func(_a0 spi.Message)) *MockAPCI_SetPDUUserData_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(spi.Message)) - }) - return _c -} - -func (_c *MockAPCI_SetPDUUserData_Call) Return() *MockAPCI_SetPDUUserData_Call { - _c.Call.Return() - return _c -} - -func (_c *MockAPCI_SetPDUUserData_Call) RunAndReturn(run func(spi.Message)) *MockAPCI_SetPDUUserData_Call { - _c.Call.Return(run) - return _c -} - -// String provides a mock function with given fields: -func (_m *MockAPCI) String() string { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for String") - } - - var r0 string - if rf, ok := ret.Get(0).(func() string); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(string) - } - - return r0 -} - -// MockAPCI_String_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'String' -type MockAPCI_String_Call struct { - *mock.Call -} - -// String is a helper method to define mock.On call -func (_e *MockAPCI_Expecter) String() *MockAPCI_String_Call { - return &MockAPCI_String_Call{Call: _e.mock.On("String")} -} - -func (_c *MockAPCI_String_Call) Run(run func()) *MockAPCI_String_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockAPCI_String_Call) Return(_a0 string) *MockAPCI_String_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockAPCI_String_Call) RunAndReturn(run func() string) *MockAPCI_String_Call { - _c.Call.Return(run) - return _c -} - -// Update provides a mock function with given fields: pci -func (_m *MockAPCI) Update(pci Arg) error { - ret := _m.Called(pci) - - if len(ret) == 0 { - panic("no return value specified for Update") - } - - var r0 error - if rf, ok := ret.Get(0).(func(Arg) error); ok { - r0 = rf(pci) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockAPCI_Update_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Update' -type MockAPCI_Update_Call struct { - *mock.Call -} - -// Update is a helper method to define mock.On call -// - pci Arg -func (_e *MockAPCI_Expecter) Update(pci interface{}) *MockAPCI_Update_Call { - return &MockAPCI_Update_Call{Call: _e.mock.On("Update", pci)} -} - -func (_c *MockAPCI_Update_Call) Run(run func(pci Arg)) *MockAPCI_Update_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(Arg)) - }) - return _c -} - -func (_c *MockAPCI_Update_Call) Return(_a0 error) *MockAPCI_Update_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockAPCI_Update_Call) RunAndReturn(run func(Arg) error) *MockAPCI_Update_Call { - _c.Call.Return(run) - return _c -} - -// getAPDU provides a mock function with given fields: -func (_m *MockAPCI) getAPDU() model.APDU { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for getAPDU") - } - - var r0 model.APDU - if rf, ok := ret.Get(0).(func() model.APDU); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(model.APDU) - } - } - - return r0 -} - -// MockAPCI_getAPDU_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'getAPDU' -type MockAPCI_getAPDU_Call struct { - *mock.Call -} - -// getAPDU is a helper method to define mock.On call -func (_e *MockAPCI_Expecter) getAPDU() *MockAPCI_getAPDU_Call { - return &MockAPCI_getAPDU_Call{Call: _e.mock.On("getAPDU")} -} - -func (_c *MockAPCI_getAPDU_Call) Run(run func()) *MockAPCI_getAPDU_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockAPCI_getAPDU_Call) Return(_a0 model.APDU) *MockAPCI_getAPDU_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockAPCI_getAPDU_Call) RunAndReturn(run func() model.APDU) *MockAPCI_getAPDU_Call { - _c.Call.Return(run) - return _c -} - -// setAPDU provides a mock function with given fields: _a0 -func (_m *MockAPCI) setAPDU(_a0 model.APDU) { - _m.Called(_a0) -} - -// MockAPCI_setAPDU_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'setAPDU' -type MockAPCI_setAPDU_Call struct { - *mock.Call -} - -// setAPDU is a helper method to define mock.On call -// - _a0 model.APDU -func (_e *MockAPCI_Expecter) setAPDU(_a0 interface{}) *MockAPCI_setAPDU_Call { - return &MockAPCI_setAPDU_Call{Call: _e.mock.On("setAPDU", _a0)} -} - -func (_c *MockAPCI_setAPDU_Call) Run(run func(_a0 model.APDU)) *MockAPCI_setAPDU_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(model.APDU)) - }) - return _c -} - -func (_c *MockAPCI_setAPDU_Call) Return() *MockAPCI_setAPDU_Call { - _c.Call.Return() - return _c -} - -func (_c *MockAPCI_setAPDU_Call) RunAndReturn(run func(model.APDU)) *MockAPCI_setAPDU_Call { - _c.Call.Return(run) - return _c -} - -// NewMockAPCI creates a new instance of MockAPCI. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewMockAPCI(t interface { - mock.TestingT - Cleanup(func()) -}) *MockAPCI { - mock := &MockAPCI{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/plc4go/internal/bacnetip/mock_APDU_test.go b/plc4go/internal/bacnetip/mock_APDU_test.go deleted file mode 100644 index 64fe1528151..00000000000 --- a/plc4go/internal/bacnetip/mock_APDU_test.go +++ /dev/null @@ -1,1502 +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 - * - * https://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. - */ - -// Code generated by mockery v2.42.2. DO NOT EDIT. - -package bacnetip - -import ( - context "context" - - model "github.com/apache/plc4x/plc4go/protocols/bacnetip/readwrite/model" - mock "github.com/stretchr/testify/mock" - - spi "github.com/apache/plc4x/plc4go/spi" - - utils "github.com/apache/plc4x/plc4go/spi/utils" -) - -// MockAPDU is an autogenerated mock type for the APDU type -type MockAPDU struct { - mock.Mock -} - -type MockAPDU_Expecter struct { - mock *mock.Mock -} - -func (_m *MockAPDU) EXPECT() *MockAPDU_Expecter { - return &MockAPDU_Expecter{mock: &_m.Mock} -} - -// Decode provides a mock function with given fields: pdu -func (_m *MockAPDU) Decode(pdu Arg) error { - ret := _m.Called(pdu) - - if len(ret) == 0 { - panic("no return value specified for Decode") - } - - var r0 error - if rf, ok := ret.Get(0).(func(Arg) error); ok { - r0 = rf(pdu) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockAPDU_Decode_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Decode' -type MockAPDU_Decode_Call struct { - *mock.Call -} - -// Decode is a helper method to define mock.On call -// - pdu Arg -func (_e *MockAPDU_Expecter) Decode(pdu interface{}) *MockAPDU_Decode_Call { - return &MockAPDU_Decode_Call{Call: _e.mock.On("Decode", pdu)} -} - -func (_c *MockAPDU_Decode_Call) Run(run func(pdu Arg)) *MockAPDU_Decode_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(Arg)) - }) - return _c -} - -func (_c *MockAPDU_Decode_Call) Return(_a0 error) *MockAPDU_Decode_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockAPDU_Decode_Call) RunAndReturn(run func(Arg) error) *MockAPDU_Decode_Call { - _c.Call.Return(run) - return _c -} - -// Encode provides a mock function with given fields: pdu -func (_m *MockAPDU) Encode(pdu Arg) error { - ret := _m.Called(pdu) - - if len(ret) == 0 { - panic("no return value specified for Encode") - } - - var r0 error - if rf, ok := ret.Get(0).(func(Arg) error); ok { - r0 = rf(pdu) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockAPDU_Encode_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Encode' -type MockAPDU_Encode_Call struct { - *mock.Call -} - -// Encode is a helper method to define mock.On call -// - pdu Arg -func (_e *MockAPDU_Expecter) Encode(pdu interface{}) *MockAPDU_Encode_Call { - return &MockAPDU_Encode_Call{Call: _e.mock.On("Encode", pdu)} -} - -func (_c *MockAPDU_Encode_Call) Run(run func(pdu Arg)) *MockAPDU_Encode_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(Arg)) - }) - return _c -} - -func (_c *MockAPDU_Encode_Call) Return(_a0 error) *MockAPDU_Encode_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockAPDU_Encode_Call) RunAndReturn(run func(Arg) error) *MockAPDU_Encode_Call { - _c.Call.Return(run) - return _c -} - -// Get provides a mock function with given fields: -func (_m *MockAPDU) Get() (byte, error) { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Get") - } - - var r0 byte - var r1 error - if rf, ok := ret.Get(0).(func() (byte, error)); ok { - return rf() - } - if rf, ok := ret.Get(0).(func() byte); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(byte) - } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockAPDU_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' -type MockAPDU_Get_Call struct { - *mock.Call -} - -// Get is a helper method to define mock.On call -func (_e *MockAPDU_Expecter) Get() *MockAPDU_Get_Call { - return &MockAPDU_Get_Call{Call: _e.mock.On("Get")} -} - -func (_c *MockAPDU_Get_Call) Run(run func()) *MockAPDU_Get_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockAPDU_Get_Call) Return(_a0 byte, _a1 error) *MockAPDU_Get_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockAPDU_Get_Call) RunAndReturn(run func() (byte, error)) *MockAPDU_Get_Call { - _c.Call.Return(run) - return _c -} - -// GetApduInvokeID provides a mock function with given fields: -func (_m *MockAPDU) GetApduInvokeID() *uint8 { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetApduInvokeID") - } - - var r0 *uint8 - if rf, ok := ret.Get(0).(func() *uint8); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*uint8) - } - } - - return r0 -} - -// MockAPDU_GetApduInvokeID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetApduInvokeID' -type MockAPDU_GetApduInvokeID_Call struct { - *mock.Call -} - -// GetApduInvokeID is a helper method to define mock.On call -func (_e *MockAPDU_Expecter) GetApduInvokeID() *MockAPDU_GetApduInvokeID_Call { - return &MockAPDU_GetApduInvokeID_Call{Call: _e.mock.On("GetApduInvokeID")} -} - -func (_c *MockAPDU_GetApduInvokeID_Call) Run(run func()) *MockAPDU_GetApduInvokeID_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockAPDU_GetApduInvokeID_Call) Return(_a0 *uint8) *MockAPDU_GetApduInvokeID_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockAPDU_GetApduInvokeID_Call) RunAndReturn(run func() *uint8) *MockAPDU_GetApduInvokeID_Call { - _c.Call.Return(run) - return _c -} - -// GetApduType provides a mock function with given fields: -func (_m *MockAPDU) GetApduType() model.ApduType { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetApduType") - } - - var r0 model.ApduType - if rf, ok := ret.Get(0).(func() model.ApduType); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(model.ApduType) - } - - return r0 -} - -// MockAPDU_GetApduType_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetApduType' -type MockAPDU_GetApduType_Call struct { - *mock.Call -} - -// GetApduType is a helper method to define mock.On call -func (_e *MockAPDU_Expecter) GetApduType() *MockAPDU_GetApduType_Call { - return &MockAPDU_GetApduType_Call{Call: _e.mock.On("GetApduType")} -} - -func (_c *MockAPDU_GetApduType_Call) Run(run func()) *MockAPDU_GetApduType_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockAPDU_GetApduType_Call) Return(_a0 model.ApduType) *MockAPDU_GetApduType_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockAPDU_GetApduType_Call) RunAndReturn(run func() model.ApduType) *MockAPDU_GetApduType_Call { - _c.Call.Return(run) - return _c -} - -// GetData provides a mock function with given fields: dlen -func (_m *MockAPDU) GetData(dlen int) ([]byte, error) { - ret := _m.Called(dlen) - - if len(ret) == 0 { - panic("no return value specified for GetData") - } - - var r0 []byte - var r1 error - if rf, ok := ret.Get(0).(func(int) ([]byte, error)); ok { - return rf(dlen) - } - if rf, ok := ret.Get(0).(func(int) []byte); ok { - r0 = rf(dlen) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]byte) - } - } - - if rf, ok := ret.Get(1).(func(int) error); ok { - r1 = rf(dlen) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockAPDU_GetData_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetData' -type MockAPDU_GetData_Call struct { - *mock.Call -} - -// GetData is a helper method to define mock.On call -// - dlen int -func (_e *MockAPDU_Expecter) GetData(dlen interface{}) *MockAPDU_GetData_Call { - return &MockAPDU_GetData_Call{Call: _e.mock.On("GetData", dlen)} -} - -func (_c *MockAPDU_GetData_Call) Run(run func(dlen int)) *MockAPDU_GetData_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(int)) - }) - return _c -} - -func (_c *MockAPDU_GetData_Call) Return(_a0 []byte, _a1 error) *MockAPDU_GetData_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockAPDU_GetData_Call) RunAndReturn(run func(int) ([]byte, error)) *MockAPDU_GetData_Call { - _c.Call.Return(run) - return _c -} - -// GetExpectingReply provides a mock function with given fields: -func (_m *MockAPDU) GetExpectingReply() bool { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetExpectingReply") - } - - var r0 bool - if rf, ok := ret.Get(0).(func() bool); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(bool) - } - - return r0 -} - -// MockAPDU_GetExpectingReply_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetExpectingReply' -type MockAPDU_GetExpectingReply_Call struct { - *mock.Call -} - -// GetExpectingReply is a helper method to define mock.On call -func (_e *MockAPDU_Expecter) GetExpectingReply() *MockAPDU_GetExpectingReply_Call { - return &MockAPDU_GetExpectingReply_Call{Call: _e.mock.On("GetExpectingReply")} -} - -func (_c *MockAPDU_GetExpectingReply_Call) Run(run func()) *MockAPDU_GetExpectingReply_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockAPDU_GetExpectingReply_Call) Return(_a0 bool) *MockAPDU_GetExpectingReply_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockAPDU_GetExpectingReply_Call) RunAndReturn(run func() bool) *MockAPDU_GetExpectingReply_Call { - _c.Call.Return(run) - return _c -} - -// GetLengthInBits provides a mock function with given fields: ctx -func (_m *MockAPDU) GetLengthInBits(ctx context.Context) uint16 { - ret := _m.Called(ctx) - - if len(ret) == 0 { - panic("no return value specified for GetLengthInBits") - } - - var r0 uint16 - if rf, ok := ret.Get(0).(func(context.Context) uint16); ok { - r0 = rf(ctx) - } else { - r0 = ret.Get(0).(uint16) - } - - return r0 -} - -// MockAPDU_GetLengthInBits_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetLengthInBits' -type MockAPDU_GetLengthInBits_Call struct { - *mock.Call -} - -// GetLengthInBits is a helper method to define mock.On call -// - ctx context.Context -func (_e *MockAPDU_Expecter) GetLengthInBits(ctx interface{}) *MockAPDU_GetLengthInBits_Call { - return &MockAPDU_GetLengthInBits_Call{Call: _e.mock.On("GetLengthInBits", ctx)} -} - -func (_c *MockAPDU_GetLengthInBits_Call) Run(run func(ctx context.Context)) *MockAPDU_GetLengthInBits_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context)) - }) - return _c -} - -func (_c *MockAPDU_GetLengthInBits_Call) Return(_a0 uint16) *MockAPDU_GetLengthInBits_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockAPDU_GetLengthInBits_Call) RunAndReturn(run func(context.Context) uint16) *MockAPDU_GetLengthInBits_Call { - _c.Call.Return(run) - return _c -} - -// GetLengthInBytes provides a mock function with given fields: ctx -func (_m *MockAPDU) GetLengthInBytes(ctx context.Context) uint16 { - ret := _m.Called(ctx) - - if len(ret) == 0 { - panic("no return value specified for GetLengthInBytes") - } - - var r0 uint16 - if rf, ok := ret.Get(0).(func(context.Context) uint16); ok { - r0 = rf(ctx) - } else { - r0 = ret.Get(0).(uint16) - } - - return r0 -} - -// MockAPDU_GetLengthInBytes_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetLengthInBytes' -type MockAPDU_GetLengthInBytes_Call struct { - *mock.Call -} - -// GetLengthInBytes is a helper method to define mock.On call -// - ctx context.Context -func (_e *MockAPDU_Expecter) GetLengthInBytes(ctx interface{}) *MockAPDU_GetLengthInBytes_Call { - return &MockAPDU_GetLengthInBytes_Call{Call: _e.mock.On("GetLengthInBytes", ctx)} -} - -func (_c *MockAPDU_GetLengthInBytes_Call) Run(run func(ctx context.Context)) *MockAPDU_GetLengthInBytes_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context)) - }) - return _c -} - -func (_c *MockAPDU_GetLengthInBytes_Call) Return(_a0 uint16) *MockAPDU_GetLengthInBytes_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockAPDU_GetLengthInBytes_Call) RunAndReturn(run func(context.Context) uint16) *MockAPDU_GetLengthInBytes_Call { - _c.Call.Return(run) - return _c -} - -// GetLong provides a mock function with given fields: -func (_m *MockAPDU) GetLong() (int64, error) { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetLong") - } - - var r0 int64 - var r1 error - if rf, ok := ret.Get(0).(func() (int64, error)); ok { - return rf() - } - if rf, ok := ret.Get(0).(func() int64); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(int64) - } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockAPDU_GetLong_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetLong' -type MockAPDU_GetLong_Call struct { - *mock.Call -} - -// GetLong is a helper method to define mock.On call -func (_e *MockAPDU_Expecter) GetLong() *MockAPDU_GetLong_Call { - return &MockAPDU_GetLong_Call{Call: _e.mock.On("GetLong")} -} - -func (_c *MockAPDU_GetLong_Call) Run(run func()) *MockAPDU_GetLong_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockAPDU_GetLong_Call) Return(_a0 int64, _a1 error) *MockAPDU_GetLong_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockAPDU_GetLong_Call) RunAndReturn(run func() (int64, error)) *MockAPDU_GetLong_Call { - _c.Call.Return(run) - return _c -} - -// GetNetworkPriority provides a mock function with given fields: -func (_m *MockAPDU) GetNetworkPriority() model.NPDUNetworkPriority { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetNetworkPriority") - } - - var r0 model.NPDUNetworkPriority - if rf, ok := ret.Get(0).(func() model.NPDUNetworkPriority); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(model.NPDUNetworkPriority) - } - - return r0 -} - -// MockAPDU_GetNetworkPriority_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetNetworkPriority' -type MockAPDU_GetNetworkPriority_Call struct { - *mock.Call -} - -// GetNetworkPriority is a helper method to define mock.On call -func (_e *MockAPDU_Expecter) GetNetworkPriority() *MockAPDU_GetNetworkPriority_Call { - return &MockAPDU_GetNetworkPriority_Call{Call: _e.mock.On("GetNetworkPriority")} -} - -func (_c *MockAPDU_GetNetworkPriority_Call) Run(run func()) *MockAPDU_GetNetworkPriority_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockAPDU_GetNetworkPriority_Call) Return(_a0 model.NPDUNetworkPriority) *MockAPDU_GetNetworkPriority_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockAPDU_GetNetworkPriority_Call) RunAndReturn(run func() model.NPDUNetworkPriority) *MockAPDU_GetNetworkPriority_Call { - _c.Call.Return(run) - return _c -} - -// GetPDUDestination provides a mock function with given fields: -func (_m *MockAPDU) GetPDUDestination() *Address { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetPDUDestination") - } - - var r0 *Address - if rf, ok := ret.Get(0).(func() *Address); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*Address) - } - } - - return r0 -} - -// MockAPDU_GetPDUDestination_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPDUDestination' -type MockAPDU_GetPDUDestination_Call struct { - *mock.Call -} - -// GetPDUDestination is a helper method to define mock.On call -func (_e *MockAPDU_Expecter) GetPDUDestination() *MockAPDU_GetPDUDestination_Call { - return &MockAPDU_GetPDUDestination_Call{Call: _e.mock.On("GetPDUDestination")} -} - -func (_c *MockAPDU_GetPDUDestination_Call) Run(run func()) *MockAPDU_GetPDUDestination_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockAPDU_GetPDUDestination_Call) Return(_a0 *Address) *MockAPDU_GetPDUDestination_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockAPDU_GetPDUDestination_Call) RunAndReturn(run func() *Address) *MockAPDU_GetPDUDestination_Call { - _c.Call.Return(run) - return _c -} - -// GetPDUSource provides a mock function with given fields: -func (_m *MockAPDU) GetPDUSource() *Address { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetPDUSource") - } - - var r0 *Address - if rf, ok := ret.Get(0).(func() *Address); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*Address) - } - } - - return r0 -} - -// MockAPDU_GetPDUSource_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPDUSource' -type MockAPDU_GetPDUSource_Call struct { - *mock.Call -} - -// GetPDUSource is a helper method to define mock.On call -func (_e *MockAPDU_Expecter) GetPDUSource() *MockAPDU_GetPDUSource_Call { - return &MockAPDU_GetPDUSource_Call{Call: _e.mock.On("GetPDUSource")} -} - -func (_c *MockAPDU_GetPDUSource_Call) Run(run func()) *MockAPDU_GetPDUSource_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockAPDU_GetPDUSource_Call) Return(_a0 *Address) *MockAPDU_GetPDUSource_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockAPDU_GetPDUSource_Call) RunAndReturn(run func() *Address) *MockAPDU_GetPDUSource_Call { - _c.Call.Return(run) - return _c -} - -// GetPDUUserData provides a mock function with given fields: -func (_m *MockAPDU) GetPDUUserData() spi.Message { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetPDUUserData") - } - - var r0 spi.Message - if rf, ok := ret.Get(0).(func() spi.Message); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(spi.Message) - } - } - - return r0 -} - -// MockAPDU_GetPDUUserData_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPDUUserData' -type MockAPDU_GetPDUUserData_Call struct { - *mock.Call -} - -// GetPDUUserData is a helper method to define mock.On call -func (_e *MockAPDU_Expecter) GetPDUUserData() *MockAPDU_GetPDUUserData_Call { - return &MockAPDU_GetPDUUserData_Call{Call: _e.mock.On("GetPDUUserData")} -} - -func (_c *MockAPDU_GetPDUUserData_Call) Run(run func()) *MockAPDU_GetPDUUserData_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockAPDU_GetPDUUserData_Call) Return(_a0 spi.Message) *MockAPDU_GetPDUUserData_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockAPDU_GetPDUUserData_Call) RunAndReturn(run func() spi.Message) *MockAPDU_GetPDUUserData_Call { - _c.Call.Return(run) - return _c -} - -// GetPduData provides a mock function with given fields: -func (_m *MockAPDU) GetPduData() []byte { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetPduData") - } - - var r0 []byte - if rf, ok := ret.Get(0).(func() []byte); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]byte) - } - } - - return r0 -} - -// MockAPDU_GetPduData_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPduData' -type MockAPDU_GetPduData_Call struct { - *mock.Call -} - -// GetPduData is a helper method to define mock.On call -func (_e *MockAPDU_Expecter) GetPduData() *MockAPDU_GetPduData_Call { - return &MockAPDU_GetPduData_Call{Call: _e.mock.On("GetPduData")} -} - -func (_c *MockAPDU_GetPduData_Call) Run(run func()) *MockAPDU_GetPduData_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockAPDU_GetPduData_Call) Return(_a0 []byte) *MockAPDU_GetPduData_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockAPDU_GetPduData_Call) RunAndReturn(run func() []byte) *MockAPDU_GetPduData_Call { - _c.Call.Return(run) - return _c -} - -// GetRootMessage provides a mock function with given fields: -func (_m *MockAPDU) GetRootMessage() spi.Message { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetRootMessage") - } - - var r0 spi.Message - if rf, ok := ret.Get(0).(func() spi.Message); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(spi.Message) - } - } - - return r0 -} - -// MockAPDU_GetRootMessage_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRootMessage' -type MockAPDU_GetRootMessage_Call struct { - *mock.Call -} - -// GetRootMessage is a helper method to define mock.On call -func (_e *MockAPDU_Expecter) GetRootMessage() *MockAPDU_GetRootMessage_Call { - return &MockAPDU_GetRootMessage_Call{Call: _e.mock.On("GetRootMessage")} -} - -func (_c *MockAPDU_GetRootMessage_Call) Run(run func()) *MockAPDU_GetRootMessage_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockAPDU_GetRootMessage_Call) Return(_a0 spi.Message) *MockAPDU_GetRootMessage_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockAPDU_GetRootMessage_Call) RunAndReturn(run func() spi.Message) *MockAPDU_GetRootMessage_Call { - _c.Call.Return(run) - return _c -} - -// GetShort provides a mock function with given fields: -func (_m *MockAPDU) GetShort() (int16, error) { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetShort") - } - - var r0 int16 - var r1 error - if rf, ok := ret.Get(0).(func() (int16, error)); ok { - return rf() - } - if rf, ok := ret.Get(0).(func() int16); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(int16) - } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockAPDU_GetShort_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetShort' -type MockAPDU_GetShort_Call struct { - *mock.Call -} - -// GetShort is a helper method to define mock.On call -func (_e *MockAPDU_Expecter) GetShort() *MockAPDU_GetShort_Call { - return &MockAPDU_GetShort_Call{Call: _e.mock.On("GetShort")} -} - -func (_c *MockAPDU_GetShort_Call) Run(run func()) *MockAPDU_GetShort_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockAPDU_GetShort_Call) Return(_a0 int16, _a1 error) *MockAPDU_GetShort_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockAPDU_GetShort_Call) RunAndReturn(run func() (int16, error)) *MockAPDU_GetShort_Call { - _c.Call.Return(run) - return _c -} - -// Put provides a mock function with given fields: _a0 -func (_m *MockAPDU) Put(_a0 byte) { - _m.Called(_a0) -} - -// MockAPDU_Put_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Put' -type MockAPDU_Put_Call struct { - *mock.Call -} - -// Put is a helper method to define mock.On call -// - _a0 byte -func (_e *MockAPDU_Expecter) Put(_a0 interface{}) *MockAPDU_Put_Call { - return &MockAPDU_Put_Call{Call: _e.mock.On("Put", _a0)} -} - -func (_c *MockAPDU_Put_Call) Run(run func(_a0 byte)) *MockAPDU_Put_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(byte)) - }) - return _c -} - -func (_c *MockAPDU_Put_Call) Return() *MockAPDU_Put_Call { - _c.Call.Return() - return _c -} - -func (_c *MockAPDU_Put_Call) RunAndReturn(run func(byte)) *MockAPDU_Put_Call { - _c.Call.Return(run) - return _c -} - -// PutData provides a mock function with given fields: _a0 -func (_m *MockAPDU) PutData(_a0 ...byte) { - _va := make([]interface{}, len(_a0)) - for _i := range _a0 { - _va[_i] = _a0[_i] - } - var _ca []interface{} - _ca = append(_ca, _va...) - _m.Called(_ca...) -} - -// MockAPDU_PutData_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PutData' -type MockAPDU_PutData_Call struct { - *mock.Call -} - -// PutData is a helper method to define mock.On call -// - _a0 ...byte -func (_e *MockAPDU_Expecter) PutData(_a0 ...interface{}) *MockAPDU_PutData_Call { - return &MockAPDU_PutData_Call{Call: _e.mock.On("PutData", - append([]interface{}{}, _a0...)...)} -} - -func (_c *MockAPDU_PutData_Call) Run(run func(_a0 ...byte)) *MockAPDU_PutData_Call { - _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]byte, len(args)-0) - for i, a := range args[0:] { - if a != nil { - variadicArgs[i] = a.(byte) - } - } - run(variadicArgs...) - }) - return _c -} - -func (_c *MockAPDU_PutData_Call) Return() *MockAPDU_PutData_Call { - _c.Call.Return() - return _c -} - -func (_c *MockAPDU_PutData_Call) RunAndReturn(run func(...byte)) *MockAPDU_PutData_Call { - _c.Call.Return(run) - return _c -} - -// PutLong provides a mock function with given fields: _a0 -func (_m *MockAPDU) PutLong(_a0 uint32) { - _m.Called(_a0) -} - -// MockAPDU_PutLong_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PutLong' -type MockAPDU_PutLong_Call struct { - *mock.Call -} - -// PutLong is a helper method to define mock.On call -// - _a0 uint32 -func (_e *MockAPDU_Expecter) PutLong(_a0 interface{}) *MockAPDU_PutLong_Call { - return &MockAPDU_PutLong_Call{Call: _e.mock.On("PutLong", _a0)} -} - -func (_c *MockAPDU_PutLong_Call) Run(run func(_a0 uint32)) *MockAPDU_PutLong_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(uint32)) - }) - return _c -} - -func (_c *MockAPDU_PutLong_Call) Return() *MockAPDU_PutLong_Call { - _c.Call.Return() - return _c -} - -func (_c *MockAPDU_PutLong_Call) RunAndReturn(run func(uint32)) *MockAPDU_PutLong_Call { - _c.Call.Return(run) - return _c -} - -// PutShort provides a mock function with given fields: _a0 -func (_m *MockAPDU) PutShort(_a0 uint16) { - _m.Called(_a0) -} - -// MockAPDU_PutShort_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PutShort' -type MockAPDU_PutShort_Call struct { - *mock.Call -} - -// PutShort is a helper method to define mock.On call -// - _a0 uint16 -func (_e *MockAPDU_Expecter) PutShort(_a0 interface{}) *MockAPDU_PutShort_Call { - return &MockAPDU_PutShort_Call{Call: _e.mock.On("PutShort", _a0)} -} - -func (_c *MockAPDU_PutShort_Call) Run(run func(_a0 uint16)) *MockAPDU_PutShort_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(uint16)) - }) - return _c -} - -func (_c *MockAPDU_PutShort_Call) Return() *MockAPDU_PutShort_Call { - _c.Call.Return() - return _c -} - -func (_c *MockAPDU_PutShort_Call) RunAndReturn(run func(uint16)) *MockAPDU_PutShort_Call { - _c.Call.Return(run) - return _c -} - -// Serialize provides a mock function with given fields: -func (_m *MockAPDU) Serialize() ([]byte, error) { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Serialize") - } - - var r0 []byte - var r1 error - if rf, ok := ret.Get(0).(func() ([]byte, error)); ok { - return rf() - } - if rf, ok := ret.Get(0).(func() []byte); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]byte) - } - } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockAPDU_Serialize_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Serialize' -type MockAPDU_Serialize_Call struct { - *mock.Call -} - -// Serialize is a helper method to define mock.On call -func (_e *MockAPDU_Expecter) Serialize() *MockAPDU_Serialize_Call { - return &MockAPDU_Serialize_Call{Call: _e.mock.On("Serialize")} -} - -func (_c *MockAPDU_Serialize_Call) Run(run func()) *MockAPDU_Serialize_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockAPDU_Serialize_Call) Return(_a0 []byte, _a1 error) *MockAPDU_Serialize_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockAPDU_Serialize_Call) RunAndReturn(run func() ([]byte, error)) *MockAPDU_Serialize_Call { - _c.Call.Return(run) - return _c -} - -// SerializeWithWriteBuffer provides a mock function with given fields: ctx, writeBuffer -func (_m *MockAPDU) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { - ret := _m.Called(ctx, writeBuffer) - - if len(ret) == 0 { - panic("no return value specified for SerializeWithWriteBuffer") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, utils.WriteBuffer) error); ok { - r0 = rf(ctx, writeBuffer) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockAPDU_SerializeWithWriteBuffer_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SerializeWithWriteBuffer' -type MockAPDU_SerializeWithWriteBuffer_Call struct { - *mock.Call -} - -// SerializeWithWriteBuffer is a helper method to define mock.On call -// - ctx context.Context -// - writeBuffer utils.WriteBuffer -func (_e *MockAPDU_Expecter) SerializeWithWriteBuffer(ctx interface{}, writeBuffer interface{}) *MockAPDU_SerializeWithWriteBuffer_Call { - return &MockAPDU_SerializeWithWriteBuffer_Call{Call: _e.mock.On("SerializeWithWriteBuffer", ctx, writeBuffer)} -} - -func (_c *MockAPDU_SerializeWithWriteBuffer_Call) Run(run func(ctx context.Context, writeBuffer utils.WriteBuffer)) *MockAPDU_SerializeWithWriteBuffer_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(utils.WriteBuffer)) - }) - return _c -} - -func (_c *MockAPDU_SerializeWithWriteBuffer_Call) Return(_a0 error) *MockAPDU_SerializeWithWriteBuffer_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockAPDU_SerializeWithWriteBuffer_Call) RunAndReturn(run func(context.Context, utils.WriteBuffer) error) *MockAPDU_SerializeWithWriteBuffer_Call { - _c.Call.Return(run) - return _c -} - -// SetExpectingReply provides a mock function with given fields: _a0 -func (_m *MockAPDU) SetExpectingReply(_a0 bool) { - _m.Called(_a0) -} - -// MockAPDU_SetExpectingReply_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetExpectingReply' -type MockAPDU_SetExpectingReply_Call struct { - *mock.Call -} - -// SetExpectingReply is a helper method to define mock.On call -// - _a0 bool -func (_e *MockAPDU_Expecter) SetExpectingReply(_a0 interface{}) *MockAPDU_SetExpectingReply_Call { - return &MockAPDU_SetExpectingReply_Call{Call: _e.mock.On("SetExpectingReply", _a0)} -} - -func (_c *MockAPDU_SetExpectingReply_Call) Run(run func(_a0 bool)) *MockAPDU_SetExpectingReply_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(bool)) - }) - return _c -} - -func (_c *MockAPDU_SetExpectingReply_Call) Return() *MockAPDU_SetExpectingReply_Call { - _c.Call.Return() - return _c -} - -func (_c *MockAPDU_SetExpectingReply_Call) RunAndReturn(run func(bool)) *MockAPDU_SetExpectingReply_Call { - _c.Call.Return(run) - return _c -} - -// SetNetworkPriority provides a mock function with given fields: _a0 -func (_m *MockAPDU) SetNetworkPriority(_a0 model.NPDUNetworkPriority) { - _m.Called(_a0) -} - -// MockAPDU_SetNetworkPriority_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetNetworkPriority' -type MockAPDU_SetNetworkPriority_Call struct { - *mock.Call -} - -// SetNetworkPriority is a helper method to define mock.On call -// - _a0 model.NPDUNetworkPriority -func (_e *MockAPDU_Expecter) SetNetworkPriority(_a0 interface{}) *MockAPDU_SetNetworkPriority_Call { - return &MockAPDU_SetNetworkPriority_Call{Call: _e.mock.On("SetNetworkPriority", _a0)} -} - -func (_c *MockAPDU_SetNetworkPriority_Call) Run(run func(_a0 model.NPDUNetworkPriority)) *MockAPDU_SetNetworkPriority_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(model.NPDUNetworkPriority)) - }) - return _c -} - -func (_c *MockAPDU_SetNetworkPriority_Call) Return() *MockAPDU_SetNetworkPriority_Call { - _c.Call.Return() - return _c -} - -func (_c *MockAPDU_SetNetworkPriority_Call) RunAndReturn(run func(model.NPDUNetworkPriority)) *MockAPDU_SetNetworkPriority_Call { - _c.Call.Return(run) - return _c -} - -// SetPDUDestination provides a mock function with given fields: _a0 -func (_m *MockAPDU) SetPDUDestination(_a0 *Address) { - _m.Called(_a0) -} - -// MockAPDU_SetPDUDestination_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetPDUDestination' -type MockAPDU_SetPDUDestination_Call struct { - *mock.Call -} - -// SetPDUDestination is a helper method to define mock.On call -// - _a0 *Address -func (_e *MockAPDU_Expecter) SetPDUDestination(_a0 interface{}) *MockAPDU_SetPDUDestination_Call { - return &MockAPDU_SetPDUDestination_Call{Call: _e.mock.On("SetPDUDestination", _a0)} -} - -func (_c *MockAPDU_SetPDUDestination_Call) Run(run func(_a0 *Address)) *MockAPDU_SetPDUDestination_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(*Address)) - }) - return _c -} - -func (_c *MockAPDU_SetPDUDestination_Call) Return() *MockAPDU_SetPDUDestination_Call { - _c.Call.Return() - return _c -} - -func (_c *MockAPDU_SetPDUDestination_Call) RunAndReturn(run func(*Address)) *MockAPDU_SetPDUDestination_Call { - _c.Call.Return(run) - return _c -} - -// SetPDUSource provides a mock function with given fields: source -func (_m *MockAPDU) SetPDUSource(source *Address) { - _m.Called(source) -} - -// MockAPDU_SetPDUSource_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetPDUSource' -type MockAPDU_SetPDUSource_Call struct { - *mock.Call -} - -// SetPDUSource is a helper method to define mock.On call -// - source *Address -func (_e *MockAPDU_Expecter) SetPDUSource(source interface{}) *MockAPDU_SetPDUSource_Call { - return &MockAPDU_SetPDUSource_Call{Call: _e.mock.On("SetPDUSource", source)} -} - -func (_c *MockAPDU_SetPDUSource_Call) Run(run func(source *Address)) *MockAPDU_SetPDUSource_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(*Address)) - }) - return _c -} - -func (_c *MockAPDU_SetPDUSource_Call) Return() *MockAPDU_SetPDUSource_Call { - _c.Call.Return() - return _c -} - -func (_c *MockAPDU_SetPDUSource_Call) RunAndReturn(run func(*Address)) *MockAPDU_SetPDUSource_Call { - _c.Call.Return(run) - return _c -} - -// SetPDUUserData provides a mock function with given fields: _a0 -func (_m *MockAPDU) SetPDUUserData(_a0 spi.Message) { - _m.Called(_a0) -} - -// MockAPDU_SetPDUUserData_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetPDUUserData' -type MockAPDU_SetPDUUserData_Call struct { - *mock.Call -} - -// SetPDUUserData is a helper method to define mock.On call -// - _a0 spi.Message -func (_e *MockAPDU_Expecter) SetPDUUserData(_a0 interface{}) *MockAPDU_SetPDUUserData_Call { - return &MockAPDU_SetPDUUserData_Call{Call: _e.mock.On("SetPDUUserData", _a0)} -} - -func (_c *MockAPDU_SetPDUUserData_Call) Run(run func(_a0 spi.Message)) *MockAPDU_SetPDUUserData_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(spi.Message)) - }) - return _c -} - -func (_c *MockAPDU_SetPDUUserData_Call) Return() *MockAPDU_SetPDUUserData_Call { - _c.Call.Return() - return _c -} - -func (_c *MockAPDU_SetPDUUserData_Call) RunAndReturn(run func(spi.Message)) *MockAPDU_SetPDUUserData_Call { - _c.Call.Return(run) - return _c -} - -// SetPduData provides a mock function with given fields: _a0 -func (_m *MockAPDU) SetPduData(_a0 []byte) { - _m.Called(_a0) -} - -// MockAPDU_SetPduData_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetPduData' -type MockAPDU_SetPduData_Call struct { - *mock.Call -} - -// SetPduData is a helper method to define mock.On call -// - _a0 []byte -func (_e *MockAPDU_Expecter) SetPduData(_a0 interface{}) *MockAPDU_SetPduData_Call { - return &MockAPDU_SetPduData_Call{Call: _e.mock.On("SetPduData", _a0)} -} - -func (_c *MockAPDU_SetPduData_Call) Run(run func(_a0 []byte)) *MockAPDU_SetPduData_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].([]byte)) - }) - return _c -} - -func (_c *MockAPDU_SetPduData_Call) Return() *MockAPDU_SetPduData_Call { - _c.Call.Return() - return _c -} - -func (_c *MockAPDU_SetPduData_Call) RunAndReturn(run func([]byte)) *MockAPDU_SetPduData_Call { - _c.Call.Return(run) - return _c -} - -// String provides a mock function with given fields: -func (_m *MockAPDU) String() string { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for String") - } - - var r0 string - if rf, ok := ret.Get(0).(func() string); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(string) - } - - return r0 -} - -// MockAPDU_String_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'String' -type MockAPDU_String_Call struct { - *mock.Call -} - -// String is a helper method to define mock.On call -func (_e *MockAPDU_Expecter) String() *MockAPDU_String_Call { - return &MockAPDU_String_Call{Call: _e.mock.On("String")} -} - -func (_c *MockAPDU_String_Call) Run(run func()) *MockAPDU_String_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockAPDU_String_Call) Return(_a0 string) *MockAPDU_String_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockAPDU_String_Call) RunAndReturn(run func() string) *MockAPDU_String_Call { - _c.Call.Return(run) - return _c -} - -// Update provides a mock function with given fields: pci -func (_m *MockAPDU) Update(pci Arg) error { - ret := _m.Called(pci) - - if len(ret) == 0 { - panic("no return value specified for Update") - } - - var r0 error - if rf, ok := ret.Get(0).(func(Arg) error); ok { - r0 = rf(pci) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockAPDU_Update_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Update' -type MockAPDU_Update_Call struct { - *mock.Call -} - -// Update is a helper method to define mock.On call -// - pci Arg -func (_e *MockAPDU_Expecter) Update(pci interface{}) *MockAPDU_Update_Call { - return &MockAPDU_Update_Call{Call: _e.mock.On("Update", pci)} -} - -func (_c *MockAPDU_Update_Call) Run(run func(pci Arg)) *MockAPDU_Update_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(Arg)) - }) - return _c -} - -func (_c *MockAPDU_Update_Call) Return(_a0 error) *MockAPDU_Update_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockAPDU_Update_Call) RunAndReturn(run func(Arg) error) *MockAPDU_Update_Call { - _c.Call.Return(run) - return _c -} - -// getAPDU provides a mock function with given fields: -func (_m *MockAPDU) getAPDU() model.APDU { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for getAPDU") - } - - var r0 model.APDU - if rf, ok := ret.Get(0).(func() model.APDU); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(model.APDU) - } - } - - return r0 -} - -// MockAPDU_getAPDU_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'getAPDU' -type MockAPDU_getAPDU_Call struct { - *mock.Call -} - -// getAPDU is a helper method to define mock.On call -func (_e *MockAPDU_Expecter) getAPDU() *MockAPDU_getAPDU_Call { - return &MockAPDU_getAPDU_Call{Call: _e.mock.On("getAPDU")} -} - -func (_c *MockAPDU_getAPDU_Call) Run(run func()) *MockAPDU_getAPDU_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockAPDU_getAPDU_Call) Return(_a0 model.APDU) *MockAPDU_getAPDU_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockAPDU_getAPDU_Call) RunAndReturn(run func() model.APDU) *MockAPDU_getAPDU_Call { - _c.Call.Return(run) - return _c -} - -// setAPDU provides a mock function with given fields: _a0 -func (_m *MockAPDU) setAPDU(_a0 model.APDU) { - _m.Called(_a0) -} - -// MockAPDU_setAPDU_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'setAPDU' -type MockAPDU_setAPDU_Call struct { - *mock.Call -} - -// setAPDU is a helper method to define mock.On call -// - _a0 model.APDU -func (_e *MockAPDU_Expecter) setAPDU(_a0 interface{}) *MockAPDU_setAPDU_Call { - return &MockAPDU_setAPDU_Call{Call: _e.mock.On("setAPDU", _a0)} -} - -func (_c *MockAPDU_setAPDU_Call) Run(run func(_a0 model.APDU)) *MockAPDU_setAPDU_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(model.APDU)) - }) - return _c -} - -func (_c *MockAPDU_setAPDU_Call) Return() *MockAPDU_setAPDU_Call { - _c.Call.Return() - return _c -} - -func (_c *MockAPDU_setAPDU_Call) RunAndReturn(run func(model.APDU)) *MockAPDU_setAPDU_Call { - _c.Call.Return(run) - return _c -} - -// NewMockAPDU creates a new instance of MockAPDU. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewMockAPDU(t interface { - mock.TestingT - Cleanup(func()) -}) *MockAPDU { - mock := &MockAPDU{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/plc4go/internal/bacnetip/mock_AnyContract_test.go b/plc4go/internal/bacnetip/mock_AnyContract_test.go deleted file mode 100644 index 8e5b930f848..00000000000 --- a/plc4go/internal/bacnetip/mock_AnyContract_test.go +++ /dev/null @@ -1,235 +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 - * - * https://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. - */ - -// Code generated by mockery v2.42.2. DO NOT EDIT. - -package bacnetip - -import mock "github.com/stretchr/testify/mock" - -// MockAnyContract is an autogenerated mock type for the AnyContract type -type MockAnyContract struct { - mock.Mock -} - -type MockAnyContract_Expecter struct { - mock *mock.Mock -} - -func (_m *MockAnyContract) EXPECT() *MockAnyContract_Expecter { - return &MockAnyContract_Expecter{mock: &_m.Mock} -} - -// Decode provides a mock function with given fields: taglist -func (_m *MockAnyContract) Decode(taglist TagList) error { - ret := _m.Called(taglist) - - if len(ret) == 0 { - panic("no return value specified for Decode") - } - - var r0 error - if rf, ok := ret.Get(0).(func(TagList) error); ok { - r0 = rf(taglist) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockAnyContract_Decode_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Decode' -type MockAnyContract_Decode_Call struct { - *mock.Call -} - -// Decode is a helper method to define mock.On call -// - taglist TagList -func (_e *MockAnyContract_Expecter) Decode(taglist interface{}) *MockAnyContract_Decode_Call { - return &MockAnyContract_Decode_Call{Call: _e.mock.On("Decode", taglist)} -} - -func (_c *MockAnyContract_Decode_Call) Run(run func(taglist TagList)) *MockAnyContract_Decode_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(TagList)) - }) - return _c -} - -func (_c *MockAnyContract_Decode_Call) Return(_a0 error) *MockAnyContract_Decode_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockAnyContract_Decode_Call) RunAndReturn(run func(TagList) error) *MockAnyContract_Decode_Call { - _c.Call.Return(run) - return _c -} - -// Encode provides a mock function with given fields: taglist -func (_m *MockAnyContract) Encode(taglist TagList) error { - ret := _m.Called(taglist) - - if len(ret) == 0 { - panic("no return value specified for Encode") - } - - var r0 error - if rf, ok := ret.Get(0).(func(TagList) error); ok { - r0 = rf(taglist) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockAnyContract_Encode_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Encode' -type MockAnyContract_Encode_Call struct { - *mock.Call -} - -// Encode is a helper method to define mock.On call -// - taglist TagList -func (_e *MockAnyContract_Expecter) Encode(taglist interface{}) *MockAnyContract_Encode_Call { - return &MockAnyContract_Encode_Call{Call: _e.mock.On("Encode", taglist)} -} - -func (_c *MockAnyContract_Encode_Call) Run(run func(taglist TagList)) *MockAnyContract_Encode_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(TagList)) - }) - return _c -} - -func (_c *MockAnyContract_Encode_Call) Return(_a0 error) *MockAnyContract_Encode_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockAnyContract_Encode_Call) RunAndReturn(run func(TagList) error) *MockAnyContract_Encode_Call { - _c.Call.Return(run) - return _c -} - -// castIn provides a mock function with given fields: arg -func (_m *MockAnyContract) castIn(arg Arg) error { - ret := _m.Called(arg) - - if len(ret) == 0 { - panic("no return value specified for castIn") - } - - var r0 error - if rf, ok := ret.Get(0).(func(Arg) error); ok { - r0 = rf(arg) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockAnyContract_castIn_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'castIn' -type MockAnyContract_castIn_Call struct { - *mock.Call -} - -// castIn is a helper method to define mock.On call -// - arg Arg -func (_e *MockAnyContract_Expecter) castIn(arg interface{}) *MockAnyContract_castIn_Call { - return &MockAnyContract_castIn_Call{Call: _e.mock.On("castIn", arg)} -} - -func (_c *MockAnyContract_castIn_Call) Run(run func(arg Arg)) *MockAnyContract_castIn_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(Arg)) - }) - return _c -} - -func (_c *MockAnyContract_castIn_Call) Return(_a0 error) *MockAnyContract_castIn_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockAnyContract_castIn_Call) RunAndReturn(run func(Arg) error) *MockAnyContract_castIn_Call { - _c.Call.Return(run) - return _c -} - -// castOut provides a mock function with given fields: arg -func (_m *MockAnyContract) castOut(arg Arg) error { - ret := _m.Called(arg) - - if len(ret) == 0 { - panic("no return value specified for castOut") - } - - var r0 error - if rf, ok := ret.Get(0).(func(Arg) error); ok { - r0 = rf(arg) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockAnyContract_castOut_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'castOut' -type MockAnyContract_castOut_Call struct { - *mock.Call -} - -// castOut is a helper method to define mock.On call -// - arg Arg -func (_e *MockAnyContract_Expecter) castOut(arg interface{}) *MockAnyContract_castOut_Call { - return &MockAnyContract_castOut_Call{Call: _e.mock.On("castOut", arg)} -} - -func (_c *MockAnyContract_castOut_Call) Run(run func(arg Arg)) *MockAnyContract_castOut_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(Arg)) - }) - return _c -} - -func (_c *MockAnyContract_castOut_Call) Return(_a0 error) *MockAnyContract_castOut_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockAnyContract_castOut_Call) RunAndReturn(run func(Arg) error) *MockAnyContract_castOut_Call { - _c.Call.Return(run) - return _c -} - -// NewMockAnyContract creates a new instance of MockAnyContract. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewMockAnyContract(t interface { - mock.TestingT - Cleanup(func()) -}) *MockAnyContract { - mock := &MockAnyContract{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/plc4go/internal/bacnetip/mock_ApplicationRequirements_test.go b/plc4go/internal/bacnetip/mock_ApplicationRequirements_test.go deleted file mode 100644 index 7caf2a97ce2..00000000000 --- a/plc4go/internal/bacnetip/mock_ApplicationRequirements_test.go +++ /dev/null @@ -1,98 +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 - * - * https://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. - */ - -// Code generated by mockery v2.42.2. DO NOT EDIT. - -package bacnetip - -import mock "github.com/stretchr/testify/mock" - -// MockApplicationRequirements is an autogenerated mock type for the ApplicationRequirements type -type MockApplicationRequirements struct { - mock.Mock -} - -type MockApplicationRequirements_Expecter struct { - mock *mock.Mock -} - -func (_m *MockApplicationRequirements) EXPECT() *MockApplicationRequirements_Expecter { - return &MockApplicationRequirements_Expecter{mock: &_m.Mock} -} - -// Confirmation provides a mock function with given fields: args, kwargs -func (_m *MockApplicationRequirements) Confirmation(args Args, kwargs KWArgs) error { - ret := _m.Called(args, kwargs) - - if len(ret) == 0 { - panic("no return value specified for Confirmation") - } - - var r0 error - if rf, ok := ret.Get(0).(func(Args, KWArgs) error); ok { - r0 = rf(args, kwargs) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockApplicationRequirements_Confirmation_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Confirmation' -type MockApplicationRequirements_Confirmation_Call struct { - *mock.Call -} - -// Confirmation is a helper method to define mock.On call -// - args Args -// - kwargs KWArgs -func (_e *MockApplicationRequirements_Expecter) Confirmation(args interface{}, kwargs interface{}) *MockApplicationRequirements_Confirmation_Call { - return &MockApplicationRequirements_Confirmation_Call{Call: _e.mock.On("Confirmation", args, kwargs)} -} - -func (_c *MockApplicationRequirements_Confirmation_Call) Run(run func(args Args, kwargs KWArgs)) *MockApplicationRequirements_Confirmation_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(Args), args[1].(KWArgs)) - }) - return _c -} - -func (_c *MockApplicationRequirements_Confirmation_Call) Return(_a0 error) *MockApplicationRequirements_Confirmation_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockApplicationRequirements_Confirmation_Call) RunAndReturn(run func(Args, KWArgs) error) *MockApplicationRequirements_Confirmation_Call { - _c.Call.Return(run) - return _c -} - -// NewMockApplicationRequirements creates a new instance of MockApplicationRequirements. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewMockApplicationRequirements(t interface { - mock.TestingT - Cleanup(func()) -}) *MockApplicationRequirements { - mock := &MockApplicationRequirements{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/plc4go/internal/bacnetip/mock_ApplicationServiceElementContract_test.go b/plc4go/internal/bacnetip/mock_ApplicationServiceElementContract_test.go deleted file mode 100644 index ebf199ee801..00000000000 --- a/plc4go/internal/bacnetip/mock_ApplicationServiceElementContract_test.go +++ /dev/null @@ -1,272 +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 - * - * https://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. - */ - -// Code generated by mockery v2.42.2. DO NOT EDIT. - -package bacnetip - -import mock "github.com/stretchr/testify/mock" - -// MockApplicationServiceElementContract is an autogenerated mock type for the ApplicationServiceElementContract type -type MockApplicationServiceElementContract struct { - mock.Mock -} - -type MockApplicationServiceElementContract_Expecter struct { - mock *mock.Mock -} - -func (_m *MockApplicationServiceElementContract) EXPECT() *MockApplicationServiceElementContract_Expecter { - return &MockApplicationServiceElementContract_Expecter{mock: &_m.Mock} -} - -// Confirmation provides a mock function with given fields: args, kwargs -func (_m *MockApplicationServiceElementContract) Confirmation(args Args, kwargs KWArgs) error { - ret := _m.Called(args, kwargs) - - if len(ret) == 0 { - panic("no return value specified for Confirmation") - } - - var r0 error - if rf, ok := ret.Get(0).(func(Args, KWArgs) error); ok { - r0 = rf(args, kwargs) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockApplicationServiceElementContract_Confirmation_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Confirmation' -type MockApplicationServiceElementContract_Confirmation_Call struct { - *mock.Call -} - -// Confirmation is a helper method to define mock.On call -// - args Args -// - kwargs KWArgs -func (_e *MockApplicationServiceElementContract_Expecter) Confirmation(args interface{}, kwargs interface{}) *MockApplicationServiceElementContract_Confirmation_Call { - return &MockApplicationServiceElementContract_Confirmation_Call{Call: _e.mock.On("Confirmation", args, kwargs)} -} - -func (_c *MockApplicationServiceElementContract_Confirmation_Call) Run(run func(args Args, kwargs KWArgs)) *MockApplicationServiceElementContract_Confirmation_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(Args), args[1].(KWArgs)) - }) - return _c -} - -func (_c *MockApplicationServiceElementContract_Confirmation_Call) Return(_a0 error) *MockApplicationServiceElementContract_Confirmation_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockApplicationServiceElementContract_Confirmation_Call) RunAndReturn(run func(Args, KWArgs) error) *MockApplicationServiceElementContract_Confirmation_Call { - _c.Call.Return(run) - return _c -} - -// Indication provides a mock function with given fields: args, kwargs -func (_m *MockApplicationServiceElementContract) Indication(args Args, kwargs KWArgs) error { - ret := _m.Called(args, kwargs) - - if len(ret) == 0 { - panic("no return value specified for Indication") - } - - var r0 error - if rf, ok := ret.Get(0).(func(Args, KWArgs) error); ok { - r0 = rf(args, kwargs) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockApplicationServiceElementContract_Indication_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Indication' -type MockApplicationServiceElementContract_Indication_Call struct { - *mock.Call -} - -// Indication is a helper method to define mock.On call -// - args Args -// - kwargs KWArgs -func (_e *MockApplicationServiceElementContract_Expecter) Indication(args interface{}, kwargs interface{}) *MockApplicationServiceElementContract_Indication_Call { - return &MockApplicationServiceElementContract_Indication_Call{Call: _e.mock.On("Indication", args, kwargs)} -} - -func (_c *MockApplicationServiceElementContract_Indication_Call) Run(run func(args Args, kwargs KWArgs)) *MockApplicationServiceElementContract_Indication_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(Args), args[1].(KWArgs)) - }) - return _c -} - -func (_c *MockApplicationServiceElementContract_Indication_Call) Return(_a0 error) *MockApplicationServiceElementContract_Indication_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockApplicationServiceElementContract_Indication_Call) RunAndReturn(run func(Args, KWArgs) error) *MockApplicationServiceElementContract_Indication_Call { - _c.Call.Return(run) - return _c -} - -// Request provides a mock function with given fields: args, kwargs -func (_m *MockApplicationServiceElementContract) Request(args Args, kwargs KWArgs) error { - ret := _m.Called(args, kwargs) - - if len(ret) == 0 { - panic("no return value specified for Request") - } - - var r0 error - if rf, ok := ret.Get(0).(func(Args, KWArgs) error); ok { - r0 = rf(args, kwargs) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockApplicationServiceElementContract_Request_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Request' -type MockApplicationServiceElementContract_Request_Call struct { - *mock.Call -} - -// Request is a helper method to define mock.On call -// - args Args -// - kwargs KWArgs -func (_e *MockApplicationServiceElementContract_Expecter) Request(args interface{}, kwargs interface{}) *MockApplicationServiceElementContract_Request_Call { - return &MockApplicationServiceElementContract_Request_Call{Call: _e.mock.On("Request", args, kwargs)} -} - -func (_c *MockApplicationServiceElementContract_Request_Call) Run(run func(args Args, kwargs KWArgs)) *MockApplicationServiceElementContract_Request_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(Args), args[1].(KWArgs)) - }) - return _c -} - -func (_c *MockApplicationServiceElementContract_Request_Call) Return(_a0 error) *MockApplicationServiceElementContract_Request_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockApplicationServiceElementContract_Request_Call) RunAndReturn(run func(Args, KWArgs) error) *MockApplicationServiceElementContract_Request_Call { - _c.Call.Return(run) - return _c -} - -// Response provides a mock function with given fields: args, kwargs -func (_m *MockApplicationServiceElementContract) Response(args Args, kwargs KWArgs) error { - ret := _m.Called(args, kwargs) - - if len(ret) == 0 { - panic("no return value specified for Response") - } - - var r0 error - if rf, ok := ret.Get(0).(func(Args, KWArgs) error); ok { - r0 = rf(args, kwargs) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockApplicationServiceElementContract_Response_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Response' -type MockApplicationServiceElementContract_Response_Call struct { - *mock.Call -} - -// Response is a helper method to define mock.On call -// - args Args -// - kwargs KWArgs -func (_e *MockApplicationServiceElementContract_Expecter) Response(args interface{}, kwargs interface{}) *MockApplicationServiceElementContract_Response_Call { - return &MockApplicationServiceElementContract_Response_Call{Call: _e.mock.On("Response", args, kwargs)} -} - -func (_c *MockApplicationServiceElementContract_Response_Call) Run(run func(args Args, kwargs KWArgs)) *MockApplicationServiceElementContract_Response_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(Args), args[1].(KWArgs)) - }) - return _c -} - -func (_c *MockApplicationServiceElementContract_Response_Call) Return(_a0 error) *MockApplicationServiceElementContract_Response_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockApplicationServiceElementContract_Response_Call) RunAndReturn(run func(Args, KWArgs) error) *MockApplicationServiceElementContract_Response_Call { - _c.Call.Return(run) - return _c -} - -// _setElementService provides a mock function with given fields: elementService -func (_m *MockApplicationServiceElementContract) _setElementService(elementService ServiceAccessPointContract) { - _m.Called(elementService) -} - -// MockApplicationServiceElementContract__setElementService_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method '_setElementService' -type MockApplicationServiceElementContract__setElementService_Call struct { - *mock.Call -} - -// _setElementService is a helper method to define mock.On call -// - elementService ServiceAccessPointContract -func (_e *MockApplicationServiceElementContract_Expecter) _setElementService(elementService interface{}) *MockApplicationServiceElementContract__setElementService_Call { - return &MockApplicationServiceElementContract__setElementService_Call{Call: _e.mock.On("_setElementService", elementService)} -} - -func (_c *MockApplicationServiceElementContract__setElementService_Call) Run(run func(elementService ServiceAccessPointContract)) *MockApplicationServiceElementContract__setElementService_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(ServiceAccessPointContract)) - }) - return _c -} - -func (_c *MockApplicationServiceElementContract__setElementService_Call) Return() *MockApplicationServiceElementContract__setElementService_Call { - _c.Call.Return() - return _c -} - -func (_c *MockApplicationServiceElementContract__setElementService_Call) RunAndReturn(run func(ServiceAccessPointContract)) *MockApplicationServiceElementContract__setElementService_Call { - _c.Call.Return(run) - return _c -} - -// NewMockApplicationServiceElementContract creates a new instance of MockApplicationServiceElementContract. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewMockApplicationServiceElementContract(t interface { - mock.TestingT - Cleanup(func()) -}) *MockApplicationServiceElementContract { - mock := &MockApplicationServiceElementContract{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/plc4go/internal/bacnetip/mock_ApplicationServiceElementRequirements_test.go b/plc4go/internal/bacnetip/mock_ApplicationServiceElementRequirements_test.go deleted file mode 100644 index 93184b28b60..00000000000 --- a/plc4go/internal/bacnetip/mock_ApplicationServiceElementRequirements_test.go +++ /dev/null @@ -1,98 +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 - * - * https://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. - */ - -// Code generated by mockery v2.42.2. DO NOT EDIT. - -package bacnetip - -import mock "github.com/stretchr/testify/mock" - -// MockApplicationServiceElementRequirements is an autogenerated mock type for the ApplicationServiceElementRequirements type -type MockApplicationServiceElementRequirements struct { - mock.Mock -} - -type MockApplicationServiceElementRequirements_Expecter struct { - mock *mock.Mock -} - -func (_m *MockApplicationServiceElementRequirements) EXPECT() *MockApplicationServiceElementRequirements_Expecter { - return &MockApplicationServiceElementRequirements_Expecter{mock: &_m.Mock} -} - -// Confirmation provides a mock function with given fields: args, kwargs -func (_m *MockApplicationServiceElementRequirements) Confirmation(args Args, kwargs KWArgs) error { - ret := _m.Called(args, kwargs) - - if len(ret) == 0 { - panic("no return value specified for Confirmation") - } - - var r0 error - if rf, ok := ret.Get(0).(func(Args, KWArgs) error); ok { - r0 = rf(args, kwargs) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockApplicationServiceElementRequirements_Confirmation_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Confirmation' -type MockApplicationServiceElementRequirements_Confirmation_Call struct { - *mock.Call -} - -// Confirmation is a helper method to define mock.On call -// - args Args -// - kwargs KWArgs -func (_e *MockApplicationServiceElementRequirements_Expecter) Confirmation(args interface{}, kwargs interface{}) *MockApplicationServiceElementRequirements_Confirmation_Call { - return &MockApplicationServiceElementRequirements_Confirmation_Call{Call: _e.mock.On("Confirmation", args, kwargs)} -} - -func (_c *MockApplicationServiceElementRequirements_Confirmation_Call) Run(run func(args Args, kwargs KWArgs)) *MockApplicationServiceElementRequirements_Confirmation_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(Args), args[1].(KWArgs)) - }) - return _c -} - -func (_c *MockApplicationServiceElementRequirements_Confirmation_Call) Return(_a0 error) *MockApplicationServiceElementRequirements_Confirmation_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockApplicationServiceElementRequirements_Confirmation_Call) RunAndReturn(run func(Args, KWArgs) error) *MockApplicationServiceElementRequirements_Confirmation_Call { - _c.Call.Return(run) - return _c -} - -// NewMockApplicationServiceElementRequirements creates a new instance of MockApplicationServiceElementRequirements. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewMockApplicationServiceElementRequirements(t interface { - mock.TestingT - Cleanup(func()) -}) *MockApplicationServiceElementRequirements { - mock := &MockApplicationServiceElementRequirements{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/plc4go/internal/bacnetip/mock_AtomicContract_test.go b/plc4go/internal/bacnetip/mock_AtomicContract_test.go deleted file mode 100644 index de517e6c0b3..00000000000 --- a/plc4go/internal/bacnetip/mock_AtomicContract_test.go +++ /dev/null @@ -1,234 +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 - * - * https://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. - */ - -// Code generated by mockery v2.42.2. DO NOT EDIT. - -package bacnetip - -import mock "github.com/stretchr/testify/mock" - -// MockAtomicContract is an autogenerated mock type for the AtomicContract type -type MockAtomicContract[T ComparableAndOrdered] struct { - mock.Mock -} - -type MockAtomicContract_Expecter[T ComparableAndOrdered] struct { - mock *mock.Mock -} - -func (_m *MockAtomicContract[T]) EXPECT() *MockAtomicContract_Expecter[T] { - return &MockAtomicContract_Expecter[T]{mock: &_m.Mock} -} - -// Compare provides a mock function with given fields: other -func (_m *MockAtomicContract[T]) Compare(other interface{}) int { - ret := _m.Called(other) - - if len(ret) == 0 { - panic("no return value specified for Compare") - } - - var r0 int - if rf, ok := ret.Get(0).(func(interface{}) int); ok { - r0 = rf(other) - } else { - r0 = ret.Get(0).(int) - } - - return r0 -} - -// MockAtomicContract_Compare_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Compare' -type MockAtomicContract_Compare_Call[T ComparableAndOrdered] struct { - *mock.Call -} - -// Compare is a helper method to define mock.On call -// - other interface{} -func (_e *MockAtomicContract_Expecter[T]) Compare(other interface{}) *MockAtomicContract_Compare_Call[T] { - return &MockAtomicContract_Compare_Call[T]{Call: _e.mock.On("Compare", other)} -} - -func (_c *MockAtomicContract_Compare_Call[T]) Run(run func(other interface{})) *MockAtomicContract_Compare_Call[T] { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(interface{})) - }) - return _c -} - -func (_c *MockAtomicContract_Compare_Call[T]) Return(_a0 int) *MockAtomicContract_Compare_Call[T] { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockAtomicContract_Compare_Call[T]) RunAndReturn(run func(interface{}) int) *MockAtomicContract_Compare_Call[T] { - _c.Call.Return(run) - return _c -} - -// Equals provides a mock function with given fields: other -func (_m *MockAtomicContract[T]) Equals(other interface{}) bool { - ret := _m.Called(other) - - if len(ret) == 0 { - panic("no return value specified for Equals") - } - - var r0 bool - if rf, ok := ret.Get(0).(func(interface{}) bool); ok { - r0 = rf(other) - } else { - r0 = ret.Get(0).(bool) - } - - return r0 -} - -// MockAtomicContract_Equals_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Equals' -type MockAtomicContract_Equals_Call[T ComparableAndOrdered] struct { - *mock.Call -} - -// Equals is a helper method to define mock.On call -// - other interface{} -func (_e *MockAtomicContract_Expecter[T]) Equals(other interface{}) *MockAtomicContract_Equals_Call[T] { - return &MockAtomicContract_Equals_Call[T]{Call: _e.mock.On("Equals", other)} -} - -func (_c *MockAtomicContract_Equals_Call[T]) Run(run func(other interface{})) *MockAtomicContract_Equals_Call[T] { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(interface{})) - }) - return _c -} - -func (_c *MockAtomicContract_Equals_Call[T]) Return(_a0 bool) *MockAtomicContract_Equals_Call[T] { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockAtomicContract_Equals_Call[T]) RunAndReturn(run func(interface{}) bool) *MockAtomicContract_Equals_Call[T] { - _c.Call.Return(run) - return _c -} - -// GetValue provides a mock function with given fields: -func (_m *MockAtomicContract[T]) GetValue() T { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetValue") - } - - var r0 T - if rf, ok := ret.Get(0).(func() T); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(T) - } - - return r0 -} - -// MockAtomicContract_GetValue_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetValue' -type MockAtomicContract_GetValue_Call[T ComparableAndOrdered] struct { - *mock.Call -} - -// GetValue is a helper method to define mock.On call -func (_e *MockAtomicContract_Expecter[T]) GetValue() *MockAtomicContract_GetValue_Call[T] { - return &MockAtomicContract_GetValue_Call[T]{Call: _e.mock.On("GetValue")} -} - -func (_c *MockAtomicContract_GetValue_Call[T]) Run(run func()) *MockAtomicContract_GetValue_Call[T] { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockAtomicContract_GetValue_Call[T]) Return(_a0 T) *MockAtomicContract_GetValue_Call[T] { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockAtomicContract_GetValue_Call[T]) RunAndReturn(run func() T) *MockAtomicContract_GetValue_Call[T] { - _c.Call.Return(run) - return _c -} - -// LowerThan provides a mock function with given fields: other -func (_m *MockAtomicContract[T]) LowerThan(other interface{}) bool { - ret := _m.Called(other) - - if len(ret) == 0 { - panic("no return value specified for LowerThan") - } - - var r0 bool - if rf, ok := ret.Get(0).(func(interface{}) bool); ok { - r0 = rf(other) - } else { - r0 = ret.Get(0).(bool) - } - - return r0 -} - -// MockAtomicContract_LowerThan_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LowerThan' -type MockAtomicContract_LowerThan_Call[T ComparableAndOrdered] struct { - *mock.Call -} - -// LowerThan is a helper method to define mock.On call -// - other interface{} -func (_e *MockAtomicContract_Expecter[T]) LowerThan(other interface{}) *MockAtomicContract_LowerThan_Call[T] { - return &MockAtomicContract_LowerThan_Call[T]{Call: _e.mock.On("LowerThan", other)} -} - -func (_c *MockAtomicContract_LowerThan_Call[T]) Run(run func(other interface{})) *MockAtomicContract_LowerThan_Call[T] { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(interface{})) - }) - return _c -} - -func (_c *MockAtomicContract_LowerThan_Call[T]) Return(_a0 bool) *MockAtomicContract_LowerThan_Call[T] { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockAtomicContract_LowerThan_Call[T]) RunAndReturn(run func(interface{}) bool) *MockAtomicContract_LowerThan_Call[T] { - _c.Call.Return(run) - return _c -} - -// NewMockAtomicContract creates a new instance of MockAtomicContract. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewMockAtomicContract[T ComparableAndOrdered](t interface { - mock.TestingT - Cleanup(func()) -}) *MockAtomicContract[T] { - mock := &MockAtomicContract[T]{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/plc4go/internal/bacnetip/mock_AtomicRequirements_test.go b/plc4go/internal/bacnetip/mock_AtomicRequirements_test.go deleted file mode 100644 index 8bb378bf641..00000000000 --- a/plc4go/internal/bacnetip/mock_AtomicRequirements_test.go +++ /dev/null @@ -1,97 +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 - * - * https://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. - */ - -// Code generated by mockery v2.42.2. DO NOT EDIT. - -package bacnetip - -import mock "github.com/stretchr/testify/mock" - -// MockAtomicRequirements is an autogenerated mock type for the AtomicRequirements type -type MockAtomicRequirements struct { - mock.Mock -} - -type MockAtomicRequirements_Expecter struct { - mock *mock.Mock -} - -func (_m *MockAtomicRequirements) EXPECT() *MockAtomicRequirements_Expecter { - return &MockAtomicRequirements_Expecter{mock: &_m.Mock} -} - -// IsValid provides a mock function with given fields: arg -func (_m *MockAtomicRequirements) IsValid(arg interface{}) bool { - ret := _m.Called(arg) - - if len(ret) == 0 { - panic("no return value specified for IsValid") - } - - var r0 bool - if rf, ok := ret.Get(0).(func(interface{}) bool); ok { - r0 = rf(arg) - } else { - r0 = ret.Get(0).(bool) - } - - return r0 -} - -// MockAtomicRequirements_IsValid_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsValid' -type MockAtomicRequirements_IsValid_Call struct { - *mock.Call -} - -// IsValid is a helper method to define mock.On call -// - arg interface{} -func (_e *MockAtomicRequirements_Expecter) IsValid(arg interface{}) *MockAtomicRequirements_IsValid_Call { - return &MockAtomicRequirements_IsValid_Call{Call: _e.mock.On("IsValid", arg)} -} - -func (_c *MockAtomicRequirements_IsValid_Call) Run(run func(arg interface{})) *MockAtomicRequirements_IsValid_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(interface{})) - }) - return _c -} - -func (_c *MockAtomicRequirements_IsValid_Call) Return(_a0 bool) *MockAtomicRequirements_IsValid_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockAtomicRequirements_IsValid_Call) RunAndReturn(run func(interface{}) bool) *MockAtomicRequirements_IsValid_Call { - _c.Call.Return(run) - return _c -} - -// NewMockAtomicRequirements creates a new instance of MockAtomicRequirements. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewMockAtomicRequirements(t interface { - mock.TestingT - Cleanup(func()) -}) *MockAtomicRequirements { - mock := &MockAtomicRequirements{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/plc4go/internal/bacnetip/mock_BIPSAPRequirements_test.go b/plc4go/internal/bacnetip/mock_BIPSAPRequirements_test.go deleted file mode 100644 index 094607fef1c..00000000000 --- a/plc4go/internal/bacnetip/mock_BIPSAPRequirements_test.go +++ /dev/null @@ -1,491 +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 - * - * https://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. - */ - -// Code generated by mockery v2.42.2. DO NOT EDIT. - -package bacnetip - -import mock "github.com/stretchr/testify/mock" - -// MockBIPSAPRequirements is an autogenerated mock type for the BIPSAPRequirements type -type MockBIPSAPRequirements struct { - mock.Mock -} - -type MockBIPSAPRequirements_Expecter struct { - mock *mock.Mock -} - -func (_m *MockBIPSAPRequirements) EXPECT() *MockBIPSAPRequirements_Expecter { - return &MockBIPSAPRequirements_Expecter{mock: &_m.Mock} -} - -// Confirmation provides a mock function with given fields: args, kwargs -func (_m *MockBIPSAPRequirements) Confirmation(args Args, kwargs KWArgs) error { - ret := _m.Called(args, kwargs) - - if len(ret) == 0 { - panic("no return value specified for Confirmation") - } - - var r0 error - if rf, ok := ret.Get(0).(func(Args, KWArgs) error); ok { - r0 = rf(args, kwargs) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockBIPSAPRequirements_Confirmation_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Confirmation' -type MockBIPSAPRequirements_Confirmation_Call struct { - *mock.Call -} - -// Confirmation is a helper method to define mock.On call -// - args Args -// - kwargs KWArgs -func (_e *MockBIPSAPRequirements_Expecter) Confirmation(args interface{}, kwargs interface{}) *MockBIPSAPRequirements_Confirmation_Call { - return &MockBIPSAPRequirements_Confirmation_Call{Call: _e.mock.On("Confirmation", args, kwargs)} -} - -func (_c *MockBIPSAPRequirements_Confirmation_Call) Run(run func(args Args, kwargs KWArgs)) *MockBIPSAPRequirements_Confirmation_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(Args), args[1].(KWArgs)) - }) - return _c -} - -func (_c *MockBIPSAPRequirements_Confirmation_Call) Return(_a0 error) *MockBIPSAPRequirements_Confirmation_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockBIPSAPRequirements_Confirmation_Call) RunAndReturn(run func(Args, KWArgs) error) *MockBIPSAPRequirements_Confirmation_Call { - _c.Call.Return(run) - return _c -} - -// Request provides a mock function with given fields: args, kwargs -func (_m *MockBIPSAPRequirements) Request(args Args, kwargs KWArgs) error { - ret := _m.Called(args, kwargs) - - if len(ret) == 0 { - panic("no return value specified for Request") - } - - var r0 error - if rf, ok := ret.Get(0).(func(Args, KWArgs) error); ok { - r0 = rf(args, kwargs) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockBIPSAPRequirements_Request_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Request' -type MockBIPSAPRequirements_Request_Call struct { - *mock.Call -} - -// Request is a helper method to define mock.On call -// - args Args -// - kwargs KWArgs -func (_e *MockBIPSAPRequirements_Expecter) Request(args interface{}, kwargs interface{}) *MockBIPSAPRequirements_Request_Call { - return &MockBIPSAPRequirements_Request_Call{Call: _e.mock.On("Request", args, kwargs)} -} - -func (_c *MockBIPSAPRequirements_Request_Call) Run(run func(args Args, kwargs KWArgs)) *MockBIPSAPRequirements_Request_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(Args), args[1].(KWArgs)) - }) - return _c -} - -func (_c *MockBIPSAPRequirements_Request_Call) Return(_a0 error) *MockBIPSAPRequirements_Request_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockBIPSAPRequirements_Request_Call) RunAndReturn(run func(Args, KWArgs) error) *MockBIPSAPRequirements_Request_Call { - _c.Call.Return(run) - return _c -} - -// SapConfirmation provides a mock function with given fields: _a0, _a1 -func (_m *MockBIPSAPRequirements) SapConfirmation(_a0 Args, _a1 KWArgs) error { - ret := _m.Called(_a0, _a1) - - if len(ret) == 0 { - panic("no return value specified for SapConfirmation") - } - - var r0 error - if rf, ok := ret.Get(0).(func(Args, KWArgs) error); ok { - r0 = rf(_a0, _a1) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockBIPSAPRequirements_SapConfirmation_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SapConfirmation' -type MockBIPSAPRequirements_SapConfirmation_Call struct { - *mock.Call -} - -// SapConfirmation is a helper method to define mock.On call -// - _a0 Args -// - _a1 KWArgs -func (_e *MockBIPSAPRequirements_Expecter) SapConfirmation(_a0 interface{}, _a1 interface{}) *MockBIPSAPRequirements_SapConfirmation_Call { - return &MockBIPSAPRequirements_SapConfirmation_Call{Call: _e.mock.On("SapConfirmation", _a0, _a1)} -} - -func (_c *MockBIPSAPRequirements_SapConfirmation_Call) Run(run func(_a0 Args, _a1 KWArgs)) *MockBIPSAPRequirements_SapConfirmation_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(Args), args[1].(KWArgs)) - }) - return _c -} - -func (_c *MockBIPSAPRequirements_SapConfirmation_Call) Return(_a0 error) *MockBIPSAPRequirements_SapConfirmation_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockBIPSAPRequirements_SapConfirmation_Call) RunAndReturn(run func(Args, KWArgs) error) *MockBIPSAPRequirements_SapConfirmation_Call { - _c.Call.Return(run) - return _c -} - -// SapIndication provides a mock function with given fields: _a0, _a1 -func (_m *MockBIPSAPRequirements) SapIndication(_a0 Args, _a1 KWArgs) error { - ret := _m.Called(_a0, _a1) - - if len(ret) == 0 { - panic("no return value specified for SapIndication") - } - - var r0 error - if rf, ok := ret.Get(0).(func(Args, KWArgs) error); ok { - r0 = rf(_a0, _a1) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockBIPSAPRequirements_SapIndication_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SapIndication' -type MockBIPSAPRequirements_SapIndication_Call struct { - *mock.Call -} - -// SapIndication is a helper method to define mock.On call -// - _a0 Args -// - _a1 KWArgs -func (_e *MockBIPSAPRequirements_Expecter) SapIndication(_a0 interface{}, _a1 interface{}) *MockBIPSAPRequirements_SapIndication_Call { - return &MockBIPSAPRequirements_SapIndication_Call{Call: _e.mock.On("SapIndication", _a0, _a1)} -} - -func (_c *MockBIPSAPRequirements_SapIndication_Call) Run(run func(_a0 Args, _a1 KWArgs)) *MockBIPSAPRequirements_SapIndication_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(Args), args[1].(KWArgs)) - }) - return _c -} - -func (_c *MockBIPSAPRequirements_SapIndication_Call) Return(_a0 error) *MockBIPSAPRequirements_SapIndication_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockBIPSAPRequirements_SapIndication_Call) RunAndReturn(run func(Args, KWArgs) error) *MockBIPSAPRequirements_SapIndication_Call { - _c.Call.Return(run) - return _c -} - -// SapRequest provides a mock function with given fields: _a0, _a1 -func (_m *MockBIPSAPRequirements) SapRequest(_a0 Args, _a1 KWArgs) error { - ret := _m.Called(_a0, _a1) - - if len(ret) == 0 { - panic("no return value specified for SapRequest") - } - - var r0 error - if rf, ok := ret.Get(0).(func(Args, KWArgs) error); ok { - r0 = rf(_a0, _a1) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockBIPSAPRequirements_SapRequest_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SapRequest' -type MockBIPSAPRequirements_SapRequest_Call struct { - *mock.Call -} - -// SapRequest is a helper method to define mock.On call -// - _a0 Args -// - _a1 KWArgs -func (_e *MockBIPSAPRequirements_Expecter) SapRequest(_a0 interface{}, _a1 interface{}) *MockBIPSAPRequirements_SapRequest_Call { - return &MockBIPSAPRequirements_SapRequest_Call{Call: _e.mock.On("SapRequest", _a0, _a1)} -} - -func (_c *MockBIPSAPRequirements_SapRequest_Call) Run(run func(_a0 Args, _a1 KWArgs)) *MockBIPSAPRequirements_SapRequest_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(Args), args[1].(KWArgs)) - }) - return _c -} - -func (_c *MockBIPSAPRequirements_SapRequest_Call) Return(_a0 error) *MockBIPSAPRequirements_SapRequest_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockBIPSAPRequirements_SapRequest_Call) RunAndReturn(run func(Args, KWArgs) error) *MockBIPSAPRequirements_SapRequest_Call { - _c.Call.Return(run) - return _c -} - -// SapResponse provides a mock function with given fields: _a0, _a1 -func (_m *MockBIPSAPRequirements) SapResponse(_a0 Args, _a1 KWArgs) error { - ret := _m.Called(_a0, _a1) - - if len(ret) == 0 { - panic("no return value specified for SapResponse") - } - - var r0 error - if rf, ok := ret.Get(0).(func(Args, KWArgs) error); ok { - r0 = rf(_a0, _a1) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockBIPSAPRequirements_SapResponse_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SapResponse' -type MockBIPSAPRequirements_SapResponse_Call struct { - *mock.Call -} - -// SapResponse is a helper method to define mock.On call -// - _a0 Args -// - _a1 KWArgs -func (_e *MockBIPSAPRequirements_Expecter) SapResponse(_a0 interface{}, _a1 interface{}) *MockBIPSAPRequirements_SapResponse_Call { - return &MockBIPSAPRequirements_SapResponse_Call{Call: _e.mock.On("SapResponse", _a0, _a1)} -} - -func (_c *MockBIPSAPRequirements_SapResponse_Call) Run(run func(_a0 Args, _a1 KWArgs)) *MockBIPSAPRequirements_SapResponse_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(Args), args[1].(KWArgs)) - }) - return _c -} - -func (_c *MockBIPSAPRequirements_SapResponse_Call) Return(_a0 error) *MockBIPSAPRequirements_SapResponse_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockBIPSAPRequirements_SapResponse_Call) RunAndReturn(run func(Args, KWArgs) error) *MockBIPSAPRequirements_SapResponse_Call { - _c.Call.Return(run) - return _c -} - -// String provides a mock function with given fields: -func (_m *MockBIPSAPRequirements) String() string { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for String") - } - - var r0 string - if rf, ok := ret.Get(0).(func() string); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(string) - } - - return r0 -} - -// MockBIPSAPRequirements_String_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'String' -type MockBIPSAPRequirements_String_Call struct { - *mock.Call -} - -// String is a helper method to define mock.On call -func (_e *MockBIPSAPRequirements_Expecter) String() *MockBIPSAPRequirements_String_Call { - return &MockBIPSAPRequirements_String_Call{Call: _e.mock.On("String")} -} - -func (_c *MockBIPSAPRequirements_String_Call) Run(run func()) *MockBIPSAPRequirements_String_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockBIPSAPRequirements_String_Call) Return(_a0 string) *MockBIPSAPRequirements_String_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockBIPSAPRequirements_String_Call) RunAndReturn(run func() string) *MockBIPSAPRequirements_String_Call { - _c.Call.Return(run) - return _c -} - -// _setClientPeer provides a mock function with given fields: server -func (_m *MockBIPSAPRequirements) _setClientPeer(server Server) { - _m.Called(server) -} - -// MockBIPSAPRequirements__setClientPeer_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method '_setClientPeer' -type MockBIPSAPRequirements__setClientPeer_Call struct { - *mock.Call -} - -// _setClientPeer is a helper method to define mock.On call -// - server Server -func (_e *MockBIPSAPRequirements_Expecter) _setClientPeer(server interface{}) *MockBIPSAPRequirements__setClientPeer_Call { - return &MockBIPSAPRequirements__setClientPeer_Call{Call: _e.mock.On("_setClientPeer", server)} -} - -func (_c *MockBIPSAPRequirements__setClientPeer_Call) Run(run func(server Server)) *MockBIPSAPRequirements__setClientPeer_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(Server)) - }) - return _c -} - -func (_c *MockBIPSAPRequirements__setClientPeer_Call) Return() *MockBIPSAPRequirements__setClientPeer_Call { - _c.Call.Return() - return _c -} - -func (_c *MockBIPSAPRequirements__setClientPeer_Call) RunAndReturn(run func(Server)) *MockBIPSAPRequirements__setClientPeer_Call { - _c.Call.Return(run) - return _c -} - -// _setServiceElement provides a mock function with given fields: serviceElement -func (_m *MockBIPSAPRequirements) _setServiceElement(serviceElement ApplicationServiceElementContract) { - _m.Called(serviceElement) -} - -// MockBIPSAPRequirements__setServiceElement_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method '_setServiceElement' -type MockBIPSAPRequirements__setServiceElement_Call struct { - *mock.Call -} - -// _setServiceElement is a helper method to define mock.On call -// - serviceElement ApplicationServiceElementContract -func (_e *MockBIPSAPRequirements_Expecter) _setServiceElement(serviceElement interface{}) *MockBIPSAPRequirements__setServiceElement_Call { - return &MockBIPSAPRequirements__setServiceElement_Call{Call: _e.mock.On("_setServiceElement", serviceElement)} -} - -func (_c *MockBIPSAPRequirements__setServiceElement_Call) Run(run func(serviceElement ApplicationServiceElementContract)) *MockBIPSAPRequirements__setServiceElement_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(ApplicationServiceElementContract)) - }) - return _c -} - -func (_c *MockBIPSAPRequirements__setServiceElement_Call) Return() *MockBIPSAPRequirements__setServiceElement_Call { - _c.Call.Return() - return _c -} - -func (_c *MockBIPSAPRequirements__setServiceElement_Call) RunAndReturn(run func(ApplicationServiceElementContract)) *MockBIPSAPRequirements__setServiceElement_Call { - _c.Call.Return(run) - return _c -} - -// getClientId provides a mock function with given fields: -func (_m *MockBIPSAPRequirements) getClientId() *int { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for getClientId") - } - - var r0 *int - if rf, ok := ret.Get(0).(func() *int); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*int) - } - } - - return r0 -} - -// MockBIPSAPRequirements_getClientId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'getClientId' -type MockBIPSAPRequirements_getClientId_Call struct { - *mock.Call -} - -// getClientId is a helper method to define mock.On call -func (_e *MockBIPSAPRequirements_Expecter) getClientId() *MockBIPSAPRequirements_getClientId_Call { - return &MockBIPSAPRequirements_getClientId_Call{Call: _e.mock.On("getClientId")} -} - -func (_c *MockBIPSAPRequirements_getClientId_Call) Run(run func()) *MockBIPSAPRequirements_getClientId_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockBIPSAPRequirements_getClientId_Call) Return(_a0 *int) *MockBIPSAPRequirements_getClientId_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockBIPSAPRequirements_getClientId_Call) RunAndReturn(run func() *int) *MockBIPSAPRequirements_getClientId_Call { - _c.Call.Return(run) - return _c -} - -// NewMockBIPSAPRequirements creates a new instance of MockBIPSAPRequirements. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewMockBIPSAPRequirements(t interface { - mock.TestingT - Cleanup(func()) -}) *MockBIPSAPRequirements { - mock := &MockBIPSAPRequirements{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/plc4go/internal/bacnetip/mock_BVLCI_test.go b/plc4go/internal/bacnetip/mock_BVLCI_test.go deleted file mode 100644 index ea1f0a06718..00000000000 --- a/plc4go/internal/bacnetip/mock_BVLCI_test.go +++ /dev/null @@ -1,882 +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 - * - * https://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. - */ - -// Code generated by mockery v2.42.2. DO NOT EDIT. - -package bacnetip - -import ( - context "context" - - model "github.com/apache/plc4x/plc4go/protocols/bacnetip/readwrite/model" - mock "github.com/stretchr/testify/mock" - - spi "github.com/apache/plc4x/plc4go/spi" - - utils "github.com/apache/plc4x/plc4go/spi/utils" -) - -// MockBVLCI is an autogenerated mock type for the BVLCI type -type MockBVLCI struct { - mock.Mock -} - -type MockBVLCI_Expecter struct { - mock *mock.Mock -} - -func (_m *MockBVLCI) EXPECT() *MockBVLCI_Expecter { - return &MockBVLCI_Expecter{mock: &_m.Mock} -} - -// Decode provides a mock function with given fields: pdu -func (_m *MockBVLCI) Decode(pdu Arg) error { - ret := _m.Called(pdu) - - if len(ret) == 0 { - panic("no return value specified for Decode") - } - - var r0 error - if rf, ok := ret.Get(0).(func(Arg) error); ok { - r0 = rf(pdu) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockBVLCI_Decode_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Decode' -type MockBVLCI_Decode_Call struct { - *mock.Call -} - -// Decode is a helper method to define mock.On call -// - pdu Arg -func (_e *MockBVLCI_Expecter) Decode(pdu interface{}) *MockBVLCI_Decode_Call { - return &MockBVLCI_Decode_Call{Call: _e.mock.On("Decode", pdu)} -} - -func (_c *MockBVLCI_Decode_Call) Run(run func(pdu Arg)) *MockBVLCI_Decode_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(Arg)) - }) - return _c -} - -func (_c *MockBVLCI_Decode_Call) Return(_a0 error) *MockBVLCI_Decode_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockBVLCI_Decode_Call) RunAndReturn(run func(Arg) error) *MockBVLCI_Decode_Call { - _c.Call.Return(run) - return _c -} - -// Encode provides a mock function with given fields: pdu -func (_m *MockBVLCI) Encode(pdu Arg) error { - ret := _m.Called(pdu) - - if len(ret) == 0 { - panic("no return value specified for Encode") - } - - var r0 error - if rf, ok := ret.Get(0).(func(Arg) error); ok { - r0 = rf(pdu) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockBVLCI_Encode_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Encode' -type MockBVLCI_Encode_Call struct { - *mock.Call -} - -// Encode is a helper method to define mock.On call -// - pdu Arg -func (_e *MockBVLCI_Expecter) Encode(pdu interface{}) *MockBVLCI_Encode_Call { - return &MockBVLCI_Encode_Call{Call: _e.mock.On("Encode", pdu)} -} - -func (_c *MockBVLCI_Encode_Call) Run(run func(pdu Arg)) *MockBVLCI_Encode_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(Arg)) - }) - return _c -} - -func (_c *MockBVLCI_Encode_Call) Return(_a0 error) *MockBVLCI_Encode_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockBVLCI_Encode_Call) RunAndReturn(run func(Arg) error) *MockBVLCI_Encode_Call { - _c.Call.Return(run) - return _c -} - -// GetExpectingReply provides a mock function with given fields: -func (_m *MockBVLCI) GetExpectingReply() bool { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetExpectingReply") - } - - var r0 bool - if rf, ok := ret.Get(0).(func() bool); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(bool) - } - - return r0 -} - -// MockBVLCI_GetExpectingReply_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetExpectingReply' -type MockBVLCI_GetExpectingReply_Call struct { - *mock.Call -} - -// GetExpectingReply is a helper method to define mock.On call -func (_e *MockBVLCI_Expecter) GetExpectingReply() *MockBVLCI_GetExpectingReply_Call { - return &MockBVLCI_GetExpectingReply_Call{Call: _e.mock.On("GetExpectingReply")} -} - -func (_c *MockBVLCI_GetExpectingReply_Call) Run(run func()) *MockBVLCI_GetExpectingReply_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockBVLCI_GetExpectingReply_Call) Return(_a0 bool) *MockBVLCI_GetExpectingReply_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockBVLCI_GetExpectingReply_Call) RunAndReturn(run func() bool) *MockBVLCI_GetExpectingReply_Call { - _c.Call.Return(run) - return _c -} - -// GetLengthInBits provides a mock function with given fields: ctx -func (_m *MockBVLCI) GetLengthInBits(ctx context.Context) uint16 { - ret := _m.Called(ctx) - - if len(ret) == 0 { - panic("no return value specified for GetLengthInBits") - } - - var r0 uint16 - if rf, ok := ret.Get(0).(func(context.Context) uint16); ok { - r0 = rf(ctx) - } else { - r0 = ret.Get(0).(uint16) - } - - return r0 -} - -// MockBVLCI_GetLengthInBits_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetLengthInBits' -type MockBVLCI_GetLengthInBits_Call struct { - *mock.Call -} - -// GetLengthInBits is a helper method to define mock.On call -// - ctx context.Context -func (_e *MockBVLCI_Expecter) GetLengthInBits(ctx interface{}) *MockBVLCI_GetLengthInBits_Call { - return &MockBVLCI_GetLengthInBits_Call{Call: _e.mock.On("GetLengthInBits", ctx)} -} - -func (_c *MockBVLCI_GetLengthInBits_Call) Run(run func(ctx context.Context)) *MockBVLCI_GetLengthInBits_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context)) - }) - return _c -} - -func (_c *MockBVLCI_GetLengthInBits_Call) Return(_a0 uint16) *MockBVLCI_GetLengthInBits_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockBVLCI_GetLengthInBits_Call) RunAndReturn(run func(context.Context) uint16) *MockBVLCI_GetLengthInBits_Call { - _c.Call.Return(run) - return _c -} - -// GetLengthInBytes provides a mock function with given fields: ctx -func (_m *MockBVLCI) GetLengthInBytes(ctx context.Context) uint16 { - ret := _m.Called(ctx) - - if len(ret) == 0 { - panic("no return value specified for GetLengthInBytes") - } - - var r0 uint16 - if rf, ok := ret.Get(0).(func(context.Context) uint16); ok { - r0 = rf(ctx) - } else { - r0 = ret.Get(0).(uint16) - } - - return r0 -} - -// MockBVLCI_GetLengthInBytes_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetLengthInBytes' -type MockBVLCI_GetLengthInBytes_Call struct { - *mock.Call -} - -// GetLengthInBytes is a helper method to define mock.On call -// - ctx context.Context -func (_e *MockBVLCI_Expecter) GetLengthInBytes(ctx interface{}) *MockBVLCI_GetLengthInBytes_Call { - return &MockBVLCI_GetLengthInBytes_Call{Call: _e.mock.On("GetLengthInBytes", ctx)} -} - -func (_c *MockBVLCI_GetLengthInBytes_Call) Run(run func(ctx context.Context)) *MockBVLCI_GetLengthInBytes_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context)) - }) - return _c -} - -func (_c *MockBVLCI_GetLengthInBytes_Call) Return(_a0 uint16) *MockBVLCI_GetLengthInBytes_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockBVLCI_GetLengthInBytes_Call) RunAndReturn(run func(context.Context) uint16) *MockBVLCI_GetLengthInBytes_Call { - _c.Call.Return(run) - return _c -} - -// GetNetworkPriority provides a mock function with given fields: -func (_m *MockBVLCI) GetNetworkPriority() model.NPDUNetworkPriority { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetNetworkPriority") - } - - var r0 model.NPDUNetworkPriority - if rf, ok := ret.Get(0).(func() model.NPDUNetworkPriority); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(model.NPDUNetworkPriority) - } - - return r0 -} - -// MockBVLCI_GetNetworkPriority_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetNetworkPriority' -type MockBVLCI_GetNetworkPriority_Call struct { - *mock.Call -} - -// GetNetworkPriority is a helper method to define mock.On call -func (_e *MockBVLCI_Expecter) GetNetworkPriority() *MockBVLCI_GetNetworkPriority_Call { - return &MockBVLCI_GetNetworkPriority_Call{Call: _e.mock.On("GetNetworkPriority")} -} - -func (_c *MockBVLCI_GetNetworkPriority_Call) Run(run func()) *MockBVLCI_GetNetworkPriority_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockBVLCI_GetNetworkPriority_Call) Return(_a0 model.NPDUNetworkPriority) *MockBVLCI_GetNetworkPriority_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockBVLCI_GetNetworkPriority_Call) RunAndReturn(run func() model.NPDUNetworkPriority) *MockBVLCI_GetNetworkPriority_Call { - _c.Call.Return(run) - return _c -} - -// GetPDUDestination provides a mock function with given fields: -func (_m *MockBVLCI) GetPDUDestination() *Address { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetPDUDestination") - } - - var r0 *Address - if rf, ok := ret.Get(0).(func() *Address); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*Address) - } - } - - return r0 -} - -// MockBVLCI_GetPDUDestination_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPDUDestination' -type MockBVLCI_GetPDUDestination_Call struct { - *mock.Call -} - -// GetPDUDestination is a helper method to define mock.On call -func (_e *MockBVLCI_Expecter) GetPDUDestination() *MockBVLCI_GetPDUDestination_Call { - return &MockBVLCI_GetPDUDestination_Call{Call: _e.mock.On("GetPDUDestination")} -} - -func (_c *MockBVLCI_GetPDUDestination_Call) Run(run func()) *MockBVLCI_GetPDUDestination_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockBVLCI_GetPDUDestination_Call) Return(_a0 *Address) *MockBVLCI_GetPDUDestination_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockBVLCI_GetPDUDestination_Call) RunAndReturn(run func() *Address) *MockBVLCI_GetPDUDestination_Call { - _c.Call.Return(run) - return _c -} - -// GetPDUSource provides a mock function with given fields: -func (_m *MockBVLCI) GetPDUSource() *Address { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetPDUSource") - } - - var r0 *Address - if rf, ok := ret.Get(0).(func() *Address); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*Address) - } - } - - return r0 -} - -// MockBVLCI_GetPDUSource_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPDUSource' -type MockBVLCI_GetPDUSource_Call struct { - *mock.Call -} - -// GetPDUSource is a helper method to define mock.On call -func (_e *MockBVLCI_Expecter) GetPDUSource() *MockBVLCI_GetPDUSource_Call { - return &MockBVLCI_GetPDUSource_Call{Call: _e.mock.On("GetPDUSource")} -} - -func (_c *MockBVLCI_GetPDUSource_Call) Run(run func()) *MockBVLCI_GetPDUSource_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockBVLCI_GetPDUSource_Call) Return(_a0 *Address) *MockBVLCI_GetPDUSource_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockBVLCI_GetPDUSource_Call) RunAndReturn(run func() *Address) *MockBVLCI_GetPDUSource_Call { - _c.Call.Return(run) - return _c -} - -// GetPDUUserData provides a mock function with given fields: -func (_m *MockBVLCI) GetPDUUserData() spi.Message { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetPDUUserData") - } - - var r0 spi.Message - if rf, ok := ret.Get(0).(func() spi.Message); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(spi.Message) - } - } - - return r0 -} - -// MockBVLCI_GetPDUUserData_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPDUUserData' -type MockBVLCI_GetPDUUserData_Call struct { - *mock.Call -} - -// GetPDUUserData is a helper method to define mock.On call -func (_e *MockBVLCI_Expecter) GetPDUUserData() *MockBVLCI_GetPDUUserData_Call { - return &MockBVLCI_GetPDUUserData_Call{Call: _e.mock.On("GetPDUUserData")} -} - -func (_c *MockBVLCI_GetPDUUserData_Call) Run(run func()) *MockBVLCI_GetPDUUserData_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockBVLCI_GetPDUUserData_Call) Return(_a0 spi.Message) *MockBVLCI_GetPDUUserData_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockBVLCI_GetPDUUserData_Call) RunAndReturn(run func() spi.Message) *MockBVLCI_GetPDUUserData_Call { - _c.Call.Return(run) - return _c -} - -// GetRootMessage provides a mock function with given fields: -func (_m *MockBVLCI) GetRootMessage() spi.Message { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetRootMessage") - } - - var r0 spi.Message - if rf, ok := ret.Get(0).(func() spi.Message); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(spi.Message) - } - } - - return r0 -} - -// MockBVLCI_GetRootMessage_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRootMessage' -type MockBVLCI_GetRootMessage_Call struct { - *mock.Call -} - -// GetRootMessage is a helper method to define mock.On call -func (_e *MockBVLCI_Expecter) GetRootMessage() *MockBVLCI_GetRootMessage_Call { - return &MockBVLCI_GetRootMessage_Call{Call: _e.mock.On("GetRootMessage")} -} - -func (_c *MockBVLCI_GetRootMessage_Call) Run(run func()) *MockBVLCI_GetRootMessage_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockBVLCI_GetRootMessage_Call) Return(_a0 spi.Message) *MockBVLCI_GetRootMessage_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockBVLCI_GetRootMessage_Call) RunAndReturn(run func() spi.Message) *MockBVLCI_GetRootMessage_Call { - _c.Call.Return(run) - return _c -} - -// Serialize provides a mock function with given fields: -func (_m *MockBVLCI) Serialize() ([]byte, error) { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Serialize") - } - - var r0 []byte - var r1 error - if rf, ok := ret.Get(0).(func() ([]byte, error)); ok { - return rf() - } - if rf, ok := ret.Get(0).(func() []byte); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]byte) - } - } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockBVLCI_Serialize_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Serialize' -type MockBVLCI_Serialize_Call struct { - *mock.Call -} - -// Serialize is a helper method to define mock.On call -func (_e *MockBVLCI_Expecter) Serialize() *MockBVLCI_Serialize_Call { - return &MockBVLCI_Serialize_Call{Call: _e.mock.On("Serialize")} -} - -func (_c *MockBVLCI_Serialize_Call) Run(run func()) *MockBVLCI_Serialize_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockBVLCI_Serialize_Call) Return(_a0 []byte, _a1 error) *MockBVLCI_Serialize_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockBVLCI_Serialize_Call) RunAndReturn(run func() ([]byte, error)) *MockBVLCI_Serialize_Call { - _c.Call.Return(run) - return _c -} - -// SerializeWithWriteBuffer provides a mock function with given fields: ctx, writeBuffer -func (_m *MockBVLCI) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { - ret := _m.Called(ctx, writeBuffer) - - if len(ret) == 0 { - panic("no return value specified for SerializeWithWriteBuffer") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, utils.WriteBuffer) error); ok { - r0 = rf(ctx, writeBuffer) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockBVLCI_SerializeWithWriteBuffer_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SerializeWithWriteBuffer' -type MockBVLCI_SerializeWithWriteBuffer_Call struct { - *mock.Call -} - -// SerializeWithWriteBuffer is a helper method to define mock.On call -// - ctx context.Context -// - writeBuffer utils.WriteBuffer -func (_e *MockBVLCI_Expecter) SerializeWithWriteBuffer(ctx interface{}, writeBuffer interface{}) *MockBVLCI_SerializeWithWriteBuffer_Call { - return &MockBVLCI_SerializeWithWriteBuffer_Call{Call: _e.mock.On("SerializeWithWriteBuffer", ctx, writeBuffer)} -} - -func (_c *MockBVLCI_SerializeWithWriteBuffer_Call) Run(run func(ctx context.Context, writeBuffer utils.WriteBuffer)) *MockBVLCI_SerializeWithWriteBuffer_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(utils.WriteBuffer)) - }) - return _c -} - -func (_c *MockBVLCI_SerializeWithWriteBuffer_Call) Return(_a0 error) *MockBVLCI_SerializeWithWriteBuffer_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockBVLCI_SerializeWithWriteBuffer_Call) RunAndReturn(run func(context.Context, utils.WriteBuffer) error) *MockBVLCI_SerializeWithWriteBuffer_Call { - _c.Call.Return(run) - return _c -} - -// SetExpectingReply provides a mock function with given fields: _a0 -func (_m *MockBVLCI) SetExpectingReply(_a0 bool) { - _m.Called(_a0) -} - -// MockBVLCI_SetExpectingReply_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetExpectingReply' -type MockBVLCI_SetExpectingReply_Call struct { - *mock.Call -} - -// SetExpectingReply is a helper method to define mock.On call -// - _a0 bool -func (_e *MockBVLCI_Expecter) SetExpectingReply(_a0 interface{}) *MockBVLCI_SetExpectingReply_Call { - return &MockBVLCI_SetExpectingReply_Call{Call: _e.mock.On("SetExpectingReply", _a0)} -} - -func (_c *MockBVLCI_SetExpectingReply_Call) Run(run func(_a0 bool)) *MockBVLCI_SetExpectingReply_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(bool)) - }) - return _c -} - -func (_c *MockBVLCI_SetExpectingReply_Call) Return() *MockBVLCI_SetExpectingReply_Call { - _c.Call.Return() - return _c -} - -func (_c *MockBVLCI_SetExpectingReply_Call) RunAndReturn(run func(bool)) *MockBVLCI_SetExpectingReply_Call { - _c.Call.Return(run) - return _c -} - -// SetNetworkPriority provides a mock function with given fields: _a0 -func (_m *MockBVLCI) SetNetworkPriority(_a0 model.NPDUNetworkPriority) { - _m.Called(_a0) -} - -// MockBVLCI_SetNetworkPriority_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetNetworkPriority' -type MockBVLCI_SetNetworkPriority_Call struct { - *mock.Call -} - -// SetNetworkPriority is a helper method to define mock.On call -// - _a0 model.NPDUNetworkPriority -func (_e *MockBVLCI_Expecter) SetNetworkPriority(_a0 interface{}) *MockBVLCI_SetNetworkPriority_Call { - return &MockBVLCI_SetNetworkPriority_Call{Call: _e.mock.On("SetNetworkPriority", _a0)} -} - -func (_c *MockBVLCI_SetNetworkPriority_Call) Run(run func(_a0 model.NPDUNetworkPriority)) *MockBVLCI_SetNetworkPriority_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(model.NPDUNetworkPriority)) - }) - return _c -} - -func (_c *MockBVLCI_SetNetworkPriority_Call) Return() *MockBVLCI_SetNetworkPriority_Call { - _c.Call.Return() - return _c -} - -func (_c *MockBVLCI_SetNetworkPriority_Call) RunAndReturn(run func(model.NPDUNetworkPriority)) *MockBVLCI_SetNetworkPriority_Call { - _c.Call.Return(run) - return _c -} - -// SetPDUDestination provides a mock function with given fields: _a0 -func (_m *MockBVLCI) SetPDUDestination(_a0 *Address) { - _m.Called(_a0) -} - -// MockBVLCI_SetPDUDestination_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetPDUDestination' -type MockBVLCI_SetPDUDestination_Call struct { - *mock.Call -} - -// SetPDUDestination is a helper method to define mock.On call -// - _a0 *Address -func (_e *MockBVLCI_Expecter) SetPDUDestination(_a0 interface{}) *MockBVLCI_SetPDUDestination_Call { - return &MockBVLCI_SetPDUDestination_Call{Call: _e.mock.On("SetPDUDestination", _a0)} -} - -func (_c *MockBVLCI_SetPDUDestination_Call) Run(run func(_a0 *Address)) *MockBVLCI_SetPDUDestination_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(*Address)) - }) - return _c -} - -func (_c *MockBVLCI_SetPDUDestination_Call) Return() *MockBVLCI_SetPDUDestination_Call { - _c.Call.Return() - return _c -} - -func (_c *MockBVLCI_SetPDUDestination_Call) RunAndReturn(run func(*Address)) *MockBVLCI_SetPDUDestination_Call { - _c.Call.Return(run) - return _c -} - -// SetPDUSource provides a mock function with given fields: source -func (_m *MockBVLCI) SetPDUSource(source *Address) { - _m.Called(source) -} - -// MockBVLCI_SetPDUSource_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetPDUSource' -type MockBVLCI_SetPDUSource_Call struct { - *mock.Call -} - -// SetPDUSource is a helper method to define mock.On call -// - source *Address -func (_e *MockBVLCI_Expecter) SetPDUSource(source interface{}) *MockBVLCI_SetPDUSource_Call { - return &MockBVLCI_SetPDUSource_Call{Call: _e.mock.On("SetPDUSource", source)} -} - -func (_c *MockBVLCI_SetPDUSource_Call) Run(run func(source *Address)) *MockBVLCI_SetPDUSource_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(*Address)) - }) - return _c -} - -func (_c *MockBVLCI_SetPDUSource_Call) Return() *MockBVLCI_SetPDUSource_Call { - _c.Call.Return() - return _c -} - -func (_c *MockBVLCI_SetPDUSource_Call) RunAndReturn(run func(*Address)) *MockBVLCI_SetPDUSource_Call { - _c.Call.Return(run) - return _c -} - -// SetPDUUserData provides a mock function with given fields: _a0 -func (_m *MockBVLCI) SetPDUUserData(_a0 spi.Message) { - _m.Called(_a0) -} - -// MockBVLCI_SetPDUUserData_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetPDUUserData' -type MockBVLCI_SetPDUUserData_Call struct { - *mock.Call -} - -// SetPDUUserData is a helper method to define mock.On call -// - _a0 spi.Message -func (_e *MockBVLCI_Expecter) SetPDUUserData(_a0 interface{}) *MockBVLCI_SetPDUUserData_Call { - return &MockBVLCI_SetPDUUserData_Call{Call: _e.mock.On("SetPDUUserData", _a0)} -} - -func (_c *MockBVLCI_SetPDUUserData_Call) Run(run func(_a0 spi.Message)) *MockBVLCI_SetPDUUserData_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(spi.Message)) - }) - return _c -} - -func (_c *MockBVLCI_SetPDUUserData_Call) Return() *MockBVLCI_SetPDUUserData_Call { - _c.Call.Return() - return _c -} - -func (_c *MockBVLCI_SetPDUUserData_Call) RunAndReturn(run func(spi.Message)) *MockBVLCI_SetPDUUserData_Call { - _c.Call.Return(run) - return _c -} - -// String provides a mock function with given fields: -func (_m *MockBVLCI) String() string { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for String") - } - - var r0 string - if rf, ok := ret.Get(0).(func() string); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(string) - } - - return r0 -} - -// MockBVLCI_String_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'String' -type MockBVLCI_String_Call struct { - *mock.Call -} - -// String is a helper method to define mock.On call -func (_e *MockBVLCI_Expecter) String() *MockBVLCI_String_Call { - return &MockBVLCI_String_Call{Call: _e.mock.On("String")} -} - -func (_c *MockBVLCI_String_Call) Run(run func()) *MockBVLCI_String_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockBVLCI_String_Call) Return(_a0 string) *MockBVLCI_String_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockBVLCI_String_Call) RunAndReturn(run func() string) *MockBVLCI_String_Call { - _c.Call.Return(run) - return _c -} - -// Update provides a mock function with given fields: pci -func (_m *MockBVLCI) Update(pci Arg) error { - ret := _m.Called(pci) - - if len(ret) == 0 { - panic("no return value specified for Update") - } - - var r0 error - if rf, ok := ret.Get(0).(func(Arg) error); ok { - r0 = rf(pci) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockBVLCI_Update_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Update' -type MockBVLCI_Update_Call struct { - *mock.Call -} - -// Update is a helper method to define mock.On call -// - pci Arg -func (_e *MockBVLCI_Expecter) Update(pci interface{}) *MockBVLCI_Update_Call { - return &MockBVLCI_Update_Call{Call: _e.mock.On("Update", pci)} -} - -func (_c *MockBVLCI_Update_Call) Run(run func(pci Arg)) *MockBVLCI_Update_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(Arg)) - }) - return _c -} - -func (_c *MockBVLCI_Update_Call) Return(_a0 error) *MockBVLCI_Update_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockBVLCI_Update_Call) RunAndReturn(run func(Arg) error) *MockBVLCI_Update_Call { - _c.Call.Return(run) - return _c -} - -// NewMockBVLCI creates a new instance of MockBVLCI. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewMockBVLCI(t interface { - mock.TestingT - Cleanup(func()) -}) *MockBVLCI { - mock := &MockBVLCI{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/plc4go/internal/bacnetip/mock_BVLPDU_test.go b/plc4go/internal/bacnetip/mock_BVLPDU_test.go deleted file mode 100644 index 7e7c68e6d78..00000000000 --- a/plc4go/internal/bacnetip/mock_BVLPDU_test.go +++ /dev/null @@ -1,1500 +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 - * - * https://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. - */ - -// Code generated by mockery v2.42.2. DO NOT EDIT. - -package bacnetip - -import ( - context "context" - - model "github.com/apache/plc4x/plc4go/protocols/bacnetip/readwrite/model" - mock "github.com/stretchr/testify/mock" - - spi "github.com/apache/plc4x/plc4go/spi" - - utils "github.com/apache/plc4x/plc4go/spi/utils" -) - -// MockBVLPDU is an autogenerated mock type for the BVLPDU type -type MockBVLPDU struct { - mock.Mock -} - -type MockBVLPDU_Expecter struct { - mock *mock.Mock -} - -func (_m *MockBVLPDU) EXPECT() *MockBVLPDU_Expecter { - return &MockBVLPDU_Expecter{mock: &_m.Mock} -} - -// Decode provides a mock function with given fields: pdu -func (_m *MockBVLPDU) Decode(pdu Arg) error { - ret := _m.Called(pdu) - - if len(ret) == 0 { - panic("no return value specified for Decode") - } - - var r0 error - if rf, ok := ret.Get(0).(func(Arg) error); ok { - r0 = rf(pdu) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockBVLPDU_Decode_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Decode' -type MockBVLPDU_Decode_Call struct { - *mock.Call -} - -// Decode is a helper method to define mock.On call -// - pdu Arg -func (_e *MockBVLPDU_Expecter) Decode(pdu interface{}) *MockBVLPDU_Decode_Call { - return &MockBVLPDU_Decode_Call{Call: _e.mock.On("Decode", pdu)} -} - -func (_c *MockBVLPDU_Decode_Call) Run(run func(pdu Arg)) *MockBVLPDU_Decode_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(Arg)) - }) - return _c -} - -func (_c *MockBVLPDU_Decode_Call) Return(_a0 error) *MockBVLPDU_Decode_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockBVLPDU_Decode_Call) RunAndReturn(run func(Arg) error) *MockBVLPDU_Decode_Call { - _c.Call.Return(run) - return _c -} - -// Encode provides a mock function with given fields: pdu -func (_m *MockBVLPDU) Encode(pdu Arg) error { - ret := _m.Called(pdu) - - if len(ret) == 0 { - panic("no return value specified for Encode") - } - - var r0 error - if rf, ok := ret.Get(0).(func(Arg) error); ok { - r0 = rf(pdu) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockBVLPDU_Encode_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Encode' -type MockBVLPDU_Encode_Call struct { - *mock.Call -} - -// Encode is a helper method to define mock.On call -// - pdu Arg -func (_e *MockBVLPDU_Expecter) Encode(pdu interface{}) *MockBVLPDU_Encode_Call { - return &MockBVLPDU_Encode_Call{Call: _e.mock.On("Encode", pdu)} -} - -func (_c *MockBVLPDU_Encode_Call) Run(run func(pdu Arg)) *MockBVLPDU_Encode_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(Arg)) - }) - return _c -} - -func (_c *MockBVLPDU_Encode_Call) Return(_a0 error) *MockBVLPDU_Encode_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockBVLPDU_Encode_Call) RunAndReturn(run func(Arg) error) *MockBVLPDU_Encode_Call { - _c.Call.Return(run) - return _c -} - -// Get provides a mock function with given fields: -func (_m *MockBVLPDU) Get() (byte, error) { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Get") - } - - var r0 byte - var r1 error - if rf, ok := ret.Get(0).(func() (byte, error)); ok { - return rf() - } - if rf, ok := ret.Get(0).(func() byte); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(byte) - } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockBVLPDU_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' -type MockBVLPDU_Get_Call struct { - *mock.Call -} - -// Get is a helper method to define mock.On call -func (_e *MockBVLPDU_Expecter) Get() *MockBVLPDU_Get_Call { - return &MockBVLPDU_Get_Call{Call: _e.mock.On("Get")} -} - -func (_c *MockBVLPDU_Get_Call) Run(run func()) *MockBVLPDU_Get_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockBVLPDU_Get_Call) Return(_a0 byte, _a1 error) *MockBVLPDU_Get_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockBVLPDU_Get_Call) RunAndReturn(run func() (byte, error)) *MockBVLPDU_Get_Call { - _c.Call.Return(run) - return _c -} - -// GetBvlcFunction provides a mock function with given fields: -func (_m *MockBVLPDU) GetBvlcFunction() uint8 { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetBvlcFunction") - } - - var r0 uint8 - if rf, ok := ret.Get(0).(func() uint8); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(uint8) - } - - return r0 -} - -// MockBVLPDU_GetBvlcFunction_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetBvlcFunction' -type MockBVLPDU_GetBvlcFunction_Call struct { - *mock.Call -} - -// GetBvlcFunction is a helper method to define mock.On call -func (_e *MockBVLPDU_Expecter) GetBvlcFunction() *MockBVLPDU_GetBvlcFunction_Call { - return &MockBVLPDU_GetBvlcFunction_Call{Call: _e.mock.On("GetBvlcFunction")} -} - -func (_c *MockBVLPDU_GetBvlcFunction_Call) Run(run func()) *MockBVLPDU_GetBvlcFunction_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockBVLPDU_GetBvlcFunction_Call) Return(_a0 uint8) *MockBVLPDU_GetBvlcFunction_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockBVLPDU_GetBvlcFunction_Call) RunAndReturn(run func() uint8) *MockBVLPDU_GetBvlcFunction_Call { - _c.Call.Return(run) - return _c -} - -// GetBvlcPayloadLength provides a mock function with given fields: -func (_m *MockBVLPDU) GetBvlcPayloadLength() uint16 { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetBvlcPayloadLength") - } - - var r0 uint16 - if rf, ok := ret.Get(0).(func() uint16); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(uint16) - } - - return r0 -} - -// MockBVLPDU_GetBvlcPayloadLength_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetBvlcPayloadLength' -type MockBVLPDU_GetBvlcPayloadLength_Call struct { - *mock.Call -} - -// GetBvlcPayloadLength is a helper method to define mock.On call -func (_e *MockBVLPDU_Expecter) GetBvlcPayloadLength() *MockBVLPDU_GetBvlcPayloadLength_Call { - return &MockBVLPDU_GetBvlcPayloadLength_Call{Call: _e.mock.On("GetBvlcPayloadLength")} -} - -func (_c *MockBVLPDU_GetBvlcPayloadLength_Call) Run(run func()) *MockBVLPDU_GetBvlcPayloadLength_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockBVLPDU_GetBvlcPayloadLength_Call) Return(_a0 uint16) *MockBVLPDU_GetBvlcPayloadLength_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockBVLPDU_GetBvlcPayloadLength_Call) RunAndReturn(run func() uint16) *MockBVLPDU_GetBvlcPayloadLength_Call { - _c.Call.Return(run) - return _c -} - -// GetData provides a mock function with given fields: dlen -func (_m *MockBVLPDU) GetData(dlen int) ([]byte, error) { - ret := _m.Called(dlen) - - if len(ret) == 0 { - panic("no return value specified for GetData") - } - - var r0 []byte - var r1 error - if rf, ok := ret.Get(0).(func(int) ([]byte, error)); ok { - return rf(dlen) - } - if rf, ok := ret.Get(0).(func(int) []byte); ok { - r0 = rf(dlen) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]byte) - } - } - - if rf, ok := ret.Get(1).(func(int) error); ok { - r1 = rf(dlen) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockBVLPDU_GetData_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetData' -type MockBVLPDU_GetData_Call struct { - *mock.Call -} - -// GetData is a helper method to define mock.On call -// - dlen int -func (_e *MockBVLPDU_Expecter) GetData(dlen interface{}) *MockBVLPDU_GetData_Call { - return &MockBVLPDU_GetData_Call{Call: _e.mock.On("GetData", dlen)} -} - -func (_c *MockBVLPDU_GetData_Call) Run(run func(dlen int)) *MockBVLPDU_GetData_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(int)) - }) - return _c -} - -func (_c *MockBVLPDU_GetData_Call) Return(_a0 []byte, _a1 error) *MockBVLPDU_GetData_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockBVLPDU_GetData_Call) RunAndReturn(run func(int) ([]byte, error)) *MockBVLPDU_GetData_Call { - _c.Call.Return(run) - return _c -} - -// GetExpectingReply provides a mock function with given fields: -func (_m *MockBVLPDU) GetExpectingReply() bool { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetExpectingReply") - } - - var r0 bool - if rf, ok := ret.Get(0).(func() bool); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(bool) - } - - return r0 -} - -// MockBVLPDU_GetExpectingReply_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetExpectingReply' -type MockBVLPDU_GetExpectingReply_Call struct { - *mock.Call -} - -// GetExpectingReply is a helper method to define mock.On call -func (_e *MockBVLPDU_Expecter) GetExpectingReply() *MockBVLPDU_GetExpectingReply_Call { - return &MockBVLPDU_GetExpectingReply_Call{Call: _e.mock.On("GetExpectingReply")} -} - -func (_c *MockBVLPDU_GetExpectingReply_Call) Run(run func()) *MockBVLPDU_GetExpectingReply_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockBVLPDU_GetExpectingReply_Call) Return(_a0 bool) *MockBVLPDU_GetExpectingReply_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockBVLPDU_GetExpectingReply_Call) RunAndReturn(run func() bool) *MockBVLPDU_GetExpectingReply_Call { - _c.Call.Return(run) - return _c -} - -// GetLengthInBits provides a mock function with given fields: ctx -func (_m *MockBVLPDU) GetLengthInBits(ctx context.Context) uint16 { - ret := _m.Called(ctx) - - if len(ret) == 0 { - panic("no return value specified for GetLengthInBits") - } - - var r0 uint16 - if rf, ok := ret.Get(0).(func(context.Context) uint16); ok { - r0 = rf(ctx) - } else { - r0 = ret.Get(0).(uint16) - } - - return r0 -} - -// MockBVLPDU_GetLengthInBits_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetLengthInBits' -type MockBVLPDU_GetLengthInBits_Call struct { - *mock.Call -} - -// GetLengthInBits is a helper method to define mock.On call -// - ctx context.Context -func (_e *MockBVLPDU_Expecter) GetLengthInBits(ctx interface{}) *MockBVLPDU_GetLengthInBits_Call { - return &MockBVLPDU_GetLengthInBits_Call{Call: _e.mock.On("GetLengthInBits", ctx)} -} - -func (_c *MockBVLPDU_GetLengthInBits_Call) Run(run func(ctx context.Context)) *MockBVLPDU_GetLengthInBits_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context)) - }) - return _c -} - -func (_c *MockBVLPDU_GetLengthInBits_Call) Return(_a0 uint16) *MockBVLPDU_GetLengthInBits_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockBVLPDU_GetLengthInBits_Call) RunAndReturn(run func(context.Context) uint16) *MockBVLPDU_GetLengthInBits_Call { - _c.Call.Return(run) - return _c -} - -// GetLengthInBytes provides a mock function with given fields: ctx -func (_m *MockBVLPDU) GetLengthInBytes(ctx context.Context) uint16 { - ret := _m.Called(ctx) - - if len(ret) == 0 { - panic("no return value specified for GetLengthInBytes") - } - - var r0 uint16 - if rf, ok := ret.Get(0).(func(context.Context) uint16); ok { - r0 = rf(ctx) - } else { - r0 = ret.Get(0).(uint16) - } - - return r0 -} - -// MockBVLPDU_GetLengthInBytes_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetLengthInBytes' -type MockBVLPDU_GetLengthInBytes_Call struct { - *mock.Call -} - -// GetLengthInBytes is a helper method to define mock.On call -// - ctx context.Context -func (_e *MockBVLPDU_Expecter) GetLengthInBytes(ctx interface{}) *MockBVLPDU_GetLengthInBytes_Call { - return &MockBVLPDU_GetLengthInBytes_Call{Call: _e.mock.On("GetLengthInBytes", ctx)} -} - -func (_c *MockBVLPDU_GetLengthInBytes_Call) Run(run func(ctx context.Context)) *MockBVLPDU_GetLengthInBytes_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context)) - }) - return _c -} - -func (_c *MockBVLPDU_GetLengthInBytes_Call) Return(_a0 uint16) *MockBVLPDU_GetLengthInBytes_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockBVLPDU_GetLengthInBytes_Call) RunAndReturn(run func(context.Context) uint16) *MockBVLPDU_GetLengthInBytes_Call { - _c.Call.Return(run) - return _c -} - -// GetLong provides a mock function with given fields: -func (_m *MockBVLPDU) GetLong() (int64, error) { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetLong") - } - - var r0 int64 - var r1 error - if rf, ok := ret.Get(0).(func() (int64, error)); ok { - return rf() - } - if rf, ok := ret.Get(0).(func() int64); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(int64) - } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockBVLPDU_GetLong_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetLong' -type MockBVLPDU_GetLong_Call struct { - *mock.Call -} - -// GetLong is a helper method to define mock.On call -func (_e *MockBVLPDU_Expecter) GetLong() *MockBVLPDU_GetLong_Call { - return &MockBVLPDU_GetLong_Call{Call: _e.mock.On("GetLong")} -} - -func (_c *MockBVLPDU_GetLong_Call) Run(run func()) *MockBVLPDU_GetLong_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockBVLPDU_GetLong_Call) Return(_a0 int64, _a1 error) *MockBVLPDU_GetLong_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockBVLPDU_GetLong_Call) RunAndReturn(run func() (int64, error)) *MockBVLPDU_GetLong_Call { - _c.Call.Return(run) - return _c -} - -// GetNetworkPriority provides a mock function with given fields: -func (_m *MockBVLPDU) GetNetworkPriority() model.NPDUNetworkPriority { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetNetworkPriority") - } - - var r0 model.NPDUNetworkPriority - if rf, ok := ret.Get(0).(func() model.NPDUNetworkPriority); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(model.NPDUNetworkPriority) - } - - return r0 -} - -// MockBVLPDU_GetNetworkPriority_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetNetworkPriority' -type MockBVLPDU_GetNetworkPriority_Call struct { - *mock.Call -} - -// GetNetworkPriority is a helper method to define mock.On call -func (_e *MockBVLPDU_Expecter) GetNetworkPriority() *MockBVLPDU_GetNetworkPriority_Call { - return &MockBVLPDU_GetNetworkPriority_Call{Call: _e.mock.On("GetNetworkPriority")} -} - -func (_c *MockBVLPDU_GetNetworkPriority_Call) Run(run func()) *MockBVLPDU_GetNetworkPriority_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockBVLPDU_GetNetworkPriority_Call) Return(_a0 model.NPDUNetworkPriority) *MockBVLPDU_GetNetworkPriority_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockBVLPDU_GetNetworkPriority_Call) RunAndReturn(run func() model.NPDUNetworkPriority) *MockBVLPDU_GetNetworkPriority_Call { - _c.Call.Return(run) - return _c -} - -// GetPDUDestination provides a mock function with given fields: -func (_m *MockBVLPDU) GetPDUDestination() *Address { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetPDUDestination") - } - - var r0 *Address - if rf, ok := ret.Get(0).(func() *Address); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*Address) - } - } - - return r0 -} - -// MockBVLPDU_GetPDUDestination_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPDUDestination' -type MockBVLPDU_GetPDUDestination_Call struct { - *mock.Call -} - -// GetPDUDestination is a helper method to define mock.On call -func (_e *MockBVLPDU_Expecter) GetPDUDestination() *MockBVLPDU_GetPDUDestination_Call { - return &MockBVLPDU_GetPDUDestination_Call{Call: _e.mock.On("GetPDUDestination")} -} - -func (_c *MockBVLPDU_GetPDUDestination_Call) Run(run func()) *MockBVLPDU_GetPDUDestination_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockBVLPDU_GetPDUDestination_Call) Return(_a0 *Address) *MockBVLPDU_GetPDUDestination_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockBVLPDU_GetPDUDestination_Call) RunAndReturn(run func() *Address) *MockBVLPDU_GetPDUDestination_Call { - _c.Call.Return(run) - return _c -} - -// GetPDUSource provides a mock function with given fields: -func (_m *MockBVLPDU) GetPDUSource() *Address { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetPDUSource") - } - - var r0 *Address - if rf, ok := ret.Get(0).(func() *Address); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*Address) - } - } - - return r0 -} - -// MockBVLPDU_GetPDUSource_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPDUSource' -type MockBVLPDU_GetPDUSource_Call struct { - *mock.Call -} - -// GetPDUSource is a helper method to define mock.On call -func (_e *MockBVLPDU_Expecter) GetPDUSource() *MockBVLPDU_GetPDUSource_Call { - return &MockBVLPDU_GetPDUSource_Call{Call: _e.mock.On("GetPDUSource")} -} - -func (_c *MockBVLPDU_GetPDUSource_Call) Run(run func()) *MockBVLPDU_GetPDUSource_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockBVLPDU_GetPDUSource_Call) Return(_a0 *Address) *MockBVLPDU_GetPDUSource_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockBVLPDU_GetPDUSource_Call) RunAndReturn(run func() *Address) *MockBVLPDU_GetPDUSource_Call { - _c.Call.Return(run) - return _c -} - -// GetPDUUserData provides a mock function with given fields: -func (_m *MockBVLPDU) GetPDUUserData() spi.Message { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetPDUUserData") - } - - var r0 spi.Message - if rf, ok := ret.Get(0).(func() spi.Message); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(spi.Message) - } - } - - return r0 -} - -// MockBVLPDU_GetPDUUserData_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPDUUserData' -type MockBVLPDU_GetPDUUserData_Call struct { - *mock.Call -} - -// GetPDUUserData is a helper method to define mock.On call -func (_e *MockBVLPDU_Expecter) GetPDUUserData() *MockBVLPDU_GetPDUUserData_Call { - return &MockBVLPDU_GetPDUUserData_Call{Call: _e.mock.On("GetPDUUserData")} -} - -func (_c *MockBVLPDU_GetPDUUserData_Call) Run(run func()) *MockBVLPDU_GetPDUUserData_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockBVLPDU_GetPDUUserData_Call) Return(_a0 spi.Message) *MockBVLPDU_GetPDUUserData_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockBVLPDU_GetPDUUserData_Call) RunAndReturn(run func() spi.Message) *MockBVLPDU_GetPDUUserData_Call { - _c.Call.Return(run) - return _c -} - -// GetPduData provides a mock function with given fields: -func (_m *MockBVLPDU) GetPduData() []byte { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetPduData") - } - - var r0 []byte - if rf, ok := ret.Get(0).(func() []byte); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]byte) - } - } - - return r0 -} - -// MockBVLPDU_GetPduData_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPduData' -type MockBVLPDU_GetPduData_Call struct { - *mock.Call -} - -// GetPduData is a helper method to define mock.On call -func (_e *MockBVLPDU_Expecter) GetPduData() *MockBVLPDU_GetPduData_Call { - return &MockBVLPDU_GetPduData_Call{Call: _e.mock.On("GetPduData")} -} - -func (_c *MockBVLPDU_GetPduData_Call) Run(run func()) *MockBVLPDU_GetPduData_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockBVLPDU_GetPduData_Call) Return(_a0 []byte) *MockBVLPDU_GetPduData_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockBVLPDU_GetPduData_Call) RunAndReturn(run func() []byte) *MockBVLPDU_GetPduData_Call { - _c.Call.Return(run) - return _c -} - -// GetRootMessage provides a mock function with given fields: -func (_m *MockBVLPDU) GetRootMessage() spi.Message { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetRootMessage") - } - - var r0 spi.Message - if rf, ok := ret.Get(0).(func() spi.Message); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(spi.Message) - } - } - - return r0 -} - -// MockBVLPDU_GetRootMessage_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRootMessage' -type MockBVLPDU_GetRootMessage_Call struct { - *mock.Call -} - -// GetRootMessage is a helper method to define mock.On call -func (_e *MockBVLPDU_Expecter) GetRootMessage() *MockBVLPDU_GetRootMessage_Call { - return &MockBVLPDU_GetRootMessage_Call{Call: _e.mock.On("GetRootMessage")} -} - -func (_c *MockBVLPDU_GetRootMessage_Call) Run(run func()) *MockBVLPDU_GetRootMessage_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockBVLPDU_GetRootMessage_Call) Return(_a0 spi.Message) *MockBVLPDU_GetRootMessage_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockBVLPDU_GetRootMessage_Call) RunAndReturn(run func() spi.Message) *MockBVLPDU_GetRootMessage_Call { - _c.Call.Return(run) - return _c -} - -// GetShort provides a mock function with given fields: -func (_m *MockBVLPDU) GetShort() (int16, error) { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetShort") - } - - var r0 int16 - var r1 error - if rf, ok := ret.Get(0).(func() (int16, error)); ok { - return rf() - } - if rf, ok := ret.Get(0).(func() int16); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(int16) - } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockBVLPDU_GetShort_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetShort' -type MockBVLPDU_GetShort_Call struct { - *mock.Call -} - -// GetShort is a helper method to define mock.On call -func (_e *MockBVLPDU_Expecter) GetShort() *MockBVLPDU_GetShort_Call { - return &MockBVLPDU_GetShort_Call{Call: _e.mock.On("GetShort")} -} - -func (_c *MockBVLPDU_GetShort_Call) Run(run func()) *MockBVLPDU_GetShort_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockBVLPDU_GetShort_Call) Return(_a0 int16, _a1 error) *MockBVLPDU_GetShort_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockBVLPDU_GetShort_Call) RunAndReturn(run func() (int16, error)) *MockBVLPDU_GetShort_Call { - _c.Call.Return(run) - return _c -} - -// Put provides a mock function with given fields: _a0 -func (_m *MockBVLPDU) Put(_a0 byte) { - _m.Called(_a0) -} - -// MockBVLPDU_Put_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Put' -type MockBVLPDU_Put_Call struct { - *mock.Call -} - -// Put is a helper method to define mock.On call -// - _a0 byte -func (_e *MockBVLPDU_Expecter) Put(_a0 interface{}) *MockBVLPDU_Put_Call { - return &MockBVLPDU_Put_Call{Call: _e.mock.On("Put", _a0)} -} - -func (_c *MockBVLPDU_Put_Call) Run(run func(_a0 byte)) *MockBVLPDU_Put_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(byte)) - }) - return _c -} - -func (_c *MockBVLPDU_Put_Call) Return() *MockBVLPDU_Put_Call { - _c.Call.Return() - return _c -} - -func (_c *MockBVLPDU_Put_Call) RunAndReturn(run func(byte)) *MockBVLPDU_Put_Call { - _c.Call.Return(run) - return _c -} - -// PutData provides a mock function with given fields: _a0 -func (_m *MockBVLPDU) PutData(_a0 ...byte) { - _va := make([]interface{}, len(_a0)) - for _i := range _a0 { - _va[_i] = _a0[_i] - } - var _ca []interface{} - _ca = append(_ca, _va...) - _m.Called(_ca...) -} - -// MockBVLPDU_PutData_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PutData' -type MockBVLPDU_PutData_Call struct { - *mock.Call -} - -// PutData is a helper method to define mock.On call -// - _a0 ...byte -func (_e *MockBVLPDU_Expecter) PutData(_a0 ...interface{}) *MockBVLPDU_PutData_Call { - return &MockBVLPDU_PutData_Call{Call: _e.mock.On("PutData", - append([]interface{}{}, _a0...)...)} -} - -func (_c *MockBVLPDU_PutData_Call) Run(run func(_a0 ...byte)) *MockBVLPDU_PutData_Call { - _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]byte, len(args)-0) - for i, a := range args[0:] { - if a != nil { - variadicArgs[i] = a.(byte) - } - } - run(variadicArgs...) - }) - return _c -} - -func (_c *MockBVLPDU_PutData_Call) Return() *MockBVLPDU_PutData_Call { - _c.Call.Return() - return _c -} - -func (_c *MockBVLPDU_PutData_Call) RunAndReturn(run func(...byte)) *MockBVLPDU_PutData_Call { - _c.Call.Return(run) - return _c -} - -// PutLong provides a mock function with given fields: _a0 -func (_m *MockBVLPDU) PutLong(_a0 uint32) { - _m.Called(_a0) -} - -// MockBVLPDU_PutLong_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PutLong' -type MockBVLPDU_PutLong_Call struct { - *mock.Call -} - -// PutLong is a helper method to define mock.On call -// - _a0 uint32 -func (_e *MockBVLPDU_Expecter) PutLong(_a0 interface{}) *MockBVLPDU_PutLong_Call { - return &MockBVLPDU_PutLong_Call{Call: _e.mock.On("PutLong", _a0)} -} - -func (_c *MockBVLPDU_PutLong_Call) Run(run func(_a0 uint32)) *MockBVLPDU_PutLong_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(uint32)) - }) - return _c -} - -func (_c *MockBVLPDU_PutLong_Call) Return() *MockBVLPDU_PutLong_Call { - _c.Call.Return() - return _c -} - -func (_c *MockBVLPDU_PutLong_Call) RunAndReturn(run func(uint32)) *MockBVLPDU_PutLong_Call { - _c.Call.Return(run) - return _c -} - -// PutShort provides a mock function with given fields: _a0 -func (_m *MockBVLPDU) PutShort(_a0 uint16) { - _m.Called(_a0) -} - -// MockBVLPDU_PutShort_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PutShort' -type MockBVLPDU_PutShort_Call struct { - *mock.Call -} - -// PutShort is a helper method to define mock.On call -// - _a0 uint16 -func (_e *MockBVLPDU_Expecter) PutShort(_a0 interface{}) *MockBVLPDU_PutShort_Call { - return &MockBVLPDU_PutShort_Call{Call: _e.mock.On("PutShort", _a0)} -} - -func (_c *MockBVLPDU_PutShort_Call) Run(run func(_a0 uint16)) *MockBVLPDU_PutShort_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(uint16)) - }) - return _c -} - -func (_c *MockBVLPDU_PutShort_Call) Return() *MockBVLPDU_PutShort_Call { - _c.Call.Return() - return _c -} - -func (_c *MockBVLPDU_PutShort_Call) RunAndReturn(run func(uint16)) *MockBVLPDU_PutShort_Call { - _c.Call.Return(run) - return _c -} - -// Serialize provides a mock function with given fields: -func (_m *MockBVLPDU) Serialize() ([]byte, error) { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Serialize") - } - - var r0 []byte - var r1 error - if rf, ok := ret.Get(0).(func() ([]byte, error)); ok { - return rf() - } - if rf, ok := ret.Get(0).(func() []byte); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]byte) - } - } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockBVLPDU_Serialize_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Serialize' -type MockBVLPDU_Serialize_Call struct { - *mock.Call -} - -// Serialize is a helper method to define mock.On call -func (_e *MockBVLPDU_Expecter) Serialize() *MockBVLPDU_Serialize_Call { - return &MockBVLPDU_Serialize_Call{Call: _e.mock.On("Serialize")} -} - -func (_c *MockBVLPDU_Serialize_Call) Run(run func()) *MockBVLPDU_Serialize_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockBVLPDU_Serialize_Call) Return(_a0 []byte, _a1 error) *MockBVLPDU_Serialize_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockBVLPDU_Serialize_Call) RunAndReturn(run func() ([]byte, error)) *MockBVLPDU_Serialize_Call { - _c.Call.Return(run) - return _c -} - -// SerializeWithWriteBuffer provides a mock function with given fields: ctx, writeBuffer -func (_m *MockBVLPDU) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { - ret := _m.Called(ctx, writeBuffer) - - if len(ret) == 0 { - panic("no return value specified for SerializeWithWriteBuffer") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, utils.WriteBuffer) error); ok { - r0 = rf(ctx, writeBuffer) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockBVLPDU_SerializeWithWriteBuffer_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SerializeWithWriteBuffer' -type MockBVLPDU_SerializeWithWriteBuffer_Call struct { - *mock.Call -} - -// SerializeWithWriteBuffer is a helper method to define mock.On call -// - ctx context.Context -// - writeBuffer utils.WriteBuffer -func (_e *MockBVLPDU_Expecter) SerializeWithWriteBuffer(ctx interface{}, writeBuffer interface{}) *MockBVLPDU_SerializeWithWriteBuffer_Call { - return &MockBVLPDU_SerializeWithWriteBuffer_Call{Call: _e.mock.On("SerializeWithWriteBuffer", ctx, writeBuffer)} -} - -func (_c *MockBVLPDU_SerializeWithWriteBuffer_Call) Run(run func(ctx context.Context, writeBuffer utils.WriteBuffer)) *MockBVLPDU_SerializeWithWriteBuffer_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(utils.WriteBuffer)) - }) - return _c -} - -func (_c *MockBVLPDU_SerializeWithWriteBuffer_Call) Return(_a0 error) *MockBVLPDU_SerializeWithWriteBuffer_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockBVLPDU_SerializeWithWriteBuffer_Call) RunAndReturn(run func(context.Context, utils.WriteBuffer) error) *MockBVLPDU_SerializeWithWriteBuffer_Call { - _c.Call.Return(run) - return _c -} - -// SetExpectingReply provides a mock function with given fields: _a0 -func (_m *MockBVLPDU) SetExpectingReply(_a0 bool) { - _m.Called(_a0) -} - -// MockBVLPDU_SetExpectingReply_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetExpectingReply' -type MockBVLPDU_SetExpectingReply_Call struct { - *mock.Call -} - -// SetExpectingReply is a helper method to define mock.On call -// - _a0 bool -func (_e *MockBVLPDU_Expecter) SetExpectingReply(_a0 interface{}) *MockBVLPDU_SetExpectingReply_Call { - return &MockBVLPDU_SetExpectingReply_Call{Call: _e.mock.On("SetExpectingReply", _a0)} -} - -func (_c *MockBVLPDU_SetExpectingReply_Call) Run(run func(_a0 bool)) *MockBVLPDU_SetExpectingReply_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(bool)) - }) - return _c -} - -func (_c *MockBVLPDU_SetExpectingReply_Call) Return() *MockBVLPDU_SetExpectingReply_Call { - _c.Call.Return() - return _c -} - -func (_c *MockBVLPDU_SetExpectingReply_Call) RunAndReturn(run func(bool)) *MockBVLPDU_SetExpectingReply_Call { - _c.Call.Return(run) - return _c -} - -// SetNetworkPriority provides a mock function with given fields: _a0 -func (_m *MockBVLPDU) SetNetworkPriority(_a0 model.NPDUNetworkPriority) { - _m.Called(_a0) -} - -// MockBVLPDU_SetNetworkPriority_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetNetworkPriority' -type MockBVLPDU_SetNetworkPriority_Call struct { - *mock.Call -} - -// SetNetworkPriority is a helper method to define mock.On call -// - _a0 model.NPDUNetworkPriority -func (_e *MockBVLPDU_Expecter) SetNetworkPriority(_a0 interface{}) *MockBVLPDU_SetNetworkPriority_Call { - return &MockBVLPDU_SetNetworkPriority_Call{Call: _e.mock.On("SetNetworkPriority", _a0)} -} - -func (_c *MockBVLPDU_SetNetworkPriority_Call) Run(run func(_a0 model.NPDUNetworkPriority)) *MockBVLPDU_SetNetworkPriority_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(model.NPDUNetworkPriority)) - }) - return _c -} - -func (_c *MockBVLPDU_SetNetworkPriority_Call) Return() *MockBVLPDU_SetNetworkPriority_Call { - _c.Call.Return() - return _c -} - -func (_c *MockBVLPDU_SetNetworkPriority_Call) RunAndReturn(run func(model.NPDUNetworkPriority)) *MockBVLPDU_SetNetworkPriority_Call { - _c.Call.Return(run) - return _c -} - -// SetPDUDestination provides a mock function with given fields: _a0 -func (_m *MockBVLPDU) SetPDUDestination(_a0 *Address) { - _m.Called(_a0) -} - -// MockBVLPDU_SetPDUDestination_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetPDUDestination' -type MockBVLPDU_SetPDUDestination_Call struct { - *mock.Call -} - -// SetPDUDestination is a helper method to define mock.On call -// - _a0 *Address -func (_e *MockBVLPDU_Expecter) SetPDUDestination(_a0 interface{}) *MockBVLPDU_SetPDUDestination_Call { - return &MockBVLPDU_SetPDUDestination_Call{Call: _e.mock.On("SetPDUDestination", _a0)} -} - -func (_c *MockBVLPDU_SetPDUDestination_Call) Run(run func(_a0 *Address)) *MockBVLPDU_SetPDUDestination_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(*Address)) - }) - return _c -} - -func (_c *MockBVLPDU_SetPDUDestination_Call) Return() *MockBVLPDU_SetPDUDestination_Call { - _c.Call.Return() - return _c -} - -func (_c *MockBVLPDU_SetPDUDestination_Call) RunAndReturn(run func(*Address)) *MockBVLPDU_SetPDUDestination_Call { - _c.Call.Return(run) - return _c -} - -// SetPDUSource provides a mock function with given fields: source -func (_m *MockBVLPDU) SetPDUSource(source *Address) { - _m.Called(source) -} - -// MockBVLPDU_SetPDUSource_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetPDUSource' -type MockBVLPDU_SetPDUSource_Call struct { - *mock.Call -} - -// SetPDUSource is a helper method to define mock.On call -// - source *Address -func (_e *MockBVLPDU_Expecter) SetPDUSource(source interface{}) *MockBVLPDU_SetPDUSource_Call { - return &MockBVLPDU_SetPDUSource_Call{Call: _e.mock.On("SetPDUSource", source)} -} - -func (_c *MockBVLPDU_SetPDUSource_Call) Run(run func(source *Address)) *MockBVLPDU_SetPDUSource_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(*Address)) - }) - return _c -} - -func (_c *MockBVLPDU_SetPDUSource_Call) Return() *MockBVLPDU_SetPDUSource_Call { - _c.Call.Return() - return _c -} - -func (_c *MockBVLPDU_SetPDUSource_Call) RunAndReturn(run func(*Address)) *MockBVLPDU_SetPDUSource_Call { - _c.Call.Return(run) - return _c -} - -// SetPDUUserData provides a mock function with given fields: _a0 -func (_m *MockBVLPDU) SetPDUUserData(_a0 spi.Message) { - _m.Called(_a0) -} - -// MockBVLPDU_SetPDUUserData_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetPDUUserData' -type MockBVLPDU_SetPDUUserData_Call struct { - *mock.Call -} - -// SetPDUUserData is a helper method to define mock.On call -// - _a0 spi.Message -func (_e *MockBVLPDU_Expecter) SetPDUUserData(_a0 interface{}) *MockBVLPDU_SetPDUUserData_Call { - return &MockBVLPDU_SetPDUUserData_Call{Call: _e.mock.On("SetPDUUserData", _a0)} -} - -func (_c *MockBVLPDU_SetPDUUserData_Call) Run(run func(_a0 spi.Message)) *MockBVLPDU_SetPDUUserData_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(spi.Message)) - }) - return _c -} - -func (_c *MockBVLPDU_SetPDUUserData_Call) Return() *MockBVLPDU_SetPDUUserData_Call { - _c.Call.Return() - return _c -} - -func (_c *MockBVLPDU_SetPDUUserData_Call) RunAndReturn(run func(spi.Message)) *MockBVLPDU_SetPDUUserData_Call { - _c.Call.Return(run) - return _c -} - -// SetPduData provides a mock function with given fields: _a0 -func (_m *MockBVLPDU) SetPduData(_a0 []byte) { - _m.Called(_a0) -} - -// MockBVLPDU_SetPduData_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetPduData' -type MockBVLPDU_SetPduData_Call struct { - *mock.Call -} - -// SetPduData is a helper method to define mock.On call -// - _a0 []byte -func (_e *MockBVLPDU_Expecter) SetPduData(_a0 interface{}) *MockBVLPDU_SetPduData_Call { - return &MockBVLPDU_SetPduData_Call{Call: _e.mock.On("SetPduData", _a0)} -} - -func (_c *MockBVLPDU_SetPduData_Call) Run(run func(_a0 []byte)) *MockBVLPDU_SetPduData_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].([]byte)) - }) - return _c -} - -func (_c *MockBVLPDU_SetPduData_Call) Return() *MockBVLPDU_SetPduData_Call { - _c.Call.Return() - return _c -} - -func (_c *MockBVLPDU_SetPduData_Call) RunAndReturn(run func([]byte)) *MockBVLPDU_SetPduData_Call { - _c.Call.Return(run) - return _c -} - -// String provides a mock function with given fields: -func (_m *MockBVLPDU) String() string { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for String") - } - - var r0 string - if rf, ok := ret.Get(0).(func() string); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(string) - } - - return r0 -} - -// MockBVLPDU_String_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'String' -type MockBVLPDU_String_Call struct { - *mock.Call -} - -// String is a helper method to define mock.On call -func (_e *MockBVLPDU_Expecter) String() *MockBVLPDU_String_Call { - return &MockBVLPDU_String_Call{Call: _e.mock.On("String")} -} - -func (_c *MockBVLPDU_String_Call) Run(run func()) *MockBVLPDU_String_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockBVLPDU_String_Call) Return(_a0 string) *MockBVLPDU_String_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockBVLPDU_String_Call) RunAndReturn(run func() string) *MockBVLPDU_String_Call { - _c.Call.Return(run) - return _c -} - -// Update provides a mock function with given fields: pci -func (_m *MockBVLPDU) Update(pci Arg) error { - ret := _m.Called(pci) - - if len(ret) == 0 { - panic("no return value specified for Update") - } - - var r0 error - if rf, ok := ret.Get(0).(func(Arg) error); ok { - r0 = rf(pci) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockBVLPDU_Update_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Update' -type MockBVLPDU_Update_Call struct { - *mock.Call -} - -// Update is a helper method to define mock.On call -// - pci Arg -func (_e *MockBVLPDU_Expecter) Update(pci interface{}) *MockBVLPDU_Update_Call { - return &MockBVLPDU_Update_Call{Call: _e.mock.On("Update", pci)} -} - -func (_c *MockBVLPDU_Update_Call) Run(run func(pci Arg)) *MockBVLPDU_Update_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(Arg)) - }) - return _c -} - -func (_c *MockBVLPDU_Update_Call) Return(_a0 error) *MockBVLPDU_Update_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockBVLPDU_Update_Call) RunAndReturn(run func(Arg) error) *MockBVLPDU_Update_Call { - _c.Call.Return(run) - return _c -} - -// getBVLC provides a mock function with given fields: -func (_m *MockBVLPDU) getBVLC() model.BVLC { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for getBVLC") - } - - var r0 model.BVLC - if rf, ok := ret.Get(0).(func() model.BVLC); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(model.BVLC) - } - } - - return r0 -} - -// MockBVLPDU_getBVLC_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'getBVLC' -type MockBVLPDU_getBVLC_Call struct { - *mock.Call -} - -// getBVLC is a helper method to define mock.On call -func (_e *MockBVLPDU_Expecter) getBVLC() *MockBVLPDU_getBVLC_Call { - return &MockBVLPDU_getBVLC_Call{Call: _e.mock.On("getBVLC")} -} - -func (_c *MockBVLPDU_getBVLC_Call) Run(run func()) *MockBVLPDU_getBVLC_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockBVLPDU_getBVLC_Call) Return(_a0 model.BVLC) *MockBVLPDU_getBVLC_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockBVLPDU_getBVLC_Call) RunAndReturn(run func() model.BVLC) *MockBVLPDU_getBVLC_Call { - _c.Call.Return(run) - return _c -} - -// setBVLC provides a mock function with given fields: _a0 -func (_m *MockBVLPDU) setBVLC(_a0 model.BVLC) { - _m.Called(_a0) -} - -// MockBVLPDU_setBVLC_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'setBVLC' -type MockBVLPDU_setBVLC_Call struct { - *mock.Call -} - -// setBVLC is a helper method to define mock.On call -// - _a0 model.BVLC -func (_e *MockBVLPDU_Expecter) setBVLC(_a0 interface{}) *MockBVLPDU_setBVLC_Call { - return &MockBVLPDU_setBVLC_Call{Call: _e.mock.On("setBVLC", _a0)} -} - -func (_c *MockBVLPDU_setBVLC_Call) Run(run func(_a0 model.BVLC)) *MockBVLPDU_setBVLC_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(model.BVLC)) - }) - return _c -} - -func (_c *MockBVLPDU_setBVLC_Call) Return() *MockBVLPDU_setBVLC_Call { - _c.Call.Return() - return _c -} - -func (_c *MockBVLPDU_setBVLC_Call) RunAndReturn(run func(model.BVLC)) *MockBVLPDU_setBVLC_Call { - _c.Call.Return(run) - return _c -} - -// NewMockBVLPDU creates a new instance of MockBVLPDU. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewMockBVLPDU(t interface { - mock.TestingT - Cleanup(func()) -}) *MockBVLPDU { - mock := &MockBVLPDU{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/plc4go/internal/bacnetip/mock_BacNetPlcTag_test.go b/plc4go/internal/bacnetip/mock_BacNetPlcTag_test.go deleted file mode 100644 index 09dff8407d0..00000000000 --- a/plc4go/internal/bacnetip/mock_BacNetPlcTag_test.go +++ /dev/null @@ -1,330 +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 - * - * https://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. - */ - -// Code generated by mockery v2.42.2. DO NOT EDIT. - -package bacnetip - -import ( - model "github.com/apache/plc4x/plc4go/pkg/api/model" - mock "github.com/stretchr/testify/mock" - - values "github.com/apache/plc4x/plc4go/pkg/api/values" -) - -// MockBacNetPlcTag is an autogenerated mock type for the BacNetPlcTag type -type MockBacNetPlcTag struct { - mock.Mock -} - -type MockBacNetPlcTag_Expecter struct { - mock *mock.Mock -} - -func (_m *MockBacNetPlcTag) EXPECT() *MockBacNetPlcTag_Expecter { - return &MockBacNetPlcTag_Expecter{mock: &_m.Mock} -} - -// GetAddressString provides a mock function with given fields: -func (_m *MockBacNetPlcTag) GetAddressString() string { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetAddressString") - } - - var r0 string - if rf, ok := ret.Get(0).(func() string); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(string) - } - - return r0 -} - -// MockBacNetPlcTag_GetAddressString_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAddressString' -type MockBacNetPlcTag_GetAddressString_Call struct { - *mock.Call -} - -// GetAddressString is a helper method to define mock.On call -func (_e *MockBacNetPlcTag_Expecter) GetAddressString() *MockBacNetPlcTag_GetAddressString_Call { - return &MockBacNetPlcTag_GetAddressString_Call{Call: _e.mock.On("GetAddressString")} -} - -func (_c *MockBacNetPlcTag_GetAddressString_Call) Run(run func()) *MockBacNetPlcTag_GetAddressString_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockBacNetPlcTag_GetAddressString_Call) Return(_a0 string) *MockBacNetPlcTag_GetAddressString_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockBacNetPlcTag_GetAddressString_Call) RunAndReturn(run func() string) *MockBacNetPlcTag_GetAddressString_Call { - _c.Call.Return(run) - return _c -} - -// GetArrayInfo provides a mock function with given fields: -func (_m *MockBacNetPlcTag) GetArrayInfo() []model.ArrayInfo { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetArrayInfo") - } - - var r0 []model.ArrayInfo - if rf, ok := ret.Get(0).(func() []model.ArrayInfo); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]model.ArrayInfo) - } - } - - return r0 -} - -// MockBacNetPlcTag_GetArrayInfo_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetArrayInfo' -type MockBacNetPlcTag_GetArrayInfo_Call struct { - *mock.Call -} - -// GetArrayInfo is a helper method to define mock.On call -func (_e *MockBacNetPlcTag_Expecter) GetArrayInfo() *MockBacNetPlcTag_GetArrayInfo_Call { - return &MockBacNetPlcTag_GetArrayInfo_Call{Call: _e.mock.On("GetArrayInfo")} -} - -func (_c *MockBacNetPlcTag_GetArrayInfo_Call) Run(run func()) *MockBacNetPlcTag_GetArrayInfo_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockBacNetPlcTag_GetArrayInfo_Call) Return(_a0 []model.ArrayInfo) *MockBacNetPlcTag_GetArrayInfo_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockBacNetPlcTag_GetArrayInfo_Call) RunAndReturn(run func() []model.ArrayInfo) *MockBacNetPlcTag_GetArrayInfo_Call { - _c.Call.Return(run) - return _c -} - -// GetObjectId provides a mock function with given fields: -func (_m *MockBacNetPlcTag) GetObjectId() objectId { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetObjectId") - } - - var r0 objectId - if rf, ok := ret.Get(0).(func() objectId); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(objectId) - } - - return r0 -} - -// MockBacNetPlcTag_GetObjectId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetObjectId' -type MockBacNetPlcTag_GetObjectId_Call struct { - *mock.Call -} - -// GetObjectId is a helper method to define mock.On call -func (_e *MockBacNetPlcTag_Expecter) GetObjectId() *MockBacNetPlcTag_GetObjectId_Call { - return &MockBacNetPlcTag_GetObjectId_Call{Call: _e.mock.On("GetObjectId")} -} - -func (_c *MockBacNetPlcTag_GetObjectId_Call) Run(run func()) *MockBacNetPlcTag_GetObjectId_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockBacNetPlcTag_GetObjectId_Call) Return(_a0 objectId) *MockBacNetPlcTag_GetObjectId_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockBacNetPlcTag_GetObjectId_Call) RunAndReturn(run func() objectId) *MockBacNetPlcTag_GetObjectId_Call { - _c.Call.Return(run) - return _c -} - -// GetProperties provides a mock function with given fields: -func (_m *MockBacNetPlcTag) GetProperties() []property { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetProperties") - } - - var r0 []property - if rf, ok := ret.Get(0).(func() []property); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]property) - } - } - - return r0 -} - -// MockBacNetPlcTag_GetProperties_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetProperties' -type MockBacNetPlcTag_GetProperties_Call struct { - *mock.Call -} - -// GetProperties is a helper method to define mock.On call -func (_e *MockBacNetPlcTag_Expecter) GetProperties() *MockBacNetPlcTag_GetProperties_Call { - return &MockBacNetPlcTag_GetProperties_Call{Call: _e.mock.On("GetProperties")} -} - -func (_c *MockBacNetPlcTag_GetProperties_Call) Run(run func()) *MockBacNetPlcTag_GetProperties_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockBacNetPlcTag_GetProperties_Call) Return(_a0 []property) *MockBacNetPlcTag_GetProperties_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockBacNetPlcTag_GetProperties_Call) RunAndReturn(run func() []property) *MockBacNetPlcTag_GetProperties_Call { - _c.Call.Return(run) - return _c -} - -// GetValueType provides a mock function with given fields: -func (_m *MockBacNetPlcTag) GetValueType() values.PlcValueType { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetValueType") - } - - var r0 values.PlcValueType - if rf, ok := ret.Get(0).(func() values.PlcValueType); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(values.PlcValueType) - } - - return r0 -} - -// MockBacNetPlcTag_GetValueType_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetValueType' -type MockBacNetPlcTag_GetValueType_Call struct { - *mock.Call -} - -// GetValueType is a helper method to define mock.On call -func (_e *MockBacNetPlcTag_Expecter) GetValueType() *MockBacNetPlcTag_GetValueType_Call { - return &MockBacNetPlcTag_GetValueType_Call{Call: _e.mock.On("GetValueType")} -} - -func (_c *MockBacNetPlcTag_GetValueType_Call) Run(run func()) *MockBacNetPlcTag_GetValueType_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockBacNetPlcTag_GetValueType_Call) Return(_a0 values.PlcValueType) *MockBacNetPlcTag_GetValueType_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockBacNetPlcTag_GetValueType_Call) RunAndReturn(run func() values.PlcValueType) *MockBacNetPlcTag_GetValueType_Call { - _c.Call.Return(run) - return _c -} - -// String provides a mock function with given fields: -func (_m *MockBacNetPlcTag) String() string { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for String") - } - - var r0 string - if rf, ok := ret.Get(0).(func() string); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(string) - } - - return r0 -} - -// MockBacNetPlcTag_String_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'String' -type MockBacNetPlcTag_String_Call struct { - *mock.Call -} - -// String is a helper method to define mock.On call -func (_e *MockBacNetPlcTag_Expecter) String() *MockBacNetPlcTag_String_Call { - return &MockBacNetPlcTag_String_Call{Call: _e.mock.On("String")} -} - -func (_c *MockBacNetPlcTag_String_Call) Run(run func()) *MockBacNetPlcTag_String_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockBacNetPlcTag_String_Call) Return(_a0 string) *MockBacNetPlcTag_String_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockBacNetPlcTag_String_Call) RunAndReturn(run func() string) *MockBacNetPlcTag_String_Call { - _c.Call.Return(run) - return _c -} - -// NewMockBacNetPlcTag creates a new instance of MockBacNetPlcTag. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewMockBacNetPlcTag(t interface { - mock.TestingT - Cleanup(func()) -}) *MockBacNetPlcTag { - mock := &MockBacNetPlcTag{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/plc4go/internal/bacnetip/mock_BitStringExtension_test.go b/plc4go/internal/bacnetip/mock_BitStringExtension_test.go deleted file mode 100644 index 4524dd825f8..00000000000 --- a/plc4go/internal/bacnetip/mock_BitStringExtension_test.go +++ /dev/null @@ -1,188 +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 - * - * https://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. - */ - -// Code generated by mockery v2.42.2. DO NOT EDIT. - -package bacnetip - -import mock "github.com/stretchr/testify/mock" - -// MockBitStringExtension is an autogenerated mock type for the BitStringExtension type -type MockBitStringExtension struct { - mock.Mock -} - -type MockBitStringExtension_Expecter struct { - mock *mock.Mock -} - -func (_m *MockBitStringExtension) EXPECT() *MockBitStringExtension_Expecter { - return &MockBitStringExtension_Expecter{mock: &_m.Mock} -} - -// GetBitLen provides a mock function with given fields: -func (_m *MockBitStringExtension) GetBitLen() int { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetBitLen") - } - - var r0 int - if rf, ok := ret.Get(0).(func() int); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(int) - } - - return r0 -} - -// MockBitStringExtension_GetBitLen_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetBitLen' -type MockBitStringExtension_GetBitLen_Call struct { - *mock.Call -} - -// GetBitLen is a helper method to define mock.On call -func (_e *MockBitStringExtension_Expecter) GetBitLen() *MockBitStringExtension_GetBitLen_Call { - return &MockBitStringExtension_GetBitLen_Call{Call: _e.mock.On("GetBitLen")} -} - -func (_c *MockBitStringExtension_GetBitLen_Call) Run(run func()) *MockBitStringExtension_GetBitLen_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockBitStringExtension_GetBitLen_Call) Return(_a0 int) *MockBitStringExtension_GetBitLen_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockBitStringExtension_GetBitLen_Call) RunAndReturn(run func() int) *MockBitStringExtension_GetBitLen_Call { - _c.Call.Return(run) - return _c -} - -// GetBitNames provides a mock function with given fields: -func (_m *MockBitStringExtension) GetBitNames() map[string]int { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetBitNames") - } - - var r0 map[string]int - if rf, ok := ret.Get(0).(func() map[string]int); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(map[string]int) - } - } - - return r0 -} - -// MockBitStringExtension_GetBitNames_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetBitNames' -type MockBitStringExtension_GetBitNames_Call struct { - *mock.Call -} - -// GetBitNames is a helper method to define mock.On call -func (_e *MockBitStringExtension_Expecter) GetBitNames() *MockBitStringExtension_GetBitNames_Call { - return &MockBitStringExtension_GetBitNames_Call{Call: _e.mock.On("GetBitNames")} -} - -func (_c *MockBitStringExtension_GetBitNames_Call) Run(run func()) *MockBitStringExtension_GetBitNames_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockBitStringExtension_GetBitNames_Call) Return(_a0 map[string]int) *MockBitStringExtension_GetBitNames_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockBitStringExtension_GetBitNames_Call) RunAndReturn(run func() map[string]int) *MockBitStringExtension_GetBitNames_Call { - _c.Call.Return(run) - return _c -} - -// String provides a mock function with given fields: -func (_m *MockBitStringExtension) String() string { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for String") - } - - var r0 string - if rf, ok := ret.Get(0).(func() string); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(string) - } - - return r0 -} - -// MockBitStringExtension_String_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'String' -type MockBitStringExtension_String_Call struct { - *mock.Call -} - -// String is a helper method to define mock.On call -func (_e *MockBitStringExtension_Expecter) String() *MockBitStringExtension_String_Call { - return &MockBitStringExtension_String_Call{Call: _e.mock.On("String")} -} - -func (_c *MockBitStringExtension_String_Call) Run(run func()) *MockBitStringExtension_String_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockBitStringExtension_String_Call) Return(_a0 string) *MockBitStringExtension_String_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockBitStringExtension_String_Call) RunAndReturn(run func() string) *MockBitStringExtension_String_Call { - _c.Call.Return(run) - return _c -} - -// NewMockBitStringExtension creates a new instance of MockBitStringExtension. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewMockBitStringExtension(t interface { - mock.TestingT - Cleanup(func()) -}) *MockBitStringExtension { - mock := &MockBitStringExtension{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/plc4go/internal/bacnetip/mock_ClientContract_test.go b/plc4go/internal/bacnetip/mock_ClientContract_test.go deleted file mode 100644 index a7c6cc7f08a..00000000000 --- a/plc4go/internal/bacnetip/mock_ClientContract_test.go +++ /dev/null @@ -1,270 +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 - * - * https://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. - */ - -// Code generated by mockery v2.42.2. DO NOT EDIT. - -package bacnetip - -import mock "github.com/stretchr/testify/mock" - -// MockClientContract is an autogenerated mock type for the ClientContract type -type MockClientContract struct { - mock.Mock -} - -type MockClientContract_Expecter struct { - mock *mock.Mock -} - -func (_m *MockClientContract) EXPECT() *MockClientContract_Expecter { - return &MockClientContract_Expecter{mock: &_m.Mock} -} - -// Confirmation provides a mock function with given fields: args, kwargs -func (_m *MockClientContract) Confirmation(args Args, kwargs KWArgs) error { - ret := _m.Called(args, kwargs) - - if len(ret) == 0 { - panic("no return value specified for Confirmation") - } - - var r0 error - if rf, ok := ret.Get(0).(func(Args, KWArgs) error); ok { - r0 = rf(args, kwargs) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockClientContract_Confirmation_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Confirmation' -type MockClientContract_Confirmation_Call struct { - *mock.Call -} - -// Confirmation is a helper method to define mock.On call -// - args Args -// - kwargs KWArgs -func (_e *MockClientContract_Expecter) Confirmation(args interface{}, kwargs interface{}) *MockClientContract_Confirmation_Call { - return &MockClientContract_Confirmation_Call{Call: _e.mock.On("Confirmation", args, kwargs)} -} - -func (_c *MockClientContract_Confirmation_Call) Run(run func(args Args, kwargs KWArgs)) *MockClientContract_Confirmation_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(Args), args[1].(KWArgs)) - }) - return _c -} - -func (_c *MockClientContract_Confirmation_Call) Return(_a0 error) *MockClientContract_Confirmation_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockClientContract_Confirmation_Call) RunAndReturn(run func(Args, KWArgs) error) *MockClientContract_Confirmation_Call { - _c.Call.Return(run) - return _c -} - -// Request provides a mock function with given fields: args, kwargs -func (_m *MockClientContract) Request(args Args, kwargs KWArgs) error { - ret := _m.Called(args, kwargs) - - if len(ret) == 0 { - panic("no return value specified for Request") - } - - var r0 error - if rf, ok := ret.Get(0).(func(Args, KWArgs) error); ok { - r0 = rf(args, kwargs) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockClientContract_Request_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Request' -type MockClientContract_Request_Call struct { - *mock.Call -} - -// Request is a helper method to define mock.On call -// - args Args -// - kwargs KWArgs -func (_e *MockClientContract_Expecter) Request(args interface{}, kwargs interface{}) *MockClientContract_Request_Call { - return &MockClientContract_Request_Call{Call: _e.mock.On("Request", args, kwargs)} -} - -func (_c *MockClientContract_Request_Call) Run(run func(args Args, kwargs KWArgs)) *MockClientContract_Request_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(Args), args[1].(KWArgs)) - }) - return _c -} - -func (_c *MockClientContract_Request_Call) Return(_a0 error) *MockClientContract_Request_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockClientContract_Request_Call) RunAndReturn(run func(Args, KWArgs) error) *MockClientContract_Request_Call { - _c.Call.Return(run) - return _c -} - -// String provides a mock function with given fields: -func (_m *MockClientContract) String() string { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for String") - } - - var r0 string - if rf, ok := ret.Get(0).(func() string); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(string) - } - - return r0 -} - -// MockClientContract_String_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'String' -type MockClientContract_String_Call struct { - *mock.Call -} - -// String is a helper method to define mock.On call -func (_e *MockClientContract_Expecter) String() *MockClientContract_String_Call { - return &MockClientContract_String_Call{Call: _e.mock.On("String")} -} - -func (_c *MockClientContract_String_Call) Run(run func()) *MockClientContract_String_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockClientContract_String_Call) Return(_a0 string) *MockClientContract_String_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockClientContract_String_Call) RunAndReturn(run func() string) *MockClientContract_String_Call { - _c.Call.Return(run) - return _c -} - -// _setClientPeer provides a mock function with given fields: server -func (_m *MockClientContract) _setClientPeer(server Server) { - _m.Called(server) -} - -// MockClientContract__setClientPeer_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method '_setClientPeer' -type MockClientContract__setClientPeer_Call struct { - *mock.Call -} - -// _setClientPeer is a helper method to define mock.On call -// - server Server -func (_e *MockClientContract_Expecter) _setClientPeer(server interface{}) *MockClientContract__setClientPeer_Call { - return &MockClientContract__setClientPeer_Call{Call: _e.mock.On("_setClientPeer", server)} -} - -func (_c *MockClientContract__setClientPeer_Call) Run(run func(server Server)) *MockClientContract__setClientPeer_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(Server)) - }) - return _c -} - -func (_c *MockClientContract__setClientPeer_Call) Return() *MockClientContract__setClientPeer_Call { - _c.Call.Return() - return _c -} - -func (_c *MockClientContract__setClientPeer_Call) RunAndReturn(run func(Server)) *MockClientContract__setClientPeer_Call { - _c.Call.Return(run) - return _c -} - -// getClientId provides a mock function with given fields: -func (_m *MockClientContract) getClientId() *int { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for getClientId") - } - - var r0 *int - if rf, ok := ret.Get(0).(func() *int); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*int) - } - } - - return r0 -} - -// MockClientContract_getClientId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'getClientId' -type MockClientContract_getClientId_Call struct { - *mock.Call -} - -// getClientId is a helper method to define mock.On call -func (_e *MockClientContract_Expecter) getClientId() *MockClientContract_getClientId_Call { - return &MockClientContract_getClientId_Call{Call: _e.mock.On("getClientId")} -} - -func (_c *MockClientContract_getClientId_Call) Run(run func()) *MockClientContract_getClientId_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockClientContract_getClientId_Call) Return(_a0 *int) *MockClientContract_getClientId_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockClientContract_getClientId_Call) RunAndReturn(run func() *int) *MockClientContract_getClientId_Call { - _c.Call.Return(run) - return _c -} - -// NewMockClientContract creates a new instance of MockClientContract. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewMockClientContract(t interface { - mock.TestingT - Cleanup(func()) -}) *MockClientContract { - mock := &MockClientContract{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/plc4go/internal/bacnetip/mock_ClientRequirements_test.go b/plc4go/internal/bacnetip/mock_ClientRequirements_test.go deleted file mode 100644 index 6f9c84cbfbe..00000000000 --- a/plc4go/internal/bacnetip/mock_ClientRequirements_test.go +++ /dev/null @@ -1,51 +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 - * - * https://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. - */ - -// Code generated by mockery v2.42.2. DO NOT EDIT. - -package bacnetip - -import mock "github.com/stretchr/testify/mock" - -// MockClientRequirements is an autogenerated mock type for the ClientRequirements type -type MockClientRequirements struct { - mock.Mock -} - -type MockClientRequirements_Expecter struct { - mock *mock.Mock -} - -func (_m *MockClientRequirements) EXPECT() *MockClientRequirements_Expecter { - return &MockClientRequirements_Expecter{mock: &_m.Mock} -} - -// NewMockClientRequirements creates a new instance of MockClientRequirements. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewMockClientRequirements(t interface { - mock.TestingT - Cleanup(func()) -}) *MockClientRequirements { - mock := &MockClientRequirements{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/plc4go/internal/bacnetip/mock_Client_test.go b/plc4go/internal/bacnetip/mock_Client_test.go deleted file mode 100644 index 7b394ee5a0e..00000000000 --- a/plc4go/internal/bacnetip/mock_Client_test.go +++ /dev/null @@ -1,270 +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 - * - * https://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. - */ - -// Code generated by mockery v2.42.2. DO NOT EDIT. - -package bacnetip - -import mock "github.com/stretchr/testify/mock" - -// MockClient is an autogenerated mock type for the Client type -type MockClient struct { - mock.Mock -} - -type MockClient_Expecter struct { - mock *mock.Mock -} - -func (_m *MockClient) EXPECT() *MockClient_Expecter { - return &MockClient_Expecter{mock: &_m.Mock} -} - -// Confirmation provides a mock function with given fields: args, kwargs -func (_m *MockClient) Confirmation(args Args, kwargs KWArgs) error { - ret := _m.Called(args, kwargs) - - if len(ret) == 0 { - panic("no return value specified for Confirmation") - } - - var r0 error - if rf, ok := ret.Get(0).(func(Args, KWArgs) error); ok { - r0 = rf(args, kwargs) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockClient_Confirmation_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Confirmation' -type MockClient_Confirmation_Call struct { - *mock.Call -} - -// Confirmation is a helper method to define mock.On call -// - args Args -// - kwargs KWArgs -func (_e *MockClient_Expecter) Confirmation(args interface{}, kwargs interface{}) *MockClient_Confirmation_Call { - return &MockClient_Confirmation_Call{Call: _e.mock.On("Confirmation", args, kwargs)} -} - -func (_c *MockClient_Confirmation_Call) Run(run func(args Args, kwargs KWArgs)) *MockClient_Confirmation_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(Args), args[1].(KWArgs)) - }) - return _c -} - -func (_c *MockClient_Confirmation_Call) Return(_a0 error) *MockClient_Confirmation_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockClient_Confirmation_Call) RunAndReturn(run func(Args, KWArgs) error) *MockClient_Confirmation_Call { - _c.Call.Return(run) - return _c -} - -// Request provides a mock function with given fields: args, kwargs -func (_m *MockClient) Request(args Args, kwargs KWArgs) error { - ret := _m.Called(args, kwargs) - - if len(ret) == 0 { - panic("no return value specified for Request") - } - - var r0 error - if rf, ok := ret.Get(0).(func(Args, KWArgs) error); ok { - r0 = rf(args, kwargs) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockClient_Request_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Request' -type MockClient_Request_Call struct { - *mock.Call -} - -// Request is a helper method to define mock.On call -// - args Args -// - kwargs KWArgs -func (_e *MockClient_Expecter) Request(args interface{}, kwargs interface{}) *MockClient_Request_Call { - return &MockClient_Request_Call{Call: _e.mock.On("Request", args, kwargs)} -} - -func (_c *MockClient_Request_Call) Run(run func(args Args, kwargs KWArgs)) *MockClient_Request_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(Args), args[1].(KWArgs)) - }) - return _c -} - -func (_c *MockClient_Request_Call) Return(_a0 error) *MockClient_Request_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockClient_Request_Call) RunAndReturn(run func(Args, KWArgs) error) *MockClient_Request_Call { - _c.Call.Return(run) - return _c -} - -// String provides a mock function with given fields: -func (_m *MockClient) String() string { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for String") - } - - var r0 string - if rf, ok := ret.Get(0).(func() string); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(string) - } - - return r0 -} - -// MockClient_String_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'String' -type MockClient_String_Call struct { - *mock.Call -} - -// String is a helper method to define mock.On call -func (_e *MockClient_Expecter) String() *MockClient_String_Call { - return &MockClient_String_Call{Call: _e.mock.On("String")} -} - -func (_c *MockClient_String_Call) Run(run func()) *MockClient_String_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockClient_String_Call) Return(_a0 string) *MockClient_String_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockClient_String_Call) RunAndReturn(run func() string) *MockClient_String_Call { - _c.Call.Return(run) - return _c -} - -// _setClientPeer provides a mock function with given fields: server -func (_m *MockClient) _setClientPeer(server Server) { - _m.Called(server) -} - -// MockClient__setClientPeer_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method '_setClientPeer' -type MockClient__setClientPeer_Call struct { - *mock.Call -} - -// _setClientPeer is a helper method to define mock.On call -// - server Server -func (_e *MockClient_Expecter) _setClientPeer(server interface{}) *MockClient__setClientPeer_Call { - return &MockClient__setClientPeer_Call{Call: _e.mock.On("_setClientPeer", server)} -} - -func (_c *MockClient__setClientPeer_Call) Run(run func(server Server)) *MockClient__setClientPeer_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(Server)) - }) - return _c -} - -func (_c *MockClient__setClientPeer_Call) Return() *MockClient__setClientPeer_Call { - _c.Call.Return() - return _c -} - -func (_c *MockClient__setClientPeer_Call) RunAndReturn(run func(Server)) *MockClient__setClientPeer_Call { - _c.Call.Return(run) - return _c -} - -// getClientId provides a mock function with given fields: -func (_m *MockClient) getClientId() *int { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for getClientId") - } - - var r0 *int - if rf, ok := ret.Get(0).(func() *int); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*int) - } - } - - return r0 -} - -// MockClient_getClientId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'getClientId' -type MockClient_getClientId_Call struct { - *mock.Call -} - -// getClientId is a helper method to define mock.On call -func (_e *MockClient_Expecter) getClientId() *MockClient_getClientId_Call { - return &MockClient_getClientId_Call{Call: _e.mock.On("getClientId")} -} - -func (_c *MockClient_getClientId_Call) Run(run func()) *MockClient_getClientId_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockClient_getClientId_Call) Return(_a0 *int) *MockClient_getClientId_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockClient_getClientId_Call) RunAndReturn(run func() *int) *MockClient_getClientId_Call { - _c.Call.Return(run) - return _c -} - -// NewMockClient creates a new instance of MockClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewMockClient(t interface { - mock.TestingT - Cleanup(func()) -}) *MockClient { - mock := &MockClient{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/plc4go/internal/bacnetip/mock_ComparableAndOrdered_test.go b/plc4go/internal/bacnetip/mock_ComparableAndOrdered_test.go deleted file mode 100644 index 7960ab74d4a..00000000000 --- a/plc4go/internal/bacnetip/mock_ComparableAndOrdered_test.go +++ /dev/null @@ -1,51 +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 - * - * https://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. - */ - -// Code generated by mockery v2.42.2. DO NOT EDIT. - -package bacnetip - -import mock "github.com/stretchr/testify/mock" - -// MockComparableAndOrdered is an autogenerated mock type for the ComparableAndOrdered type -type MockComparableAndOrdered struct { - mock.Mock -} - -type MockComparableAndOrdered_Expecter struct { - mock *mock.Mock -} - -func (_m *MockComparableAndOrdered) EXPECT() *MockComparableAndOrdered_Expecter { - return &MockComparableAndOrdered_Expecter{mock: &_m.Mock} -} - -// NewMockComparableAndOrdered creates a new instance of MockComparableAndOrdered. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewMockComparableAndOrdered(t interface { - mock.TestingT - Cleanup(func()) -}) *MockComparableAndOrdered { - mock := &MockComparableAndOrdered{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/plc4go/internal/bacnetip/mock_Copyable_test.go b/plc4go/internal/bacnetip/mock_Copyable_test.go deleted file mode 100644 index b9091573fe2..00000000000 --- a/plc4go/internal/bacnetip/mock_Copyable_test.go +++ /dev/null @@ -1,98 +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 - * - * https://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. - */ - -// Code generated by mockery v2.42.2. DO NOT EDIT. - -package bacnetip - -import mock "github.com/stretchr/testify/mock" - -// MockCopyable is an autogenerated mock type for the Copyable type -type MockCopyable struct { - mock.Mock -} - -type MockCopyable_Expecter struct { - mock *mock.Mock -} - -func (_m *MockCopyable) EXPECT() *MockCopyable_Expecter { - return &MockCopyable_Expecter{mock: &_m.Mock} -} - -// DeepCopy provides a mock function with given fields: -func (_m *MockCopyable) DeepCopy() interface{} { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for DeepCopy") - } - - var r0 interface{} - if rf, ok := ret.Get(0).(func() interface{}); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(interface{}) - } - } - - return r0 -} - -// MockCopyable_DeepCopy_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeepCopy' -type MockCopyable_DeepCopy_Call struct { - *mock.Call -} - -// DeepCopy is a helper method to define mock.On call -func (_e *MockCopyable_Expecter) DeepCopy() *MockCopyable_DeepCopy_Call { - return &MockCopyable_DeepCopy_Call{Call: _e.mock.On("DeepCopy")} -} - -func (_c *MockCopyable_DeepCopy_Call) Run(run func()) *MockCopyable_DeepCopy_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockCopyable_DeepCopy_Call) Return(_a0 interface{}) *MockCopyable_DeepCopy_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockCopyable_DeepCopy_Call) RunAndReturn(run func() interface{}) *MockCopyable_DeepCopy_Call { - _c.Call.Return(run) - return _c -} - -// NewMockCopyable creates a new instance of MockCopyable. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewMockCopyable(t interface { - mock.TestingT - Cleanup(func()) -}) *MockCopyable { - mock := &MockCopyable{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/plc4go/internal/bacnetip/mock_EnumeratedContract_test.go b/plc4go/internal/bacnetip/mock_EnumeratedContract_test.go deleted file mode 100644 index 19e8a04399e..00000000000 --- a/plc4go/internal/bacnetip/mock_EnumeratedContract_test.go +++ /dev/null @@ -1,178 +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 - * - * https://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. - */ - -// Code generated by mockery v2.42.2. DO NOT EDIT. - -package bacnetip - -import mock "github.com/stretchr/testify/mock" - -// MockEnumeratedContract is an autogenerated mock type for the EnumeratedContract type -type MockEnumeratedContract struct { - mock.Mock -} - -type MockEnumeratedContract_Expecter struct { - mock *mock.Mock -} - -func (_m *MockEnumeratedContract) EXPECT() *MockEnumeratedContract_Expecter { - return &MockEnumeratedContract_Expecter{mock: &_m.Mock} -} - -// GetEnumerations provides a mock function with given fields: -func (_m *MockEnumeratedContract) GetEnumerations() map[string]uint64 { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetEnumerations") - } - - var r0 map[string]uint64 - if rf, ok := ret.Get(0).(func() map[string]uint64); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(map[string]uint64) - } - } - - return r0 -} - -// MockEnumeratedContract_GetEnumerations_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetEnumerations' -type MockEnumeratedContract_GetEnumerations_Call struct { - *mock.Call -} - -// GetEnumerations is a helper method to define mock.On call -func (_e *MockEnumeratedContract_Expecter) GetEnumerations() *MockEnumeratedContract_GetEnumerations_Call { - return &MockEnumeratedContract_GetEnumerations_Call{Call: _e.mock.On("GetEnumerations")} -} - -func (_c *MockEnumeratedContract_GetEnumerations_Call) Run(run func()) *MockEnumeratedContract_GetEnumerations_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockEnumeratedContract_GetEnumerations_Call) Return(_a0 map[string]uint64) *MockEnumeratedContract_GetEnumerations_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockEnumeratedContract_GetEnumerations_Call) RunAndReturn(run func() map[string]uint64) *MockEnumeratedContract_GetEnumerations_Call { - _c.Call.Return(run) - return _c -} - -// GetXlateTable provides a mock function with given fields: -func (_m *MockEnumeratedContract) GetXlateTable() map[interface{}]interface{} { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetXlateTable") - } - - var r0 map[interface{}]interface{} - if rf, ok := ret.Get(0).(func() map[interface{}]interface{}); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(map[interface{}]interface{}) - } - } - - return r0 -} - -// MockEnumeratedContract_GetXlateTable_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetXlateTable' -type MockEnumeratedContract_GetXlateTable_Call struct { - *mock.Call -} - -// GetXlateTable is a helper method to define mock.On call -func (_e *MockEnumeratedContract_Expecter) GetXlateTable() *MockEnumeratedContract_GetXlateTable_Call { - return &MockEnumeratedContract_GetXlateTable_Call{Call: _e.mock.On("GetXlateTable")} -} - -func (_c *MockEnumeratedContract_GetXlateTable_Call) Run(run func()) *MockEnumeratedContract_GetXlateTable_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockEnumeratedContract_GetXlateTable_Call) Return(_a0 map[interface{}]interface{}) *MockEnumeratedContract_GetXlateTable_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockEnumeratedContract_GetXlateTable_Call) RunAndReturn(run func() map[interface{}]interface{}) *MockEnumeratedContract_GetXlateTable_Call { - _c.Call.Return(run) - return _c -} - -// SetEnumerated provides a mock function with given fields: enumerated -func (_m *MockEnumeratedContract) SetEnumerated(enumerated *Enumerated) { - _m.Called(enumerated) -} - -// MockEnumeratedContract_SetEnumerated_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetEnumerated' -type MockEnumeratedContract_SetEnumerated_Call struct { - *mock.Call -} - -// SetEnumerated is a helper method to define mock.On call -// - enumerated *Enumerated -func (_e *MockEnumeratedContract_Expecter) SetEnumerated(enumerated interface{}) *MockEnumeratedContract_SetEnumerated_Call { - return &MockEnumeratedContract_SetEnumerated_Call{Call: _e.mock.On("SetEnumerated", enumerated)} -} - -func (_c *MockEnumeratedContract_SetEnumerated_Call) Run(run func(enumerated *Enumerated)) *MockEnumeratedContract_SetEnumerated_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(*Enumerated)) - }) - return _c -} - -func (_c *MockEnumeratedContract_SetEnumerated_Call) Return() *MockEnumeratedContract_SetEnumerated_Call { - _c.Call.Return() - return _c -} - -func (_c *MockEnumeratedContract_SetEnumerated_Call) RunAndReturn(run func(*Enumerated)) *MockEnumeratedContract_SetEnumerated_Call { - _c.Call.Return(run) - return _c -} - -// NewMockEnumeratedContract creates a new instance of MockEnumeratedContract. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewMockEnumeratedContract(t interface { - mock.TestingT - Cleanup(func()) -}) *MockEnumeratedContract { - mock := &MockEnumeratedContract{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/plc4go/internal/bacnetip/mock_IOControllerRequirements_test.go b/plc4go/internal/bacnetip/mock_IOControllerRequirements_test.go deleted file mode 100644 index 62312ec2051..00000000000 --- a/plc4go/internal/bacnetip/mock_IOControllerRequirements_test.go +++ /dev/null @@ -1,237 +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 - * - * https://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. - */ - -// Code generated by mockery v2.42.2. DO NOT EDIT. - -package bacnetip - -import mock "github.com/stretchr/testify/mock" - -// MockIOControllerRequirements is an autogenerated mock type for the IOControllerRequirements type -type MockIOControllerRequirements struct { - mock.Mock -} - -type MockIOControllerRequirements_Expecter struct { - mock *mock.Mock -} - -func (_m *MockIOControllerRequirements) EXPECT() *MockIOControllerRequirements_Expecter { - return &MockIOControllerRequirements_Expecter{mock: &_m.Mock} -} - -// Abort provides a mock function with given fields: err -func (_m *MockIOControllerRequirements) Abort(err error) error { - ret := _m.Called(err) - - if len(ret) == 0 { - panic("no return value specified for Abort") - } - - var r0 error - if rf, ok := ret.Get(0).(func(error) error); ok { - r0 = rf(err) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockIOControllerRequirements_Abort_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Abort' -type MockIOControllerRequirements_Abort_Call struct { - *mock.Call -} - -// Abort is a helper method to define mock.On call -// - err error -func (_e *MockIOControllerRequirements_Expecter) Abort(err interface{}) *MockIOControllerRequirements_Abort_Call { - return &MockIOControllerRequirements_Abort_Call{Call: _e.mock.On("Abort", err)} -} - -func (_c *MockIOControllerRequirements_Abort_Call) Run(run func(err error)) *MockIOControllerRequirements_Abort_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(error)) - }) - return _c -} - -func (_c *MockIOControllerRequirements_Abort_Call) Return(_a0 error) *MockIOControllerRequirements_Abort_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockIOControllerRequirements_Abort_Call) RunAndReturn(run func(error) error) *MockIOControllerRequirements_Abort_Call { - _c.Call.Return(run) - return _c -} - -// AbortIO provides a mock function with given fields: iocb, err -func (_m *MockIOControllerRequirements) AbortIO(iocb _IOCB, err error) error { - ret := _m.Called(iocb, err) - - if len(ret) == 0 { - panic("no return value specified for AbortIO") - } - - var r0 error - if rf, ok := ret.Get(0).(func(_IOCB, error) error); ok { - r0 = rf(iocb, err) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockIOControllerRequirements_AbortIO_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AbortIO' -type MockIOControllerRequirements_AbortIO_Call struct { - *mock.Call -} - -// AbortIO is a helper method to define mock.On call -// - iocb _IOCB -// - err error -func (_e *MockIOControllerRequirements_Expecter) AbortIO(iocb interface{}, err interface{}) *MockIOControllerRequirements_AbortIO_Call { - return &MockIOControllerRequirements_AbortIO_Call{Call: _e.mock.On("AbortIO", iocb, err)} -} - -func (_c *MockIOControllerRequirements_AbortIO_Call) Run(run func(iocb _IOCB, err error)) *MockIOControllerRequirements_AbortIO_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(_IOCB), args[1].(error)) - }) - return _c -} - -func (_c *MockIOControllerRequirements_AbortIO_Call) Return(_a0 error) *MockIOControllerRequirements_AbortIO_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockIOControllerRequirements_AbortIO_Call) RunAndReturn(run func(_IOCB, error) error) *MockIOControllerRequirements_AbortIO_Call { - _c.Call.Return(run) - return _c -} - -// CompleteIO provides a mock function with given fields: iocb, pdu -func (_m *MockIOControllerRequirements) CompleteIO(iocb _IOCB, pdu PDU) error { - ret := _m.Called(iocb, pdu) - - if len(ret) == 0 { - panic("no return value specified for CompleteIO") - } - - var r0 error - if rf, ok := ret.Get(0).(func(_IOCB, PDU) error); ok { - r0 = rf(iocb, pdu) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockIOControllerRequirements_CompleteIO_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CompleteIO' -type MockIOControllerRequirements_CompleteIO_Call struct { - *mock.Call -} - -// CompleteIO is a helper method to define mock.On call -// - iocb _IOCB -// - pdu PDU -func (_e *MockIOControllerRequirements_Expecter) CompleteIO(iocb interface{}, pdu interface{}) *MockIOControllerRequirements_CompleteIO_Call { - return &MockIOControllerRequirements_CompleteIO_Call{Call: _e.mock.On("CompleteIO", iocb, pdu)} -} - -func (_c *MockIOControllerRequirements_CompleteIO_Call) Run(run func(iocb _IOCB, pdu PDU)) *MockIOControllerRequirements_CompleteIO_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(_IOCB), args[1].(PDU)) - }) - return _c -} - -func (_c *MockIOControllerRequirements_CompleteIO_Call) Return(_a0 error) *MockIOControllerRequirements_CompleteIO_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockIOControllerRequirements_CompleteIO_Call) RunAndReturn(run func(_IOCB, PDU) error) *MockIOControllerRequirements_CompleteIO_Call { - _c.Call.Return(run) - return _c -} - -// ProcessIO provides a mock function with given fields: iocb -func (_m *MockIOControllerRequirements) ProcessIO(iocb _IOCB) error { - ret := _m.Called(iocb) - - if len(ret) == 0 { - panic("no return value specified for ProcessIO") - } - - var r0 error - if rf, ok := ret.Get(0).(func(_IOCB) error); ok { - r0 = rf(iocb) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockIOControllerRequirements_ProcessIO_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ProcessIO' -type MockIOControllerRequirements_ProcessIO_Call struct { - *mock.Call -} - -// ProcessIO is a helper method to define mock.On call -// - iocb _IOCB -func (_e *MockIOControllerRequirements_Expecter) ProcessIO(iocb interface{}) *MockIOControllerRequirements_ProcessIO_Call { - return &MockIOControllerRequirements_ProcessIO_Call{Call: _e.mock.On("ProcessIO", iocb)} -} - -func (_c *MockIOControllerRequirements_ProcessIO_Call) Run(run func(iocb _IOCB)) *MockIOControllerRequirements_ProcessIO_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(_IOCB)) - }) - return _c -} - -func (_c *MockIOControllerRequirements_ProcessIO_Call) Return(_a0 error) *MockIOControllerRequirements_ProcessIO_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockIOControllerRequirements_ProcessIO_Call) RunAndReturn(run func(_IOCB) error) *MockIOControllerRequirements_ProcessIO_Call { - _c.Call.Return(run) - return _c -} - -// NewMockIOControllerRequirements creates a new instance of MockIOControllerRequirements. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewMockIOControllerRequirements(t interface { - mock.TestingT - Cleanup(func()) -}) *MockIOControllerRequirements { - mock := &MockIOControllerRequirements{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/plc4go/internal/bacnetip/mock_IOQControllerRequirements_test.go b/plc4go/internal/bacnetip/mock_IOQControllerRequirements_test.go deleted file mode 100644 index 65495c61351..00000000000 --- a/plc4go/internal/bacnetip/mock_IOQControllerRequirements_test.go +++ /dev/null @@ -1,237 +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 - * - * https://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. - */ - -// Code generated by mockery v2.42.2. DO NOT EDIT. - -package bacnetip - -import mock "github.com/stretchr/testify/mock" - -// MockIOQControllerRequirements is an autogenerated mock type for the IOQControllerRequirements type -type MockIOQControllerRequirements struct { - mock.Mock -} - -type MockIOQControllerRequirements_Expecter struct { - mock *mock.Mock -} - -func (_m *MockIOQControllerRequirements) EXPECT() *MockIOQControllerRequirements_Expecter { - return &MockIOQControllerRequirements_Expecter{mock: &_m.Mock} -} - -// Abort provides a mock function with given fields: err -func (_m *MockIOQControllerRequirements) Abort(err error) error { - ret := _m.Called(err) - - if len(ret) == 0 { - panic("no return value specified for Abort") - } - - var r0 error - if rf, ok := ret.Get(0).(func(error) error); ok { - r0 = rf(err) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockIOQControllerRequirements_Abort_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Abort' -type MockIOQControllerRequirements_Abort_Call struct { - *mock.Call -} - -// Abort is a helper method to define mock.On call -// - err error -func (_e *MockIOQControllerRequirements_Expecter) Abort(err interface{}) *MockIOQControllerRequirements_Abort_Call { - return &MockIOQControllerRequirements_Abort_Call{Call: _e.mock.On("Abort", err)} -} - -func (_c *MockIOQControllerRequirements_Abort_Call) Run(run func(err error)) *MockIOQControllerRequirements_Abort_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(error)) - }) - return _c -} - -func (_c *MockIOQControllerRequirements_Abort_Call) Return(_a0 error) *MockIOQControllerRequirements_Abort_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockIOQControllerRequirements_Abort_Call) RunAndReturn(run func(error) error) *MockIOQControllerRequirements_Abort_Call { - _c.Call.Return(run) - return _c -} - -// AbortIO provides a mock function with given fields: iocb, err -func (_m *MockIOQControllerRequirements) AbortIO(iocb _IOCB, err error) error { - ret := _m.Called(iocb, err) - - if len(ret) == 0 { - panic("no return value specified for AbortIO") - } - - var r0 error - if rf, ok := ret.Get(0).(func(_IOCB, error) error); ok { - r0 = rf(iocb, err) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockIOQControllerRequirements_AbortIO_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AbortIO' -type MockIOQControllerRequirements_AbortIO_Call struct { - *mock.Call -} - -// AbortIO is a helper method to define mock.On call -// - iocb _IOCB -// - err error -func (_e *MockIOQControllerRequirements_Expecter) AbortIO(iocb interface{}, err interface{}) *MockIOQControllerRequirements_AbortIO_Call { - return &MockIOQControllerRequirements_AbortIO_Call{Call: _e.mock.On("AbortIO", iocb, err)} -} - -func (_c *MockIOQControllerRequirements_AbortIO_Call) Run(run func(iocb _IOCB, err error)) *MockIOQControllerRequirements_AbortIO_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(_IOCB), args[1].(error)) - }) - return _c -} - -func (_c *MockIOQControllerRequirements_AbortIO_Call) Return(_a0 error) *MockIOQControllerRequirements_AbortIO_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockIOQControllerRequirements_AbortIO_Call) RunAndReturn(run func(_IOCB, error) error) *MockIOQControllerRequirements_AbortIO_Call { - _c.Call.Return(run) - return _c -} - -// CompleteIO provides a mock function with given fields: iocb, pdu -func (_m *MockIOQControllerRequirements) CompleteIO(iocb _IOCB, pdu PDU) error { - ret := _m.Called(iocb, pdu) - - if len(ret) == 0 { - panic("no return value specified for CompleteIO") - } - - var r0 error - if rf, ok := ret.Get(0).(func(_IOCB, PDU) error); ok { - r0 = rf(iocb, pdu) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockIOQControllerRequirements_CompleteIO_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CompleteIO' -type MockIOQControllerRequirements_CompleteIO_Call struct { - *mock.Call -} - -// CompleteIO is a helper method to define mock.On call -// - iocb _IOCB -// - pdu PDU -func (_e *MockIOQControllerRequirements_Expecter) CompleteIO(iocb interface{}, pdu interface{}) *MockIOQControllerRequirements_CompleteIO_Call { - return &MockIOQControllerRequirements_CompleteIO_Call{Call: _e.mock.On("CompleteIO", iocb, pdu)} -} - -func (_c *MockIOQControllerRequirements_CompleteIO_Call) Run(run func(iocb _IOCB, pdu PDU)) *MockIOQControllerRequirements_CompleteIO_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(_IOCB), args[1].(PDU)) - }) - return _c -} - -func (_c *MockIOQControllerRequirements_CompleteIO_Call) Return(_a0 error) *MockIOQControllerRequirements_CompleteIO_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockIOQControllerRequirements_CompleteIO_Call) RunAndReturn(run func(_IOCB, PDU) error) *MockIOQControllerRequirements_CompleteIO_Call { - _c.Call.Return(run) - return _c -} - -// ProcessIO provides a mock function with given fields: iocb -func (_m *MockIOQControllerRequirements) ProcessIO(iocb _IOCB) error { - ret := _m.Called(iocb) - - if len(ret) == 0 { - panic("no return value specified for ProcessIO") - } - - var r0 error - if rf, ok := ret.Get(0).(func(_IOCB) error); ok { - r0 = rf(iocb) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockIOQControllerRequirements_ProcessIO_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ProcessIO' -type MockIOQControllerRequirements_ProcessIO_Call struct { - *mock.Call -} - -// ProcessIO is a helper method to define mock.On call -// - iocb _IOCB -func (_e *MockIOQControllerRequirements_Expecter) ProcessIO(iocb interface{}) *MockIOQControllerRequirements_ProcessIO_Call { - return &MockIOQControllerRequirements_ProcessIO_Call{Call: _e.mock.On("ProcessIO", iocb)} -} - -func (_c *MockIOQControllerRequirements_ProcessIO_Call) Run(run func(iocb _IOCB)) *MockIOQControllerRequirements_ProcessIO_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(_IOCB)) - }) - return _c -} - -func (_c *MockIOQControllerRequirements_ProcessIO_Call) Return(_a0 error) *MockIOQControllerRequirements_ProcessIO_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockIOQControllerRequirements_ProcessIO_Call) RunAndReturn(run func(_IOCB) error) *MockIOQControllerRequirements_ProcessIO_Call { - _c.Call.Return(run) - return _c -} - -// NewMockIOQControllerRequirements creates a new instance of MockIOQControllerRequirements. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewMockIOQControllerRequirements(t interface { - mock.TestingT - Cleanup(func()) -}) *MockIOQControllerRequirements { - mock := &MockIOQControllerRequirements{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/plc4go/internal/bacnetip/mock_IPCI_test.go b/plc4go/internal/bacnetip/mock_IPCI_test.go deleted file mode 100644 index d0a7257ab17..00000000000 --- a/plc4go/internal/bacnetip/mock_IPCI_test.go +++ /dev/null @@ -1,632 +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 - * - * https://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. - */ - -// Code generated by mockery v2.42.2. DO NOT EDIT. - -package bacnetip - -import ( - context "context" - - spi "github.com/apache/plc4x/plc4go/spi" - mock "github.com/stretchr/testify/mock" - - utils "github.com/apache/plc4x/plc4go/spi/utils" -) - -// MockIPCI is an autogenerated mock type for the IPCI type -type MockIPCI struct { - mock.Mock -} - -type MockIPCI_Expecter struct { - mock *mock.Mock -} - -func (_m *MockIPCI) EXPECT() *MockIPCI_Expecter { - return &MockIPCI_Expecter{mock: &_m.Mock} -} - -// GetLengthInBits provides a mock function with given fields: ctx -func (_m *MockIPCI) GetLengthInBits(ctx context.Context) uint16 { - ret := _m.Called(ctx) - - if len(ret) == 0 { - panic("no return value specified for GetLengthInBits") - } - - var r0 uint16 - if rf, ok := ret.Get(0).(func(context.Context) uint16); ok { - r0 = rf(ctx) - } else { - r0 = ret.Get(0).(uint16) - } - - return r0 -} - -// MockIPCI_GetLengthInBits_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetLengthInBits' -type MockIPCI_GetLengthInBits_Call struct { - *mock.Call -} - -// GetLengthInBits is a helper method to define mock.On call -// - ctx context.Context -func (_e *MockIPCI_Expecter) GetLengthInBits(ctx interface{}) *MockIPCI_GetLengthInBits_Call { - return &MockIPCI_GetLengthInBits_Call{Call: _e.mock.On("GetLengthInBits", ctx)} -} - -func (_c *MockIPCI_GetLengthInBits_Call) Run(run func(ctx context.Context)) *MockIPCI_GetLengthInBits_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context)) - }) - return _c -} - -func (_c *MockIPCI_GetLengthInBits_Call) Return(_a0 uint16) *MockIPCI_GetLengthInBits_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockIPCI_GetLengthInBits_Call) RunAndReturn(run func(context.Context) uint16) *MockIPCI_GetLengthInBits_Call { - _c.Call.Return(run) - return _c -} - -// GetLengthInBytes provides a mock function with given fields: ctx -func (_m *MockIPCI) GetLengthInBytes(ctx context.Context) uint16 { - ret := _m.Called(ctx) - - if len(ret) == 0 { - panic("no return value specified for GetLengthInBytes") - } - - var r0 uint16 - if rf, ok := ret.Get(0).(func(context.Context) uint16); ok { - r0 = rf(ctx) - } else { - r0 = ret.Get(0).(uint16) - } - - return r0 -} - -// MockIPCI_GetLengthInBytes_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetLengthInBytes' -type MockIPCI_GetLengthInBytes_Call struct { - *mock.Call -} - -// GetLengthInBytes is a helper method to define mock.On call -// - ctx context.Context -func (_e *MockIPCI_Expecter) GetLengthInBytes(ctx interface{}) *MockIPCI_GetLengthInBytes_Call { - return &MockIPCI_GetLengthInBytes_Call{Call: _e.mock.On("GetLengthInBytes", ctx)} -} - -func (_c *MockIPCI_GetLengthInBytes_Call) Run(run func(ctx context.Context)) *MockIPCI_GetLengthInBytes_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context)) - }) - return _c -} - -func (_c *MockIPCI_GetLengthInBytes_Call) Return(_a0 uint16) *MockIPCI_GetLengthInBytes_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockIPCI_GetLengthInBytes_Call) RunAndReturn(run func(context.Context) uint16) *MockIPCI_GetLengthInBytes_Call { - _c.Call.Return(run) - return _c -} - -// GetPDUDestination provides a mock function with given fields: -func (_m *MockIPCI) GetPDUDestination() *Address { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetPDUDestination") - } - - var r0 *Address - if rf, ok := ret.Get(0).(func() *Address); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*Address) - } - } - - return r0 -} - -// MockIPCI_GetPDUDestination_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPDUDestination' -type MockIPCI_GetPDUDestination_Call struct { - *mock.Call -} - -// GetPDUDestination is a helper method to define mock.On call -func (_e *MockIPCI_Expecter) GetPDUDestination() *MockIPCI_GetPDUDestination_Call { - return &MockIPCI_GetPDUDestination_Call{Call: _e.mock.On("GetPDUDestination")} -} - -func (_c *MockIPCI_GetPDUDestination_Call) Run(run func()) *MockIPCI_GetPDUDestination_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockIPCI_GetPDUDestination_Call) Return(_a0 *Address) *MockIPCI_GetPDUDestination_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockIPCI_GetPDUDestination_Call) RunAndReturn(run func() *Address) *MockIPCI_GetPDUDestination_Call { - _c.Call.Return(run) - return _c -} - -// GetPDUSource provides a mock function with given fields: -func (_m *MockIPCI) GetPDUSource() *Address { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetPDUSource") - } - - var r0 *Address - if rf, ok := ret.Get(0).(func() *Address); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*Address) - } - } - - return r0 -} - -// MockIPCI_GetPDUSource_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPDUSource' -type MockIPCI_GetPDUSource_Call struct { - *mock.Call -} - -// GetPDUSource is a helper method to define mock.On call -func (_e *MockIPCI_Expecter) GetPDUSource() *MockIPCI_GetPDUSource_Call { - return &MockIPCI_GetPDUSource_Call{Call: _e.mock.On("GetPDUSource")} -} - -func (_c *MockIPCI_GetPDUSource_Call) Run(run func()) *MockIPCI_GetPDUSource_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockIPCI_GetPDUSource_Call) Return(_a0 *Address) *MockIPCI_GetPDUSource_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockIPCI_GetPDUSource_Call) RunAndReturn(run func() *Address) *MockIPCI_GetPDUSource_Call { - _c.Call.Return(run) - return _c -} - -// GetPDUUserData provides a mock function with given fields: -func (_m *MockIPCI) GetPDUUserData() spi.Message { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetPDUUserData") - } - - var r0 spi.Message - if rf, ok := ret.Get(0).(func() spi.Message); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(spi.Message) - } - } - - return r0 -} - -// MockIPCI_GetPDUUserData_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPDUUserData' -type MockIPCI_GetPDUUserData_Call struct { - *mock.Call -} - -// GetPDUUserData is a helper method to define mock.On call -func (_e *MockIPCI_Expecter) GetPDUUserData() *MockIPCI_GetPDUUserData_Call { - return &MockIPCI_GetPDUUserData_Call{Call: _e.mock.On("GetPDUUserData")} -} - -func (_c *MockIPCI_GetPDUUserData_Call) Run(run func()) *MockIPCI_GetPDUUserData_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockIPCI_GetPDUUserData_Call) Return(_a0 spi.Message) *MockIPCI_GetPDUUserData_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockIPCI_GetPDUUserData_Call) RunAndReturn(run func() spi.Message) *MockIPCI_GetPDUUserData_Call { - _c.Call.Return(run) - return _c -} - -// GetRootMessage provides a mock function with given fields: -func (_m *MockIPCI) GetRootMessage() spi.Message { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetRootMessage") - } - - var r0 spi.Message - if rf, ok := ret.Get(0).(func() spi.Message); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(spi.Message) - } - } - - return r0 -} - -// MockIPCI_GetRootMessage_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRootMessage' -type MockIPCI_GetRootMessage_Call struct { - *mock.Call -} - -// GetRootMessage is a helper method to define mock.On call -func (_e *MockIPCI_Expecter) GetRootMessage() *MockIPCI_GetRootMessage_Call { - return &MockIPCI_GetRootMessage_Call{Call: _e.mock.On("GetRootMessage")} -} - -func (_c *MockIPCI_GetRootMessage_Call) Run(run func()) *MockIPCI_GetRootMessage_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockIPCI_GetRootMessage_Call) Return(_a0 spi.Message) *MockIPCI_GetRootMessage_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockIPCI_GetRootMessage_Call) RunAndReturn(run func() spi.Message) *MockIPCI_GetRootMessage_Call { - _c.Call.Return(run) - return _c -} - -// Serialize provides a mock function with given fields: -func (_m *MockIPCI) Serialize() ([]byte, error) { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Serialize") - } - - var r0 []byte - var r1 error - if rf, ok := ret.Get(0).(func() ([]byte, error)); ok { - return rf() - } - if rf, ok := ret.Get(0).(func() []byte); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]byte) - } - } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockIPCI_Serialize_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Serialize' -type MockIPCI_Serialize_Call struct { - *mock.Call -} - -// Serialize is a helper method to define mock.On call -func (_e *MockIPCI_Expecter) Serialize() *MockIPCI_Serialize_Call { - return &MockIPCI_Serialize_Call{Call: _e.mock.On("Serialize")} -} - -func (_c *MockIPCI_Serialize_Call) Run(run func()) *MockIPCI_Serialize_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockIPCI_Serialize_Call) Return(_a0 []byte, _a1 error) *MockIPCI_Serialize_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockIPCI_Serialize_Call) RunAndReturn(run func() ([]byte, error)) *MockIPCI_Serialize_Call { - _c.Call.Return(run) - return _c -} - -// SerializeWithWriteBuffer provides a mock function with given fields: ctx, writeBuffer -func (_m *MockIPCI) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { - ret := _m.Called(ctx, writeBuffer) - - if len(ret) == 0 { - panic("no return value specified for SerializeWithWriteBuffer") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, utils.WriteBuffer) error); ok { - r0 = rf(ctx, writeBuffer) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockIPCI_SerializeWithWriteBuffer_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SerializeWithWriteBuffer' -type MockIPCI_SerializeWithWriteBuffer_Call struct { - *mock.Call -} - -// SerializeWithWriteBuffer is a helper method to define mock.On call -// - ctx context.Context -// - writeBuffer utils.WriteBuffer -func (_e *MockIPCI_Expecter) SerializeWithWriteBuffer(ctx interface{}, writeBuffer interface{}) *MockIPCI_SerializeWithWriteBuffer_Call { - return &MockIPCI_SerializeWithWriteBuffer_Call{Call: _e.mock.On("SerializeWithWriteBuffer", ctx, writeBuffer)} -} - -func (_c *MockIPCI_SerializeWithWriteBuffer_Call) Run(run func(ctx context.Context, writeBuffer utils.WriteBuffer)) *MockIPCI_SerializeWithWriteBuffer_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(utils.WriteBuffer)) - }) - return _c -} - -func (_c *MockIPCI_SerializeWithWriteBuffer_Call) Return(_a0 error) *MockIPCI_SerializeWithWriteBuffer_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockIPCI_SerializeWithWriteBuffer_Call) RunAndReturn(run func(context.Context, utils.WriteBuffer) error) *MockIPCI_SerializeWithWriteBuffer_Call { - _c.Call.Return(run) - return _c -} - -// SetPDUDestination provides a mock function with given fields: _a0 -func (_m *MockIPCI) SetPDUDestination(_a0 *Address) { - _m.Called(_a0) -} - -// MockIPCI_SetPDUDestination_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetPDUDestination' -type MockIPCI_SetPDUDestination_Call struct { - *mock.Call -} - -// SetPDUDestination is a helper method to define mock.On call -// - _a0 *Address -func (_e *MockIPCI_Expecter) SetPDUDestination(_a0 interface{}) *MockIPCI_SetPDUDestination_Call { - return &MockIPCI_SetPDUDestination_Call{Call: _e.mock.On("SetPDUDestination", _a0)} -} - -func (_c *MockIPCI_SetPDUDestination_Call) Run(run func(_a0 *Address)) *MockIPCI_SetPDUDestination_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(*Address)) - }) - return _c -} - -func (_c *MockIPCI_SetPDUDestination_Call) Return() *MockIPCI_SetPDUDestination_Call { - _c.Call.Return() - return _c -} - -func (_c *MockIPCI_SetPDUDestination_Call) RunAndReturn(run func(*Address)) *MockIPCI_SetPDUDestination_Call { - _c.Call.Return(run) - return _c -} - -// SetPDUSource provides a mock function with given fields: source -func (_m *MockIPCI) SetPDUSource(source *Address) { - _m.Called(source) -} - -// MockIPCI_SetPDUSource_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetPDUSource' -type MockIPCI_SetPDUSource_Call struct { - *mock.Call -} - -// SetPDUSource is a helper method to define mock.On call -// - source *Address -func (_e *MockIPCI_Expecter) SetPDUSource(source interface{}) *MockIPCI_SetPDUSource_Call { - return &MockIPCI_SetPDUSource_Call{Call: _e.mock.On("SetPDUSource", source)} -} - -func (_c *MockIPCI_SetPDUSource_Call) Run(run func(source *Address)) *MockIPCI_SetPDUSource_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(*Address)) - }) - return _c -} - -func (_c *MockIPCI_SetPDUSource_Call) Return() *MockIPCI_SetPDUSource_Call { - _c.Call.Return() - return _c -} - -func (_c *MockIPCI_SetPDUSource_Call) RunAndReturn(run func(*Address)) *MockIPCI_SetPDUSource_Call { - _c.Call.Return(run) - return _c -} - -// SetPDUUserData provides a mock function with given fields: _a0 -func (_m *MockIPCI) SetPDUUserData(_a0 spi.Message) { - _m.Called(_a0) -} - -// MockIPCI_SetPDUUserData_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetPDUUserData' -type MockIPCI_SetPDUUserData_Call struct { - *mock.Call -} - -// SetPDUUserData is a helper method to define mock.On call -// - _a0 spi.Message -func (_e *MockIPCI_Expecter) SetPDUUserData(_a0 interface{}) *MockIPCI_SetPDUUserData_Call { - return &MockIPCI_SetPDUUserData_Call{Call: _e.mock.On("SetPDUUserData", _a0)} -} - -func (_c *MockIPCI_SetPDUUserData_Call) Run(run func(_a0 spi.Message)) *MockIPCI_SetPDUUserData_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(spi.Message)) - }) - return _c -} - -func (_c *MockIPCI_SetPDUUserData_Call) Return() *MockIPCI_SetPDUUserData_Call { - _c.Call.Return() - return _c -} - -func (_c *MockIPCI_SetPDUUserData_Call) RunAndReturn(run func(spi.Message)) *MockIPCI_SetPDUUserData_Call { - _c.Call.Return(run) - return _c -} - -// String provides a mock function with given fields: -func (_m *MockIPCI) String() string { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for String") - } - - var r0 string - if rf, ok := ret.Get(0).(func() string); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(string) - } - - return r0 -} - -// MockIPCI_String_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'String' -type MockIPCI_String_Call struct { - *mock.Call -} - -// String is a helper method to define mock.On call -func (_e *MockIPCI_Expecter) String() *MockIPCI_String_Call { - return &MockIPCI_String_Call{Call: _e.mock.On("String")} -} - -func (_c *MockIPCI_String_Call) Run(run func()) *MockIPCI_String_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockIPCI_String_Call) Return(_a0 string) *MockIPCI_String_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockIPCI_String_Call) RunAndReturn(run func() string) *MockIPCI_String_Call { - _c.Call.Return(run) - return _c -} - -// Update provides a mock function with given fields: pci -func (_m *MockIPCI) Update(pci Arg) error { - ret := _m.Called(pci) - - if len(ret) == 0 { - panic("no return value specified for Update") - } - - var r0 error - if rf, ok := ret.Get(0).(func(Arg) error); ok { - r0 = rf(pci) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockIPCI_Update_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Update' -type MockIPCI_Update_Call struct { - *mock.Call -} - -// Update is a helper method to define mock.On call -// - pci Arg -func (_e *MockIPCI_Expecter) Update(pci interface{}) *MockIPCI_Update_Call { - return &MockIPCI_Update_Call{Call: _e.mock.On("Update", pci)} -} - -func (_c *MockIPCI_Update_Call) Run(run func(pci Arg)) *MockIPCI_Update_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(Arg)) - }) - return _c -} - -func (_c *MockIPCI_Update_Call) Return(_a0 error) *MockIPCI_Update_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockIPCI_Update_Call) RunAndReturn(run func(Arg) error) *MockIPCI_Update_Call { - _c.Call.Return(run) - return _c -} - -// NewMockIPCI creates a new instance of MockIPCI. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewMockIPCI(t interface { - mock.TestingT - Cleanup(func()) -}) *MockIPCI { - mock := &MockIPCI{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/plc4go/internal/bacnetip/mock_IsAnyAtomic_test.go b/plc4go/internal/bacnetip/mock_IsAnyAtomic_test.go deleted file mode 100644 index 084cd887567..00000000000 --- a/plc4go/internal/bacnetip/mock_IsAnyAtomic_test.go +++ /dev/null @@ -1,96 +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 - * - * https://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. - */ - -// Code generated by mockery v2.42.2. DO NOT EDIT. - -package bacnetip - -import mock "github.com/stretchr/testify/mock" - -// MockIsAnyAtomic is an autogenerated mock type for the IsAnyAtomic type -type MockIsAnyAtomic struct { - mock.Mock -} - -type MockIsAnyAtomic_Expecter struct { - mock *mock.Mock -} - -func (_m *MockIsAnyAtomic) EXPECT() *MockIsAnyAtomic_Expecter { - return &MockIsAnyAtomic_Expecter{mock: &_m.Mock} -} - -// isAnyAtomic provides a mock function with given fields: -func (_m *MockIsAnyAtomic) isAnyAtomic() bool { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for isAnyAtomic") - } - - var r0 bool - if rf, ok := ret.Get(0).(func() bool); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(bool) - } - - return r0 -} - -// MockIsAnyAtomic_isAnyAtomic_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'isAnyAtomic' -type MockIsAnyAtomic_isAnyAtomic_Call struct { - *mock.Call -} - -// isAnyAtomic is a helper method to define mock.On call -func (_e *MockIsAnyAtomic_Expecter) isAnyAtomic() *MockIsAnyAtomic_isAnyAtomic_Call { - return &MockIsAnyAtomic_isAnyAtomic_Call{Call: _e.mock.On("isAnyAtomic")} -} - -func (_c *MockIsAnyAtomic_isAnyAtomic_Call) Run(run func()) *MockIsAnyAtomic_isAnyAtomic_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockIsAnyAtomic_isAnyAtomic_Call) Return(_a0 bool) *MockIsAnyAtomic_isAnyAtomic_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockIsAnyAtomic_isAnyAtomic_Call) RunAndReturn(run func() bool) *MockIsAnyAtomic_isAnyAtomic_Call { - _c.Call.Return(run) - return _c -} - -// NewMockIsAnyAtomic creates a new instance of MockIsAnyAtomic. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewMockIsAnyAtomic(t interface { - mock.TestingT - Cleanup(func()) -}) *MockIsAnyAtomic { - mock := &MockIsAnyAtomic{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/plc4go/internal/bacnetip/mock_IsAtomic_test.go b/plc4go/internal/bacnetip/mock_IsAtomic_test.go deleted file mode 100644 index 249c1c8c8f0..00000000000 --- a/plc4go/internal/bacnetip/mock_IsAtomic_test.go +++ /dev/null @@ -1,96 +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 - * - * https://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. - */ - -// Code generated by mockery v2.42.2. DO NOT EDIT. - -package bacnetip - -import mock "github.com/stretchr/testify/mock" - -// MockIsAtomic is an autogenerated mock type for the IsAtomic type -type MockIsAtomic struct { - mock.Mock -} - -type MockIsAtomic_Expecter struct { - mock *mock.Mock -} - -func (_m *MockIsAtomic) EXPECT() *MockIsAtomic_Expecter { - return &MockIsAtomic_Expecter{mock: &_m.Mock} -} - -// isAtomic provides a mock function with given fields: -func (_m *MockIsAtomic) isAtomic() bool { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for isAtomic") - } - - var r0 bool - if rf, ok := ret.Get(0).(func() bool); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(bool) - } - - return r0 -} - -// MockIsAtomic_isAtomic_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'isAtomic' -type MockIsAtomic_isAtomic_Call struct { - *mock.Call -} - -// isAtomic is a helper method to define mock.On call -func (_e *MockIsAtomic_Expecter) isAtomic() *MockIsAtomic_isAtomic_Call { - return &MockIsAtomic_isAtomic_Call{Call: _e.mock.On("isAtomic")} -} - -func (_c *MockIsAtomic_isAtomic_Call) Run(run func()) *MockIsAtomic_isAtomic_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockIsAtomic_isAtomic_Call) Return(_a0 bool) *MockIsAtomic_isAtomic_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockIsAtomic_isAtomic_Call) RunAndReturn(run func() bool) *MockIsAtomic_isAtomic_Call { - _c.Call.Return(run) - return _c -} - -// NewMockIsAtomic creates a new instance of MockIsAtomic. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewMockIsAtomic(t interface { - mock.TestingT - Cleanup(func()) -}) *MockIsAtomic { - mock := &MockIsAtomic{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/plc4go/internal/bacnetip/mock_MessageBridge_test.go b/plc4go/internal/bacnetip/mock_MessageBridge_test.go deleted file mode 100644 index 170c9024df9..00000000000 --- a/plc4go/internal/bacnetip/mock_MessageBridge_test.go +++ /dev/null @@ -1,745 +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 - * - * https://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. - */ - -// Code generated by mockery v2.42.2. DO NOT EDIT. - -package bacnetip - -import ( - context "context" - - utils "github.com/apache/plc4x/plc4go/spi/utils" - mock "github.com/stretchr/testify/mock" -) - -// MockMessageBridge is an autogenerated mock type for the MessageBridge type -type MockMessageBridge struct { - mock.Mock -} - -type MockMessageBridge_Expecter struct { - mock *mock.Mock -} - -func (_m *MockMessageBridge) EXPECT() *MockMessageBridge_Expecter { - return &MockMessageBridge_Expecter{mock: &_m.Mock} -} - -// Get provides a mock function with given fields: -func (_m *MockMessageBridge) Get() (byte, error) { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Get") - } - - var r0 byte - var r1 error - if rf, ok := ret.Get(0).(func() (byte, error)); ok { - return rf() - } - if rf, ok := ret.Get(0).(func() byte); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(byte) - } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockMessageBridge_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' -type MockMessageBridge_Get_Call struct { - *mock.Call -} - -// Get is a helper method to define mock.On call -func (_e *MockMessageBridge_Expecter) Get() *MockMessageBridge_Get_Call { - return &MockMessageBridge_Get_Call{Call: _e.mock.On("Get")} -} - -func (_c *MockMessageBridge_Get_Call) Run(run func()) *MockMessageBridge_Get_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockMessageBridge_Get_Call) Return(_a0 byte, _a1 error) *MockMessageBridge_Get_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockMessageBridge_Get_Call) RunAndReturn(run func() (byte, error)) *MockMessageBridge_Get_Call { - _c.Call.Return(run) - return _c -} - -// GetData provides a mock function with given fields: dlen -func (_m *MockMessageBridge) GetData(dlen int) ([]byte, error) { - ret := _m.Called(dlen) - - if len(ret) == 0 { - panic("no return value specified for GetData") - } - - var r0 []byte - var r1 error - if rf, ok := ret.Get(0).(func(int) ([]byte, error)); ok { - return rf(dlen) - } - if rf, ok := ret.Get(0).(func(int) []byte); ok { - r0 = rf(dlen) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]byte) - } - } - - if rf, ok := ret.Get(1).(func(int) error); ok { - r1 = rf(dlen) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockMessageBridge_GetData_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetData' -type MockMessageBridge_GetData_Call struct { - *mock.Call -} - -// GetData is a helper method to define mock.On call -// - dlen int -func (_e *MockMessageBridge_Expecter) GetData(dlen interface{}) *MockMessageBridge_GetData_Call { - return &MockMessageBridge_GetData_Call{Call: _e.mock.On("GetData", dlen)} -} - -func (_c *MockMessageBridge_GetData_Call) Run(run func(dlen int)) *MockMessageBridge_GetData_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(int)) - }) - return _c -} - -func (_c *MockMessageBridge_GetData_Call) Return(_a0 []byte, _a1 error) *MockMessageBridge_GetData_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockMessageBridge_GetData_Call) RunAndReturn(run func(int) ([]byte, error)) *MockMessageBridge_GetData_Call { - _c.Call.Return(run) - return _c -} - -// GetLengthInBits provides a mock function with given fields: ctx -func (_m *MockMessageBridge) GetLengthInBits(ctx context.Context) uint16 { - ret := _m.Called(ctx) - - if len(ret) == 0 { - panic("no return value specified for GetLengthInBits") - } - - var r0 uint16 - if rf, ok := ret.Get(0).(func(context.Context) uint16); ok { - r0 = rf(ctx) - } else { - r0 = ret.Get(0).(uint16) - } - - return r0 -} - -// MockMessageBridge_GetLengthInBits_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetLengthInBits' -type MockMessageBridge_GetLengthInBits_Call struct { - *mock.Call -} - -// GetLengthInBits is a helper method to define mock.On call -// - ctx context.Context -func (_e *MockMessageBridge_Expecter) GetLengthInBits(ctx interface{}) *MockMessageBridge_GetLengthInBits_Call { - return &MockMessageBridge_GetLengthInBits_Call{Call: _e.mock.On("GetLengthInBits", ctx)} -} - -func (_c *MockMessageBridge_GetLengthInBits_Call) Run(run func(ctx context.Context)) *MockMessageBridge_GetLengthInBits_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context)) - }) - return _c -} - -func (_c *MockMessageBridge_GetLengthInBits_Call) Return(_a0 uint16) *MockMessageBridge_GetLengthInBits_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockMessageBridge_GetLengthInBits_Call) RunAndReturn(run func(context.Context) uint16) *MockMessageBridge_GetLengthInBits_Call { - _c.Call.Return(run) - return _c -} - -// GetLengthInBytes provides a mock function with given fields: ctx -func (_m *MockMessageBridge) GetLengthInBytes(ctx context.Context) uint16 { - ret := _m.Called(ctx) - - if len(ret) == 0 { - panic("no return value specified for GetLengthInBytes") - } - - var r0 uint16 - if rf, ok := ret.Get(0).(func(context.Context) uint16); ok { - r0 = rf(ctx) - } else { - r0 = ret.Get(0).(uint16) - } - - return r0 -} - -// MockMessageBridge_GetLengthInBytes_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetLengthInBytes' -type MockMessageBridge_GetLengthInBytes_Call struct { - *mock.Call -} - -// GetLengthInBytes is a helper method to define mock.On call -// - ctx context.Context -func (_e *MockMessageBridge_Expecter) GetLengthInBytes(ctx interface{}) *MockMessageBridge_GetLengthInBytes_Call { - return &MockMessageBridge_GetLengthInBytes_Call{Call: _e.mock.On("GetLengthInBytes", ctx)} -} - -func (_c *MockMessageBridge_GetLengthInBytes_Call) Run(run func(ctx context.Context)) *MockMessageBridge_GetLengthInBytes_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context)) - }) - return _c -} - -func (_c *MockMessageBridge_GetLengthInBytes_Call) Return(_a0 uint16) *MockMessageBridge_GetLengthInBytes_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockMessageBridge_GetLengthInBytes_Call) RunAndReturn(run func(context.Context) uint16) *MockMessageBridge_GetLengthInBytes_Call { - _c.Call.Return(run) - return _c -} - -// GetLong provides a mock function with given fields: -func (_m *MockMessageBridge) GetLong() (int64, error) { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetLong") - } - - var r0 int64 - var r1 error - if rf, ok := ret.Get(0).(func() (int64, error)); ok { - return rf() - } - if rf, ok := ret.Get(0).(func() int64); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(int64) - } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockMessageBridge_GetLong_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetLong' -type MockMessageBridge_GetLong_Call struct { - *mock.Call -} - -// GetLong is a helper method to define mock.On call -func (_e *MockMessageBridge_Expecter) GetLong() *MockMessageBridge_GetLong_Call { - return &MockMessageBridge_GetLong_Call{Call: _e.mock.On("GetLong")} -} - -func (_c *MockMessageBridge_GetLong_Call) Run(run func()) *MockMessageBridge_GetLong_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockMessageBridge_GetLong_Call) Return(_a0 int64, _a1 error) *MockMessageBridge_GetLong_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockMessageBridge_GetLong_Call) RunAndReturn(run func() (int64, error)) *MockMessageBridge_GetLong_Call { - _c.Call.Return(run) - return _c -} - -// GetPduData provides a mock function with given fields: -func (_m *MockMessageBridge) GetPduData() []byte { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetPduData") - } - - var r0 []byte - if rf, ok := ret.Get(0).(func() []byte); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]byte) - } - } - - return r0 -} - -// MockMessageBridge_GetPduData_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPduData' -type MockMessageBridge_GetPduData_Call struct { - *mock.Call -} - -// GetPduData is a helper method to define mock.On call -func (_e *MockMessageBridge_Expecter) GetPduData() *MockMessageBridge_GetPduData_Call { - return &MockMessageBridge_GetPduData_Call{Call: _e.mock.On("GetPduData")} -} - -func (_c *MockMessageBridge_GetPduData_Call) Run(run func()) *MockMessageBridge_GetPduData_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockMessageBridge_GetPduData_Call) Return(_a0 []byte) *MockMessageBridge_GetPduData_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockMessageBridge_GetPduData_Call) RunAndReturn(run func() []byte) *MockMessageBridge_GetPduData_Call { - _c.Call.Return(run) - return _c -} - -// GetShort provides a mock function with given fields: -func (_m *MockMessageBridge) GetShort() (int16, error) { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetShort") - } - - var r0 int16 - var r1 error - if rf, ok := ret.Get(0).(func() (int16, error)); ok { - return rf() - } - if rf, ok := ret.Get(0).(func() int16); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(int16) - } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockMessageBridge_GetShort_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetShort' -type MockMessageBridge_GetShort_Call struct { - *mock.Call -} - -// GetShort is a helper method to define mock.On call -func (_e *MockMessageBridge_Expecter) GetShort() *MockMessageBridge_GetShort_Call { - return &MockMessageBridge_GetShort_Call{Call: _e.mock.On("GetShort")} -} - -func (_c *MockMessageBridge_GetShort_Call) Run(run func()) *MockMessageBridge_GetShort_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockMessageBridge_GetShort_Call) Return(_a0 int16, _a1 error) *MockMessageBridge_GetShort_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockMessageBridge_GetShort_Call) RunAndReturn(run func() (int16, error)) *MockMessageBridge_GetShort_Call { - _c.Call.Return(run) - return _c -} - -// Put provides a mock function with given fields: _a0 -func (_m *MockMessageBridge) Put(_a0 byte) { - _m.Called(_a0) -} - -// MockMessageBridge_Put_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Put' -type MockMessageBridge_Put_Call struct { - *mock.Call -} - -// Put is a helper method to define mock.On call -// - _a0 byte -func (_e *MockMessageBridge_Expecter) Put(_a0 interface{}) *MockMessageBridge_Put_Call { - return &MockMessageBridge_Put_Call{Call: _e.mock.On("Put", _a0)} -} - -func (_c *MockMessageBridge_Put_Call) Run(run func(_a0 byte)) *MockMessageBridge_Put_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(byte)) - }) - return _c -} - -func (_c *MockMessageBridge_Put_Call) Return() *MockMessageBridge_Put_Call { - _c.Call.Return() - return _c -} - -func (_c *MockMessageBridge_Put_Call) RunAndReturn(run func(byte)) *MockMessageBridge_Put_Call { - _c.Call.Return(run) - return _c -} - -// PutData provides a mock function with given fields: _a0 -func (_m *MockMessageBridge) PutData(_a0 ...byte) { - _va := make([]interface{}, len(_a0)) - for _i := range _a0 { - _va[_i] = _a0[_i] - } - var _ca []interface{} - _ca = append(_ca, _va...) - _m.Called(_ca...) -} - -// MockMessageBridge_PutData_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PutData' -type MockMessageBridge_PutData_Call struct { - *mock.Call -} - -// PutData is a helper method to define mock.On call -// - _a0 ...byte -func (_e *MockMessageBridge_Expecter) PutData(_a0 ...interface{}) *MockMessageBridge_PutData_Call { - return &MockMessageBridge_PutData_Call{Call: _e.mock.On("PutData", - append([]interface{}{}, _a0...)...)} -} - -func (_c *MockMessageBridge_PutData_Call) Run(run func(_a0 ...byte)) *MockMessageBridge_PutData_Call { - _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]byte, len(args)-0) - for i, a := range args[0:] { - if a != nil { - variadicArgs[i] = a.(byte) - } - } - run(variadicArgs...) - }) - return _c -} - -func (_c *MockMessageBridge_PutData_Call) Return() *MockMessageBridge_PutData_Call { - _c.Call.Return() - return _c -} - -func (_c *MockMessageBridge_PutData_Call) RunAndReturn(run func(...byte)) *MockMessageBridge_PutData_Call { - _c.Call.Return(run) - return _c -} - -// PutLong provides a mock function with given fields: _a0 -func (_m *MockMessageBridge) PutLong(_a0 uint32) { - _m.Called(_a0) -} - -// MockMessageBridge_PutLong_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PutLong' -type MockMessageBridge_PutLong_Call struct { - *mock.Call -} - -// PutLong is a helper method to define mock.On call -// - _a0 uint32 -func (_e *MockMessageBridge_Expecter) PutLong(_a0 interface{}) *MockMessageBridge_PutLong_Call { - return &MockMessageBridge_PutLong_Call{Call: _e.mock.On("PutLong", _a0)} -} - -func (_c *MockMessageBridge_PutLong_Call) Run(run func(_a0 uint32)) *MockMessageBridge_PutLong_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(uint32)) - }) - return _c -} - -func (_c *MockMessageBridge_PutLong_Call) Return() *MockMessageBridge_PutLong_Call { - _c.Call.Return() - return _c -} - -func (_c *MockMessageBridge_PutLong_Call) RunAndReturn(run func(uint32)) *MockMessageBridge_PutLong_Call { - _c.Call.Return(run) - return _c -} - -// PutShort provides a mock function with given fields: _a0 -func (_m *MockMessageBridge) PutShort(_a0 uint16) { - _m.Called(_a0) -} - -// MockMessageBridge_PutShort_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PutShort' -type MockMessageBridge_PutShort_Call struct { - *mock.Call -} - -// PutShort is a helper method to define mock.On call -// - _a0 uint16 -func (_e *MockMessageBridge_Expecter) PutShort(_a0 interface{}) *MockMessageBridge_PutShort_Call { - return &MockMessageBridge_PutShort_Call{Call: _e.mock.On("PutShort", _a0)} -} - -func (_c *MockMessageBridge_PutShort_Call) Run(run func(_a0 uint16)) *MockMessageBridge_PutShort_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(uint16)) - }) - return _c -} - -func (_c *MockMessageBridge_PutShort_Call) Return() *MockMessageBridge_PutShort_Call { - _c.Call.Return() - return _c -} - -func (_c *MockMessageBridge_PutShort_Call) RunAndReturn(run func(uint16)) *MockMessageBridge_PutShort_Call { - _c.Call.Return(run) - return _c -} - -// Serialize provides a mock function with given fields: -func (_m *MockMessageBridge) Serialize() ([]byte, error) { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Serialize") - } - - var r0 []byte - var r1 error - if rf, ok := ret.Get(0).(func() ([]byte, error)); ok { - return rf() - } - if rf, ok := ret.Get(0).(func() []byte); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]byte) - } - } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockMessageBridge_Serialize_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Serialize' -type MockMessageBridge_Serialize_Call struct { - *mock.Call -} - -// Serialize is a helper method to define mock.On call -func (_e *MockMessageBridge_Expecter) Serialize() *MockMessageBridge_Serialize_Call { - return &MockMessageBridge_Serialize_Call{Call: _e.mock.On("Serialize")} -} - -func (_c *MockMessageBridge_Serialize_Call) Run(run func()) *MockMessageBridge_Serialize_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockMessageBridge_Serialize_Call) Return(_a0 []byte, _a1 error) *MockMessageBridge_Serialize_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockMessageBridge_Serialize_Call) RunAndReturn(run func() ([]byte, error)) *MockMessageBridge_Serialize_Call { - _c.Call.Return(run) - return _c -} - -// SerializeWithWriteBuffer provides a mock function with given fields: ctx, writeBuffer -func (_m *MockMessageBridge) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { - ret := _m.Called(ctx, writeBuffer) - - if len(ret) == 0 { - panic("no return value specified for SerializeWithWriteBuffer") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, utils.WriteBuffer) error); ok { - r0 = rf(ctx, writeBuffer) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockMessageBridge_SerializeWithWriteBuffer_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SerializeWithWriteBuffer' -type MockMessageBridge_SerializeWithWriteBuffer_Call struct { - *mock.Call -} - -// SerializeWithWriteBuffer is a helper method to define mock.On call -// - ctx context.Context -// - writeBuffer utils.WriteBuffer -func (_e *MockMessageBridge_Expecter) SerializeWithWriteBuffer(ctx interface{}, writeBuffer interface{}) *MockMessageBridge_SerializeWithWriteBuffer_Call { - return &MockMessageBridge_SerializeWithWriteBuffer_Call{Call: _e.mock.On("SerializeWithWriteBuffer", ctx, writeBuffer)} -} - -func (_c *MockMessageBridge_SerializeWithWriteBuffer_Call) Run(run func(ctx context.Context, writeBuffer utils.WriteBuffer)) *MockMessageBridge_SerializeWithWriteBuffer_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(utils.WriteBuffer)) - }) - return _c -} - -func (_c *MockMessageBridge_SerializeWithWriteBuffer_Call) Return(_a0 error) *MockMessageBridge_SerializeWithWriteBuffer_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockMessageBridge_SerializeWithWriteBuffer_Call) RunAndReturn(run func(context.Context, utils.WriteBuffer) error) *MockMessageBridge_SerializeWithWriteBuffer_Call { - _c.Call.Return(run) - return _c -} - -// SetPduData provides a mock function with given fields: _a0 -func (_m *MockMessageBridge) SetPduData(_a0 []byte) { - _m.Called(_a0) -} - -// MockMessageBridge_SetPduData_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetPduData' -type MockMessageBridge_SetPduData_Call struct { - *mock.Call -} - -// SetPduData is a helper method to define mock.On call -// - _a0 []byte -func (_e *MockMessageBridge_Expecter) SetPduData(_a0 interface{}) *MockMessageBridge_SetPduData_Call { - return &MockMessageBridge_SetPduData_Call{Call: _e.mock.On("SetPduData", _a0)} -} - -func (_c *MockMessageBridge_SetPduData_Call) Run(run func(_a0 []byte)) *MockMessageBridge_SetPduData_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].([]byte)) - }) - return _c -} - -func (_c *MockMessageBridge_SetPduData_Call) Return() *MockMessageBridge_SetPduData_Call { - _c.Call.Return() - return _c -} - -func (_c *MockMessageBridge_SetPduData_Call) RunAndReturn(run func([]byte)) *MockMessageBridge_SetPduData_Call { - _c.Call.Return(run) - return _c -} - -// String provides a mock function with given fields: -func (_m *MockMessageBridge) String() string { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for String") - } - - var r0 string - if rf, ok := ret.Get(0).(func() string); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(string) - } - - return r0 -} - -// MockMessageBridge_String_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'String' -type MockMessageBridge_String_Call struct { - *mock.Call -} - -// String is a helper method to define mock.On call -func (_e *MockMessageBridge_Expecter) String() *MockMessageBridge_String_Call { - return &MockMessageBridge_String_Call{Call: _e.mock.On("String")} -} - -func (_c *MockMessageBridge_String_Call) Run(run func()) *MockMessageBridge_String_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockMessageBridge_String_Call) Return(_a0 string) *MockMessageBridge_String_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockMessageBridge_String_Call) RunAndReturn(run func() string) *MockMessageBridge_String_Call { - _c.Call.Return(run) - return _c -} - -// NewMockMessageBridge creates a new instance of MockMessageBridge. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewMockMessageBridge(t interface { - mock.TestingT - Cleanup(func()) -}) *MockMessageBridge { - mock := &MockMessageBridge{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/plc4go/internal/bacnetip/mock_NPCI_test.go b/plc4go/internal/bacnetip/mock_NPCI_test.go deleted file mode 100644 index 9f879e45c07..00000000000 --- a/plc4go/internal/bacnetip/mock_NPCI_test.go +++ /dev/null @@ -1,1725 +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 - * - * https://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. - */ - -// Code generated by mockery v2.42.2. DO NOT EDIT. - -package bacnetip - -import ( - context "context" - - model "github.com/apache/plc4x/plc4go/protocols/bacnetip/readwrite/model" - mock "github.com/stretchr/testify/mock" - - spi "github.com/apache/plc4x/plc4go/spi" - - utils "github.com/apache/plc4x/plc4go/spi/utils" -) - -// MockNPCI is an autogenerated mock type for the NPCI type -type MockNPCI struct { - mock.Mock -} - -type MockNPCI_Expecter struct { - mock *mock.Mock -} - -func (_m *MockNPCI) EXPECT() *MockNPCI_Expecter { - return &MockNPCI_Expecter{mock: &_m.Mock} -} - -// Decode provides a mock function with given fields: pdu -func (_m *MockNPCI) Decode(pdu Arg) error { - ret := _m.Called(pdu) - - if len(ret) == 0 { - panic("no return value specified for Decode") - } - - var r0 error - if rf, ok := ret.Get(0).(func(Arg) error); ok { - r0 = rf(pdu) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockNPCI_Decode_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Decode' -type MockNPCI_Decode_Call struct { - *mock.Call -} - -// Decode is a helper method to define mock.On call -// - pdu Arg -func (_e *MockNPCI_Expecter) Decode(pdu interface{}) *MockNPCI_Decode_Call { - return &MockNPCI_Decode_Call{Call: _e.mock.On("Decode", pdu)} -} - -func (_c *MockNPCI_Decode_Call) Run(run func(pdu Arg)) *MockNPCI_Decode_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(Arg)) - }) - return _c -} - -func (_c *MockNPCI_Decode_Call) Return(_a0 error) *MockNPCI_Decode_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockNPCI_Decode_Call) RunAndReturn(run func(Arg) error) *MockNPCI_Decode_Call { - _c.Call.Return(run) - return _c -} - -// Encode provides a mock function with given fields: pdu -func (_m *MockNPCI) Encode(pdu Arg) error { - ret := _m.Called(pdu) - - if len(ret) == 0 { - panic("no return value specified for Encode") - } - - var r0 error - if rf, ok := ret.Get(0).(func(Arg) error); ok { - r0 = rf(pdu) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockNPCI_Encode_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Encode' -type MockNPCI_Encode_Call struct { - *mock.Call -} - -// Encode is a helper method to define mock.On call -// - pdu Arg -func (_e *MockNPCI_Expecter) Encode(pdu interface{}) *MockNPCI_Encode_Call { - return &MockNPCI_Encode_Call{Call: _e.mock.On("Encode", pdu)} -} - -func (_c *MockNPCI_Encode_Call) Run(run func(pdu Arg)) *MockNPCI_Encode_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(Arg)) - }) - return _c -} - -func (_c *MockNPCI_Encode_Call) Return(_a0 error) *MockNPCI_Encode_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockNPCI_Encode_Call) RunAndReturn(run func(Arg) error) *MockNPCI_Encode_Call { - _c.Call.Return(run) - return _c -} - -// GetExpectingReply provides a mock function with given fields: -func (_m *MockNPCI) GetExpectingReply() bool { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetExpectingReply") - } - - var r0 bool - if rf, ok := ret.Get(0).(func() bool); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(bool) - } - - return r0 -} - -// MockNPCI_GetExpectingReply_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetExpectingReply' -type MockNPCI_GetExpectingReply_Call struct { - *mock.Call -} - -// GetExpectingReply is a helper method to define mock.On call -func (_e *MockNPCI_Expecter) GetExpectingReply() *MockNPCI_GetExpectingReply_Call { - return &MockNPCI_GetExpectingReply_Call{Call: _e.mock.On("GetExpectingReply")} -} - -func (_c *MockNPCI_GetExpectingReply_Call) Run(run func()) *MockNPCI_GetExpectingReply_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockNPCI_GetExpectingReply_Call) Return(_a0 bool) *MockNPCI_GetExpectingReply_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockNPCI_GetExpectingReply_Call) RunAndReturn(run func() bool) *MockNPCI_GetExpectingReply_Call { - _c.Call.Return(run) - return _c -} - -// GetLengthInBits provides a mock function with given fields: ctx -func (_m *MockNPCI) GetLengthInBits(ctx context.Context) uint16 { - ret := _m.Called(ctx) - - if len(ret) == 0 { - panic("no return value specified for GetLengthInBits") - } - - var r0 uint16 - if rf, ok := ret.Get(0).(func(context.Context) uint16); ok { - r0 = rf(ctx) - } else { - r0 = ret.Get(0).(uint16) - } - - return r0 -} - -// MockNPCI_GetLengthInBits_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetLengthInBits' -type MockNPCI_GetLengthInBits_Call struct { - *mock.Call -} - -// GetLengthInBits is a helper method to define mock.On call -// - ctx context.Context -func (_e *MockNPCI_Expecter) GetLengthInBits(ctx interface{}) *MockNPCI_GetLengthInBits_Call { - return &MockNPCI_GetLengthInBits_Call{Call: _e.mock.On("GetLengthInBits", ctx)} -} - -func (_c *MockNPCI_GetLengthInBits_Call) Run(run func(ctx context.Context)) *MockNPCI_GetLengthInBits_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context)) - }) - return _c -} - -func (_c *MockNPCI_GetLengthInBits_Call) Return(_a0 uint16) *MockNPCI_GetLengthInBits_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockNPCI_GetLengthInBits_Call) RunAndReturn(run func(context.Context) uint16) *MockNPCI_GetLengthInBits_Call { - _c.Call.Return(run) - return _c -} - -// GetLengthInBytes provides a mock function with given fields: ctx -func (_m *MockNPCI) GetLengthInBytes(ctx context.Context) uint16 { - ret := _m.Called(ctx) - - if len(ret) == 0 { - panic("no return value specified for GetLengthInBytes") - } - - var r0 uint16 - if rf, ok := ret.Get(0).(func(context.Context) uint16); ok { - r0 = rf(ctx) - } else { - r0 = ret.Get(0).(uint16) - } - - return r0 -} - -// MockNPCI_GetLengthInBytes_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetLengthInBytes' -type MockNPCI_GetLengthInBytes_Call struct { - *mock.Call -} - -// GetLengthInBytes is a helper method to define mock.On call -// - ctx context.Context -func (_e *MockNPCI_Expecter) GetLengthInBytes(ctx interface{}) *MockNPCI_GetLengthInBytes_Call { - return &MockNPCI_GetLengthInBytes_Call{Call: _e.mock.On("GetLengthInBytes", ctx)} -} - -func (_c *MockNPCI_GetLengthInBytes_Call) Run(run func(ctx context.Context)) *MockNPCI_GetLengthInBytes_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context)) - }) - return _c -} - -func (_c *MockNPCI_GetLengthInBytes_Call) Return(_a0 uint16) *MockNPCI_GetLengthInBytes_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockNPCI_GetLengthInBytes_Call) RunAndReturn(run func(context.Context) uint16) *MockNPCI_GetLengthInBytes_Call { - _c.Call.Return(run) - return _c -} - -// GetNPDUNetMessage provides a mock function with given fields: -func (_m *MockNPCI) GetNPDUNetMessage() *uint8 { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetNPDUNetMessage") - } - - var r0 *uint8 - if rf, ok := ret.Get(0).(func() *uint8); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*uint8) - } - } - - return r0 -} - -// MockNPCI_GetNPDUNetMessage_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetNPDUNetMessage' -type MockNPCI_GetNPDUNetMessage_Call struct { - *mock.Call -} - -// GetNPDUNetMessage is a helper method to define mock.On call -func (_e *MockNPCI_Expecter) GetNPDUNetMessage() *MockNPCI_GetNPDUNetMessage_Call { - return &MockNPCI_GetNPDUNetMessage_Call{Call: _e.mock.On("GetNPDUNetMessage")} -} - -func (_c *MockNPCI_GetNPDUNetMessage_Call) Run(run func()) *MockNPCI_GetNPDUNetMessage_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockNPCI_GetNPDUNetMessage_Call) Return(_a0 *uint8) *MockNPCI_GetNPDUNetMessage_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockNPCI_GetNPDUNetMessage_Call) RunAndReturn(run func() *uint8) *MockNPCI_GetNPDUNetMessage_Call { - _c.Call.Return(run) - return _c -} - -// GetNetworkPriority provides a mock function with given fields: -func (_m *MockNPCI) GetNetworkPriority() model.NPDUNetworkPriority { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetNetworkPriority") - } - - var r0 model.NPDUNetworkPriority - if rf, ok := ret.Get(0).(func() model.NPDUNetworkPriority); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(model.NPDUNetworkPriority) - } - - return r0 -} - -// MockNPCI_GetNetworkPriority_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetNetworkPriority' -type MockNPCI_GetNetworkPriority_Call struct { - *mock.Call -} - -// GetNetworkPriority is a helper method to define mock.On call -func (_e *MockNPCI_Expecter) GetNetworkPriority() *MockNPCI_GetNetworkPriority_Call { - return &MockNPCI_GetNetworkPriority_Call{Call: _e.mock.On("GetNetworkPriority")} -} - -func (_c *MockNPCI_GetNetworkPriority_Call) Run(run func()) *MockNPCI_GetNetworkPriority_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockNPCI_GetNetworkPriority_Call) Return(_a0 model.NPDUNetworkPriority) *MockNPCI_GetNetworkPriority_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockNPCI_GetNetworkPriority_Call) RunAndReturn(run func() model.NPDUNetworkPriority) *MockNPCI_GetNetworkPriority_Call { - _c.Call.Return(run) - return _c -} - -// GetPDUDestination provides a mock function with given fields: -func (_m *MockNPCI) GetPDUDestination() *Address { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetPDUDestination") - } - - var r0 *Address - if rf, ok := ret.Get(0).(func() *Address); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*Address) - } - } - - return r0 -} - -// MockNPCI_GetPDUDestination_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPDUDestination' -type MockNPCI_GetPDUDestination_Call struct { - *mock.Call -} - -// GetPDUDestination is a helper method to define mock.On call -func (_e *MockNPCI_Expecter) GetPDUDestination() *MockNPCI_GetPDUDestination_Call { - return &MockNPCI_GetPDUDestination_Call{Call: _e.mock.On("GetPDUDestination")} -} - -func (_c *MockNPCI_GetPDUDestination_Call) Run(run func()) *MockNPCI_GetPDUDestination_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockNPCI_GetPDUDestination_Call) Return(_a0 *Address) *MockNPCI_GetPDUDestination_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockNPCI_GetPDUDestination_Call) RunAndReturn(run func() *Address) *MockNPCI_GetPDUDestination_Call { - _c.Call.Return(run) - return _c -} - -// GetPDUSource provides a mock function with given fields: -func (_m *MockNPCI) GetPDUSource() *Address { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetPDUSource") - } - - var r0 *Address - if rf, ok := ret.Get(0).(func() *Address); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*Address) - } - } - - return r0 -} - -// MockNPCI_GetPDUSource_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPDUSource' -type MockNPCI_GetPDUSource_Call struct { - *mock.Call -} - -// GetPDUSource is a helper method to define mock.On call -func (_e *MockNPCI_Expecter) GetPDUSource() *MockNPCI_GetPDUSource_Call { - return &MockNPCI_GetPDUSource_Call{Call: _e.mock.On("GetPDUSource")} -} - -func (_c *MockNPCI_GetPDUSource_Call) Run(run func()) *MockNPCI_GetPDUSource_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockNPCI_GetPDUSource_Call) Return(_a0 *Address) *MockNPCI_GetPDUSource_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockNPCI_GetPDUSource_Call) RunAndReturn(run func() *Address) *MockNPCI_GetPDUSource_Call { - _c.Call.Return(run) - return _c -} - -// GetPDUUserData provides a mock function with given fields: -func (_m *MockNPCI) GetPDUUserData() spi.Message { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetPDUUserData") - } - - var r0 spi.Message - if rf, ok := ret.Get(0).(func() spi.Message); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(spi.Message) - } - } - - return r0 -} - -// MockNPCI_GetPDUUserData_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPDUUserData' -type MockNPCI_GetPDUUserData_Call struct { - *mock.Call -} - -// GetPDUUserData is a helper method to define mock.On call -func (_e *MockNPCI_Expecter) GetPDUUserData() *MockNPCI_GetPDUUserData_Call { - return &MockNPCI_GetPDUUserData_Call{Call: _e.mock.On("GetPDUUserData")} -} - -func (_c *MockNPCI_GetPDUUserData_Call) Run(run func()) *MockNPCI_GetPDUUserData_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockNPCI_GetPDUUserData_Call) Return(_a0 spi.Message) *MockNPCI_GetPDUUserData_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockNPCI_GetPDUUserData_Call) RunAndReturn(run func() spi.Message) *MockNPCI_GetPDUUserData_Call { - _c.Call.Return(run) - return _c -} - -// GetRootMessage provides a mock function with given fields: -func (_m *MockNPCI) GetRootMessage() spi.Message { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetRootMessage") - } - - var r0 spi.Message - if rf, ok := ret.Get(0).(func() spi.Message); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(spi.Message) - } - } - - return r0 -} - -// MockNPCI_GetRootMessage_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRootMessage' -type MockNPCI_GetRootMessage_Call struct { - *mock.Call -} - -// GetRootMessage is a helper method to define mock.On call -func (_e *MockNPCI_Expecter) GetRootMessage() *MockNPCI_GetRootMessage_Call { - return &MockNPCI_GetRootMessage_Call{Call: _e.mock.On("GetRootMessage")} -} - -func (_c *MockNPCI_GetRootMessage_Call) Run(run func()) *MockNPCI_GetRootMessage_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockNPCI_GetRootMessage_Call) Return(_a0 spi.Message) *MockNPCI_GetRootMessage_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockNPCI_GetRootMessage_Call) RunAndReturn(run func() spi.Message) *MockNPCI_GetRootMessage_Call { - _c.Call.Return(run) - return _c -} - -// Serialize provides a mock function with given fields: -func (_m *MockNPCI) Serialize() ([]byte, error) { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Serialize") - } - - var r0 []byte - var r1 error - if rf, ok := ret.Get(0).(func() ([]byte, error)); ok { - return rf() - } - if rf, ok := ret.Get(0).(func() []byte); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]byte) - } - } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockNPCI_Serialize_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Serialize' -type MockNPCI_Serialize_Call struct { - *mock.Call -} - -// Serialize is a helper method to define mock.On call -func (_e *MockNPCI_Expecter) Serialize() *MockNPCI_Serialize_Call { - return &MockNPCI_Serialize_Call{Call: _e.mock.On("Serialize")} -} - -func (_c *MockNPCI_Serialize_Call) Run(run func()) *MockNPCI_Serialize_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockNPCI_Serialize_Call) Return(_a0 []byte, _a1 error) *MockNPCI_Serialize_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockNPCI_Serialize_Call) RunAndReturn(run func() ([]byte, error)) *MockNPCI_Serialize_Call { - _c.Call.Return(run) - return _c -} - -// SerializeWithWriteBuffer provides a mock function with given fields: ctx, writeBuffer -func (_m *MockNPCI) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { - ret := _m.Called(ctx, writeBuffer) - - if len(ret) == 0 { - panic("no return value specified for SerializeWithWriteBuffer") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, utils.WriteBuffer) error); ok { - r0 = rf(ctx, writeBuffer) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockNPCI_SerializeWithWriteBuffer_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SerializeWithWriteBuffer' -type MockNPCI_SerializeWithWriteBuffer_Call struct { - *mock.Call -} - -// SerializeWithWriteBuffer is a helper method to define mock.On call -// - ctx context.Context -// - writeBuffer utils.WriteBuffer -func (_e *MockNPCI_Expecter) SerializeWithWriteBuffer(ctx interface{}, writeBuffer interface{}) *MockNPCI_SerializeWithWriteBuffer_Call { - return &MockNPCI_SerializeWithWriteBuffer_Call{Call: _e.mock.On("SerializeWithWriteBuffer", ctx, writeBuffer)} -} - -func (_c *MockNPCI_SerializeWithWriteBuffer_Call) Run(run func(ctx context.Context, writeBuffer utils.WriteBuffer)) *MockNPCI_SerializeWithWriteBuffer_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(utils.WriteBuffer)) - }) - return _c -} - -func (_c *MockNPCI_SerializeWithWriteBuffer_Call) Return(_a0 error) *MockNPCI_SerializeWithWriteBuffer_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockNPCI_SerializeWithWriteBuffer_Call) RunAndReturn(run func(context.Context, utils.WriteBuffer) error) *MockNPCI_SerializeWithWriteBuffer_Call { - _c.Call.Return(run) - return _c -} - -// SetExpectingReply provides a mock function with given fields: _a0 -func (_m *MockNPCI) SetExpectingReply(_a0 bool) { - _m.Called(_a0) -} - -// MockNPCI_SetExpectingReply_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetExpectingReply' -type MockNPCI_SetExpectingReply_Call struct { - *mock.Call -} - -// SetExpectingReply is a helper method to define mock.On call -// - _a0 bool -func (_e *MockNPCI_Expecter) SetExpectingReply(_a0 interface{}) *MockNPCI_SetExpectingReply_Call { - return &MockNPCI_SetExpectingReply_Call{Call: _e.mock.On("SetExpectingReply", _a0)} -} - -func (_c *MockNPCI_SetExpectingReply_Call) Run(run func(_a0 bool)) *MockNPCI_SetExpectingReply_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(bool)) - }) - return _c -} - -func (_c *MockNPCI_SetExpectingReply_Call) Return() *MockNPCI_SetExpectingReply_Call { - _c.Call.Return() - return _c -} - -func (_c *MockNPCI_SetExpectingReply_Call) RunAndReturn(run func(bool)) *MockNPCI_SetExpectingReply_Call { - _c.Call.Return(run) - return _c -} - -// SetNetworkPriority provides a mock function with given fields: _a0 -func (_m *MockNPCI) SetNetworkPriority(_a0 model.NPDUNetworkPriority) { - _m.Called(_a0) -} - -// MockNPCI_SetNetworkPriority_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetNetworkPriority' -type MockNPCI_SetNetworkPriority_Call struct { - *mock.Call -} - -// SetNetworkPriority is a helper method to define mock.On call -// - _a0 model.NPDUNetworkPriority -func (_e *MockNPCI_Expecter) SetNetworkPriority(_a0 interface{}) *MockNPCI_SetNetworkPriority_Call { - return &MockNPCI_SetNetworkPriority_Call{Call: _e.mock.On("SetNetworkPriority", _a0)} -} - -func (_c *MockNPCI_SetNetworkPriority_Call) Run(run func(_a0 model.NPDUNetworkPriority)) *MockNPCI_SetNetworkPriority_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(model.NPDUNetworkPriority)) - }) - return _c -} - -func (_c *MockNPCI_SetNetworkPriority_Call) Return() *MockNPCI_SetNetworkPriority_Call { - _c.Call.Return() - return _c -} - -func (_c *MockNPCI_SetNetworkPriority_Call) RunAndReturn(run func(model.NPDUNetworkPriority)) *MockNPCI_SetNetworkPriority_Call { - _c.Call.Return(run) - return _c -} - -// SetPDUDestination provides a mock function with given fields: _a0 -func (_m *MockNPCI) SetPDUDestination(_a0 *Address) { - _m.Called(_a0) -} - -// MockNPCI_SetPDUDestination_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetPDUDestination' -type MockNPCI_SetPDUDestination_Call struct { - *mock.Call -} - -// SetPDUDestination is a helper method to define mock.On call -// - _a0 *Address -func (_e *MockNPCI_Expecter) SetPDUDestination(_a0 interface{}) *MockNPCI_SetPDUDestination_Call { - return &MockNPCI_SetPDUDestination_Call{Call: _e.mock.On("SetPDUDestination", _a0)} -} - -func (_c *MockNPCI_SetPDUDestination_Call) Run(run func(_a0 *Address)) *MockNPCI_SetPDUDestination_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(*Address)) - }) - return _c -} - -func (_c *MockNPCI_SetPDUDestination_Call) Return() *MockNPCI_SetPDUDestination_Call { - _c.Call.Return() - return _c -} - -func (_c *MockNPCI_SetPDUDestination_Call) RunAndReturn(run func(*Address)) *MockNPCI_SetPDUDestination_Call { - _c.Call.Return(run) - return _c -} - -// SetPDUSource provides a mock function with given fields: source -func (_m *MockNPCI) SetPDUSource(source *Address) { - _m.Called(source) -} - -// MockNPCI_SetPDUSource_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetPDUSource' -type MockNPCI_SetPDUSource_Call struct { - *mock.Call -} - -// SetPDUSource is a helper method to define mock.On call -// - source *Address -func (_e *MockNPCI_Expecter) SetPDUSource(source interface{}) *MockNPCI_SetPDUSource_Call { - return &MockNPCI_SetPDUSource_Call{Call: _e.mock.On("SetPDUSource", source)} -} - -func (_c *MockNPCI_SetPDUSource_Call) Run(run func(source *Address)) *MockNPCI_SetPDUSource_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(*Address)) - }) - return _c -} - -func (_c *MockNPCI_SetPDUSource_Call) Return() *MockNPCI_SetPDUSource_Call { - _c.Call.Return() - return _c -} - -func (_c *MockNPCI_SetPDUSource_Call) RunAndReturn(run func(*Address)) *MockNPCI_SetPDUSource_Call { - _c.Call.Return(run) - return _c -} - -// SetPDUUserData provides a mock function with given fields: _a0 -func (_m *MockNPCI) SetPDUUserData(_a0 spi.Message) { - _m.Called(_a0) -} - -// MockNPCI_SetPDUUserData_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetPDUUserData' -type MockNPCI_SetPDUUserData_Call struct { - *mock.Call -} - -// SetPDUUserData is a helper method to define mock.On call -// - _a0 spi.Message -func (_e *MockNPCI_Expecter) SetPDUUserData(_a0 interface{}) *MockNPCI_SetPDUUserData_Call { - return &MockNPCI_SetPDUUserData_Call{Call: _e.mock.On("SetPDUUserData", _a0)} -} - -func (_c *MockNPCI_SetPDUUserData_Call) Run(run func(_a0 spi.Message)) *MockNPCI_SetPDUUserData_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(spi.Message)) - }) - return _c -} - -func (_c *MockNPCI_SetPDUUserData_Call) Return() *MockNPCI_SetPDUUserData_Call { - _c.Call.Return() - return _c -} - -func (_c *MockNPCI_SetPDUUserData_Call) RunAndReturn(run func(spi.Message)) *MockNPCI_SetPDUUserData_Call { - _c.Call.Return(run) - return _c -} - -// String provides a mock function with given fields: -func (_m *MockNPCI) String() string { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for String") - } - - var r0 string - if rf, ok := ret.Get(0).(func() string); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(string) - } - - return r0 -} - -// MockNPCI_String_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'String' -type MockNPCI_String_Call struct { - *mock.Call -} - -// String is a helper method to define mock.On call -func (_e *MockNPCI_Expecter) String() *MockNPCI_String_Call { - return &MockNPCI_String_Call{Call: _e.mock.On("String")} -} - -func (_c *MockNPCI_String_Call) Run(run func()) *MockNPCI_String_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockNPCI_String_Call) Return(_a0 string) *MockNPCI_String_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockNPCI_String_Call) RunAndReturn(run func() string) *MockNPCI_String_Call { - _c.Call.Return(run) - return _c -} - -// Update provides a mock function with given fields: pci -func (_m *MockNPCI) Update(pci Arg) error { - ret := _m.Called(pci) - - if len(ret) == 0 { - panic("no return value specified for Update") - } - - var r0 error - if rf, ok := ret.Get(0).(func(Arg) error); ok { - r0 = rf(pci) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockNPCI_Update_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Update' -type MockNPCI_Update_Call struct { - *mock.Call -} - -// Update is a helper method to define mock.On call -// - pci Arg -func (_e *MockNPCI_Expecter) Update(pci interface{}) *MockNPCI_Update_Call { - return &MockNPCI_Update_Call{Call: _e.mock.On("Update", pci)} -} - -func (_c *MockNPCI_Update_Call) Run(run func(pci Arg)) *MockNPCI_Update_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(Arg)) - }) - return _c -} - -func (_c *MockNPCI_Update_Call) Return(_a0 error) *MockNPCI_Update_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockNPCI_Update_Call) RunAndReturn(run func(Arg) error) *MockNPCI_Update_Call { - _c.Call.Return(run) - return _c -} - -// getAPDU provides a mock function with given fields: -func (_m *MockNPCI) getAPDU() model.APDU { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for getAPDU") - } - - var r0 model.APDU - if rf, ok := ret.Get(0).(func() model.APDU); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(model.APDU) - } - } - - return r0 -} - -// MockNPCI_getAPDU_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'getAPDU' -type MockNPCI_getAPDU_Call struct { - *mock.Call -} - -// getAPDU is a helper method to define mock.On call -func (_e *MockNPCI_Expecter) getAPDU() *MockNPCI_getAPDU_Call { - return &MockNPCI_getAPDU_Call{Call: _e.mock.On("getAPDU")} -} - -func (_c *MockNPCI_getAPDU_Call) Run(run func()) *MockNPCI_getAPDU_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockNPCI_getAPDU_Call) Return(_a0 model.APDU) *MockNPCI_getAPDU_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockNPCI_getAPDU_Call) RunAndReturn(run func() model.APDU) *MockNPCI_getAPDU_Call { - _c.Call.Return(run) - return _c -} - -// getNLM provides a mock function with given fields: -func (_m *MockNPCI) getNLM() model.NLM { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for getNLM") - } - - var r0 model.NLM - if rf, ok := ret.Get(0).(func() model.NLM); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(model.NLM) - } - } - - return r0 -} - -// MockNPCI_getNLM_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'getNLM' -type MockNPCI_getNLM_Call struct { - *mock.Call -} - -// getNLM is a helper method to define mock.On call -func (_e *MockNPCI_Expecter) getNLM() *MockNPCI_getNLM_Call { - return &MockNPCI_getNLM_Call{Call: _e.mock.On("getNLM")} -} - -func (_c *MockNPCI_getNLM_Call) Run(run func()) *MockNPCI_getNLM_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockNPCI_getNLM_Call) Return(_a0 model.NLM) *MockNPCI_getNLM_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockNPCI_getNLM_Call) RunAndReturn(run func() model.NLM) *MockNPCI_getNLM_Call { - _c.Call.Return(run) - return _c -} - -// getNPDU provides a mock function with given fields: -func (_m *MockNPCI) getNPDU() model.NPDU { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for getNPDU") - } - - var r0 model.NPDU - if rf, ok := ret.Get(0).(func() model.NPDU); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(model.NPDU) - } - } - - return r0 -} - -// MockNPCI_getNPDU_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'getNPDU' -type MockNPCI_getNPDU_Call struct { - *mock.Call -} - -// getNPDU is a helper method to define mock.On call -func (_e *MockNPCI_Expecter) getNPDU() *MockNPCI_getNPDU_Call { - return &MockNPCI_getNPDU_Call{Call: _e.mock.On("getNPDU")} -} - -func (_c *MockNPCI_getNPDU_Call) Run(run func()) *MockNPCI_getNPDU_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockNPCI_getNPDU_Call) Return(_a0 model.NPDU) *MockNPCI_getNPDU_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockNPCI_getNPDU_Call) RunAndReturn(run func() model.NPDU) *MockNPCI_getNPDU_Call { - _c.Call.Return(run) - return _c -} - -// getNpduControl provides a mock function with given fields: -func (_m *MockNPCI) getNpduControl() uint8 { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for getNpduControl") - } - - var r0 uint8 - if rf, ok := ret.Get(0).(func() uint8); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(uint8) - } - - return r0 -} - -// MockNPCI_getNpduControl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'getNpduControl' -type MockNPCI_getNpduControl_Call struct { - *mock.Call -} - -// getNpduControl is a helper method to define mock.On call -func (_e *MockNPCI_Expecter) getNpduControl() *MockNPCI_getNpduControl_Call { - return &MockNPCI_getNpduControl_Call{Call: _e.mock.On("getNpduControl")} -} - -func (_c *MockNPCI_getNpduControl_Call) Run(run func()) *MockNPCI_getNpduControl_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockNPCI_getNpduControl_Call) Return(_a0 uint8) *MockNPCI_getNpduControl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockNPCI_getNpduControl_Call) RunAndReturn(run func() uint8) *MockNPCI_getNpduControl_Call { - _c.Call.Return(run) - return _c -} - -// getNpduDADR provides a mock function with given fields: -func (_m *MockNPCI) getNpduDADR() *Address { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for getNpduDADR") - } - - var r0 *Address - if rf, ok := ret.Get(0).(func() *Address); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*Address) - } - } - - return r0 -} - -// MockNPCI_getNpduDADR_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'getNpduDADR' -type MockNPCI_getNpduDADR_Call struct { - *mock.Call -} - -// getNpduDADR is a helper method to define mock.On call -func (_e *MockNPCI_Expecter) getNpduDADR() *MockNPCI_getNpduDADR_Call { - return &MockNPCI_getNpduDADR_Call{Call: _e.mock.On("getNpduDADR")} -} - -func (_c *MockNPCI_getNpduDADR_Call) Run(run func()) *MockNPCI_getNpduDADR_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockNPCI_getNpduDADR_Call) Return(_a0 *Address) *MockNPCI_getNpduDADR_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockNPCI_getNpduDADR_Call) RunAndReturn(run func() *Address) *MockNPCI_getNpduDADR_Call { - _c.Call.Return(run) - return _c -} - -// getNpduHopCount provides a mock function with given fields: -func (_m *MockNPCI) getNpduHopCount() *uint8 { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for getNpduHopCount") - } - - var r0 *uint8 - if rf, ok := ret.Get(0).(func() *uint8); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*uint8) - } - } - - return r0 -} - -// MockNPCI_getNpduHopCount_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'getNpduHopCount' -type MockNPCI_getNpduHopCount_Call struct { - *mock.Call -} - -// getNpduHopCount is a helper method to define mock.On call -func (_e *MockNPCI_Expecter) getNpduHopCount() *MockNPCI_getNpduHopCount_Call { - return &MockNPCI_getNpduHopCount_Call{Call: _e.mock.On("getNpduHopCount")} -} - -func (_c *MockNPCI_getNpduHopCount_Call) Run(run func()) *MockNPCI_getNpduHopCount_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockNPCI_getNpduHopCount_Call) Return(_a0 *uint8) *MockNPCI_getNpduHopCount_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockNPCI_getNpduHopCount_Call) RunAndReturn(run func() *uint8) *MockNPCI_getNpduHopCount_Call { - _c.Call.Return(run) - return _c -} - -// getNpduNetMessage provides a mock function with given fields: -func (_m *MockNPCI) getNpduNetMessage() *uint8 { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for getNpduNetMessage") - } - - var r0 *uint8 - if rf, ok := ret.Get(0).(func() *uint8); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*uint8) - } - } - - return r0 -} - -// MockNPCI_getNpduNetMessage_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'getNpduNetMessage' -type MockNPCI_getNpduNetMessage_Call struct { - *mock.Call -} - -// getNpduNetMessage is a helper method to define mock.On call -func (_e *MockNPCI_Expecter) getNpduNetMessage() *MockNPCI_getNpduNetMessage_Call { - return &MockNPCI_getNpduNetMessage_Call{Call: _e.mock.On("getNpduNetMessage")} -} - -func (_c *MockNPCI_getNpduNetMessage_Call) Run(run func()) *MockNPCI_getNpduNetMessage_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockNPCI_getNpduNetMessage_Call) Return(_a0 *uint8) *MockNPCI_getNpduNetMessage_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockNPCI_getNpduNetMessage_Call) RunAndReturn(run func() *uint8) *MockNPCI_getNpduNetMessage_Call { - _c.Call.Return(run) - return _c -} - -// getNpduSADR provides a mock function with given fields: -func (_m *MockNPCI) getNpduSADR() *Address { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for getNpduSADR") - } - - var r0 *Address - if rf, ok := ret.Get(0).(func() *Address); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*Address) - } - } - - return r0 -} - -// MockNPCI_getNpduSADR_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'getNpduSADR' -type MockNPCI_getNpduSADR_Call struct { - *mock.Call -} - -// getNpduSADR is a helper method to define mock.On call -func (_e *MockNPCI_Expecter) getNpduSADR() *MockNPCI_getNpduSADR_Call { - return &MockNPCI_getNpduSADR_Call{Call: _e.mock.On("getNpduSADR")} -} - -func (_c *MockNPCI_getNpduSADR_Call) Run(run func()) *MockNPCI_getNpduSADR_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockNPCI_getNpduSADR_Call) Return(_a0 *Address) *MockNPCI_getNpduSADR_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockNPCI_getNpduSADR_Call) RunAndReturn(run func() *Address) *MockNPCI_getNpduSADR_Call { - _c.Call.Return(run) - return _c -} - -// getNpduVendorID provides a mock function with given fields: -func (_m *MockNPCI) getNpduVendorID() *model.BACnetVendorId { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for getNpduVendorID") - } - - var r0 *model.BACnetVendorId - if rf, ok := ret.Get(0).(func() *model.BACnetVendorId); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*model.BACnetVendorId) - } - } - - return r0 -} - -// MockNPCI_getNpduVendorID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'getNpduVendorID' -type MockNPCI_getNpduVendorID_Call struct { - *mock.Call -} - -// getNpduVendorID is a helper method to define mock.On call -func (_e *MockNPCI_Expecter) getNpduVendorID() *MockNPCI_getNpduVendorID_Call { - return &MockNPCI_getNpduVendorID_Call{Call: _e.mock.On("getNpduVendorID")} -} - -func (_c *MockNPCI_getNpduVendorID_Call) Run(run func()) *MockNPCI_getNpduVendorID_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockNPCI_getNpduVendorID_Call) Return(_a0 *model.BACnetVendorId) *MockNPCI_getNpduVendorID_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockNPCI_getNpduVendorID_Call) RunAndReturn(run func() *model.BACnetVendorId) *MockNPCI_getNpduVendorID_Call { - _c.Call.Return(run) - return _c -} - -// getNpduVersion provides a mock function with given fields: -func (_m *MockNPCI) getNpduVersion() uint8 { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for getNpduVersion") - } - - var r0 uint8 - if rf, ok := ret.Get(0).(func() uint8); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(uint8) - } - - return r0 -} - -// MockNPCI_getNpduVersion_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'getNpduVersion' -type MockNPCI_getNpduVersion_Call struct { - *mock.Call -} - -// getNpduVersion is a helper method to define mock.On call -func (_e *MockNPCI_Expecter) getNpduVersion() *MockNPCI_getNpduVersion_Call { - return &MockNPCI_getNpduVersion_Call{Call: _e.mock.On("getNpduVersion")} -} - -func (_c *MockNPCI_getNpduVersion_Call) Run(run func()) *MockNPCI_getNpduVersion_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockNPCI_getNpduVersion_Call) Return(_a0 uint8) *MockNPCI_getNpduVersion_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockNPCI_getNpduVersion_Call) RunAndReturn(run func() uint8) *MockNPCI_getNpduVersion_Call { - _c.Call.Return(run) - return _c -} - -// setAPDU provides a mock function with given fields: _a0 -func (_m *MockNPCI) setAPDU(_a0 model.APDU) { - _m.Called(_a0) -} - -// MockNPCI_setAPDU_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'setAPDU' -type MockNPCI_setAPDU_Call struct { - *mock.Call -} - -// setAPDU is a helper method to define mock.On call -// - _a0 model.APDU -func (_e *MockNPCI_Expecter) setAPDU(_a0 interface{}) *MockNPCI_setAPDU_Call { - return &MockNPCI_setAPDU_Call{Call: _e.mock.On("setAPDU", _a0)} -} - -func (_c *MockNPCI_setAPDU_Call) Run(run func(_a0 model.APDU)) *MockNPCI_setAPDU_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(model.APDU)) - }) - return _c -} - -func (_c *MockNPCI_setAPDU_Call) Return() *MockNPCI_setAPDU_Call { - _c.Call.Return() - return _c -} - -func (_c *MockNPCI_setAPDU_Call) RunAndReturn(run func(model.APDU)) *MockNPCI_setAPDU_Call { - _c.Call.Return(run) - return _c -} - -// setNLM provides a mock function with given fields: _a0 -func (_m *MockNPCI) setNLM(_a0 model.NLM) { - _m.Called(_a0) -} - -// MockNPCI_setNLM_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'setNLM' -type MockNPCI_setNLM_Call struct { - *mock.Call -} - -// setNLM is a helper method to define mock.On call -// - _a0 model.NLM -func (_e *MockNPCI_Expecter) setNLM(_a0 interface{}) *MockNPCI_setNLM_Call { - return &MockNPCI_setNLM_Call{Call: _e.mock.On("setNLM", _a0)} -} - -func (_c *MockNPCI_setNLM_Call) Run(run func(_a0 model.NLM)) *MockNPCI_setNLM_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(model.NLM)) - }) - return _c -} - -func (_c *MockNPCI_setNLM_Call) Return() *MockNPCI_setNLM_Call { - _c.Call.Return() - return _c -} - -func (_c *MockNPCI_setNLM_Call) RunAndReturn(run func(model.NLM)) *MockNPCI_setNLM_Call { - _c.Call.Return(run) - return _c -} - -// setNPDU provides a mock function with given fields: _a0 -func (_m *MockNPCI) setNPDU(_a0 model.NPDU) { - _m.Called(_a0) -} - -// MockNPCI_setNPDU_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'setNPDU' -type MockNPCI_setNPDU_Call struct { - *mock.Call -} - -// setNPDU is a helper method to define mock.On call -// - _a0 model.NPDU -func (_e *MockNPCI_Expecter) setNPDU(_a0 interface{}) *MockNPCI_setNPDU_Call { - return &MockNPCI_setNPDU_Call{Call: _e.mock.On("setNPDU", _a0)} -} - -func (_c *MockNPCI_setNPDU_Call) Run(run func(_a0 model.NPDU)) *MockNPCI_setNPDU_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(model.NPDU)) - }) - return _c -} - -func (_c *MockNPCI_setNPDU_Call) Return() *MockNPCI_setNPDU_Call { - _c.Call.Return() - return _c -} - -func (_c *MockNPCI_setNPDU_Call) RunAndReturn(run func(model.NPDU)) *MockNPCI_setNPDU_Call { - _c.Call.Return(run) - return _c -} - -// setNpduControl provides a mock function with given fields: _a0 -func (_m *MockNPCI) setNpduControl(_a0 uint8) { - _m.Called(_a0) -} - -// MockNPCI_setNpduControl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'setNpduControl' -type MockNPCI_setNpduControl_Call struct { - *mock.Call -} - -// setNpduControl is a helper method to define mock.On call -// - _a0 uint8 -func (_e *MockNPCI_Expecter) setNpduControl(_a0 interface{}) *MockNPCI_setNpduControl_Call { - return &MockNPCI_setNpduControl_Call{Call: _e.mock.On("setNpduControl", _a0)} -} - -func (_c *MockNPCI_setNpduControl_Call) Run(run func(_a0 uint8)) *MockNPCI_setNpduControl_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(uint8)) - }) - return _c -} - -func (_c *MockNPCI_setNpduControl_Call) Return() *MockNPCI_setNpduControl_Call { - _c.Call.Return() - return _c -} - -func (_c *MockNPCI_setNpduControl_Call) RunAndReturn(run func(uint8)) *MockNPCI_setNpduControl_Call { - _c.Call.Return(run) - return _c -} - -// setNpduDADR provides a mock function with given fields: _a0 -func (_m *MockNPCI) setNpduDADR(_a0 *Address) { - _m.Called(_a0) -} - -// MockNPCI_setNpduDADR_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'setNpduDADR' -type MockNPCI_setNpduDADR_Call struct { - *mock.Call -} - -// setNpduDADR is a helper method to define mock.On call -// - _a0 *Address -func (_e *MockNPCI_Expecter) setNpduDADR(_a0 interface{}) *MockNPCI_setNpduDADR_Call { - return &MockNPCI_setNpduDADR_Call{Call: _e.mock.On("setNpduDADR", _a0)} -} - -func (_c *MockNPCI_setNpduDADR_Call) Run(run func(_a0 *Address)) *MockNPCI_setNpduDADR_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(*Address)) - }) - return _c -} - -func (_c *MockNPCI_setNpduDADR_Call) Return() *MockNPCI_setNpduDADR_Call { - _c.Call.Return() - return _c -} - -func (_c *MockNPCI_setNpduDADR_Call) RunAndReturn(run func(*Address)) *MockNPCI_setNpduDADR_Call { - _c.Call.Return(run) - return _c -} - -// setNpduHopCount provides a mock function with given fields: _a0 -func (_m *MockNPCI) setNpduHopCount(_a0 *uint8) { - _m.Called(_a0) -} - -// MockNPCI_setNpduHopCount_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'setNpduHopCount' -type MockNPCI_setNpduHopCount_Call struct { - *mock.Call -} - -// setNpduHopCount is a helper method to define mock.On call -// - _a0 *uint8 -func (_e *MockNPCI_Expecter) setNpduHopCount(_a0 interface{}) *MockNPCI_setNpduHopCount_Call { - return &MockNPCI_setNpduHopCount_Call{Call: _e.mock.On("setNpduHopCount", _a0)} -} - -func (_c *MockNPCI_setNpduHopCount_Call) Run(run func(_a0 *uint8)) *MockNPCI_setNpduHopCount_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(*uint8)) - }) - return _c -} - -func (_c *MockNPCI_setNpduHopCount_Call) Return() *MockNPCI_setNpduHopCount_Call { - _c.Call.Return() - return _c -} - -func (_c *MockNPCI_setNpduHopCount_Call) RunAndReturn(run func(*uint8)) *MockNPCI_setNpduHopCount_Call { - _c.Call.Return(run) - return _c -} - -// setNpduNetMessage provides a mock function with given fields: _a0 -func (_m *MockNPCI) setNpduNetMessage(_a0 *uint8) { - _m.Called(_a0) -} - -// MockNPCI_setNpduNetMessage_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'setNpduNetMessage' -type MockNPCI_setNpduNetMessage_Call struct { - *mock.Call -} - -// setNpduNetMessage is a helper method to define mock.On call -// - _a0 *uint8 -func (_e *MockNPCI_Expecter) setNpduNetMessage(_a0 interface{}) *MockNPCI_setNpduNetMessage_Call { - return &MockNPCI_setNpduNetMessage_Call{Call: _e.mock.On("setNpduNetMessage", _a0)} -} - -func (_c *MockNPCI_setNpduNetMessage_Call) Run(run func(_a0 *uint8)) *MockNPCI_setNpduNetMessage_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(*uint8)) - }) - return _c -} - -func (_c *MockNPCI_setNpduNetMessage_Call) Return() *MockNPCI_setNpduNetMessage_Call { - _c.Call.Return() - return _c -} - -func (_c *MockNPCI_setNpduNetMessage_Call) RunAndReturn(run func(*uint8)) *MockNPCI_setNpduNetMessage_Call { - _c.Call.Return(run) - return _c -} - -// setNpduSADR provides a mock function with given fields: _a0 -func (_m *MockNPCI) setNpduSADR(_a0 *Address) { - _m.Called(_a0) -} - -// MockNPCI_setNpduSADR_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'setNpduSADR' -type MockNPCI_setNpduSADR_Call struct { - *mock.Call -} - -// setNpduSADR is a helper method to define mock.On call -// - _a0 *Address -func (_e *MockNPCI_Expecter) setNpduSADR(_a0 interface{}) *MockNPCI_setNpduSADR_Call { - return &MockNPCI_setNpduSADR_Call{Call: _e.mock.On("setNpduSADR", _a0)} -} - -func (_c *MockNPCI_setNpduSADR_Call) Run(run func(_a0 *Address)) *MockNPCI_setNpduSADR_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(*Address)) - }) - return _c -} - -func (_c *MockNPCI_setNpduSADR_Call) Return() *MockNPCI_setNpduSADR_Call { - _c.Call.Return() - return _c -} - -func (_c *MockNPCI_setNpduSADR_Call) RunAndReturn(run func(*Address)) *MockNPCI_setNpduSADR_Call { - _c.Call.Return(run) - return _c -} - -// setNpduVendorID provides a mock function with given fields: _a0 -func (_m *MockNPCI) setNpduVendorID(_a0 *model.BACnetVendorId) { - _m.Called(_a0) -} - -// MockNPCI_setNpduVendorID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'setNpduVendorID' -type MockNPCI_setNpduVendorID_Call struct { - *mock.Call -} - -// setNpduVendorID is a helper method to define mock.On call -// - _a0 *model.BACnetVendorId -func (_e *MockNPCI_Expecter) setNpduVendorID(_a0 interface{}) *MockNPCI_setNpduVendorID_Call { - return &MockNPCI_setNpduVendorID_Call{Call: _e.mock.On("setNpduVendorID", _a0)} -} - -func (_c *MockNPCI_setNpduVendorID_Call) Run(run func(_a0 *model.BACnetVendorId)) *MockNPCI_setNpduVendorID_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(*model.BACnetVendorId)) - }) - return _c -} - -func (_c *MockNPCI_setNpduVendorID_Call) Return() *MockNPCI_setNpduVendorID_Call { - _c.Call.Return() - return _c -} - -func (_c *MockNPCI_setNpduVendorID_Call) RunAndReturn(run func(*model.BACnetVendorId)) *MockNPCI_setNpduVendorID_Call { - _c.Call.Return(run) - return _c -} - -// setNpduVersion provides a mock function with given fields: _a0 -func (_m *MockNPCI) setNpduVersion(_a0 uint8) { - _m.Called(_a0) -} - -// MockNPCI_setNpduVersion_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'setNpduVersion' -type MockNPCI_setNpduVersion_Call struct { - *mock.Call -} - -// setNpduVersion is a helper method to define mock.On call -// - _a0 uint8 -func (_e *MockNPCI_Expecter) setNpduVersion(_a0 interface{}) *MockNPCI_setNpduVersion_Call { - return &MockNPCI_setNpduVersion_Call{Call: _e.mock.On("setNpduVersion", _a0)} -} - -func (_c *MockNPCI_setNpduVersion_Call) Run(run func(_a0 uint8)) *MockNPCI_setNpduVersion_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(uint8)) - }) - return _c -} - -func (_c *MockNPCI_setNpduVersion_Call) Return() *MockNPCI_setNpduVersion_Call { - _c.Call.Return() - return _c -} - -func (_c *MockNPCI_setNpduVersion_Call) RunAndReturn(run func(uint8)) *MockNPCI_setNpduVersion_Call { - _c.Call.Return(run) - return _c -} - -// NewMockNPCI creates a new instance of MockNPCI. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewMockNPCI(t interface { - mock.TestingT - Cleanup(func()) -}) *MockNPCI { - mock := &MockNPCI{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/plc4go/internal/bacnetip/mock_NPDU_test.go b/plc4go/internal/bacnetip/mock_NPDU_test.go deleted file mode 100644 index c612b9c35d1..00000000000 --- a/plc4go/internal/bacnetip/mock_NPDU_test.go +++ /dev/null @@ -1,2870 +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 - * - * https://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. - */ - -// Code generated by mockery v2.42.2. DO NOT EDIT. - -package bacnetip - -import ( - context "context" - - model "github.com/apache/plc4x/plc4go/protocols/bacnetip/readwrite/model" - mock "github.com/stretchr/testify/mock" - - spi "github.com/apache/plc4x/plc4go/spi" - - utils "github.com/apache/plc4x/plc4go/spi/utils" -) - -// MockNPDU is an autogenerated mock type for the NPDU type -type MockNPDU struct { - mock.Mock -} - -type MockNPDU_Expecter struct { - mock *mock.Mock -} - -func (_m *MockNPDU) EXPECT() *MockNPDU_Expecter { - return &MockNPDU_Expecter{mock: &_m.Mock} -} - -// Decode provides a mock function with given fields: pdu -func (_m *MockNPDU) Decode(pdu Arg) error { - ret := _m.Called(pdu) - - if len(ret) == 0 { - panic("no return value specified for Decode") - } - - var r0 error - if rf, ok := ret.Get(0).(func(Arg) error); ok { - r0 = rf(pdu) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockNPDU_Decode_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Decode' -type MockNPDU_Decode_Call struct { - *mock.Call -} - -// Decode is a helper method to define mock.On call -// - pdu Arg -func (_e *MockNPDU_Expecter) Decode(pdu interface{}) *MockNPDU_Decode_Call { - return &MockNPDU_Decode_Call{Call: _e.mock.On("Decode", pdu)} -} - -func (_c *MockNPDU_Decode_Call) Run(run func(pdu Arg)) *MockNPDU_Decode_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(Arg)) - }) - return _c -} - -func (_c *MockNPDU_Decode_Call) Return(_a0 error) *MockNPDU_Decode_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockNPDU_Decode_Call) RunAndReturn(run func(Arg) error) *MockNPDU_Decode_Call { - _c.Call.Return(run) - return _c -} - -// DeepCopy provides a mock function with given fields: -func (_m *MockNPDU) DeepCopy() interface{} { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for DeepCopy") - } - - var r0 interface{} - if rf, ok := ret.Get(0).(func() interface{}); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(interface{}) - } - } - - return r0 -} - -// MockNPDU_DeepCopy_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeepCopy' -type MockNPDU_DeepCopy_Call struct { - *mock.Call -} - -// DeepCopy is a helper method to define mock.On call -func (_e *MockNPDU_Expecter) DeepCopy() *MockNPDU_DeepCopy_Call { - return &MockNPDU_DeepCopy_Call{Call: _e.mock.On("DeepCopy")} -} - -func (_c *MockNPDU_DeepCopy_Call) Run(run func()) *MockNPDU_DeepCopy_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockNPDU_DeepCopy_Call) Return(_a0 interface{}) *MockNPDU_DeepCopy_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockNPDU_DeepCopy_Call) RunAndReturn(run func() interface{}) *MockNPDU_DeepCopy_Call { - _c.Call.Return(run) - return _c -} - -// Encode provides a mock function with given fields: pdu -func (_m *MockNPDU) Encode(pdu Arg) error { - ret := _m.Called(pdu) - - if len(ret) == 0 { - panic("no return value specified for Encode") - } - - var r0 error - if rf, ok := ret.Get(0).(func(Arg) error); ok { - r0 = rf(pdu) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockNPDU_Encode_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Encode' -type MockNPDU_Encode_Call struct { - *mock.Call -} - -// Encode is a helper method to define mock.On call -// - pdu Arg -func (_e *MockNPDU_Expecter) Encode(pdu interface{}) *MockNPDU_Encode_Call { - return &MockNPDU_Encode_Call{Call: _e.mock.On("Encode", pdu)} -} - -func (_c *MockNPDU_Encode_Call) Run(run func(pdu Arg)) *MockNPDU_Encode_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(Arg)) - }) - return _c -} - -func (_c *MockNPDU_Encode_Call) Return(_a0 error) *MockNPDU_Encode_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockNPDU_Encode_Call) RunAndReturn(run func(Arg) error) *MockNPDU_Encode_Call { - _c.Call.Return(run) - return _c -} - -// Get provides a mock function with given fields: -func (_m *MockNPDU) Get() (byte, error) { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Get") - } - - var r0 byte - var r1 error - if rf, ok := ret.Get(0).(func() (byte, error)); ok { - return rf() - } - if rf, ok := ret.Get(0).(func() byte); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(byte) - } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockNPDU_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' -type MockNPDU_Get_Call struct { - *mock.Call -} - -// Get is a helper method to define mock.On call -func (_e *MockNPDU_Expecter) Get() *MockNPDU_Get_Call { - return &MockNPDU_Get_Call{Call: _e.mock.On("Get")} -} - -func (_c *MockNPDU_Get_Call) Run(run func()) *MockNPDU_Get_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockNPDU_Get_Call) Return(_a0 byte, _a1 error) *MockNPDU_Get_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockNPDU_Get_Call) RunAndReturn(run func() (byte, error)) *MockNPDU_Get_Call { - _c.Call.Return(run) - return _c -} - -// GetApdu provides a mock function with given fields: -func (_m *MockNPDU) GetApdu() model.APDU { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetApdu") - } - - var r0 model.APDU - if rf, ok := ret.Get(0).(func() model.APDU); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(model.APDU) - } - } - - return r0 -} - -// MockNPDU_GetApdu_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetApdu' -type MockNPDU_GetApdu_Call struct { - *mock.Call -} - -// GetApdu is a helper method to define mock.On call -func (_e *MockNPDU_Expecter) GetApdu() *MockNPDU_GetApdu_Call { - return &MockNPDU_GetApdu_Call{Call: _e.mock.On("GetApdu")} -} - -func (_c *MockNPDU_GetApdu_Call) Run(run func()) *MockNPDU_GetApdu_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockNPDU_GetApdu_Call) Return(_a0 model.APDU) *MockNPDU_GetApdu_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockNPDU_GetApdu_Call) RunAndReturn(run func() model.APDU) *MockNPDU_GetApdu_Call { - _c.Call.Return(run) - return _c -} - -// GetControl provides a mock function with given fields: -func (_m *MockNPDU) GetControl() model.NPDUControl { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetControl") - } - - var r0 model.NPDUControl - if rf, ok := ret.Get(0).(func() model.NPDUControl); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(model.NPDUControl) - } - } - - return r0 -} - -// MockNPDU_GetControl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetControl' -type MockNPDU_GetControl_Call struct { - *mock.Call -} - -// GetControl is a helper method to define mock.On call -func (_e *MockNPDU_Expecter) GetControl() *MockNPDU_GetControl_Call { - return &MockNPDU_GetControl_Call{Call: _e.mock.On("GetControl")} -} - -func (_c *MockNPDU_GetControl_Call) Run(run func()) *MockNPDU_GetControl_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockNPDU_GetControl_Call) Return(_a0 model.NPDUControl) *MockNPDU_GetControl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockNPDU_GetControl_Call) RunAndReturn(run func() model.NPDUControl) *MockNPDU_GetControl_Call { - _c.Call.Return(run) - return _c -} - -// GetData provides a mock function with given fields: dlen -func (_m *MockNPDU) GetData(dlen int) ([]byte, error) { - ret := _m.Called(dlen) - - if len(ret) == 0 { - panic("no return value specified for GetData") - } - - var r0 []byte - var r1 error - if rf, ok := ret.Get(0).(func(int) ([]byte, error)); ok { - return rf(dlen) - } - if rf, ok := ret.Get(0).(func(int) []byte); ok { - r0 = rf(dlen) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]byte) - } - } - - if rf, ok := ret.Get(1).(func(int) error); ok { - r1 = rf(dlen) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockNPDU_GetData_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetData' -type MockNPDU_GetData_Call struct { - *mock.Call -} - -// GetData is a helper method to define mock.On call -// - dlen int -func (_e *MockNPDU_Expecter) GetData(dlen interface{}) *MockNPDU_GetData_Call { - return &MockNPDU_GetData_Call{Call: _e.mock.On("GetData", dlen)} -} - -func (_c *MockNPDU_GetData_Call) Run(run func(dlen int)) *MockNPDU_GetData_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(int)) - }) - return _c -} - -func (_c *MockNPDU_GetData_Call) Return(_a0 []byte, _a1 error) *MockNPDU_GetData_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockNPDU_GetData_Call) RunAndReturn(run func(int) ([]byte, error)) *MockNPDU_GetData_Call { - _c.Call.Return(run) - return _c -} - -// GetDestinationAddress provides a mock function with given fields: -func (_m *MockNPDU) GetDestinationAddress() []uint8 { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetDestinationAddress") - } - - var r0 []uint8 - if rf, ok := ret.Get(0).(func() []uint8); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]uint8) - } - } - - return r0 -} - -// MockNPDU_GetDestinationAddress_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetDestinationAddress' -type MockNPDU_GetDestinationAddress_Call struct { - *mock.Call -} - -// GetDestinationAddress is a helper method to define mock.On call -func (_e *MockNPDU_Expecter) GetDestinationAddress() *MockNPDU_GetDestinationAddress_Call { - return &MockNPDU_GetDestinationAddress_Call{Call: _e.mock.On("GetDestinationAddress")} -} - -func (_c *MockNPDU_GetDestinationAddress_Call) Run(run func()) *MockNPDU_GetDestinationAddress_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockNPDU_GetDestinationAddress_Call) Return(_a0 []uint8) *MockNPDU_GetDestinationAddress_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockNPDU_GetDestinationAddress_Call) RunAndReturn(run func() []uint8) *MockNPDU_GetDestinationAddress_Call { - _c.Call.Return(run) - return _c -} - -// GetDestinationLength provides a mock function with given fields: -func (_m *MockNPDU) GetDestinationLength() *uint8 { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetDestinationLength") - } - - var r0 *uint8 - if rf, ok := ret.Get(0).(func() *uint8); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*uint8) - } - } - - return r0 -} - -// MockNPDU_GetDestinationLength_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetDestinationLength' -type MockNPDU_GetDestinationLength_Call struct { - *mock.Call -} - -// GetDestinationLength is a helper method to define mock.On call -func (_e *MockNPDU_Expecter) GetDestinationLength() *MockNPDU_GetDestinationLength_Call { - return &MockNPDU_GetDestinationLength_Call{Call: _e.mock.On("GetDestinationLength")} -} - -func (_c *MockNPDU_GetDestinationLength_Call) Run(run func()) *MockNPDU_GetDestinationLength_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockNPDU_GetDestinationLength_Call) Return(_a0 *uint8) *MockNPDU_GetDestinationLength_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockNPDU_GetDestinationLength_Call) RunAndReturn(run func() *uint8) *MockNPDU_GetDestinationLength_Call { - _c.Call.Return(run) - return _c -} - -// GetDestinationLengthAddon provides a mock function with given fields: -func (_m *MockNPDU) GetDestinationLengthAddon() uint16 { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetDestinationLengthAddon") - } - - var r0 uint16 - if rf, ok := ret.Get(0).(func() uint16); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(uint16) - } - - return r0 -} - -// MockNPDU_GetDestinationLengthAddon_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetDestinationLengthAddon' -type MockNPDU_GetDestinationLengthAddon_Call struct { - *mock.Call -} - -// GetDestinationLengthAddon is a helper method to define mock.On call -func (_e *MockNPDU_Expecter) GetDestinationLengthAddon() *MockNPDU_GetDestinationLengthAddon_Call { - return &MockNPDU_GetDestinationLengthAddon_Call{Call: _e.mock.On("GetDestinationLengthAddon")} -} - -func (_c *MockNPDU_GetDestinationLengthAddon_Call) Run(run func()) *MockNPDU_GetDestinationLengthAddon_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockNPDU_GetDestinationLengthAddon_Call) Return(_a0 uint16) *MockNPDU_GetDestinationLengthAddon_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockNPDU_GetDestinationLengthAddon_Call) RunAndReturn(run func() uint16) *MockNPDU_GetDestinationLengthAddon_Call { - _c.Call.Return(run) - return _c -} - -// GetDestinationNetworkAddress provides a mock function with given fields: -func (_m *MockNPDU) GetDestinationNetworkAddress() *uint16 { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetDestinationNetworkAddress") - } - - var r0 *uint16 - if rf, ok := ret.Get(0).(func() *uint16); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*uint16) - } - } - - return r0 -} - -// MockNPDU_GetDestinationNetworkAddress_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetDestinationNetworkAddress' -type MockNPDU_GetDestinationNetworkAddress_Call struct { - *mock.Call -} - -// GetDestinationNetworkAddress is a helper method to define mock.On call -func (_e *MockNPDU_Expecter) GetDestinationNetworkAddress() *MockNPDU_GetDestinationNetworkAddress_Call { - return &MockNPDU_GetDestinationNetworkAddress_Call{Call: _e.mock.On("GetDestinationNetworkAddress")} -} - -func (_c *MockNPDU_GetDestinationNetworkAddress_Call) Run(run func()) *MockNPDU_GetDestinationNetworkAddress_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockNPDU_GetDestinationNetworkAddress_Call) Return(_a0 *uint16) *MockNPDU_GetDestinationNetworkAddress_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockNPDU_GetDestinationNetworkAddress_Call) RunAndReturn(run func() *uint16) *MockNPDU_GetDestinationNetworkAddress_Call { - _c.Call.Return(run) - return _c -} - -// GetExpectingReply provides a mock function with given fields: -func (_m *MockNPDU) GetExpectingReply() bool { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetExpectingReply") - } - - var r0 bool - if rf, ok := ret.Get(0).(func() bool); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(bool) - } - - return r0 -} - -// MockNPDU_GetExpectingReply_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetExpectingReply' -type MockNPDU_GetExpectingReply_Call struct { - *mock.Call -} - -// GetExpectingReply is a helper method to define mock.On call -func (_e *MockNPDU_Expecter) GetExpectingReply() *MockNPDU_GetExpectingReply_Call { - return &MockNPDU_GetExpectingReply_Call{Call: _e.mock.On("GetExpectingReply")} -} - -func (_c *MockNPDU_GetExpectingReply_Call) Run(run func()) *MockNPDU_GetExpectingReply_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockNPDU_GetExpectingReply_Call) Return(_a0 bool) *MockNPDU_GetExpectingReply_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockNPDU_GetExpectingReply_Call) RunAndReturn(run func() bool) *MockNPDU_GetExpectingReply_Call { - _c.Call.Return(run) - return _c -} - -// GetHopCount provides a mock function with given fields: -func (_m *MockNPDU) GetHopCount() *uint8 { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetHopCount") - } - - var r0 *uint8 - if rf, ok := ret.Get(0).(func() *uint8); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*uint8) - } - } - - return r0 -} - -// MockNPDU_GetHopCount_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetHopCount' -type MockNPDU_GetHopCount_Call struct { - *mock.Call -} - -// GetHopCount is a helper method to define mock.On call -func (_e *MockNPDU_Expecter) GetHopCount() *MockNPDU_GetHopCount_Call { - return &MockNPDU_GetHopCount_Call{Call: _e.mock.On("GetHopCount")} -} - -func (_c *MockNPDU_GetHopCount_Call) Run(run func()) *MockNPDU_GetHopCount_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockNPDU_GetHopCount_Call) Return(_a0 *uint8) *MockNPDU_GetHopCount_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockNPDU_GetHopCount_Call) RunAndReturn(run func() *uint8) *MockNPDU_GetHopCount_Call { - _c.Call.Return(run) - return _c -} - -// GetLengthInBits provides a mock function with given fields: ctx -func (_m *MockNPDU) GetLengthInBits(ctx context.Context) uint16 { - ret := _m.Called(ctx) - - if len(ret) == 0 { - panic("no return value specified for GetLengthInBits") - } - - var r0 uint16 - if rf, ok := ret.Get(0).(func(context.Context) uint16); ok { - r0 = rf(ctx) - } else { - r0 = ret.Get(0).(uint16) - } - - return r0 -} - -// MockNPDU_GetLengthInBits_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetLengthInBits' -type MockNPDU_GetLengthInBits_Call struct { - *mock.Call -} - -// GetLengthInBits is a helper method to define mock.On call -// - ctx context.Context -func (_e *MockNPDU_Expecter) GetLengthInBits(ctx interface{}) *MockNPDU_GetLengthInBits_Call { - return &MockNPDU_GetLengthInBits_Call{Call: _e.mock.On("GetLengthInBits", ctx)} -} - -func (_c *MockNPDU_GetLengthInBits_Call) Run(run func(ctx context.Context)) *MockNPDU_GetLengthInBits_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context)) - }) - return _c -} - -func (_c *MockNPDU_GetLengthInBits_Call) Return(_a0 uint16) *MockNPDU_GetLengthInBits_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockNPDU_GetLengthInBits_Call) RunAndReturn(run func(context.Context) uint16) *MockNPDU_GetLengthInBits_Call { - _c.Call.Return(run) - return _c -} - -// GetLengthInBytes provides a mock function with given fields: ctx -func (_m *MockNPDU) GetLengthInBytes(ctx context.Context) uint16 { - ret := _m.Called(ctx) - - if len(ret) == 0 { - panic("no return value specified for GetLengthInBytes") - } - - var r0 uint16 - if rf, ok := ret.Get(0).(func(context.Context) uint16); ok { - r0 = rf(ctx) - } else { - r0 = ret.Get(0).(uint16) - } - - return r0 -} - -// MockNPDU_GetLengthInBytes_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetLengthInBytes' -type MockNPDU_GetLengthInBytes_Call struct { - *mock.Call -} - -// GetLengthInBytes is a helper method to define mock.On call -// - ctx context.Context -func (_e *MockNPDU_Expecter) GetLengthInBytes(ctx interface{}) *MockNPDU_GetLengthInBytes_Call { - return &MockNPDU_GetLengthInBytes_Call{Call: _e.mock.On("GetLengthInBytes", ctx)} -} - -func (_c *MockNPDU_GetLengthInBytes_Call) Run(run func(ctx context.Context)) *MockNPDU_GetLengthInBytes_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context)) - }) - return _c -} - -func (_c *MockNPDU_GetLengthInBytes_Call) Return(_a0 uint16) *MockNPDU_GetLengthInBytes_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockNPDU_GetLengthInBytes_Call) RunAndReturn(run func(context.Context) uint16) *MockNPDU_GetLengthInBytes_Call { - _c.Call.Return(run) - return _c -} - -// GetLong provides a mock function with given fields: -func (_m *MockNPDU) GetLong() (int64, error) { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetLong") - } - - var r0 int64 - var r1 error - if rf, ok := ret.Get(0).(func() (int64, error)); ok { - return rf() - } - if rf, ok := ret.Get(0).(func() int64); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(int64) - } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockNPDU_GetLong_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetLong' -type MockNPDU_GetLong_Call struct { - *mock.Call -} - -// GetLong is a helper method to define mock.On call -func (_e *MockNPDU_Expecter) GetLong() *MockNPDU_GetLong_Call { - return &MockNPDU_GetLong_Call{Call: _e.mock.On("GetLong")} -} - -func (_c *MockNPDU_GetLong_Call) Run(run func()) *MockNPDU_GetLong_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockNPDU_GetLong_Call) Return(_a0 int64, _a1 error) *MockNPDU_GetLong_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockNPDU_GetLong_Call) RunAndReturn(run func() (int64, error)) *MockNPDU_GetLong_Call { - _c.Call.Return(run) - return _c -} - -// GetNPDUNetMessage provides a mock function with given fields: -func (_m *MockNPDU) GetNPDUNetMessage() *uint8 { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetNPDUNetMessage") - } - - var r0 *uint8 - if rf, ok := ret.Get(0).(func() *uint8); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*uint8) - } - } - - return r0 -} - -// MockNPDU_GetNPDUNetMessage_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetNPDUNetMessage' -type MockNPDU_GetNPDUNetMessage_Call struct { - *mock.Call -} - -// GetNPDUNetMessage is a helper method to define mock.On call -func (_e *MockNPDU_Expecter) GetNPDUNetMessage() *MockNPDU_GetNPDUNetMessage_Call { - return &MockNPDU_GetNPDUNetMessage_Call{Call: _e.mock.On("GetNPDUNetMessage")} -} - -func (_c *MockNPDU_GetNPDUNetMessage_Call) Run(run func()) *MockNPDU_GetNPDUNetMessage_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockNPDU_GetNPDUNetMessage_Call) Return(_a0 *uint8) *MockNPDU_GetNPDUNetMessage_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockNPDU_GetNPDUNetMessage_Call) RunAndReturn(run func() *uint8) *MockNPDU_GetNPDUNetMessage_Call { - _c.Call.Return(run) - return _c -} - -// GetNetworkPriority provides a mock function with given fields: -func (_m *MockNPDU) GetNetworkPriority() model.NPDUNetworkPriority { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetNetworkPriority") - } - - var r0 model.NPDUNetworkPriority - if rf, ok := ret.Get(0).(func() model.NPDUNetworkPriority); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(model.NPDUNetworkPriority) - } - - return r0 -} - -// MockNPDU_GetNetworkPriority_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetNetworkPriority' -type MockNPDU_GetNetworkPriority_Call struct { - *mock.Call -} - -// GetNetworkPriority is a helper method to define mock.On call -func (_e *MockNPDU_Expecter) GetNetworkPriority() *MockNPDU_GetNetworkPriority_Call { - return &MockNPDU_GetNetworkPriority_Call{Call: _e.mock.On("GetNetworkPriority")} -} - -func (_c *MockNPDU_GetNetworkPriority_Call) Run(run func()) *MockNPDU_GetNetworkPriority_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockNPDU_GetNetworkPriority_Call) Return(_a0 model.NPDUNetworkPriority) *MockNPDU_GetNetworkPriority_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockNPDU_GetNetworkPriority_Call) RunAndReturn(run func() model.NPDUNetworkPriority) *MockNPDU_GetNetworkPriority_Call { - _c.Call.Return(run) - return _c -} - -// GetNlm provides a mock function with given fields: -func (_m *MockNPDU) GetNlm() model.NLM { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetNlm") - } - - var r0 model.NLM - if rf, ok := ret.Get(0).(func() model.NLM); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(model.NLM) - } - } - - return r0 -} - -// MockNPDU_GetNlm_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetNlm' -type MockNPDU_GetNlm_Call struct { - *mock.Call -} - -// GetNlm is a helper method to define mock.On call -func (_e *MockNPDU_Expecter) GetNlm() *MockNPDU_GetNlm_Call { - return &MockNPDU_GetNlm_Call{Call: _e.mock.On("GetNlm")} -} - -func (_c *MockNPDU_GetNlm_Call) Run(run func()) *MockNPDU_GetNlm_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockNPDU_GetNlm_Call) Return(_a0 model.NLM) *MockNPDU_GetNlm_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockNPDU_GetNlm_Call) RunAndReturn(run func() model.NLM) *MockNPDU_GetNlm_Call { - _c.Call.Return(run) - return _c -} - -// GetPDUDestination provides a mock function with given fields: -func (_m *MockNPDU) GetPDUDestination() *Address { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetPDUDestination") - } - - var r0 *Address - if rf, ok := ret.Get(0).(func() *Address); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*Address) - } - } - - return r0 -} - -// MockNPDU_GetPDUDestination_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPDUDestination' -type MockNPDU_GetPDUDestination_Call struct { - *mock.Call -} - -// GetPDUDestination is a helper method to define mock.On call -func (_e *MockNPDU_Expecter) GetPDUDestination() *MockNPDU_GetPDUDestination_Call { - return &MockNPDU_GetPDUDestination_Call{Call: _e.mock.On("GetPDUDestination")} -} - -func (_c *MockNPDU_GetPDUDestination_Call) Run(run func()) *MockNPDU_GetPDUDestination_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockNPDU_GetPDUDestination_Call) Return(_a0 *Address) *MockNPDU_GetPDUDestination_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockNPDU_GetPDUDestination_Call) RunAndReturn(run func() *Address) *MockNPDU_GetPDUDestination_Call { - _c.Call.Return(run) - return _c -} - -// GetPDUSource provides a mock function with given fields: -func (_m *MockNPDU) GetPDUSource() *Address { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetPDUSource") - } - - var r0 *Address - if rf, ok := ret.Get(0).(func() *Address); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*Address) - } - } - - return r0 -} - -// MockNPDU_GetPDUSource_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPDUSource' -type MockNPDU_GetPDUSource_Call struct { - *mock.Call -} - -// GetPDUSource is a helper method to define mock.On call -func (_e *MockNPDU_Expecter) GetPDUSource() *MockNPDU_GetPDUSource_Call { - return &MockNPDU_GetPDUSource_Call{Call: _e.mock.On("GetPDUSource")} -} - -func (_c *MockNPDU_GetPDUSource_Call) Run(run func()) *MockNPDU_GetPDUSource_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockNPDU_GetPDUSource_Call) Return(_a0 *Address) *MockNPDU_GetPDUSource_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockNPDU_GetPDUSource_Call) RunAndReturn(run func() *Address) *MockNPDU_GetPDUSource_Call { - _c.Call.Return(run) - return _c -} - -// GetPDUUserData provides a mock function with given fields: -func (_m *MockNPDU) GetPDUUserData() spi.Message { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetPDUUserData") - } - - var r0 spi.Message - if rf, ok := ret.Get(0).(func() spi.Message); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(spi.Message) - } - } - - return r0 -} - -// MockNPDU_GetPDUUserData_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPDUUserData' -type MockNPDU_GetPDUUserData_Call struct { - *mock.Call -} - -// GetPDUUserData is a helper method to define mock.On call -func (_e *MockNPDU_Expecter) GetPDUUserData() *MockNPDU_GetPDUUserData_Call { - return &MockNPDU_GetPDUUserData_Call{Call: _e.mock.On("GetPDUUserData")} -} - -func (_c *MockNPDU_GetPDUUserData_Call) Run(run func()) *MockNPDU_GetPDUUserData_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockNPDU_GetPDUUserData_Call) Return(_a0 spi.Message) *MockNPDU_GetPDUUserData_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockNPDU_GetPDUUserData_Call) RunAndReturn(run func() spi.Message) *MockNPDU_GetPDUUserData_Call { - _c.Call.Return(run) - return _c -} - -// GetPayloadSubtraction provides a mock function with given fields: -func (_m *MockNPDU) GetPayloadSubtraction() uint16 { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetPayloadSubtraction") - } - - var r0 uint16 - if rf, ok := ret.Get(0).(func() uint16); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(uint16) - } - - return r0 -} - -// MockNPDU_GetPayloadSubtraction_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPayloadSubtraction' -type MockNPDU_GetPayloadSubtraction_Call struct { - *mock.Call -} - -// GetPayloadSubtraction is a helper method to define mock.On call -func (_e *MockNPDU_Expecter) GetPayloadSubtraction() *MockNPDU_GetPayloadSubtraction_Call { - return &MockNPDU_GetPayloadSubtraction_Call{Call: _e.mock.On("GetPayloadSubtraction")} -} - -func (_c *MockNPDU_GetPayloadSubtraction_Call) Run(run func()) *MockNPDU_GetPayloadSubtraction_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockNPDU_GetPayloadSubtraction_Call) Return(_a0 uint16) *MockNPDU_GetPayloadSubtraction_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockNPDU_GetPayloadSubtraction_Call) RunAndReturn(run func() uint16) *MockNPDU_GetPayloadSubtraction_Call { - _c.Call.Return(run) - return _c -} - -// GetPduData provides a mock function with given fields: -func (_m *MockNPDU) GetPduData() []byte { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetPduData") - } - - var r0 []byte - if rf, ok := ret.Get(0).(func() []byte); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]byte) - } - } - - return r0 -} - -// MockNPDU_GetPduData_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPduData' -type MockNPDU_GetPduData_Call struct { - *mock.Call -} - -// GetPduData is a helper method to define mock.On call -func (_e *MockNPDU_Expecter) GetPduData() *MockNPDU_GetPduData_Call { - return &MockNPDU_GetPduData_Call{Call: _e.mock.On("GetPduData")} -} - -func (_c *MockNPDU_GetPduData_Call) Run(run func()) *MockNPDU_GetPduData_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockNPDU_GetPduData_Call) Return(_a0 []byte) *MockNPDU_GetPduData_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockNPDU_GetPduData_Call) RunAndReturn(run func() []byte) *MockNPDU_GetPduData_Call { - _c.Call.Return(run) - return _c -} - -// GetProtocolVersionNumber provides a mock function with given fields: -func (_m *MockNPDU) GetProtocolVersionNumber() uint8 { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetProtocolVersionNumber") - } - - var r0 uint8 - if rf, ok := ret.Get(0).(func() uint8); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(uint8) - } - - return r0 -} - -// MockNPDU_GetProtocolVersionNumber_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetProtocolVersionNumber' -type MockNPDU_GetProtocolVersionNumber_Call struct { - *mock.Call -} - -// GetProtocolVersionNumber is a helper method to define mock.On call -func (_e *MockNPDU_Expecter) GetProtocolVersionNumber() *MockNPDU_GetProtocolVersionNumber_Call { - return &MockNPDU_GetProtocolVersionNumber_Call{Call: _e.mock.On("GetProtocolVersionNumber")} -} - -func (_c *MockNPDU_GetProtocolVersionNumber_Call) Run(run func()) *MockNPDU_GetProtocolVersionNumber_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockNPDU_GetProtocolVersionNumber_Call) Return(_a0 uint8) *MockNPDU_GetProtocolVersionNumber_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockNPDU_GetProtocolVersionNumber_Call) RunAndReturn(run func() uint8) *MockNPDU_GetProtocolVersionNumber_Call { - _c.Call.Return(run) - return _c -} - -// GetRootMessage provides a mock function with given fields: -func (_m *MockNPDU) GetRootMessage() spi.Message { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetRootMessage") - } - - var r0 spi.Message - if rf, ok := ret.Get(0).(func() spi.Message); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(spi.Message) - } - } - - return r0 -} - -// MockNPDU_GetRootMessage_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRootMessage' -type MockNPDU_GetRootMessage_Call struct { - *mock.Call -} - -// GetRootMessage is a helper method to define mock.On call -func (_e *MockNPDU_Expecter) GetRootMessage() *MockNPDU_GetRootMessage_Call { - return &MockNPDU_GetRootMessage_Call{Call: _e.mock.On("GetRootMessage")} -} - -func (_c *MockNPDU_GetRootMessage_Call) Run(run func()) *MockNPDU_GetRootMessage_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockNPDU_GetRootMessage_Call) Return(_a0 spi.Message) *MockNPDU_GetRootMessage_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockNPDU_GetRootMessage_Call) RunAndReturn(run func() spi.Message) *MockNPDU_GetRootMessage_Call { - _c.Call.Return(run) - return _c -} - -// GetShort provides a mock function with given fields: -func (_m *MockNPDU) GetShort() (int16, error) { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetShort") - } - - var r0 int16 - var r1 error - if rf, ok := ret.Get(0).(func() (int16, error)); ok { - return rf() - } - if rf, ok := ret.Get(0).(func() int16); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(int16) - } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockNPDU_GetShort_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetShort' -type MockNPDU_GetShort_Call struct { - *mock.Call -} - -// GetShort is a helper method to define mock.On call -func (_e *MockNPDU_Expecter) GetShort() *MockNPDU_GetShort_Call { - return &MockNPDU_GetShort_Call{Call: _e.mock.On("GetShort")} -} - -func (_c *MockNPDU_GetShort_Call) Run(run func()) *MockNPDU_GetShort_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockNPDU_GetShort_Call) Return(_a0 int16, _a1 error) *MockNPDU_GetShort_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockNPDU_GetShort_Call) RunAndReturn(run func() (int16, error)) *MockNPDU_GetShort_Call { - _c.Call.Return(run) - return _c -} - -// GetSourceAddress provides a mock function with given fields: -func (_m *MockNPDU) GetSourceAddress() []uint8 { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetSourceAddress") - } - - var r0 []uint8 - if rf, ok := ret.Get(0).(func() []uint8); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]uint8) - } - } - - return r0 -} - -// MockNPDU_GetSourceAddress_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetSourceAddress' -type MockNPDU_GetSourceAddress_Call struct { - *mock.Call -} - -// GetSourceAddress is a helper method to define mock.On call -func (_e *MockNPDU_Expecter) GetSourceAddress() *MockNPDU_GetSourceAddress_Call { - return &MockNPDU_GetSourceAddress_Call{Call: _e.mock.On("GetSourceAddress")} -} - -func (_c *MockNPDU_GetSourceAddress_Call) Run(run func()) *MockNPDU_GetSourceAddress_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockNPDU_GetSourceAddress_Call) Return(_a0 []uint8) *MockNPDU_GetSourceAddress_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockNPDU_GetSourceAddress_Call) RunAndReturn(run func() []uint8) *MockNPDU_GetSourceAddress_Call { - _c.Call.Return(run) - return _c -} - -// GetSourceLength provides a mock function with given fields: -func (_m *MockNPDU) GetSourceLength() *uint8 { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetSourceLength") - } - - var r0 *uint8 - if rf, ok := ret.Get(0).(func() *uint8); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*uint8) - } - } - - return r0 -} - -// MockNPDU_GetSourceLength_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetSourceLength' -type MockNPDU_GetSourceLength_Call struct { - *mock.Call -} - -// GetSourceLength is a helper method to define mock.On call -func (_e *MockNPDU_Expecter) GetSourceLength() *MockNPDU_GetSourceLength_Call { - return &MockNPDU_GetSourceLength_Call{Call: _e.mock.On("GetSourceLength")} -} - -func (_c *MockNPDU_GetSourceLength_Call) Run(run func()) *MockNPDU_GetSourceLength_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockNPDU_GetSourceLength_Call) Return(_a0 *uint8) *MockNPDU_GetSourceLength_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockNPDU_GetSourceLength_Call) RunAndReturn(run func() *uint8) *MockNPDU_GetSourceLength_Call { - _c.Call.Return(run) - return _c -} - -// GetSourceLengthAddon provides a mock function with given fields: -func (_m *MockNPDU) GetSourceLengthAddon() uint16 { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetSourceLengthAddon") - } - - var r0 uint16 - if rf, ok := ret.Get(0).(func() uint16); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(uint16) - } - - return r0 -} - -// MockNPDU_GetSourceLengthAddon_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetSourceLengthAddon' -type MockNPDU_GetSourceLengthAddon_Call struct { - *mock.Call -} - -// GetSourceLengthAddon is a helper method to define mock.On call -func (_e *MockNPDU_Expecter) GetSourceLengthAddon() *MockNPDU_GetSourceLengthAddon_Call { - return &MockNPDU_GetSourceLengthAddon_Call{Call: _e.mock.On("GetSourceLengthAddon")} -} - -func (_c *MockNPDU_GetSourceLengthAddon_Call) Run(run func()) *MockNPDU_GetSourceLengthAddon_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockNPDU_GetSourceLengthAddon_Call) Return(_a0 uint16) *MockNPDU_GetSourceLengthAddon_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockNPDU_GetSourceLengthAddon_Call) RunAndReturn(run func() uint16) *MockNPDU_GetSourceLengthAddon_Call { - _c.Call.Return(run) - return _c -} - -// GetSourceNetworkAddress provides a mock function with given fields: -func (_m *MockNPDU) GetSourceNetworkAddress() *uint16 { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetSourceNetworkAddress") - } - - var r0 *uint16 - if rf, ok := ret.Get(0).(func() *uint16); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*uint16) - } - } - - return r0 -} - -// MockNPDU_GetSourceNetworkAddress_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetSourceNetworkAddress' -type MockNPDU_GetSourceNetworkAddress_Call struct { - *mock.Call -} - -// GetSourceNetworkAddress is a helper method to define mock.On call -func (_e *MockNPDU_Expecter) GetSourceNetworkAddress() *MockNPDU_GetSourceNetworkAddress_Call { - return &MockNPDU_GetSourceNetworkAddress_Call{Call: _e.mock.On("GetSourceNetworkAddress")} -} - -func (_c *MockNPDU_GetSourceNetworkAddress_Call) Run(run func()) *MockNPDU_GetSourceNetworkAddress_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockNPDU_GetSourceNetworkAddress_Call) Return(_a0 *uint16) *MockNPDU_GetSourceNetworkAddress_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockNPDU_GetSourceNetworkAddress_Call) RunAndReturn(run func() *uint16) *MockNPDU_GetSourceNetworkAddress_Call { - _c.Call.Return(run) - return _c -} - -// Put provides a mock function with given fields: _a0 -func (_m *MockNPDU) Put(_a0 byte) { - _m.Called(_a0) -} - -// MockNPDU_Put_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Put' -type MockNPDU_Put_Call struct { - *mock.Call -} - -// Put is a helper method to define mock.On call -// - _a0 byte -func (_e *MockNPDU_Expecter) Put(_a0 interface{}) *MockNPDU_Put_Call { - return &MockNPDU_Put_Call{Call: _e.mock.On("Put", _a0)} -} - -func (_c *MockNPDU_Put_Call) Run(run func(_a0 byte)) *MockNPDU_Put_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(byte)) - }) - return _c -} - -func (_c *MockNPDU_Put_Call) Return() *MockNPDU_Put_Call { - _c.Call.Return() - return _c -} - -func (_c *MockNPDU_Put_Call) RunAndReturn(run func(byte)) *MockNPDU_Put_Call { - _c.Call.Return(run) - return _c -} - -// PutData provides a mock function with given fields: _a0 -func (_m *MockNPDU) PutData(_a0 ...byte) { - _va := make([]interface{}, len(_a0)) - for _i := range _a0 { - _va[_i] = _a0[_i] - } - var _ca []interface{} - _ca = append(_ca, _va...) - _m.Called(_ca...) -} - -// MockNPDU_PutData_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PutData' -type MockNPDU_PutData_Call struct { - *mock.Call -} - -// PutData is a helper method to define mock.On call -// - _a0 ...byte -func (_e *MockNPDU_Expecter) PutData(_a0 ...interface{}) *MockNPDU_PutData_Call { - return &MockNPDU_PutData_Call{Call: _e.mock.On("PutData", - append([]interface{}{}, _a0...)...)} -} - -func (_c *MockNPDU_PutData_Call) Run(run func(_a0 ...byte)) *MockNPDU_PutData_Call { - _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]byte, len(args)-0) - for i, a := range args[0:] { - if a != nil { - variadicArgs[i] = a.(byte) - } - } - run(variadicArgs...) - }) - return _c -} - -func (_c *MockNPDU_PutData_Call) Return() *MockNPDU_PutData_Call { - _c.Call.Return() - return _c -} - -func (_c *MockNPDU_PutData_Call) RunAndReturn(run func(...byte)) *MockNPDU_PutData_Call { - _c.Call.Return(run) - return _c -} - -// PutLong provides a mock function with given fields: _a0 -func (_m *MockNPDU) PutLong(_a0 uint32) { - _m.Called(_a0) -} - -// MockNPDU_PutLong_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PutLong' -type MockNPDU_PutLong_Call struct { - *mock.Call -} - -// PutLong is a helper method to define mock.On call -// - _a0 uint32 -func (_e *MockNPDU_Expecter) PutLong(_a0 interface{}) *MockNPDU_PutLong_Call { - return &MockNPDU_PutLong_Call{Call: _e.mock.On("PutLong", _a0)} -} - -func (_c *MockNPDU_PutLong_Call) Run(run func(_a0 uint32)) *MockNPDU_PutLong_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(uint32)) - }) - return _c -} - -func (_c *MockNPDU_PutLong_Call) Return() *MockNPDU_PutLong_Call { - _c.Call.Return() - return _c -} - -func (_c *MockNPDU_PutLong_Call) RunAndReturn(run func(uint32)) *MockNPDU_PutLong_Call { - _c.Call.Return(run) - return _c -} - -// PutShort provides a mock function with given fields: _a0 -func (_m *MockNPDU) PutShort(_a0 uint16) { - _m.Called(_a0) -} - -// MockNPDU_PutShort_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PutShort' -type MockNPDU_PutShort_Call struct { - *mock.Call -} - -// PutShort is a helper method to define mock.On call -// - _a0 uint16 -func (_e *MockNPDU_Expecter) PutShort(_a0 interface{}) *MockNPDU_PutShort_Call { - return &MockNPDU_PutShort_Call{Call: _e.mock.On("PutShort", _a0)} -} - -func (_c *MockNPDU_PutShort_Call) Run(run func(_a0 uint16)) *MockNPDU_PutShort_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(uint16)) - }) - return _c -} - -func (_c *MockNPDU_PutShort_Call) Return() *MockNPDU_PutShort_Call { - _c.Call.Return() - return _c -} - -func (_c *MockNPDU_PutShort_Call) RunAndReturn(run func(uint16)) *MockNPDU_PutShort_Call { - _c.Call.Return(run) - return _c -} - -// Serialize provides a mock function with given fields: -func (_m *MockNPDU) Serialize() ([]byte, error) { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Serialize") - } - - var r0 []byte - var r1 error - if rf, ok := ret.Get(0).(func() ([]byte, error)); ok { - return rf() - } - if rf, ok := ret.Get(0).(func() []byte); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]byte) - } - } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockNPDU_Serialize_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Serialize' -type MockNPDU_Serialize_Call struct { - *mock.Call -} - -// Serialize is a helper method to define mock.On call -func (_e *MockNPDU_Expecter) Serialize() *MockNPDU_Serialize_Call { - return &MockNPDU_Serialize_Call{Call: _e.mock.On("Serialize")} -} - -func (_c *MockNPDU_Serialize_Call) Run(run func()) *MockNPDU_Serialize_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockNPDU_Serialize_Call) Return(_a0 []byte, _a1 error) *MockNPDU_Serialize_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockNPDU_Serialize_Call) RunAndReturn(run func() ([]byte, error)) *MockNPDU_Serialize_Call { - _c.Call.Return(run) - return _c -} - -// SerializeWithWriteBuffer provides a mock function with given fields: ctx, writeBuffer -func (_m *MockNPDU) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { - ret := _m.Called(ctx, writeBuffer) - - if len(ret) == 0 { - panic("no return value specified for SerializeWithWriteBuffer") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, utils.WriteBuffer) error); ok { - r0 = rf(ctx, writeBuffer) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockNPDU_SerializeWithWriteBuffer_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SerializeWithWriteBuffer' -type MockNPDU_SerializeWithWriteBuffer_Call struct { - *mock.Call -} - -// SerializeWithWriteBuffer is a helper method to define mock.On call -// - ctx context.Context -// - writeBuffer utils.WriteBuffer -func (_e *MockNPDU_Expecter) SerializeWithWriteBuffer(ctx interface{}, writeBuffer interface{}) *MockNPDU_SerializeWithWriteBuffer_Call { - return &MockNPDU_SerializeWithWriteBuffer_Call{Call: _e.mock.On("SerializeWithWriteBuffer", ctx, writeBuffer)} -} - -func (_c *MockNPDU_SerializeWithWriteBuffer_Call) Run(run func(ctx context.Context, writeBuffer utils.WriteBuffer)) *MockNPDU_SerializeWithWriteBuffer_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(utils.WriteBuffer)) - }) - return _c -} - -func (_c *MockNPDU_SerializeWithWriteBuffer_Call) Return(_a0 error) *MockNPDU_SerializeWithWriteBuffer_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockNPDU_SerializeWithWriteBuffer_Call) RunAndReturn(run func(context.Context, utils.WriteBuffer) error) *MockNPDU_SerializeWithWriteBuffer_Call { - _c.Call.Return(run) - return _c -} - -// SetExpectingReply provides a mock function with given fields: _a0 -func (_m *MockNPDU) SetExpectingReply(_a0 bool) { - _m.Called(_a0) -} - -// MockNPDU_SetExpectingReply_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetExpectingReply' -type MockNPDU_SetExpectingReply_Call struct { - *mock.Call -} - -// SetExpectingReply is a helper method to define mock.On call -// - _a0 bool -func (_e *MockNPDU_Expecter) SetExpectingReply(_a0 interface{}) *MockNPDU_SetExpectingReply_Call { - return &MockNPDU_SetExpectingReply_Call{Call: _e.mock.On("SetExpectingReply", _a0)} -} - -func (_c *MockNPDU_SetExpectingReply_Call) Run(run func(_a0 bool)) *MockNPDU_SetExpectingReply_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(bool)) - }) - return _c -} - -func (_c *MockNPDU_SetExpectingReply_Call) Return() *MockNPDU_SetExpectingReply_Call { - _c.Call.Return() - return _c -} - -func (_c *MockNPDU_SetExpectingReply_Call) RunAndReturn(run func(bool)) *MockNPDU_SetExpectingReply_Call { - _c.Call.Return(run) - return _c -} - -// SetNetworkPriority provides a mock function with given fields: _a0 -func (_m *MockNPDU) SetNetworkPriority(_a0 model.NPDUNetworkPriority) { - _m.Called(_a0) -} - -// MockNPDU_SetNetworkPriority_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetNetworkPriority' -type MockNPDU_SetNetworkPriority_Call struct { - *mock.Call -} - -// SetNetworkPriority is a helper method to define mock.On call -// - _a0 model.NPDUNetworkPriority -func (_e *MockNPDU_Expecter) SetNetworkPriority(_a0 interface{}) *MockNPDU_SetNetworkPriority_Call { - return &MockNPDU_SetNetworkPriority_Call{Call: _e.mock.On("SetNetworkPriority", _a0)} -} - -func (_c *MockNPDU_SetNetworkPriority_Call) Run(run func(_a0 model.NPDUNetworkPriority)) *MockNPDU_SetNetworkPriority_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(model.NPDUNetworkPriority)) - }) - return _c -} - -func (_c *MockNPDU_SetNetworkPriority_Call) Return() *MockNPDU_SetNetworkPriority_Call { - _c.Call.Return() - return _c -} - -func (_c *MockNPDU_SetNetworkPriority_Call) RunAndReturn(run func(model.NPDUNetworkPriority)) *MockNPDU_SetNetworkPriority_Call { - _c.Call.Return(run) - return _c -} - -// SetPDUDestination provides a mock function with given fields: _a0 -func (_m *MockNPDU) SetPDUDestination(_a0 *Address) { - _m.Called(_a0) -} - -// MockNPDU_SetPDUDestination_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetPDUDestination' -type MockNPDU_SetPDUDestination_Call struct { - *mock.Call -} - -// SetPDUDestination is a helper method to define mock.On call -// - _a0 *Address -func (_e *MockNPDU_Expecter) SetPDUDestination(_a0 interface{}) *MockNPDU_SetPDUDestination_Call { - return &MockNPDU_SetPDUDestination_Call{Call: _e.mock.On("SetPDUDestination", _a0)} -} - -func (_c *MockNPDU_SetPDUDestination_Call) Run(run func(_a0 *Address)) *MockNPDU_SetPDUDestination_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(*Address)) - }) - return _c -} - -func (_c *MockNPDU_SetPDUDestination_Call) Return() *MockNPDU_SetPDUDestination_Call { - _c.Call.Return() - return _c -} - -func (_c *MockNPDU_SetPDUDestination_Call) RunAndReturn(run func(*Address)) *MockNPDU_SetPDUDestination_Call { - _c.Call.Return(run) - return _c -} - -// SetPDUSource provides a mock function with given fields: source -func (_m *MockNPDU) SetPDUSource(source *Address) { - _m.Called(source) -} - -// MockNPDU_SetPDUSource_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetPDUSource' -type MockNPDU_SetPDUSource_Call struct { - *mock.Call -} - -// SetPDUSource is a helper method to define mock.On call -// - source *Address -func (_e *MockNPDU_Expecter) SetPDUSource(source interface{}) *MockNPDU_SetPDUSource_Call { - return &MockNPDU_SetPDUSource_Call{Call: _e.mock.On("SetPDUSource", source)} -} - -func (_c *MockNPDU_SetPDUSource_Call) Run(run func(source *Address)) *MockNPDU_SetPDUSource_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(*Address)) - }) - return _c -} - -func (_c *MockNPDU_SetPDUSource_Call) Return() *MockNPDU_SetPDUSource_Call { - _c.Call.Return() - return _c -} - -func (_c *MockNPDU_SetPDUSource_Call) RunAndReturn(run func(*Address)) *MockNPDU_SetPDUSource_Call { - _c.Call.Return(run) - return _c -} - -// SetPDUUserData provides a mock function with given fields: _a0 -func (_m *MockNPDU) SetPDUUserData(_a0 spi.Message) { - _m.Called(_a0) -} - -// MockNPDU_SetPDUUserData_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetPDUUserData' -type MockNPDU_SetPDUUserData_Call struct { - *mock.Call -} - -// SetPDUUserData is a helper method to define mock.On call -// - _a0 spi.Message -func (_e *MockNPDU_Expecter) SetPDUUserData(_a0 interface{}) *MockNPDU_SetPDUUserData_Call { - return &MockNPDU_SetPDUUserData_Call{Call: _e.mock.On("SetPDUUserData", _a0)} -} - -func (_c *MockNPDU_SetPDUUserData_Call) Run(run func(_a0 spi.Message)) *MockNPDU_SetPDUUserData_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(spi.Message)) - }) - return _c -} - -func (_c *MockNPDU_SetPDUUserData_Call) Return() *MockNPDU_SetPDUUserData_Call { - _c.Call.Return() - return _c -} - -func (_c *MockNPDU_SetPDUUserData_Call) RunAndReturn(run func(spi.Message)) *MockNPDU_SetPDUUserData_Call { - _c.Call.Return(run) - return _c -} - -// SetPduData provides a mock function with given fields: _a0 -func (_m *MockNPDU) SetPduData(_a0 []byte) { - _m.Called(_a0) -} - -// MockNPDU_SetPduData_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetPduData' -type MockNPDU_SetPduData_Call struct { - *mock.Call -} - -// SetPduData is a helper method to define mock.On call -// - _a0 []byte -func (_e *MockNPDU_Expecter) SetPduData(_a0 interface{}) *MockNPDU_SetPduData_Call { - return &MockNPDU_SetPduData_Call{Call: _e.mock.On("SetPduData", _a0)} -} - -func (_c *MockNPDU_SetPduData_Call) Run(run func(_a0 []byte)) *MockNPDU_SetPduData_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].([]byte)) - }) - return _c -} - -func (_c *MockNPDU_SetPduData_Call) Return() *MockNPDU_SetPduData_Call { - _c.Call.Return() - return _c -} - -func (_c *MockNPDU_SetPduData_Call) RunAndReturn(run func([]byte)) *MockNPDU_SetPduData_Call { - _c.Call.Return(run) - return _c -} - -// String provides a mock function with given fields: -func (_m *MockNPDU) String() string { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for String") - } - - var r0 string - if rf, ok := ret.Get(0).(func() string); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(string) - } - - return r0 -} - -// MockNPDU_String_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'String' -type MockNPDU_String_Call struct { - *mock.Call -} - -// String is a helper method to define mock.On call -func (_e *MockNPDU_Expecter) String() *MockNPDU_String_Call { - return &MockNPDU_String_Call{Call: _e.mock.On("String")} -} - -func (_c *MockNPDU_String_Call) Run(run func()) *MockNPDU_String_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockNPDU_String_Call) Return(_a0 string) *MockNPDU_String_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockNPDU_String_Call) RunAndReturn(run func() string) *MockNPDU_String_Call { - _c.Call.Return(run) - return _c -} - -// Update provides a mock function with given fields: pci -func (_m *MockNPDU) Update(pci Arg) error { - ret := _m.Called(pci) - - if len(ret) == 0 { - panic("no return value specified for Update") - } - - var r0 error - if rf, ok := ret.Get(0).(func(Arg) error); ok { - r0 = rf(pci) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockNPDU_Update_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Update' -type MockNPDU_Update_Call struct { - *mock.Call -} - -// Update is a helper method to define mock.On call -// - pci Arg -func (_e *MockNPDU_Expecter) Update(pci interface{}) *MockNPDU_Update_Call { - return &MockNPDU_Update_Call{Call: _e.mock.On("Update", pci)} -} - -func (_c *MockNPDU_Update_Call) Run(run func(pci Arg)) *MockNPDU_Update_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(Arg)) - }) - return _c -} - -func (_c *MockNPDU_Update_Call) Return(_a0 error) *MockNPDU_Update_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockNPDU_Update_Call) RunAndReturn(run func(Arg) error) *MockNPDU_Update_Call { - _c.Call.Return(run) - return _c -} - -// getAPDU provides a mock function with given fields: -func (_m *MockNPDU) getAPDU() model.APDU { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for getAPDU") - } - - var r0 model.APDU - if rf, ok := ret.Get(0).(func() model.APDU); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(model.APDU) - } - } - - return r0 -} - -// MockNPDU_getAPDU_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'getAPDU' -type MockNPDU_getAPDU_Call struct { - *mock.Call -} - -// getAPDU is a helper method to define mock.On call -func (_e *MockNPDU_Expecter) getAPDU() *MockNPDU_getAPDU_Call { - return &MockNPDU_getAPDU_Call{Call: _e.mock.On("getAPDU")} -} - -func (_c *MockNPDU_getAPDU_Call) Run(run func()) *MockNPDU_getAPDU_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockNPDU_getAPDU_Call) Return(_a0 model.APDU) *MockNPDU_getAPDU_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockNPDU_getAPDU_Call) RunAndReturn(run func() model.APDU) *MockNPDU_getAPDU_Call { - _c.Call.Return(run) - return _c -} - -// getNLM provides a mock function with given fields: -func (_m *MockNPDU) getNLM() model.NLM { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for getNLM") - } - - var r0 model.NLM - if rf, ok := ret.Get(0).(func() model.NLM); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(model.NLM) - } - } - - return r0 -} - -// MockNPDU_getNLM_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'getNLM' -type MockNPDU_getNLM_Call struct { - *mock.Call -} - -// getNLM is a helper method to define mock.On call -func (_e *MockNPDU_Expecter) getNLM() *MockNPDU_getNLM_Call { - return &MockNPDU_getNLM_Call{Call: _e.mock.On("getNLM")} -} - -func (_c *MockNPDU_getNLM_Call) Run(run func()) *MockNPDU_getNLM_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockNPDU_getNLM_Call) Return(_a0 model.NLM) *MockNPDU_getNLM_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockNPDU_getNLM_Call) RunAndReturn(run func() model.NLM) *MockNPDU_getNLM_Call { - _c.Call.Return(run) - return _c -} - -// getNPDU provides a mock function with given fields: -func (_m *MockNPDU) getNPDU() model.NPDU { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for getNPDU") - } - - var r0 model.NPDU - if rf, ok := ret.Get(0).(func() model.NPDU); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(model.NPDU) - } - } - - return r0 -} - -// MockNPDU_getNPDU_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'getNPDU' -type MockNPDU_getNPDU_Call struct { - *mock.Call -} - -// getNPDU is a helper method to define mock.On call -func (_e *MockNPDU_Expecter) getNPDU() *MockNPDU_getNPDU_Call { - return &MockNPDU_getNPDU_Call{Call: _e.mock.On("getNPDU")} -} - -func (_c *MockNPDU_getNPDU_Call) Run(run func()) *MockNPDU_getNPDU_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockNPDU_getNPDU_Call) Return(_a0 model.NPDU) *MockNPDU_getNPDU_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockNPDU_getNPDU_Call) RunAndReturn(run func() model.NPDU) *MockNPDU_getNPDU_Call { - _c.Call.Return(run) - return _c -} - -// getNpduControl provides a mock function with given fields: -func (_m *MockNPDU) getNpduControl() uint8 { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for getNpduControl") - } - - var r0 uint8 - if rf, ok := ret.Get(0).(func() uint8); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(uint8) - } - - return r0 -} - -// MockNPDU_getNpduControl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'getNpduControl' -type MockNPDU_getNpduControl_Call struct { - *mock.Call -} - -// getNpduControl is a helper method to define mock.On call -func (_e *MockNPDU_Expecter) getNpduControl() *MockNPDU_getNpduControl_Call { - return &MockNPDU_getNpduControl_Call{Call: _e.mock.On("getNpduControl")} -} - -func (_c *MockNPDU_getNpduControl_Call) Run(run func()) *MockNPDU_getNpduControl_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockNPDU_getNpduControl_Call) Return(_a0 uint8) *MockNPDU_getNpduControl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockNPDU_getNpduControl_Call) RunAndReturn(run func() uint8) *MockNPDU_getNpduControl_Call { - _c.Call.Return(run) - return _c -} - -// getNpduDADR provides a mock function with given fields: -func (_m *MockNPDU) getNpduDADR() *Address { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for getNpduDADR") - } - - var r0 *Address - if rf, ok := ret.Get(0).(func() *Address); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*Address) - } - } - - return r0 -} - -// MockNPDU_getNpduDADR_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'getNpduDADR' -type MockNPDU_getNpduDADR_Call struct { - *mock.Call -} - -// getNpduDADR is a helper method to define mock.On call -func (_e *MockNPDU_Expecter) getNpduDADR() *MockNPDU_getNpduDADR_Call { - return &MockNPDU_getNpduDADR_Call{Call: _e.mock.On("getNpduDADR")} -} - -func (_c *MockNPDU_getNpduDADR_Call) Run(run func()) *MockNPDU_getNpduDADR_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockNPDU_getNpduDADR_Call) Return(_a0 *Address) *MockNPDU_getNpduDADR_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockNPDU_getNpduDADR_Call) RunAndReturn(run func() *Address) *MockNPDU_getNpduDADR_Call { - _c.Call.Return(run) - return _c -} - -// getNpduHopCount provides a mock function with given fields: -func (_m *MockNPDU) getNpduHopCount() *uint8 { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for getNpduHopCount") - } - - var r0 *uint8 - if rf, ok := ret.Get(0).(func() *uint8); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*uint8) - } - } - - return r0 -} - -// MockNPDU_getNpduHopCount_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'getNpduHopCount' -type MockNPDU_getNpduHopCount_Call struct { - *mock.Call -} - -// getNpduHopCount is a helper method to define mock.On call -func (_e *MockNPDU_Expecter) getNpduHopCount() *MockNPDU_getNpduHopCount_Call { - return &MockNPDU_getNpduHopCount_Call{Call: _e.mock.On("getNpduHopCount")} -} - -func (_c *MockNPDU_getNpduHopCount_Call) Run(run func()) *MockNPDU_getNpduHopCount_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockNPDU_getNpduHopCount_Call) Return(_a0 *uint8) *MockNPDU_getNpduHopCount_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockNPDU_getNpduHopCount_Call) RunAndReturn(run func() *uint8) *MockNPDU_getNpduHopCount_Call { - _c.Call.Return(run) - return _c -} - -// getNpduNetMessage provides a mock function with given fields: -func (_m *MockNPDU) getNpduNetMessage() *uint8 { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for getNpduNetMessage") - } - - var r0 *uint8 - if rf, ok := ret.Get(0).(func() *uint8); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*uint8) - } - } - - return r0 -} - -// MockNPDU_getNpduNetMessage_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'getNpduNetMessage' -type MockNPDU_getNpduNetMessage_Call struct { - *mock.Call -} - -// getNpduNetMessage is a helper method to define mock.On call -func (_e *MockNPDU_Expecter) getNpduNetMessage() *MockNPDU_getNpduNetMessage_Call { - return &MockNPDU_getNpduNetMessage_Call{Call: _e.mock.On("getNpduNetMessage")} -} - -func (_c *MockNPDU_getNpduNetMessage_Call) Run(run func()) *MockNPDU_getNpduNetMessage_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockNPDU_getNpduNetMessage_Call) Return(_a0 *uint8) *MockNPDU_getNpduNetMessage_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockNPDU_getNpduNetMessage_Call) RunAndReturn(run func() *uint8) *MockNPDU_getNpduNetMessage_Call { - _c.Call.Return(run) - return _c -} - -// getNpduSADR provides a mock function with given fields: -func (_m *MockNPDU) getNpduSADR() *Address { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for getNpduSADR") - } - - var r0 *Address - if rf, ok := ret.Get(0).(func() *Address); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*Address) - } - } - - return r0 -} - -// MockNPDU_getNpduSADR_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'getNpduSADR' -type MockNPDU_getNpduSADR_Call struct { - *mock.Call -} - -// getNpduSADR is a helper method to define mock.On call -func (_e *MockNPDU_Expecter) getNpduSADR() *MockNPDU_getNpduSADR_Call { - return &MockNPDU_getNpduSADR_Call{Call: _e.mock.On("getNpduSADR")} -} - -func (_c *MockNPDU_getNpduSADR_Call) Run(run func()) *MockNPDU_getNpduSADR_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockNPDU_getNpduSADR_Call) Return(_a0 *Address) *MockNPDU_getNpduSADR_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockNPDU_getNpduSADR_Call) RunAndReturn(run func() *Address) *MockNPDU_getNpduSADR_Call { - _c.Call.Return(run) - return _c -} - -// getNpduVendorID provides a mock function with given fields: -func (_m *MockNPDU) getNpduVendorID() *model.BACnetVendorId { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for getNpduVendorID") - } - - var r0 *model.BACnetVendorId - if rf, ok := ret.Get(0).(func() *model.BACnetVendorId); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*model.BACnetVendorId) - } - } - - return r0 -} - -// MockNPDU_getNpduVendorID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'getNpduVendorID' -type MockNPDU_getNpduVendorID_Call struct { - *mock.Call -} - -// getNpduVendorID is a helper method to define mock.On call -func (_e *MockNPDU_Expecter) getNpduVendorID() *MockNPDU_getNpduVendorID_Call { - return &MockNPDU_getNpduVendorID_Call{Call: _e.mock.On("getNpduVendorID")} -} - -func (_c *MockNPDU_getNpduVendorID_Call) Run(run func()) *MockNPDU_getNpduVendorID_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockNPDU_getNpduVendorID_Call) Return(_a0 *model.BACnetVendorId) *MockNPDU_getNpduVendorID_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockNPDU_getNpduVendorID_Call) RunAndReturn(run func() *model.BACnetVendorId) *MockNPDU_getNpduVendorID_Call { - _c.Call.Return(run) - return _c -} - -// getNpduVersion provides a mock function with given fields: -func (_m *MockNPDU) getNpduVersion() uint8 { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for getNpduVersion") - } - - var r0 uint8 - if rf, ok := ret.Get(0).(func() uint8); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(uint8) - } - - return r0 -} - -// MockNPDU_getNpduVersion_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'getNpduVersion' -type MockNPDU_getNpduVersion_Call struct { - *mock.Call -} - -// getNpduVersion is a helper method to define mock.On call -func (_e *MockNPDU_Expecter) getNpduVersion() *MockNPDU_getNpduVersion_Call { - return &MockNPDU_getNpduVersion_Call{Call: _e.mock.On("getNpduVersion")} -} - -func (_c *MockNPDU_getNpduVersion_Call) Run(run func()) *MockNPDU_getNpduVersion_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockNPDU_getNpduVersion_Call) Return(_a0 uint8) *MockNPDU_getNpduVersion_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockNPDU_getNpduVersion_Call) RunAndReturn(run func() uint8) *MockNPDU_getNpduVersion_Call { - _c.Call.Return(run) - return _c -} - -// setAPDU provides a mock function with given fields: _a0 -func (_m *MockNPDU) setAPDU(_a0 model.APDU) { - _m.Called(_a0) -} - -// MockNPDU_setAPDU_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'setAPDU' -type MockNPDU_setAPDU_Call struct { - *mock.Call -} - -// setAPDU is a helper method to define mock.On call -// - _a0 model.APDU -func (_e *MockNPDU_Expecter) setAPDU(_a0 interface{}) *MockNPDU_setAPDU_Call { - return &MockNPDU_setAPDU_Call{Call: _e.mock.On("setAPDU", _a0)} -} - -func (_c *MockNPDU_setAPDU_Call) Run(run func(_a0 model.APDU)) *MockNPDU_setAPDU_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(model.APDU)) - }) - return _c -} - -func (_c *MockNPDU_setAPDU_Call) Return() *MockNPDU_setAPDU_Call { - _c.Call.Return() - return _c -} - -func (_c *MockNPDU_setAPDU_Call) RunAndReturn(run func(model.APDU)) *MockNPDU_setAPDU_Call { - _c.Call.Return(run) - return _c -} - -// setNLM provides a mock function with given fields: _a0 -func (_m *MockNPDU) setNLM(_a0 model.NLM) { - _m.Called(_a0) -} - -// MockNPDU_setNLM_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'setNLM' -type MockNPDU_setNLM_Call struct { - *mock.Call -} - -// setNLM is a helper method to define mock.On call -// - _a0 model.NLM -func (_e *MockNPDU_Expecter) setNLM(_a0 interface{}) *MockNPDU_setNLM_Call { - return &MockNPDU_setNLM_Call{Call: _e.mock.On("setNLM", _a0)} -} - -func (_c *MockNPDU_setNLM_Call) Run(run func(_a0 model.NLM)) *MockNPDU_setNLM_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(model.NLM)) - }) - return _c -} - -func (_c *MockNPDU_setNLM_Call) Return() *MockNPDU_setNLM_Call { - _c.Call.Return() - return _c -} - -func (_c *MockNPDU_setNLM_Call) RunAndReturn(run func(model.NLM)) *MockNPDU_setNLM_Call { - _c.Call.Return(run) - return _c -} - -// setNPDU provides a mock function with given fields: _a0 -func (_m *MockNPDU) setNPDU(_a0 model.NPDU) { - _m.Called(_a0) -} - -// MockNPDU_setNPDU_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'setNPDU' -type MockNPDU_setNPDU_Call struct { - *mock.Call -} - -// setNPDU is a helper method to define mock.On call -// - _a0 model.NPDU -func (_e *MockNPDU_Expecter) setNPDU(_a0 interface{}) *MockNPDU_setNPDU_Call { - return &MockNPDU_setNPDU_Call{Call: _e.mock.On("setNPDU", _a0)} -} - -func (_c *MockNPDU_setNPDU_Call) Run(run func(_a0 model.NPDU)) *MockNPDU_setNPDU_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(model.NPDU)) - }) - return _c -} - -func (_c *MockNPDU_setNPDU_Call) Return() *MockNPDU_setNPDU_Call { - _c.Call.Return() - return _c -} - -func (_c *MockNPDU_setNPDU_Call) RunAndReturn(run func(model.NPDU)) *MockNPDU_setNPDU_Call { - _c.Call.Return(run) - return _c -} - -// setNpduControl provides a mock function with given fields: _a0 -func (_m *MockNPDU) setNpduControl(_a0 uint8) { - _m.Called(_a0) -} - -// MockNPDU_setNpduControl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'setNpduControl' -type MockNPDU_setNpduControl_Call struct { - *mock.Call -} - -// setNpduControl is a helper method to define mock.On call -// - _a0 uint8 -func (_e *MockNPDU_Expecter) setNpduControl(_a0 interface{}) *MockNPDU_setNpduControl_Call { - return &MockNPDU_setNpduControl_Call{Call: _e.mock.On("setNpduControl", _a0)} -} - -func (_c *MockNPDU_setNpduControl_Call) Run(run func(_a0 uint8)) *MockNPDU_setNpduControl_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(uint8)) - }) - return _c -} - -func (_c *MockNPDU_setNpduControl_Call) Return() *MockNPDU_setNpduControl_Call { - _c.Call.Return() - return _c -} - -func (_c *MockNPDU_setNpduControl_Call) RunAndReturn(run func(uint8)) *MockNPDU_setNpduControl_Call { - _c.Call.Return(run) - return _c -} - -// setNpduDADR provides a mock function with given fields: _a0 -func (_m *MockNPDU) setNpduDADR(_a0 *Address) { - _m.Called(_a0) -} - -// MockNPDU_setNpduDADR_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'setNpduDADR' -type MockNPDU_setNpduDADR_Call struct { - *mock.Call -} - -// setNpduDADR is a helper method to define mock.On call -// - _a0 *Address -func (_e *MockNPDU_Expecter) setNpduDADR(_a0 interface{}) *MockNPDU_setNpduDADR_Call { - return &MockNPDU_setNpduDADR_Call{Call: _e.mock.On("setNpduDADR", _a0)} -} - -func (_c *MockNPDU_setNpduDADR_Call) Run(run func(_a0 *Address)) *MockNPDU_setNpduDADR_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(*Address)) - }) - return _c -} - -func (_c *MockNPDU_setNpduDADR_Call) Return() *MockNPDU_setNpduDADR_Call { - _c.Call.Return() - return _c -} - -func (_c *MockNPDU_setNpduDADR_Call) RunAndReturn(run func(*Address)) *MockNPDU_setNpduDADR_Call { - _c.Call.Return(run) - return _c -} - -// setNpduHopCount provides a mock function with given fields: _a0 -func (_m *MockNPDU) setNpduHopCount(_a0 *uint8) { - _m.Called(_a0) -} - -// MockNPDU_setNpduHopCount_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'setNpduHopCount' -type MockNPDU_setNpduHopCount_Call struct { - *mock.Call -} - -// setNpduHopCount is a helper method to define mock.On call -// - _a0 *uint8 -func (_e *MockNPDU_Expecter) setNpduHopCount(_a0 interface{}) *MockNPDU_setNpduHopCount_Call { - return &MockNPDU_setNpduHopCount_Call{Call: _e.mock.On("setNpduHopCount", _a0)} -} - -func (_c *MockNPDU_setNpduHopCount_Call) Run(run func(_a0 *uint8)) *MockNPDU_setNpduHopCount_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(*uint8)) - }) - return _c -} - -func (_c *MockNPDU_setNpduHopCount_Call) Return() *MockNPDU_setNpduHopCount_Call { - _c.Call.Return() - return _c -} - -func (_c *MockNPDU_setNpduHopCount_Call) RunAndReturn(run func(*uint8)) *MockNPDU_setNpduHopCount_Call { - _c.Call.Return(run) - return _c -} - -// setNpduNetMessage provides a mock function with given fields: _a0 -func (_m *MockNPDU) setNpduNetMessage(_a0 *uint8) { - _m.Called(_a0) -} - -// MockNPDU_setNpduNetMessage_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'setNpduNetMessage' -type MockNPDU_setNpduNetMessage_Call struct { - *mock.Call -} - -// setNpduNetMessage is a helper method to define mock.On call -// - _a0 *uint8 -func (_e *MockNPDU_Expecter) setNpduNetMessage(_a0 interface{}) *MockNPDU_setNpduNetMessage_Call { - return &MockNPDU_setNpduNetMessage_Call{Call: _e.mock.On("setNpduNetMessage", _a0)} -} - -func (_c *MockNPDU_setNpduNetMessage_Call) Run(run func(_a0 *uint8)) *MockNPDU_setNpduNetMessage_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(*uint8)) - }) - return _c -} - -func (_c *MockNPDU_setNpduNetMessage_Call) Return() *MockNPDU_setNpduNetMessage_Call { - _c.Call.Return() - return _c -} - -func (_c *MockNPDU_setNpduNetMessage_Call) RunAndReturn(run func(*uint8)) *MockNPDU_setNpduNetMessage_Call { - _c.Call.Return(run) - return _c -} - -// setNpduSADR provides a mock function with given fields: _a0 -func (_m *MockNPDU) setNpduSADR(_a0 *Address) { - _m.Called(_a0) -} - -// MockNPDU_setNpduSADR_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'setNpduSADR' -type MockNPDU_setNpduSADR_Call struct { - *mock.Call -} - -// setNpduSADR is a helper method to define mock.On call -// - _a0 *Address -func (_e *MockNPDU_Expecter) setNpduSADR(_a0 interface{}) *MockNPDU_setNpduSADR_Call { - return &MockNPDU_setNpduSADR_Call{Call: _e.mock.On("setNpduSADR", _a0)} -} - -func (_c *MockNPDU_setNpduSADR_Call) Run(run func(_a0 *Address)) *MockNPDU_setNpduSADR_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(*Address)) - }) - return _c -} - -func (_c *MockNPDU_setNpduSADR_Call) Return() *MockNPDU_setNpduSADR_Call { - _c.Call.Return() - return _c -} - -func (_c *MockNPDU_setNpduSADR_Call) RunAndReturn(run func(*Address)) *MockNPDU_setNpduSADR_Call { - _c.Call.Return(run) - return _c -} - -// setNpduVendorID provides a mock function with given fields: _a0 -func (_m *MockNPDU) setNpduVendorID(_a0 *model.BACnetVendorId) { - _m.Called(_a0) -} - -// MockNPDU_setNpduVendorID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'setNpduVendorID' -type MockNPDU_setNpduVendorID_Call struct { - *mock.Call -} - -// setNpduVendorID is a helper method to define mock.On call -// - _a0 *model.BACnetVendorId -func (_e *MockNPDU_Expecter) setNpduVendorID(_a0 interface{}) *MockNPDU_setNpduVendorID_Call { - return &MockNPDU_setNpduVendorID_Call{Call: _e.mock.On("setNpduVendorID", _a0)} -} - -func (_c *MockNPDU_setNpduVendorID_Call) Run(run func(_a0 *model.BACnetVendorId)) *MockNPDU_setNpduVendorID_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(*model.BACnetVendorId)) - }) - return _c -} - -func (_c *MockNPDU_setNpduVendorID_Call) Return() *MockNPDU_setNpduVendorID_Call { - _c.Call.Return() - return _c -} - -func (_c *MockNPDU_setNpduVendorID_Call) RunAndReturn(run func(*model.BACnetVendorId)) *MockNPDU_setNpduVendorID_Call { - _c.Call.Return(run) - return _c -} - -// setNpduVersion provides a mock function with given fields: _a0 -func (_m *MockNPDU) setNpduVersion(_a0 uint8) { - _m.Called(_a0) -} - -// MockNPDU_setNpduVersion_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'setNpduVersion' -type MockNPDU_setNpduVersion_Call struct { - *mock.Call -} - -// setNpduVersion is a helper method to define mock.On call -// - _a0 uint8 -func (_e *MockNPDU_Expecter) setNpduVersion(_a0 interface{}) *MockNPDU_setNpduVersion_Call { - return &MockNPDU_setNpduVersion_Call{Call: _e.mock.On("setNpduVersion", _a0)} -} - -func (_c *MockNPDU_setNpduVersion_Call) Run(run func(_a0 uint8)) *MockNPDU_setNpduVersion_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(uint8)) - }) - return _c -} - -func (_c *MockNPDU_setNpduVersion_Call) Return() *MockNPDU_setNpduVersion_Call { - _c.Call.Return() - return _c -} - -func (_c *MockNPDU_setNpduVersion_Call) RunAndReturn(run func(uint8)) *MockNPDU_setNpduVersion_Call { - _c.Call.Return(run) - return _c -} - -// NewMockNPDU creates a new instance of MockNPDU. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewMockNPDU(t interface { - mock.TestingT - Cleanup(func()) -}) *MockNPDU { - mock := &MockNPDU{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/plc4go/internal/bacnetip/mock_NetworkNode_test.go b/plc4go/internal/bacnetip/mock_NetworkNode_test.go deleted file mode 100644 index 9a6e9d6d8cf..00000000000 --- a/plc4go/internal/bacnetip/mock_NetworkNode_test.go +++ /dev/null @@ -1,346 +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 - * - * https://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. - */ - -// Code generated by mockery v2.42.2. DO NOT EDIT. - -package bacnetip - -import mock "github.com/stretchr/testify/mock" - -// MockNetworkNode is an autogenerated mock type for the NetworkNode type -type MockNetworkNode struct { - mock.Mock -} - -type MockNetworkNode_Expecter struct { - mock *mock.Mock -} - -func (_m *MockNetworkNode) EXPECT() *MockNetworkNode_Expecter { - return &MockNetworkNode_Expecter{mock: &_m.Mock} -} - -// Response provides a mock function with given fields: args, kwArgs -func (_m *MockNetworkNode) Response(args Args, kwArgs KWArgs) error { - ret := _m.Called(args, kwArgs) - - if len(ret) == 0 { - panic("no return value specified for Response") - } - - var r0 error - if rf, ok := ret.Get(0).(func(Args, KWArgs) error); ok { - r0 = rf(args, kwArgs) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockNetworkNode_Response_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Response' -type MockNetworkNode_Response_Call struct { - *mock.Call -} - -// Response is a helper method to define mock.On call -// - args Args -// - kwArgs KWArgs -func (_e *MockNetworkNode_Expecter) Response(args interface{}, kwArgs interface{}) *MockNetworkNode_Response_Call { - return &MockNetworkNode_Response_Call{Call: _e.mock.On("Response", args, kwArgs)} -} - -func (_c *MockNetworkNode_Response_Call) Run(run func(args Args, kwArgs KWArgs)) *MockNetworkNode_Response_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(Args), args[1].(KWArgs)) - }) - return _c -} - -func (_c *MockNetworkNode_Response_Call) Return(_a0 error) *MockNetworkNode_Response_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockNetworkNode_Response_Call) RunAndReturn(run func(Args, KWArgs) error) *MockNetworkNode_Response_Call { - _c.Call.Return(run) - return _c -} - -// String provides a mock function with given fields: -func (_m *MockNetworkNode) String() string { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for String") - } - - var r0 string - if rf, ok := ret.Get(0).(func() string); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(string) - } - - return r0 -} - -// MockNetworkNode_String_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'String' -type MockNetworkNode_String_Call struct { - *mock.Call -} - -// String is a helper method to define mock.On call -func (_e *MockNetworkNode_Expecter) String() *MockNetworkNode_String_Call { - return &MockNetworkNode_String_Call{Call: _e.mock.On("String")} -} - -func (_c *MockNetworkNode_String_Call) Run(run func()) *MockNetworkNode_String_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockNetworkNode_String_Call) Return(_a0 string) *MockNetworkNode_String_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockNetworkNode_String_Call) RunAndReturn(run func() string) *MockNetworkNode_String_Call { - _c.Call.Return(run) - return _c -} - -// getAddress provides a mock function with given fields: -func (_m *MockNetworkNode) getAddress() *Address { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for getAddress") - } - - var r0 *Address - if rf, ok := ret.Get(0).(func() *Address); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*Address) - } - } - - return r0 -} - -// MockNetworkNode_getAddress_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'getAddress' -type MockNetworkNode_getAddress_Call struct { - *mock.Call -} - -// getAddress is a helper method to define mock.On call -func (_e *MockNetworkNode_Expecter) getAddress() *MockNetworkNode_getAddress_Call { - return &MockNetworkNode_getAddress_Call{Call: _e.mock.On("getAddress")} -} - -func (_c *MockNetworkNode_getAddress_Call) Run(run func()) *MockNetworkNode_getAddress_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockNetworkNode_getAddress_Call) Return(_a0 *Address) *MockNetworkNode_getAddress_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockNetworkNode_getAddress_Call) RunAndReturn(run func() *Address) *MockNetworkNode_getAddress_Call { - _c.Call.Return(run) - return _c -} - -// getName provides a mock function with given fields: -func (_m *MockNetworkNode) getName() string { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for getName") - } - - var r0 string - if rf, ok := ret.Get(0).(func() string); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(string) - } - - return r0 -} - -// MockNetworkNode_getName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'getName' -type MockNetworkNode_getName_Call struct { - *mock.Call -} - -// getName is a helper method to define mock.On call -func (_e *MockNetworkNode_Expecter) getName() *MockNetworkNode_getName_Call { - return &MockNetworkNode_getName_Call{Call: _e.mock.On("getName")} -} - -func (_c *MockNetworkNode_getName_Call) Run(run func()) *MockNetworkNode_getName_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockNetworkNode_getName_Call) Return(_a0 string) *MockNetworkNode_getName_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockNetworkNode_getName_Call) RunAndReturn(run func() string) *MockNetworkNode_getName_Call { - _c.Call.Return(run) - return _c -} - -// isPromiscuous provides a mock function with given fields: -func (_m *MockNetworkNode) isPromiscuous() bool { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for isPromiscuous") - } - - var r0 bool - if rf, ok := ret.Get(0).(func() bool); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(bool) - } - - return r0 -} - -// MockNetworkNode_isPromiscuous_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'isPromiscuous' -type MockNetworkNode_isPromiscuous_Call struct { - *mock.Call -} - -// isPromiscuous is a helper method to define mock.On call -func (_e *MockNetworkNode_Expecter) isPromiscuous() *MockNetworkNode_isPromiscuous_Call { - return &MockNetworkNode_isPromiscuous_Call{Call: _e.mock.On("isPromiscuous")} -} - -func (_c *MockNetworkNode_isPromiscuous_Call) Run(run func()) *MockNetworkNode_isPromiscuous_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockNetworkNode_isPromiscuous_Call) Return(_a0 bool) *MockNetworkNode_isPromiscuous_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockNetworkNode_isPromiscuous_Call) RunAndReturn(run func() bool) *MockNetworkNode_isPromiscuous_Call { - _c.Call.Return(run) - return _c -} - -// setLan provides a mock function with given fields: lan -func (_m *MockNetworkNode) setLan(lan *Network) { - _m.Called(lan) -} - -// MockNetworkNode_setLan_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'setLan' -type MockNetworkNode_setLan_Call struct { - *mock.Call -} - -// setLan is a helper method to define mock.On call -// - lan *Network -func (_e *MockNetworkNode_Expecter) setLan(lan interface{}) *MockNetworkNode_setLan_Call { - return &MockNetworkNode_setLan_Call{Call: _e.mock.On("setLan", lan)} -} - -func (_c *MockNetworkNode_setLan_Call) Run(run func(lan *Network)) *MockNetworkNode_setLan_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(*Network)) - }) - return _c -} - -func (_c *MockNetworkNode_setLan_Call) Return() *MockNetworkNode_setLan_Call { - _c.Call.Return() - return _c -} - -func (_c *MockNetworkNode_setLan_Call) RunAndReturn(run func(*Network)) *MockNetworkNode_setLan_Call { - _c.Call.Return(run) - return _c -} - -// setName provides a mock function with given fields: name -func (_m *MockNetworkNode) setName(name string) { - _m.Called(name) -} - -// MockNetworkNode_setName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'setName' -type MockNetworkNode_setName_Call struct { - *mock.Call -} - -// setName is a helper method to define mock.On call -// - name string -func (_e *MockNetworkNode_Expecter) setName(name interface{}) *MockNetworkNode_setName_Call { - return &MockNetworkNode_setName_Call{Call: _e.mock.On("setName", name)} -} - -func (_c *MockNetworkNode_setName_Call) Run(run func(name string)) *MockNetworkNode_setName_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string)) - }) - return _c -} - -func (_c *MockNetworkNode_setName_Call) Return() *MockNetworkNode_setName_Call { - _c.Call.Return() - return _c -} - -func (_c *MockNetworkNode_setName_Call) RunAndReturn(run func(string)) *MockNetworkNode_setName_Call { - _c.Call.Return(run) - return _c -} - -// NewMockNetworkNode creates a new instance of MockNetworkNode. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewMockNetworkNode(t interface { - mock.TestingT - Cleanup(func()) -}) *MockNetworkNode { - mock := &MockNetworkNode{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/plc4go/internal/bacnetip/mock_NodeNetworkReference_test.go b/plc4go/internal/bacnetip/mock_NodeNetworkReference_test.go deleted file mode 100644 index 670a9d64bdd..00000000000 --- a/plc4go/internal/bacnetip/mock_NodeNetworkReference_test.go +++ /dev/null @@ -1,130 +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 - * - * https://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. - */ - -// Code generated by mockery v2.42.2. DO NOT EDIT. - -package bacnetip - -import mock "github.com/stretchr/testify/mock" - -// MockNodeNetworkReference is an autogenerated mock type for the NodeNetworkReference type -type MockNodeNetworkReference struct { - mock.Mock -} - -type MockNodeNetworkReference_Expecter struct { - mock *mock.Mock -} - -func (_m *MockNodeNetworkReference) EXPECT() *MockNodeNetworkReference_Expecter { - return &MockNodeNetworkReference_Expecter{mock: &_m.Mock} -} - -// AddNode provides a mock function with given fields: node -func (_m *MockNodeNetworkReference) AddNode(node NetworkNode) { - _m.Called(node) -} - -// MockNodeNetworkReference_AddNode_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddNode' -type MockNodeNetworkReference_AddNode_Call struct { - *mock.Call -} - -// AddNode is a helper method to define mock.On call -// - node NetworkNode -func (_e *MockNodeNetworkReference_Expecter) AddNode(node interface{}) *MockNodeNetworkReference_AddNode_Call { - return &MockNodeNetworkReference_AddNode_Call{Call: _e.mock.On("AddNode", node)} -} - -func (_c *MockNodeNetworkReference_AddNode_Call) Run(run func(node NetworkNode)) *MockNodeNetworkReference_AddNode_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(NetworkNode)) - }) - return _c -} - -func (_c *MockNodeNetworkReference_AddNode_Call) Return() *MockNodeNetworkReference_AddNode_Call { - _c.Call.Return() - return _c -} - -func (_c *MockNodeNetworkReference_AddNode_Call) RunAndReturn(run func(NetworkNode)) *MockNodeNetworkReference_AddNode_Call { - _c.Call.Return(run) - return _c -} - -// ProcessPDU provides a mock function with given fields: pdu -func (_m *MockNodeNetworkReference) ProcessPDU(pdu PDU) error { - ret := _m.Called(pdu) - - if len(ret) == 0 { - panic("no return value specified for ProcessPDU") - } - - var r0 error - if rf, ok := ret.Get(0).(func(PDU) error); ok { - r0 = rf(pdu) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockNodeNetworkReference_ProcessPDU_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ProcessPDU' -type MockNodeNetworkReference_ProcessPDU_Call struct { - *mock.Call -} - -// ProcessPDU is a helper method to define mock.On call -// - pdu PDU -func (_e *MockNodeNetworkReference_Expecter) ProcessPDU(pdu interface{}) *MockNodeNetworkReference_ProcessPDU_Call { - return &MockNodeNetworkReference_ProcessPDU_Call{Call: _e.mock.On("ProcessPDU", pdu)} -} - -func (_c *MockNodeNetworkReference_ProcessPDU_Call) Run(run func(pdu PDU)) *MockNodeNetworkReference_ProcessPDU_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(PDU)) - }) - return _c -} - -func (_c *MockNodeNetworkReference_ProcessPDU_Call) Return(_a0 error) *MockNodeNetworkReference_ProcessPDU_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockNodeNetworkReference_ProcessPDU_Call) RunAndReturn(run func(PDU) error) *MockNodeNetworkReference_ProcessPDU_Call { - _c.Call.Return(run) - return _c -} - -// NewMockNodeNetworkReference creates a new instance of MockNodeNetworkReference. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewMockNodeNetworkReference(t interface { - mock.TestingT - Cleanup(func()) -}) *MockNodeNetworkReference { - mock := &MockNodeNetworkReference{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/plc4go/internal/bacnetip/mock_ObjectTypeContract_test.go b/plc4go/internal/bacnetip/mock_ObjectTypeContract_test.go deleted file mode 100644 index 5e5e05f16b7..00000000000 --- a/plc4go/internal/bacnetip/mock_ObjectTypeContract_test.go +++ /dev/null @@ -1,211 +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 - * - * https://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. - */ - -// Code generated by mockery v2.42.2. DO NOT EDIT. - -package bacnetip - -import mock "github.com/stretchr/testify/mock" - -// MockObjectTypeContract is an autogenerated mock type for the ObjectTypeContract type -type MockObjectTypeContract struct { - mock.Mock -} - -type MockObjectTypeContract_Expecter struct { - mock *mock.Mock -} - -func (_m *MockObjectTypeContract) EXPECT() *MockObjectTypeContract_Expecter { - return &MockObjectTypeContract_Expecter{mock: &_m.Mock} -} - -// GetEnumerations provides a mock function with given fields: -func (_m *MockObjectTypeContract) GetEnumerations() map[string]uint64 { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetEnumerations") - } - - var r0 map[string]uint64 - if rf, ok := ret.Get(0).(func() map[string]uint64); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(map[string]uint64) - } - } - - return r0 -} - -// MockObjectTypeContract_GetEnumerations_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetEnumerations' -type MockObjectTypeContract_GetEnumerations_Call struct { - *mock.Call -} - -// GetEnumerations is a helper method to define mock.On call -func (_e *MockObjectTypeContract_Expecter) GetEnumerations() *MockObjectTypeContract_GetEnumerations_Call { - return &MockObjectTypeContract_GetEnumerations_Call{Call: _e.mock.On("GetEnumerations")} -} - -func (_c *MockObjectTypeContract_GetEnumerations_Call) Run(run func()) *MockObjectTypeContract_GetEnumerations_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockObjectTypeContract_GetEnumerations_Call) Return(_a0 map[string]uint64) *MockObjectTypeContract_GetEnumerations_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockObjectTypeContract_GetEnumerations_Call) RunAndReturn(run func() map[string]uint64) *MockObjectTypeContract_GetEnumerations_Call { - _c.Call.Return(run) - return _c -} - -// GetXlateTable provides a mock function with given fields: -func (_m *MockObjectTypeContract) GetXlateTable() map[interface{}]interface{} { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetXlateTable") - } - - var r0 map[interface{}]interface{} - if rf, ok := ret.Get(0).(func() map[interface{}]interface{}); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(map[interface{}]interface{}) - } - } - - return r0 -} - -// MockObjectTypeContract_GetXlateTable_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetXlateTable' -type MockObjectTypeContract_GetXlateTable_Call struct { - *mock.Call -} - -// GetXlateTable is a helper method to define mock.On call -func (_e *MockObjectTypeContract_Expecter) GetXlateTable() *MockObjectTypeContract_GetXlateTable_Call { - return &MockObjectTypeContract_GetXlateTable_Call{Call: _e.mock.On("GetXlateTable")} -} - -func (_c *MockObjectTypeContract_GetXlateTable_Call) Run(run func()) *MockObjectTypeContract_GetXlateTable_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockObjectTypeContract_GetXlateTable_Call) Return(_a0 map[interface{}]interface{}) *MockObjectTypeContract_GetXlateTable_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockObjectTypeContract_GetXlateTable_Call) RunAndReturn(run func() map[interface{}]interface{}) *MockObjectTypeContract_GetXlateTable_Call { - _c.Call.Return(run) - return _c -} - -// SetEnumerated provides a mock function with given fields: enumerated -func (_m *MockObjectTypeContract) SetEnumerated(enumerated *Enumerated) { - _m.Called(enumerated) -} - -// MockObjectTypeContract_SetEnumerated_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetEnumerated' -type MockObjectTypeContract_SetEnumerated_Call struct { - *mock.Call -} - -// SetEnumerated is a helper method to define mock.On call -// - enumerated *Enumerated -func (_e *MockObjectTypeContract_Expecter) SetEnumerated(enumerated interface{}) *MockObjectTypeContract_SetEnumerated_Call { - return &MockObjectTypeContract_SetEnumerated_Call{Call: _e.mock.On("SetEnumerated", enumerated)} -} - -func (_c *MockObjectTypeContract_SetEnumerated_Call) Run(run func(enumerated *Enumerated)) *MockObjectTypeContract_SetEnumerated_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(*Enumerated)) - }) - return _c -} - -func (_c *MockObjectTypeContract_SetEnumerated_Call) Return() *MockObjectTypeContract_SetEnumerated_Call { - _c.Call.Return() - return _c -} - -func (_c *MockObjectTypeContract_SetEnumerated_Call) RunAndReturn(run func(*Enumerated)) *MockObjectTypeContract_SetEnumerated_Call { - _c.Call.Return(run) - return _c -} - -// SetObjectType provides a mock function with given fields: objectType -func (_m *MockObjectTypeContract) SetObjectType(objectType *ObjectType) { - _m.Called(objectType) -} - -// MockObjectTypeContract_SetObjectType_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetObjectType' -type MockObjectTypeContract_SetObjectType_Call struct { - *mock.Call -} - -// SetObjectType is a helper method to define mock.On call -// - objectType *ObjectType -func (_e *MockObjectTypeContract_Expecter) SetObjectType(objectType interface{}) *MockObjectTypeContract_SetObjectType_Call { - return &MockObjectTypeContract_SetObjectType_Call{Call: _e.mock.On("SetObjectType", objectType)} -} - -func (_c *MockObjectTypeContract_SetObjectType_Call) Run(run func(objectType *ObjectType)) *MockObjectTypeContract_SetObjectType_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(*ObjectType)) - }) - return _c -} - -func (_c *MockObjectTypeContract_SetObjectType_Call) Return() *MockObjectTypeContract_SetObjectType_Call { - _c.Call.Return() - return _c -} - -func (_c *MockObjectTypeContract_SetObjectType_Call) RunAndReturn(run func(*ObjectType)) *MockObjectTypeContract_SetObjectType_Call { - _c.Call.Return(run) - return _c -} - -// NewMockObjectTypeContract creates a new instance of MockObjectTypeContract. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewMockObjectTypeContract(t interface { - mock.TestingT - Cleanup(func()) -}) *MockObjectTypeContract { - mock := &MockObjectTypeContract{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/plc4go/internal/bacnetip/mock_OneShotTaskRequirements_test.go b/plc4go/internal/bacnetip/mock_OneShotTaskRequirements_test.go deleted file mode 100644 index c1857e9e4cf..00000000000 --- a/plc4go/internal/bacnetip/mock_OneShotTaskRequirements_test.go +++ /dev/null @@ -1,96 +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 - * - * https://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. - */ - -// Code generated by mockery v2.42.2. DO NOT EDIT. - -package bacnetip - -import mock "github.com/stretchr/testify/mock" - -// MockOneShotTaskRequirements is an autogenerated mock type for the OneShotTaskRequirements type -type MockOneShotTaskRequirements struct { - mock.Mock -} - -type MockOneShotTaskRequirements_Expecter struct { - mock *mock.Mock -} - -func (_m *MockOneShotTaskRequirements) EXPECT() *MockOneShotTaskRequirements_Expecter { - return &MockOneShotTaskRequirements_Expecter{mock: &_m.Mock} -} - -// ProcessTask provides a mock function with given fields: -func (_m *MockOneShotTaskRequirements) ProcessTask() error { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for ProcessTask") - } - - var r0 error - if rf, ok := ret.Get(0).(func() error); ok { - r0 = rf() - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockOneShotTaskRequirements_ProcessTask_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ProcessTask' -type MockOneShotTaskRequirements_ProcessTask_Call struct { - *mock.Call -} - -// ProcessTask is a helper method to define mock.On call -func (_e *MockOneShotTaskRequirements_Expecter) ProcessTask() *MockOneShotTaskRequirements_ProcessTask_Call { - return &MockOneShotTaskRequirements_ProcessTask_Call{Call: _e.mock.On("ProcessTask")} -} - -func (_c *MockOneShotTaskRequirements_ProcessTask_Call) Run(run func()) *MockOneShotTaskRequirements_ProcessTask_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockOneShotTaskRequirements_ProcessTask_Call) Return(_a0 error) *MockOneShotTaskRequirements_ProcessTask_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockOneShotTaskRequirements_ProcessTask_Call) RunAndReturn(run func() error) *MockOneShotTaskRequirements_ProcessTask_Call { - _c.Call.Return(run) - return _c -} - -// NewMockOneShotTaskRequirements creates a new instance of MockOneShotTaskRequirements. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewMockOneShotTaskRequirements(t interface { - mock.TestingT - Cleanup(func()) -}) *MockOneShotTaskRequirements { - mock := &MockOneShotTaskRequirements{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/plc4go/internal/bacnetip/mock_PCI_test.go b/plc4go/internal/bacnetip/mock_PCI_test.go deleted file mode 100644 index 59a0198604f..00000000000 --- a/plc4go/internal/bacnetip/mock_PCI_test.go +++ /dev/null @@ -1,790 +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 - * - * https://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. - */ - -// Code generated by mockery v2.42.2. DO NOT EDIT. - -package bacnetip - -import ( - context "context" - - model "github.com/apache/plc4x/plc4go/protocols/bacnetip/readwrite/model" - mock "github.com/stretchr/testify/mock" - - spi "github.com/apache/plc4x/plc4go/spi" - - utils "github.com/apache/plc4x/plc4go/spi/utils" -) - -// MockPCI is an autogenerated mock type for the PCI type -type MockPCI struct { - mock.Mock -} - -type MockPCI_Expecter struct { - mock *mock.Mock -} - -func (_m *MockPCI) EXPECT() *MockPCI_Expecter { - return &MockPCI_Expecter{mock: &_m.Mock} -} - -// GetExpectingReply provides a mock function with given fields: -func (_m *MockPCI) GetExpectingReply() bool { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetExpectingReply") - } - - var r0 bool - if rf, ok := ret.Get(0).(func() bool); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(bool) - } - - return r0 -} - -// MockPCI_GetExpectingReply_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetExpectingReply' -type MockPCI_GetExpectingReply_Call struct { - *mock.Call -} - -// GetExpectingReply is a helper method to define mock.On call -func (_e *MockPCI_Expecter) GetExpectingReply() *MockPCI_GetExpectingReply_Call { - return &MockPCI_GetExpectingReply_Call{Call: _e.mock.On("GetExpectingReply")} -} - -func (_c *MockPCI_GetExpectingReply_Call) Run(run func()) *MockPCI_GetExpectingReply_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockPCI_GetExpectingReply_Call) Return(_a0 bool) *MockPCI_GetExpectingReply_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockPCI_GetExpectingReply_Call) RunAndReturn(run func() bool) *MockPCI_GetExpectingReply_Call { - _c.Call.Return(run) - return _c -} - -// GetLengthInBits provides a mock function with given fields: ctx -func (_m *MockPCI) GetLengthInBits(ctx context.Context) uint16 { - ret := _m.Called(ctx) - - if len(ret) == 0 { - panic("no return value specified for GetLengthInBits") - } - - var r0 uint16 - if rf, ok := ret.Get(0).(func(context.Context) uint16); ok { - r0 = rf(ctx) - } else { - r0 = ret.Get(0).(uint16) - } - - return r0 -} - -// MockPCI_GetLengthInBits_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetLengthInBits' -type MockPCI_GetLengthInBits_Call struct { - *mock.Call -} - -// GetLengthInBits is a helper method to define mock.On call -// - ctx context.Context -func (_e *MockPCI_Expecter) GetLengthInBits(ctx interface{}) *MockPCI_GetLengthInBits_Call { - return &MockPCI_GetLengthInBits_Call{Call: _e.mock.On("GetLengthInBits", ctx)} -} - -func (_c *MockPCI_GetLengthInBits_Call) Run(run func(ctx context.Context)) *MockPCI_GetLengthInBits_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context)) - }) - return _c -} - -func (_c *MockPCI_GetLengthInBits_Call) Return(_a0 uint16) *MockPCI_GetLengthInBits_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockPCI_GetLengthInBits_Call) RunAndReturn(run func(context.Context) uint16) *MockPCI_GetLengthInBits_Call { - _c.Call.Return(run) - return _c -} - -// GetLengthInBytes provides a mock function with given fields: ctx -func (_m *MockPCI) GetLengthInBytes(ctx context.Context) uint16 { - ret := _m.Called(ctx) - - if len(ret) == 0 { - panic("no return value specified for GetLengthInBytes") - } - - var r0 uint16 - if rf, ok := ret.Get(0).(func(context.Context) uint16); ok { - r0 = rf(ctx) - } else { - r0 = ret.Get(0).(uint16) - } - - return r0 -} - -// MockPCI_GetLengthInBytes_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetLengthInBytes' -type MockPCI_GetLengthInBytes_Call struct { - *mock.Call -} - -// GetLengthInBytes is a helper method to define mock.On call -// - ctx context.Context -func (_e *MockPCI_Expecter) GetLengthInBytes(ctx interface{}) *MockPCI_GetLengthInBytes_Call { - return &MockPCI_GetLengthInBytes_Call{Call: _e.mock.On("GetLengthInBytes", ctx)} -} - -func (_c *MockPCI_GetLengthInBytes_Call) Run(run func(ctx context.Context)) *MockPCI_GetLengthInBytes_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context)) - }) - return _c -} - -func (_c *MockPCI_GetLengthInBytes_Call) Return(_a0 uint16) *MockPCI_GetLengthInBytes_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockPCI_GetLengthInBytes_Call) RunAndReturn(run func(context.Context) uint16) *MockPCI_GetLengthInBytes_Call { - _c.Call.Return(run) - return _c -} - -// GetNetworkPriority provides a mock function with given fields: -func (_m *MockPCI) GetNetworkPriority() model.NPDUNetworkPriority { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetNetworkPriority") - } - - var r0 model.NPDUNetworkPriority - if rf, ok := ret.Get(0).(func() model.NPDUNetworkPriority); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(model.NPDUNetworkPriority) - } - - return r0 -} - -// MockPCI_GetNetworkPriority_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetNetworkPriority' -type MockPCI_GetNetworkPriority_Call struct { - *mock.Call -} - -// GetNetworkPriority is a helper method to define mock.On call -func (_e *MockPCI_Expecter) GetNetworkPriority() *MockPCI_GetNetworkPriority_Call { - return &MockPCI_GetNetworkPriority_Call{Call: _e.mock.On("GetNetworkPriority")} -} - -func (_c *MockPCI_GetNetworkPriority_Call) Run(run func()) *MockPCI_GetNetworkPriority_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockPCI_GetNetworkPriority_Call) Return(_a0 model.NPDUNetworkPriority) *MockPCI_GetNetworkPriority_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockPCI_GetNetworkPriority_Call) RunAndReturn(run func() model.NPDUNetworkPriority) *MockPCI_GetNetworkPriority_Call { - _c.Call.Return(run) - return _c -} - -// GetPDUDestination provides a mock function with given fields: -func (_m *MockPCI) GetPDUDestination() *Address { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetPDUDestination") - } - - var r0 *Address - if rf, ok := ret.Get(0).(func() *Address); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*Address) - } - } - - return r0 -} - -// MockPCI_GetPDUDestination_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPDUDestination' -type MockPCI_GetPDUDestination_Call struct { - *mock.Call -} - -// GetPDUDestination is a helper method to define mock.On call -func (_e *MockPCI_Expecter) GetPDUDestination() *MockPCI_GetPDUDestination_Call { - return &MockPCI_GetPDUDestination_Call{Call: _e.mock.On("GetPDUDestination")} -} - -func (_c *MockPCI_GetPDUDestination_Call) Run(run func()) *MockPCI_GetPDUDestination_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockPCI_GetPDUDestination_Call) Return(_a0 *Address) *MockPCI_GetPDUDestination_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockPCI_GetPDUDestination_Call) RunAndReturn(run func() *Address) *MockPCI_GetPDUDestination_Call { - _c.Call.Return(run) - return _c -} - -// GetPDUSource provides a mock function with given fields: -func (_m *MockPCI) GetPDUSource() *Address { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetPDUSource") - } - - var r0 *Address - if rf, ok := ret.Get(0).(func() *Address); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*Address) - } - } - - return r0 -} - -// MockPCI_GetPDUSource_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPDUSource' -type MockPCI_GetPDUSource_Call struct { - *mock.Call -} - -// GetPDUSource is a helper method to define mock.On call -func (_e *MockPCI_Expecter) GetPDUSource() *MockPCI_GetPDUSource_Call { - return &MockPCI_GetPDUSource_Call{Call: _e.mock.On("GetPDUSource")} -} - -func (_c *MockPCI_GetPDUSource_Call) Run(run func()) *MockPCI_GetPDUSource_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockPCI_GetPDUSource_Call) Return(_a0 *Address) *MockPCI_GetPDUSource_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockPCI_GetPDUSource_Call) RunAndReturn(run func() *Address) *MockPCI_GetPDUSource_Call { - _c.Call.Return(run) - return _c -} - -// GetPDUUserData provides a mock function with given fields: -func (_m *MockPCI) GetPDUUserData() spi.Message { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetPDUUserData") - } - - var r0 spi.Message - if rf, ok := ret.Get(0).(func() spi.Message); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(spi.Message) - } - } - - return r0 -} - -// MockPCI_GetPDUUserData_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPDUUserData' -type MockPCI_GetPDUUserData_Call struct { - *mock.Call -} - -// GetPDUUserData is a helper method to define mock.On call -func (_e *MockPCI_Expecter) GetPDUUserData() *MockPCI_GetPDUUserData_Call { - return &MockPCI_GetPDUUserData_Call{Call: _e.mock.On("GetPDUUserData")} -} - -func (_c *MockPCI_GetPDUUserData_Call) Run(run func()) *MockPCI_GetPDUUserData_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockPCI_GetPDUUserData_Call) Return(_a0 spi.Message) *MockPCI_GetPDUUserData_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockPCI_GetPDUUserData_Call) RunAndReturn(run func() spi.Message) *MockPCI_GetPDUUserData_Call { - _c.Call.Return(run) - return _c -} - -// GetRootMessage provides a mock function with given fields: -func (_m *MockPCI) GetRootMessage() spi.Message { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetRootMessage") - } - - var r0 spi.Message - if rf, ok := ret.Get(0).(func() spi.Message); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(spi.Message) - } - } - - return r0 -} - -// MockPCI_GetRootMessage_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRootMessage' -type MockPCI_GetRootMessage_Call struct { - *mock.Call -} - -// GetRootMessage is a helper method to define mock.On call -func (_e *MockPCI_Expecter) GetRootMessage() *MockPCI_GetRootMessage_Call { - return &MockPCI_GetRootMessage_Call{Call: _e.mock.On("GetRootMessage")} -} - -func (_c *MockPCI_GetRootMessage_Call) Run(run func()) *MockPCI_GetRootMessage_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockPCI_GetRootMessage_Call) Return(_a0 spi.Message) *MockPCI_GetRootMessage_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockPCI_GetRootMessage_Call) RunAndReturn(run func() spi.Message) *MockPCI_GetRootMessage_Call { - _c.Call.Return(run) - return _c -} - -// Serialize provides a mock function with given fields: -func (_m *MockPCI) Serialize() ([]byte, error) { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Serialize") - } - - var r0 []byte - var r1 error - if rf, ok := ret.Get(0).(func() ([]byte, error)); ok { - return rf() - } - if rf, ok := ret.Get(0).(func() []byte); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]byte) - } - } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockPCI_Serialize_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Serialize' -type MockPCI_Serialize_Call struct { - *mock.Call -} - -// Serialize is a helper method to define mock.On call -func (_e *MockPCI_Expecter) Serialize() *MockPCI_Serialize_Call { - return &MockPCI_Serialize_Call{Call: _e.mock.On("Serialize")} -} - -func (_c *MockPCI_Serialize_Call) Run(run func()) *MockPCI_Serialize_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockPCI_Serialize_Call) Return(_a0 []byte, _a1 error) *MockPCI_Serialize_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockPCI_Serialize_Call) RunAndReturn(run func() ([]byte, error)) *MockPCI_Serialize_Call { - _c.Call.Return(run) - return _c -} - -// SerializeWithWriteBuffer provides a mock function with given fields: ctx, writeBuffer -func (_m *MockPCI) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { - ret := _m.Called(ctx, writeBuffer) - - if len(ret) == 0 { - panic("no return value specified for SerializeWithWriteBuffer") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, utils.WriteBuffer) error); ok { - r0 = rf(ctx, writeBuffer) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockPCI_SerializeWithWriteBuffer_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SerializeWithWriteBuffer' -type MockPCI_SerializeWithWriteBuffer_Call struct { - *mock.Call -} - -// SerializeWithWriteBuffer is a helper method to define mock.On call -// - ctx context.Context -// - writeBuffer utils.WriteBuffer -func (_e *MockPCI_Expecter) SerializeWithWriteBuffer(ctx interface{}, writeBuffer interface{}) *MockPCI_SerializeWithWriteBuffer_Call { - return &MockPCI_SerializeWithWriteBuffer_Call{Call: _e.mock.On("SerializeWithWriteBuffer", ctx, writeBuffer)} -} - -func (_c *MockPCI_SerializeWithWriteBuffer_Call) Run(run func(ctx context.Context, writeBuffer utils.WriteBuffer)) *MockPCI_SerializeWithWriteBuffer_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(utils.WriteBuffer)) - }) - return _c -} - -func (_c *MockPCI_SerializeWithWriteBuffer_Call) Return(_a0 error) *MockPCI_SerializeWithWriteBuffer_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockPCI_SerializeWithWriteBuffer_Call) RunAndReturn(run func(context.Context, utils.WriteBuffer) error) *MockPCI_SerializeWithWriteBuffer_Call { - _c.Call.Return(run) - return _c -} - -// SetExpectingReply provides a mock function with given fields: _a0 -func (_m *MockPCI) SetExpectingReply(_a0 bool) { - _m.Called(_a0) -} - -// MockPCI_SetExpectingReply_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetExpectingReply' -type MockPCI_SetExpectingReply_Call struct { - *mock.Call -} - -// SetExpectingReply is a helper method to define mock.On call -// - _a0 bool -func (_e *MockPCI_Expecter) SetExpectingReply(_a0 interface{}) *MockPCI_SetExpectingReply_Call { - return &MockPCI_SetExpectingReply_Call{Call: _e.mock.On("SetExpectingReply", _a0)} -} - -func (_c *MockPCI_SetExpectingReply_Call) Run(run func(_a0 bool)) *MockPCI_SetExpectingReply_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(bool)) - }) - return _c -} - -func (_c *MockPCI_SetExpectingReply_Call) Return() *MockPCI_SetExpectingReply_Call { - _c.Call.Return() - return _c -} - -func (_c *MockPCI_SetExpectingReply_Call) RunAndReturn(run func(bool)) *MockPCI_SetExpectingReply_Call { - _c.Call.Return(run) - return _c -} - -// SetNetworkPriority provides a mock function with given fields: _a0 -func (_m *MockPCI) SetNetworkPriority(_a0 model.NPDUNetworkPriority) { - _m.Called(_a0) -} - -// MockPCI_SetNetworkPriority_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetNetworkPriority' -type MockPCI_SetNetworkPriority_Call struct { - *mock.Call -} - -// SetNetworkPriority is a helper method to define mock.On call -// - _a0 model.NPDUNetworkPriority -func (_e *MockPCI_Expecter) SetNetworkPriority(_a0 interface{}) *MockPCI_SetNetworkPriority_Call { - return &MockPCI_SetNetworkPriority_Call{Call: _e.mock.On("SetNetworkPriority", _a0)} -} - -func (_c *MockPCI_SetNetworkPriority_Call) Run(run func(_a0 model.NPDUNetworkPriority)) *MockPCI_SetNetworkPriority_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(model.NPDUNetworkPriority)) - }) - return _c -} - -func (_c *MockPCI_SetNetworkPriority_Call) Return() *MockPCI_SetNetworkPriority_Call { - _c.Call.Return() - return _c -} - -func (_c *MockPCI_SetNetworkPriority_Call) RunAndReturn(run func(model.NPDUNetworkPriority)) *MockPCI_SetNetworkPriority_Call { - _c.Call.Return(run) - return _c -} - -// SetPDUDestination provides a mock function with given fields: _a0 -func (_m *MockPCI) SetPDUDestination(_a0 *Address) { - _m.Called(_a0) -} - -// MockPCI_SetPDUDestination_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetPDUDestination' -type MockPCI_SetPDUDestination_Call struct { - *mock.Call -} - -// SetPDUDestination is a helper method to define mock.On call -// - _a0 *Address -func (_e *MockPCI_Expecter) SetPDUDestination(_a0 interface{}) *MockPCI_SetPDUDestination_Call { - return &MockPCI_SetPDUDestination_Call{Call: _e.mock.On("SetPDUDestination", _a0)} -} - -func (_c *MockPCI_SetPDUDestination_Call) Run(run func(_a0 *Address)) *MockPCI_SetPDUDestination_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(*Address)) - }) - return _c -} - -func (_c *MockPCI_SetPDUDestination_Call) Return() *MockPCI_SetPDUDestination_Call { - _c.Call.Return() - return _c -} - -func (_c *MockPCI_SetPDUDestination_Call) RunAndReturn(run func(*Address)) *MockPCI_SetPDUDestination_Call { - _c.Call.Return(run) - return _c -} - -// SetPDUSource provides a mock function with given fields: source -func (_m *MockPCI) SetPDUSource(source *Address) { - _m.Called(source) -} - -// MockPCI_SetPDUSource_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetPDUSource' -type MockPCI_SetPDUSource_Call struct { - *mock.Call -} - -// SetPDUSource is a helper method to define mock.On call -// - source *Address -func (_e *MockPCI_Expecter) SetPDUSource(source interface{}) *MockPCI_SetPDUSource_Call { - return &MockPCI_SetPDUSource_Call{Call: _e.mock.On("SetPDUSource", source)} -} - -func (_c *MockPCI_SetPDUSource_Call) Run(run func(source *Address)) *MockPCI_SetPDUSource_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(*Address)) - }) - return _c -} - -func (_c *MockPCI_SetPDUSource_Call) Return() *MockPCI_SetPDUSource_Call { - _c.Call.Return() - return _c -} - -func (_c *MockPCI_SetPDUSource_Call) RunAndReturn(run func(*Address)) *MockPCI_SetPDUSource_Call { - _c.Call.Return(run) - return _c -} - -// SetPDUUserData provides a mock function with given fields: _a0 -func (_m *MockPCI) SetPDUUserData(_a0 spi.Message) { - _m.Called(_a0) -} - -// MockPCI_SetPDUUserData_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetPDUUserData' -type MockPCI_SetPDUUserData_Call struct { - *mock.Call -} - -// SetPDUUserData is a helper method to define mock.On call -// - _a0 spi.Message -func (_e *MockPCI_Expecter) SetPDUUserData(_a0 interface{}) *MockPCI_SetPDUUserData_Call { - return &MockPCI_SetPDUUserData_Call{Call: _e.mock.On("SetPDUUserData", _a0)} -} - -func (_c *MockPCI_SetPDUUserData_Call) Run(run func(_a0 spi.Message)) *MockPCI_SetPDUUserData_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(spi.Message)) - }) - return _c -} - -func (_c *MockPCI_SetPDUUserData_Call) Return() *MockPCI_SetPDUUserData_Call { - _c.Call.Return() - return _c -} - -func (_c *MockPCI_SetPDUUserData_Call) RunAndReturn(run func(spi.Message)) *MockPCI_SetPDUUserData_Call { - _c.Call.Return(run) - return _c -} - -// String provides a mock function with given fields: -func (_m *MockPCI) String() string { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for String") - } - - var r0 string - if rf, ok := ret.Get(0).(func() string); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(string) - } - - return r0 -} - -// MockPCI_String_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'String' -type MockPCI_String_Call struct { - *mock.Call -} - -// String is a helper method to define mock.On call -func (_e *MockPCI_Expecter) String() *MockPCI_String_Call { - return &MockPCI_String_Call{Call: _e.mock.On("String")} -} - -func (_c *MockPCI_String_Call) Run(run func()) *MockPCI_String_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockPCI_String_Call) Return(_a0 string) *MockPCI_String_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockPCI_String_Call) RunAndReturn(run func() string) *MockPCI_String_Call { - _c.Call.Return(run) - return _c -} - -// Update provides a mock function with given fields: pci -func (_m *MockPCI) Update(pci Arg) error { - ret := _m.Called(pci) - - if len(ret) == 0 { - panic("no return value specified for Update") - } - - var r0 error - if rf, ok := ret.Get(0).(func(Arg) error); ok { - r0 = rf(pci) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockPCI_Update_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Update' -type MockPCI_Update_Call struct { - *mock.Call -} - -// Update is a helper method to define mock.On call -// - pci Arg -func (_e *MockPCI_Expecter) Update(pci interface{}) *MockPCI_Update_Call { - return &MockPCI_Update_Call{Call: _e.mock.On("Update", pci)} -} - -func (_c *MockPCI_Update_Call) Run(run func(pci Arg)) *MockPCI_Update_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(Arg)) - }) - return _c -} - -func (_c *MockPCI_Update_Call) Return(_a0 error) *MockPCI_Update_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockPCI_Update_Call) RunAndReturn(run func(Arg) error) *MockPCI_Update_Call { - _c.Call.Return(run) - return _c -} - -// NewMockPCI creates a new instance of MockPCI. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewMockPCI(t interface { - mock.TestingT - Cleanup(func()) -}) *MockPCI { - mock := &MockPCI{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/plc4go/internal/bacnetip/mock_PDUContract_test.go b/plc4go/internal/bacnetip/mock_PDUContract_test.go deleted file mode 100644 index 765b241dac0..00000000000 --- a/plc4go/internal/bacnetip/mock_PDUContract_test.go +++ /dev/null @@ -1,96 +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 - * - * https://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. - */ - -// Code generated by mockery v2.42.2. DO NOT EDIT. - -package bacnetip - -import mock "github.com/stretchr/testify/mock" - -// MockPDUContract is an autogenerated mock type for the PDUContract type -type MockPDUContract struct { - mock.Mock -} - -type MockPDUContract_Expecter struct { - mock *mock.Mock -} - -func (_m *MockPDUContract) EXPECT() *MockPDUContract_Expecter { - return &MockPDUContract_Expecter{mock: &_m.Mock} -} - -// GetName provides a mock function with given fields: -func (_m *MockPDUContract) GetName() string { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetName") - } - - var r0 string - if rf, ok := ret.Get(0).(func() string); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(string) - } - - return r0 -} - -// MockPDUContract_GetName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetName' -type MockPDUContract_GetName_Call struct { - *mock.Call -} - -// GetName is a helper method to define mock.On call -func (_e *MockPDUContract_Expecter) GetName() *MockPDUContract_GetName_Call { - return &MockPDUContract_GetName_Call{Call: _e.mock.On("GetName")} -} - -func (_c *MockPDUContract_GetName_Call) Run(run func()) *MockPDUContract_GetName_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockPDUContract_GetName_Call) Return(_a0 string) *MockPDUContract_GetName_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockPDUContract_GetName_Call) RunAndReturn(run func() string) *MockPDUContract_GetName_Call { - _c.Call.Return(run) - return _c -} - -// NewMockPDUContract creates a new instance of MockPDUContract. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewMockPDUContract(t interface { - mock.TestingT - Cleanup(func()) -}) *MockPDUContract { - mock := &MockPDUContract{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/plc4go/internal/bacnetip/mock_PDUData_test.go b/plc4go/internal/bacnetip/mock_PDUData_test.go deleted file mode 100644 index e81df5df892..00000000000 --- a/plc4go/internal/bacnetip/mock_PDUData_test.go +++ /dev/null @@ -1,499 +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 - * - * https://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. - */ - -// Code generated by mockery v2.42.2. DO NOT EDIT. - -package bacnetip - -import mock "github.com/stretchr/testify/mock" - -// MockPDUData is an autogenerated mock type for the PDUData type -type MockPDUData struct { - mock.Mock -} - -type MockPDUData_Expecter struct { - mock *mock.Mock -} - -func (_m *MockPDUData) EXPECT() *MockPDUData_Expecter { - return &MockPDUData_Expecter{mock: &_m.Mock} -} - -// Get provides a mock function with given fields: -func (_m *MockPDUData) Get() (byte, error) { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Get") - } - - var r0 byte - var r1 error - if rf, ok := ret.Get(0).(func() (byte, error)); ok { - return rf() - } - if rf, ok := ret.Get(0).(func() byte); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(byte) - } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockPDUData_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' -type MockPDUData_Get_Call struct { - *mock.Call -} - -// Get is a helper method to define mock.On call -func (_e *MockPDUData_Expecter) Get() *MockPDUData_Get_Call { - return &MockPDUData_Get_Call{Call: _e.mock.On("Get")} -} - -func (_c *MockPDUData_Get_Call) Run(run func()) *MockPDUData_Get_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockPDUData_Get_Call) Return(_a0 byte, _a1 error) *MockPDUData_Get_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockPDUData_Get_Call) RunAndReturn(run func() (byte, error)) *MockPDUData_Get_Call { - _c.Call.Return(run) - return _c -} - -// GetData provides a mock function with given fields: dlen -func (_m *MockPDUData) GetData(dlen int) ([]byte, error) { - ret := _m.Called(dlen) - - if len(ret) == 0 { - panic("no return value specified for GetData") - } - - var r0 []byte - var r1 error - if rf, ok := ret.Get(0).(func(int) ([]byte, error)); ok { - return rf(dlen) - } - if rf, ok := ret.Get(0).(func(int) []byte); ok { - r0 = rf(dlen) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]byte) - } - } - - if rf, ok := ret.Get(1).(func(int) error); ok { - r1 = rf(dlen) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockPDUData_GetData_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetData' -type MockPDUData_GetData_Call struct { - *mock.Call -} - -// GetData is a helper method to define mock.On call -// - dlen int -func (_e *MockPDUData_Expecter) GetData(dlen interface{}) *MockPDUData_GetData_Call { - return &MockPDUData_GetData_Call{Call: _e.mock.On("GetData", dlen)} -} - -func (_c *MockPDUData_GetData_Call) Run(run func(dlen int)) *MockPDUData_GetData_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(int)) - }) - return _c -} - -func (_c *MockPDUData_GetData_Call) Return(_a0 []byte, _a1 error) *MockPDUData_GetData_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockPDUData_GetData_Call) RunAndReturn(run func(int) ([]byte, error)) *MockPDUData_GetData_Call { - _c.Call.Return(run) - return _c -} - -// GetLong provides a mock function with given fields: -func (_m *MockPDUData) GetLong() (int64, error) { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetLong") - } - - var r0 int64 - var r1 error - if rf, ok := ret.Get(0).(func() (int64, error)); ok { - return rf() - } - if rf, ok := ret.Get(0).(func() int64); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(int64) - } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockPDUData_GetLong_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetLong' -type MockPDUData_GetLong_Call struct { - *mock.Call -} - -// GetLong is a helper method to define mock.On call -func (_e *MockPDUData_Expecter) GetLong() *MockPDUData_GetLong_Call { - return &MockPDUData_GetLong_Call{Call: _e.mock.On("GetLong")} -} - -func (_c *MockPDUData_GetLong_Call) Run(run func()) *MockPDUData_GetLong_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockPDUData_GetLong_Call) Return(_a0 int64, _a1 error) *MockPDUData_GetLong_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockPDUData_GetLong_Call) RunAndReturn(run func() (int64, error)) *MockPDUData_GetLong_Call { - _c.Call.Return(run) - return _c -} - -// GetPduData provides a mock function with given fields: -func (_m *MockPDUData) GetPduData() []byte { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetPduData") - } - - var r0 []byte - if rf, ok := ret.Get(0).(func() []byte); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]byte) - } - } - - return r0 -} - -// MockPDUData_GetPduData_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPduData' -type MockPDUData_GetPduData_Call struct { - *mock.Call -} - -// GetPduData is a helper method to define mock.On call -func (_e *MockPDUData_Expecter) GetPduData() *MockPDUData_GetPduData_Call { - return &MockPDUData_GetPduData_Call{Call: _e.mock.On("GetPduData")} -} - -func (_c *MockPDUData_GetPduData_Call) Run(run func()) *MockPDUData_GetPduData_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockPDUData_GetPduData_Call) Return(_a0 []byte) *MockPDUData_GetPduData_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockPDUData_GetPduData_Call) RunAndReturn(run func() []byte) *MockPDUData_GetPduData_Call { - _c.Call.Return(run) - return _c -} - -// GetShort provides a mock function with given fields: -func (_m *MockPDUData) GetShort() (int16, error) { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetShort") - } - - var r0 int16 - var r1 error - if rf, ok := ret.Get(0).(func() (int16, error)); ok { - return rf() - } - if rf, ok := ret.Get(0).(func() int16); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(int16) - } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockPDUData_GetShort_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetShort' -type MockPDUData_GetShort_Call struct { - *mock.Call -} - -// GetShort is a helper method to define mock.On call -func (_e *MockPDUData_Expecter) GetShort() *MockPDUData_GetShort_Call { - return &MockPDUData_GetShort_Call{Call: _e.mock.On("GetShort")} -} - -func (_c *MockPDUData_GetShort_Call) Run(run func()) *MockPDUData_GetShort_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockPDUData_GetShort_Call) Return(_a0 int16, _a1 error) *MockPDUData_GetShort_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockPDUData_GetShort_Call) RunAndReturn(run func() (int16, error)) *MockPDUData_GetShort_Call { - _c.Call.Return(run) - return _c -} - -// Put provides a mock function with given fields: _a0 -func (_m *MockPDUData) Put(_a0 byte) { - _m.Called(_a0) -} - -// MockPDUData_Put_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Put' -type MockPDUData_Put_Call struct { - *mock.Call -} - -// Put is a helper method to define mock.On call -// - _a0 byte -func (_e *MockPDUData_Expecter) Put(_a0 interface{}) *MockPDUData_Put_Call { - return &MockPDUData_Put_Call{Call: _e.mock.On("Put", _a0)} -} - -func (_c *MockPDUData_Put_Call) Run(run func(_a0 byte)) *MockPDUData_Put_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(byte)) - }) - return _c -} - -func (_c *MockPDUData_Put_Call) Return() *MockPDUData_Put_Call { - _c.Call.Return() - return _c -} - -func (_c *MockPDUData_Put_Call) RunAndReturn(run func(byte)) *MockPDUData_Put_Call { - _c.Call.Return(run) - return _c -} - -// PutData provides a mock function with given fields: _a0 -func (_m *MockPDUData) PutData(_a0 ...byte) { - _va := make([]interface{}, len(_a0)) - for _i := range _a0 { - _va[_i] = _a0[_i] - } - var _ca []interface{} - _ca = append(_ca, _va...) - _m.Called(_ca...) -} - -// MockPDUData_PutData_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PutData' -type MockPDUData_PutData_Call struct { - *mock.Call -} - -// PutData is a helper method to define mock.On call -// - _a0 ...byte -func (_e *MockPDUData_Expecter) PutData(_a0 ...interface{}) *MockPDUData_PutData_Call { - return &MockPDUData_PutData_Call{Call: _e.mock.On("PutData", - append([]interface{}{}, _a0...)...)} -} - -func (_c *MockPDUData_PutData_Call) Run(run func(_a0 ...byte)) *MockPDUData_PutData_Call { - _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]byte, len(args)-0) - for i, a := range args[0:] { - if a != nil { - variadicArgs[i] = a.(byte) - } - } - run(variadicArgs...) - }) - return _c -} - -func (_c *MockPDUData_PutData_Call) Return() *MockPDUData_PutData_Call { - _c.Call.Return() - return _c -} - -func (_c *MockPDUData_PutData_Call) RunAndReturn(run func(...byte)) *MockPDUData_PutData_Call { - _c.Call.Return(run) - return _c -} - -// PutLong provides a mock function with given fields: _a0 -func (_m *MockPDUData) PutLong(_a0 uint32) { - _m.Called(_a0) -} - -// MockPDUData_PutLong_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PutLong' -type MockPDUData_PutLong_Call struct { - *mock.Call -} - -// PutLong is a helper method to define mock.On call -// - _a0 uint32 -func (_e *MockPDUData_Expecter) PutLong(_a0 interface{}) *MockPDUData_PutLong_Call { - return &MockPDUData_PutLong_Call{Call: _e.mock.On("PutLong", _a0)} -} - -func (_c *MockPDUData_PutLong_Call) Run(run func(_a0 uint32)) *MockPDUData_PutLong_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(uint32)) - }) - return _c -} - -func (_c *MockPDUData_PutLong_Call) Return() *MockPDUData_PutLong_Call { - _c.Call.Return() - return _c -} - -func (_c *MockPDUData_PutLong_Call) RunAndReturn(run func(uint32)) *MockPDUData_PutLong_Call { - _c.Call.Return(run) - return _c -} - -// PutShort provides a mock function with given fields: _a0 -func (_m *MockPDUData) PutShort(_a0 uint16) { - _m.Called(_a0) -} - -// MockPDUData_PutShort_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PutShort' -type MockPDUData_PutShort_Call struct { - *mock.Call -} - -// PutShort is a helper method to define mock.On call -// - _a0 uint16 -func (_e *MockPDUData_Expecter) PutShort(_a0 interface{}) *MockPDUData_PutShort_Call { - return &MockPDUData_PutShort_Call{Call: _e.mock.On("PutShort", _a0)} -} - -func (_c *MockPDUData_PutShort_Call) Run(run func(_a0 uint16)) *MockPDUData_PutShort_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(uint16)) - }) - return _c -} - -func (_c *MockPDUData_PutShort_Call) Return() *MockPDUData_PutShort_Call { - _c.Call.Return() - return _c -} - -func (_c *MockPDUData_PutShort_Call) RunAndReturn(run func(uint16)) *MockPDUData_PutShort_Call { - _c.Call.Return(run) - return _c -} - -// SetPduData provides a mock function with given fields: _a0 -func (_m *MockPDUData) SetPduData(_a0 []byte) { - _m.Called(_a0) -} - -// MockPDUData_SetPduData_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetPduData' -type MockPDUData_SetPduData_Call struct { - *mock.Call -} - -// SetPduData is a helper method to define mock.On call -// - _a0 []byte -func (_e *MockPDUData_Expecter) SetPduData(_a0 interface{}) *MockPDUData_SetPduData_Call { - return &MockPDUData_SetPduData_Call{Call: _e.mock.On("SetPduData", _a0)} -} - -func (_c *MockPDUData_SetPduData_Call) Run(run func(_a0 []byte)) *MockPDUData_SetPduData_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].([]byte)) - }) - return _c -} - -func (_c *MockPDUData_SetPduData_Call) Return() *MockPDUData_SetPduData_Call { - _c.Call.Return() - return _c -} - -func (_c *MockPDUData_SetPduData_Call) RunAndReturn(run func([]byte)) *MockPDUData_SetPduData_Call { - _c.Call.Return(run) - return _c -} - -// NewMockPDUData creates a new instance of MockPDUData. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewMockPDUData(t interface { - mock.TestingT - Cleanup(func()) -}) *MockPDUData { - mock := &MockPDUData{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/plc4go/internal/bacnetip/mock_PDUOption_test.go b/plc4go/internal/bacnetip/mock_PDUOption_test.go deleted file mode 100644 index f92dae7090b..00000000000 --- a/plc4go/internal/bacnetip/mock_PDUOption_test.go +++ /dev/null @@ -1,84 +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 - * - * https://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. - */ - -// Code generated by mockery v2.42.2. DO NOT EDIT. - -package bacnetip - -import mock "github.com/stretchr/testify/mock" - -// MockPDUOption is an autogenerated mock type for the PDUOption type -type MockPDUOption struct { - mock.Mock -} - -type MockPDUOption_Expecter struct { - mock *mock.Mock -} - -func (_m *MockPDUOption) EXPECT() *MockPDUOption_Expecter { - return &MockPDUOption_Expecter{mock: &_m.Mock} -} - -// Execute provides a mock function with given fields: pdu -func (_m *MockPDUOption) Execute(pdu *_PDU) { - _m.Called(pdu) -} - -// MockPDUOption_Execute_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Execute' -type MockPDUOption_Execute_Call struct { - *mock.Call -} - -// Execute is a helper method to define mock.On call -// - pdu *_PDU -func (_e *MockPDUOption_Expecter) Execute(pdu interface{}) *MockPDUOption_Execute_Call { - return &MockPDUOption_Execute_Call{Call: _e.mock.On("Execute", pdu)} -} - -func (_c *MockPDUOption_Execute_Call) Run(run func(pdu *_PDU)) *MockPDUOption_Execute_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(*_PDU)) - }) - return _c -} - -func (_c *MockPDUOption_Execute_Call) Return() *MockPDUOption_Execute_Call { - _c.Call.Return() - return _c -} - -func (_c *MockPDUOption_Execute_Call) RunAndReturn(run func(*_PDU)) *MockPDUOption_Execute_Call { - _c.Call.Return(run) - return _c -} - -// NewMockPDUOption creates a new instance of MockPDUOption. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewMockPDUOption(t interface { - mock.TestingT - Cleanup(func()) -}) *MockPDUOption { - mock := &MockPDUOption{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/plc4go/internal/bacnetip/mock_PDU_test.go b/plc4go/internal/bacnetip/mock_PDU_test.go deleted file mode 100644 index 394c76501b4..00000000000 --- a/plc4go/internal/bacnetip/mock_PDU_test.go +++ /dev/null @@ -1,1285 +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 - * - * https://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. - */ - -// Code generated by mockery v2.42.2. DO NOT EDIT. - -package bacnetip - -import ( - context "context" - - model "github.com/apache/plc4x/plc4go/protocols/bacnetip/readwrite/model" - mock "github.com/stretchr/testify/mock" - - spi "github.com/apache/plc4x/plc4go/spi" - - utils "github.com/apache/plc4x/plc4go/spi/utils" -) - -// MockPDU is an autogenerated mock type for the PDU type -type MockPDU struct { - mock.Mock -} - -type MockPDU_Expecter struct { - mock *mock.Mock -} - -func (_m *MockPDU) EXPECT() *MockPDU_Expecter { - return &MockPDU_Expecter{mock: &_m.Mock} -} - -// DeepCopy provides a mock function with given fields: -func (_m *MockPDU) DeepCopy() interface{} { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for DeepCopy") - } - - var r0 interface{} - if rf, ok := ret.Get(0).(func() interface{}); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(interface{}) - } - } - - return r0 -} - -// MockPDU_DeepCopy_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeepCopy' -type MockPDU_DeepCopy_Call struct { - *mock.Call -} - -// DeepCopy is a helper method to define mock.On call -func (_e *MockPDU_Expecter) DeepCopy() *MockPDU_DeepCopy_Call { - return &MockPDU_DeepCopy_Call{Call: _e.mock.On("DeepCopy")} -} - -func (_c *MockPDU_DeepCopy_Call) Run(run func()) *MockPDU_DeepCopy_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockPDU_DeepCopy_Call) Return(_a0 interface{}) *MockPDU_DeepCopy_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockPDU_DeepCopy_Call) RunAndReturn(run func() interface{}) *MockPDU_DeepCopy_Call { - _c.Call.Return(run) - return _c -} - -// Get provides a mock function with given fields: -func (_m *MockPDU) Get() (byte, error) { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Get") - } - - var r0 byte - var r1 error - if rf, ok := ret.Get(0).(func() (byte, error)); ok { - return rf() - } - if rf, ok := ret.Get(0).(func() byte); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(byte) - } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockPDU_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' -type MockPDU_Get_Call struct { - *mock.Call -} - -// Get is a helper method to define mock.On call -func (_e *MockPDU_Expecter) Get() *MockPDU_Get_Call { - return &MockPDU_Get_Call{Call: _e.mock.On("Get")} -} - -func (_c *MockPDU_Get_Call) Run(run func()) *MockPDU_Get_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockPDU_Get_Call) Return(_a0 byte, _a1 error) *MockPDU_Get_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockPDU_Get_Call) RunAndReturn(run func() (byte, error)) *MockPDU_Get_Call { - _c.Call.Return(run) - return _c -} - -// GetData provides a mock function with given fields: dlen -func (_m *MockPDU) GetData(dlen int) ([]byte, error) { - ret := _m.Called(dlen) - - if len(ret) == 0 { - panic("no return value specified for GetData") - } - - var r0 []byte - var r1 error - if rf, ok := ret.Get(0).(func(int) ([]byte, error)); ok { - return rf(dlen) - } - if rf, ok := ret.Get(0).(func(int) []byte); ok { - r0 = rf(dlen) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]byte) - } - } - - if rf, ok := ret.Get(1).(func(int) error); ok { - r1 = rf(dlen) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockPDU_GetData_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetData' -type MockPDU_GetData_Call struct { - *mock.Call -} - -// GetData is a helper method to define mock.On call -// - dlen int -func (_e *MockPDU_Expecter) GetData(dlen interface{}) *MockPDU_GetData_Call { - return &MockPDU_GetData_Call{Call: _e.mock.On("GetData", dlen)} -} - -func (_c *MockPDU_GetData_Call) Run(run func(dlen int)) *MockPDU_GetData_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(int)) - }) - return _c -} - -func (_c *MockPDU_GetData_Call) Return(_a0 []byte, _a1 error) *MockPDU_GetData_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockPDU_GetData_Call) RunAndReturn(run func(int) ([]byte, error)) *MockPDU_GetData_Call { - _c.Call.Return(run) - return _c -} - -// GetExpectingReply provides a mock function with given fields: -func (_m *MockPDU) GetExpectingReply() bool { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetExpectingReply") - } - - var r0 bool - if rf, ok := ret.Get(0).(func() bool); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(bool) - } - - return r0 -} - -// MockPDU_GetExpectingReply_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetExpectingReply' -type MockPDU_GetExpectingReply_Call struct { - *mock.Call -} - -// GetExpectingReply is a helper method to define mock.On call -func (_e *MockPDU_Expecter) GetExpectingReply() *MockPDU_GetExpectingReply_Call { - return &MockPDU_GetExpectingReply_Call{Call: _e.mock.On("GetExpectingReply")} -} - -func (_c *MockPDU_GetExpectingReply_Call) Run(run func()) *MockPDU_GetExpectingReply_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockPDU_GetExpectingReply_Call) Return(_a0 bool) *MockPDU_GetExpectingReply_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockPDU_GetExpectingReply_Call) RunAndReturn(run func() bool) *MockPDU_GetExpectingReply_Call { - _c.Call.Return(run) - return _c -} - -// GetLengthInBits provides a mock function with given fields: ctx -func (_m *MockPDU) GetLengthInBits(ctx context.Context) uint16 { - ret := _m.Called(ctx) - - if len(ret) == 0 { - panic("no return value specified for GetLengthInBits") - } - - var r0 uint16 - if rf, ok := ret.Get(0).(func(context.Context) uint16); ok { - r0 = rf(ctx) - } else { - r0 = ret.Get(0).(uint16) - } - - return r0 -} - -// MockPDU_GetLengthInBits_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetLengthInBits' -type MockPDU_GetLengthInBits_Call struct { - *mock.Call -} - -// GetLengthInBits is a helper method to define mock.On call -// - ctx context.Context -func (_e *MockPDU_Expecter) GetLengthInBits(ctx interface{}) *MockPDU_GetLengthInBits_Call { - return &MockPDU_GetLengthInBits_Call{Call: _e.mock.On("GetLengthInBits", ctx)} -} - -func (_c *MockPDU_GetLengthInBits_Call) Run(run func(ctx context.Context)) *MockPDU_GetLengthInBits_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context)) - }) - return _c -} - -func (_c *MockPDU_GetLengthInBits_Call) Return(_a0 uint16) *MockPDU_GetLengthInBits_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockPDU_GetLengthInBits_Call) RunAndReturn(run func(context.Context) uint16) *MockPDU_GetLengthInBits_Call { - _c.Call.Return(run) - return _c -} - -// GetLengthInBytes provides a mock function with given fields: ctx -func (_m *MockPDU) GetLengthInBytes(ctx context.Context) uint16 { - ret := _m.Called(ctx) - - if len(ret) == 0 { - panic("no return value specified for GetLengthInBytes") - } - - var r0 uint16 - if rf, ok := ret.Get(0).(func(context.Context) uint16); ok { - r0 = rf(ctx) - } else { - r0 = ret.Get(0).(uint16) - } - - return r0 -} - -// MockPDU_GetLengthInBytes_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetLengthInBytes' -type MockPDU_GetLengthInBytes_Call struct { - *mock.Call -} - -// GetLengthInBytes is a helper method to define mock.On call -// - ctx context.Context -func (_e *MockPDU_Expecter) GetLengthInBytes(ctx interface{}) *MockPDU_GetLengthInBytes_Call { - return &MockPDU_GetLengthInBytes_Call{Call: _e.mock.On("GetLengthInBytes", ctx)} -} - -func (_c *MockPDU_GetLengthInBytes_Call) Run(run func(ctx context.Context)) *MockPDU_GetLengthInBytes_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context)) - }) - return _c -} - -func (_c *MockPDU_GetLengthInBytes_Call) Return(_a0 uint16) *MockPDU_GetLengthInBytes_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockPDU_GetLengthInBytes_Call) RunAndReturn(run func(context.Context) uint16) *MockPDU_GetLengthInBytes_Call { - _c.Call.Return(run) - return _c -} - -// GetLong provides a mock function with given fields: -func (_m *MockPDU) GetLong() (int64, error) { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetLong") - } - - var r0 int64 - var r1 error - if rf, ok := ret.Get(0).(func() (int64, error)); ok { - return rf() - } - if rf, ok := ret.Get(0).(func() int64); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(int64) - } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockPDU_GetLong_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetLong' -type MockPDU_GetLong_Call struct { - *mock.Call -} - -// GetLong is a helper method to define mock.On call -func (_e *MockPDU_Expecter) GetLong() *MockPDU_GetLong_Call { - return &MockPDU_GetLong_Call{Call: _e.mock.On("GetLong")} -} - -func (_c *MockPDU_GetLong_Call) Run(run func()) *MockPDU_GetLong_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockPDU_GetLong_Call) Return(_a0 int64, _a1 error) *MockPDU_GetLong_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockPDU_GetLong_Call) RunAndReturn(run func() (int64, error)) *MockPDU_GetLong_Call { - _c.Call.Return(run) - return _c -} - -// GetNetworkPriority provides a mock function with given fields: -func (_m *MockPDU) GetNetworkPriority() model.NPDUNetworkPriority { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetNetworkPriority") - } - - var r0 model.NPDUNetworkPriority - if rf, ok := ret.Get(0).(func() model.NPDUNetworkPriority); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(model.NPDUNetworkPriority) - } - - return r0 -} - -// MockPDU_GetNetworkPriority_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetNetworkPriority' -type MockPDU_GetNetworkPriority_Call struct { - *mock.Call -} - -// GetNetworkPriority is a helper method to define mock.On call -func (_e *MockPDU_Expecter) GetNetworkPriority() *MockPDU_GetNetworkPriority_Call { - return &MockPDU_GetNetworkPriority_Call{Call: _e.mock.On("GetNetworkPriority")} -} - -func (_c *MockPDU_GetNetworkPriority_Call) Run(run func()) *MockPDU_GetNetworkPriority_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockPDU_GetNetworkPriority_Call) Return(_a0 model.NPDUNetworkPriority) *MockPDU_GetNetworkPriority_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockPDU_GetNetworkPriority_Call) RunAndReturn(run func() model.NPDUNetworkPriority) *MockPDU_GetNetworkPriority_Call { - _c.Call.Return(run) - return _c -} - -// GetPDUDestination provides a mock function with given fields: -func (_m *MockPDU) GetPDUDestination() *Address { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetPDUDestination") - } - - var r0 *Address - if rf, ok := ret.Get(0).(func() *Address); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*Address) - } - } - - return r0 -} - -// MockPDU_GetPDUDestination_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPDUDestination' -type MockPDU_GetPDUDestination_Call struct { - *mock.Call -} - -// GetPDUDestination is a helper method to define mock.On call -func (_e *MockPDU_Expecter) GetPDUDestination() *MockPDU_GetPDUDestination_Call { - return &MockPDU_GetPDUDestination_Call{Call: _e.mock.On("GetPDUDestination")} -} - -func (_c *MockPDU_GetPDUDestination_Call) Run(run func()) *MockPDU_GetPDUDestination_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockPDU_GetPDUDestination_Call) Return(_a0 *Address) *MockPDU_GetPDUDestination_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockPDU_GetPDUDestination_Call) RunAndReturn(run func() *Address) *MockPDU_GetPDUDestination_Call { - _c.Call.Return(run) - return _c -} - -// GetPDUSource provides a mock function with given fields: -func (_m *MockPDU) GetPDUSource() *Address { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetPDUSource") - } - - var r0 *Address - if rf, ok := ret.Get(0).(func() *Address); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*Address) - } - } - - return r0 -} - -// MockPDU_GetPDUSource_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPDUSource' -type MockPDU_GetPDUSource_Call struct { - *mock.Call -} - -// GetPDUSource is a helper method to define mock.On call -func (_e *MockPDU_Expecter) GetPDUSource() *MockPDU_GetPDUSource_Call { - return &MockPDU_GetPDUSource_Call{Call: _e.mock.On("GetPDUSource")} -} - -func (_c *MockPDU_GetPDUSource_Call) Run(run func()) *MockPDU_GetPDUSource_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockPDU_GetPDUSource_Call) Return(_a0 *Address) *MockPDU_GetPDUSource_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockPDU_GetPDUSource_Call) RunAndReturn(run func() *Address) *MockPDU_GetPDUSource_Call { - _c.Call.Return(run) - return _c -} - -// GetPDUUserData provides a mock function with given fields: -func (_m *MockPDU) GetPDUUserData() spi.Message { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetPDUUserData") - } - - var r0 spi.Message - if rf, ok := ret.Get(0).(func() spi.Message); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(spi.Message) - } - } - - return r0 -} - -// MockPDU_GetPDUUserData_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPDUUserData' -type MockPDU_GetPDUUserData_Call struct { - *mock.Call -} - -// GetPDUUserData is a helper method to define mock.On call -func (_e *MockPDU_Expecter) GetPDUUserData() *MockPDU_GetPDUUserData_Call { - return &MockPDU_GetPDUUserData_Call{Call: _e.mock.On("GetPDUUserData")} -} - -func (_c *MockPDU_GetPDUUserData_Call) Run(run func()) *MockPDU_GetPDUUserData_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockPDU_GetPDUUserData_Call) Return(_a0 spi.Message) *MockPDU_GetPDUUserData_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockPDU_GetPDUUserData_Call) RunAndReturn(run func() spi.Message) *MockPDU_GetPDUUserData_Call { - _c.Call.Return(run) - return _c -} - -// GetPduData provides a mock function with given fields: -func (_m *MockPDU) GetPduData() []byte { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetPduData") - } - - var r0 []byte - if rf, ok := ret.Get(0).(func() []byte); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]byte) - } - } - - return r0 -} - -// MockPDU_GetPduData_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPduData' -type MockPDU_GetPduData_Call struct { - *mock.Call -} - -// GetPduData is a helper method to define mock.On call -func (_e *MockPDU_Expecter) GetPduData() *MockPDU_GetPduData_Call { - return &MockPDU_GetPduData_Call{Call: _e.mock.On("GetPduData")} -} - -func (_c *MockPDU_GetPduData_Call) Run(run func()) *MockPDU_GetPduData_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockPDU_GetPduData_Call) Return(_a0 []byte) *MockPDU_GetPduData_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockPDU_GetPduData_Call) RunAndReturn(run func() []byte) *MockPDU_GetPduData_Call { - _c.Call.Return(run) - return _c -} - -// GetRootMessage provides a mock function with given fields: -func (_m *MockPDU) GetRootMessage() spi.Message { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetRootMessage") - } - - var r0 spi.Message - if rf, ok := ret.Get(0).(func() spi.Message); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(spi.Message) - } - } - - return r0 -} - -// MockPDU_GetRootMessage_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRootMessage' -type MockPDU_GetRootMessage_Call struct { - *mock.Call -} - -// GetRootMessage is a helper method to define mock.On call -func (_e *MockPDU_Expecter) GetRootMessage() *MockPDU_GetRootMessage_Call { - return &MockPDU_GetRootMessage_Call{Call: _e.mock.On("GetRootMessage")} -} - -func (_c *MockPDU_GetRootMessage_Call) Run(run func()) *MockPDU_GetRootMessage_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockPDU_GetRootMessage_Call) Return(_a0 spi.Message) *MockPDU_GetRootMessage_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockPDU_GetRootMessage_Call) RunAndReturn(run func() spi.Message) *MockPDU_GetRootMessage_Call { - _c.Call.Return(run) - return _c -} - -// GetShort provides a mock function with given fields: -func (_m *MockPDU) GetShort() (int16, error) { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetShort") - } - - var r0 int16 - var r1 error - if rf, ok := ret.Get(0).(func() (int16, error)); ok { - return rf() - } - if rf, ok := ret.Get(0).(func() int16); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(int16) - } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockPDU_GetShort_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetShort' -type MockPDU_GetShort_Call struct { - *mock.Call -} - -// GetShort is a helper method to define mock.On call -func (_e *MockPDU_Expecter) GetShort() *MockPDU_GetShort_Call { - return &MockPDU_GetShort_Call{Call: _e.mock.On("GetShort")} -} - -func (_c *MockPDU_GetShort_Call) Run(run func()) *MockPDU_GetShort_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockPDU_GetShort_Call) Return(_a0 int16, _a1 error) *MockPDU_GetShort_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockPDU_GetShort_Call) RunAndReturn(run func() (int16, error)) *MockPDU_GetShort_Call { - _c.Call.Return(run) - return _c -} - -// Put provides a mock function with given fields: _a0 -func (_m *MockPDU) Put(_a0 byte) { - _m.Called(_a0) -} - -// MockPDU_Put_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Put' -type MockPDU_Put_Call struct { - *mock.Call -} - -// Put is a helper method to define mock.On call -// - _a0 byte -func (_e *MockPDU_Expecter) Put(_a0 interface{}) *MockPDU_Put_Call { - return &MockPDU_Put_Call{Call: _e.mock.On("Put", _a0)} -} - -func (_c *MockPDU_Put_Call) Run(run func(_a0 byte)) *MockPDU_Put_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(byte)) - }) - return _c -} - -func (_c *MockPDU_Put_Call) Return() *MockPDU_Put_Call { - _c.Call.Return() - return _c -} - -func (_c *MockPDU_Put_Call) RunAndReturn(run func(byte)) *MockPDU_Put_Call { - _c.Call.Return(run) - return _c -} - -// PutData provides a mock function with given fields: _a0 -func (_m *MockPDU) PutData(_a0 ...byte) { - _va := make([]interface{}, len(_a0)) - for _i := range _a0 { - _va[_i] = _a0[_i] - } - var _ca []interface{} - _ca = append(_ca, _va...) - _m.Called(_ca...) -} - -// MockPDU_PutData_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PutData' -type MockPDU_PutData_Call struct { - *mock.Call -} - -// PutData is a helper method to define mock.On call -// - _a0 ...byte -func (_e *MockPDU_Expecter) PutData(_a0 ...interface{}) *MockPDU_PutData_Call { - return &MockPDU_PutData_Call{Call: _e.mock.On("PutData", - append([]interface{}{}, _a0...)...)} -} - -func (_c *MockPDU_PutData_Call) Run(run func(_a0 ...byte)) *MockPDU_PutData_Call { - _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]byte, len(args)-0) - for i, a := range args[0:] { - if a != nil { - variadicArgs[i] = a.(byte) - } - } - run(variadicArgs...) - }) - return _c -} - -func (_c *MockPDU_PutData_Call) Return() *MockPDU_PutData_Call { - _c.Call.Return() - return _c -} - -func (_c *MockPDU_PutData_Call) RunAndReturn(run func(...byte)) *MockPDU_PutData_Call { - _c.Call.Return(run) - return _c -} - -// PutLong provides a mock function with given fields: _a0 -func (_m *MockPDU) PutLong(_a0 uint32) { - _m.Called(_a0) -} - -// MockPDU_PutLong_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PutLong' -type MockPDU_PutLong_Call struct { - *mock.Call -} - -// PutLong is a helper method to define mock.On call -// - _a0 uint32 -func (_e *MockPDU_Expecter) PutLong(_a0 interface{}) *MockPDU_PutLong_Call { - return &MockPDU_PutLong_Call{Call: _e.mock.On("PutLong", _a0)} -} - -func (_c *MockPDU_PutLong_Call) Run(run func(_a0 uint32)) *MockPDU_PutLong_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(uint32)) - }) - return _c -} - -func (_c *MockPDU_PutLong_Call) Return() *MockPDU_PutLong_Call { - _c.Call.Return() - return _c -} - -func (_c *MockPDU_PutLong_Call) RunAndReturn(run func(uint32)) *MockPDU_PutLong_Call { - _c.Call.Return(run) - return _c -} - -// PutShort provides a mock function with given fields: _a0 -func (_m *MockPDU) PutShort(_a0 uint16) { - _m.Called(_a0) -} - -// MockPDU_PutShort_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PutShort' -type MockPDU_PutShort_Call struct { - *mock.Call -} - -// PutShort is a helper method to define mock.On call -// - _a0 uint16 -func (_e *MockPDU_Expecter) PutShort(_a0 interface{}) *MockPDU_PutShort_Call { - return &MockPDU_PutShort_Call{Call: _e.mock.On("PutShort", _a0)} -} - -func (_c *MockPDU_PutShort_Call) Run(run func(_a0 uint16)) *MockPDU_PutShort_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(uint16)) - }) - return _c -} - -func (_c *MockPDU_PutShort_Call) Return() *MockPDU_PutShort_Call { - _c.Call.Return() - return _c -} - -func (_c *MockPDU_PutShort_Call) RunAndReturn(run func(uint16)) *MockPDU_PutShort_Call { - _c.Call.Return(run) - return _c -} - -// Serialize provides a mock function with given fields: -func (_m *MockPDU) Serialize() ([]byte, error) { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Serialize") - } - - var r0 []byte - var r1 error - if rf, ok := ret.Get(0).(func() ([]byte, error)); ok { - return rf() - } - if rf, ok := ret.Get(0).(func() []byte); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]byte) - } - } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockPDU_Serialize_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Serialize' -type MockPDU_Serialize_Call struct { - *mock.Call -} - -// Serialize is a helper method to define mock.On call -func (_e *MockPDU_Expecter) Serialize() *MockPDU_Serialize_Call { - return &MockPDU_Serialize_Call{Call: _e.mock.On("Serialize")} -} - -func (_c *MockPDU_Serialize_Call) Run(run func()) *MockPDU_Serialize_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockPDU_Serialize_Call) Return(_a0 []byte, _a1 error) *MockPDU_Serialize_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockPDU_Serialize_Call) RunAndReturn(run func() ([]byte, error)) *MockPDU_Serialize_Call { - _c.Call.Return(run) - return _c -} - -// SerializeWithWriteBuffer provides a mock function with given fields: ctx, writeBuffer -func (_m *MockPDU) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { - ret := _m.Called(ctx, writeBuffer) - - if len(ret) == 0 { - panic("no return value specified for SerializeWithWriteBuffer") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, utils.WriteBuffer) error); ok { - r0 = rf(ctx, writeBuffer) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockPDU_SerializeWithWriteBuffer_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SerializeWithWriteBuffer' -type MockPDU_SerializeWithWriteBuffer_Call struct { - *mock.Call -} - -// SerializeWithWriteBuffer is a helper method to define mock.On call -// - ctx context.Context -// - writeBuffer utils.WriteBuffer -func (_e *MockPDU_Expecter) SerializeWithWriteBuffer(ctx interface{}, writeBuffer interface{}) *MockPDU_SerializeWithWriteBuffer_Call { - return &MockPDU_SerializeWithWriteBuffer_Call{Call: _e.mock.On("SerializeWithWriteBuffer", ctx, writeBuffer)} -} - -func (_c *MockPDU_SerializeWithWriteBuffer_Call) Run(run func(ctx context.Context, writeBuffer utils.WriteBuffer)) *MockPDU_SerializeWithWriteBuffer_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(utils.WriteBuffer)) - }) - return _c -} - -func (_c *MockPDU_SerializeWithWriteBuffer_Call) Return(_a0 error) *MockPDU_SerializeWithWriteBuffer_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockPDU_SerializeWithWriteBuffer_Call) RunAndReturn(run func(context.Context, utils.WriteBuffer) error) *MockPDU_SerializeWithWriteBuffer_Call { - _c.Call.Return(run) - return _c -} - -// SetExpectingReply provides a mock function with given fields: _a0 -func (_m *MockPDU) SetExpectingReply(_a0 bool) { - _m.Called(_a0) -} - -// MockPDU_SetExpectingReply_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetExpectingReply' -type MockPDU_SetExpectingReply_Call struct { - *mock.Call -} - -// SetExpectingReply is a helper method to define mock.On call -// - _a0 bool -func (_e *MockPDU_Expecter) SetExpectingReply(_a0 interface{}) *MockPDU_SetExpectingReply_Call { - return &MockPDU_SetExpectingReply_Call{Call: _e.mock.On("SetExpectingReply", _a0)} -} - -func (_c *MockPDU_SetExpectingReply_Call) Run(run func(_a0 bool)) *MockPDU_SetExpectingReply_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(bool)) - }) - return _c -} - -func (_c *MockPDU_SetExpectingReply_Call) Return() *MockPDU_SetExpectingReply_Call { - _c.Call.Return() - return _c -} - -func (_c *MockPDU_SetExpectingReply_Call) RunAndReturn(run func(bool)) *MockPDU_SetExpectingReply_Call { - _c.Call.Return(run) - return _c -} - -// SetNetworkPriority provides a mock function with given fields: _a0 -func (_m *MockPDU) SetNetworkPriority(_a0 model.NPDUNetworkPriority) { - _m.Called(_a0) -} - -// MockPDU_SetNetworkPriority_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetNetworkPriority' -type MockPDU_SetNetworkPriority_Call struct { - *mock.Call -} - -// SetNetworkPriority is a helper method to define mock.On call -// - _a0 model.NPDUNetworkPriority -func (_e *MockPDU_Expecter) SetNetworkPriority(_a0 interface{}) *MockPDU_SetNetworkPriority_Call { - return &MockPDU_SetNetworkPriority_Call{Call: _e.mock.On("SetNetworkPriority", _a0)} -} - -func (_c *MockPDU_SetNetworkPriority_Call) Run(run func(_a0 model.NPDUNetworkPriority)) *MockPDU_SetNetworkPriority_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(model.NPDUNetworkPriority)) - }) - return _c -} - -func (_c *MockPDU_SetNetworkPriority_Call) Return() *MockPDU_SetNetworkPriority_Call { - _c.Call.Return() - return _c -} - -func (_c *MockPDU_SetNetworkPriority_Call) RunAndReturn(run func(model.NPDUNetworkPriority)) *MockPDU_SetNetworkPriority_Call { - _c.Call.Return(run) - return _c -} - -// SetPDUDestination provides a mock function with given fields: _a0 -func (_m *MockPDU) SetPDUDestination(_a0 *Address) { - _m.Called(_a0) -} - -// MockPDU_SetPDUDestination_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetPDUDestination' -type MockPDU_SetPDUDestination_Call struct { - *mock.Call -} - -// SetPDUDestination is a helper method to define mock.On call -// - _a0 *Address -func (_e *MockPDU_Expecter) SetPDUDestination(_a0 interface{}) *MockPDU_SetPDUDestination_Call { - return &MockPDU_SetPDUDestination_Call{Call: _e.mock.On("SetPDUDestination", _a0)} -} - -func (_c *MockPDU_SetPDUDestination_Call) Run(run func(_a0 *Address)) *MockPDU_SetPDUDestination_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(*Address)) - }) - return _c -} - -func (_c *MockPDU_SetPDUDestination_Call) Return() *MockPDU_SetPDUDestination_Call { - _c.Call.Return() - return _c -} - -func (_c *MockPDU_SetPDUDestination_Call) RunAndReturn(run func(*Address)) *MockPDU_SetPDUDestination_Call { - _c.Call.Return(run) - return _c -} - -// SetPDUSource provides a mock function with given fields: source -func (_m *MockPDU) SetPDUSource(source *Address) { - _m.Called(source) -} - -// MockPDU_SetPDUSource_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetPDUSource' -type MockPDU_SetPDUSource_Call struct { - *mock.Call -} - -// SetPDUSource is a helper method to define mock.On call -// - source *Address -func (_e *MockPDU_Expecter) SetPDUSource(source interface{}) *MockPDU_SetPDUSource_Call { - return &MockPDU_SetPDUSource_Call{Call: _e.mock.On("SetPDUSource", source)} -} - -func (_c *MockPDU_SetPDUSource_Call) Run(run func(source *Address)) *MockPDU_SetPDUSource_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(*Address)) - }) - return _c -} - -func (_c *MockPDU_SetPDUSource_Call) Return() *MockPDU_SetPDUSource_Call { - _c.Call.Return() - return _c -} - -func (_c *MockPDU_SetPDUSource_Call) RunAndReturn(run func(*Address)) *MockPDU_SetPDUSource_Call { - _c.Call.Return(run) - return _c -} - -// SetPDUUserData provides a mock function with given fields: _a0 -func (_m *MockPDU) SetPDUUserData(_a0 spi.Message) { - _m.Called(_a0) -} - -// MockPDU_SetPDUUserData_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetPDUUserData' -type MockPDU_SetPDUUserData_Call struct { - *mock.Call -} - -// SetPDUUserData is a helper method to define mock.On call -// - _a0 spi.Message -func (_e *MockPDU_Expecter) SetPDUUserData(_a0 interface{}) *MockPDU_SetPDUUserData_Call { - return &MockPDU_SetPDUUserData_Call{Call: _e.mock.On("SetPDUUserData", _a0)} -} - -func (_c *MockPDU_SetPDUUserData_Call) Run(run func(_a0 spi.Message)) *MockPDU_SetPDUUserData_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(spi.Message)) - }) - return _c -} - -func (_c *MockPDU_SetPDUUserData_Call) Return() *MockPDU_SetPDUUserData_Call { - _c.Call.Return() - return _c -} - -func (_c *MockPDU_SetPDUUserData_Call) RunAndReturn(run func(spi.Message)) *MockPDU_SetPDUUserData_Call { - _c.Call.Return(run) - return _c -} - -// SetPduData provides a mock function with given fields: _a0 -func (_m *MockPDU) SetPduData(_a0 []byte) { - _m.Called(_a0) -} - -// MockPDU_SetPduData_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetPduData' -type MockPDU_SetPduData_Call struct { - *mock.Call -} - -// SetPduData is a helper method to define mock.On call -// - _a0 []byte -func (_e *MockPDU_Expecter) SetPduData(_a0 interface{}) *MockPDU_SetPduData_Call { - return &MockPDU_SetPduData_Call{Call: _e.mock.On("SetPduData", _a0)} -} - -func (_c *MockPDU_SetPduData_Call) Run(run func(_a0 []byte)) *MockPDU_SetPduData_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].([]byte)) - }) - return _c -} - -func (_c *MockPDU_SetPduData_Call) Return() *MockPDU_SetPduData_Call { - _c.Call.Return() - return _c -} - -func (_c *MockPDU_SetPduData_Call) RunAndReturn(run func([]byte)) *MockPDU_SetPduData_Call { - _c.Call.Return(run) - return _c -} - -// String provides a mock function with given fields: -func (_m *MockPDU) String() string { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for String") - } - - var r0 string - if rf, ok := ret.Get(0).(func() string); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(string) - } - - return r0 -} - -// MockPDU_String_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'String' -type MockPDU_String_Call struct { - *mock.Call -} - -// String is a helper method to define mock.On call -func (_e *MockPDU_Expecter) String() *MockPDU_String_Call { - return &MockPDU_String_Call{Call: _e.mock.On("String")} -} - -func (_c *MockPDU_String_Call) Run(run func()) *MockPDU_String_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockPDU_String_Call) Return(_a0 string) *MockPDU_String_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockPDU_String_Call) RunAndReturn(run func() string) *MockPDU_String_Call { - _c.Call.Return(run) - return _c -} - -// Update provides a mock function with given fields: pci -func (_m *MockPDU) Update(pci Arg) error { - ret := _m.Called(pci) - - if len(ret) == 0 { - panic("no return value specified for Update") - } - - var r0 error - if rf, ok := ret.Get(0).(func(Arg) error); ok { - r0 = rf(pci) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockPDU_Update_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Update' -type MockPDU_Update_Call struct { - *mock.Call -} - -// Update is a helper method to define mock.On call -// - pci Arg -func (_e *MockPDU_Expecter) Update(pci interface{}) *MockPDU_Update_Call { - return &MockPDU_Update_Call{Call: _e.mock.On("Update", pci)} -} - -func (_c *MockPDU_Update_Call) Run(run func(pci Arg)) *MockPDU_Update_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(Arg)) - }) - return _c -} - -func (_c *MockPDU_Update_Call) Return(_a0 error) *MockPDU_Update_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockPDU_Update_Call) RunAndReturn(run func(Arg) error) *MockPDU_Update_Call { - _c.Call.Return(run) - return _c -} - -// NewMockPDU creates a new instance of MockPDU. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewMockPDU(t interface { - mock.TestingT - Cleanup(func()) -}) *MockPDU { - mock := &MockPDU{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/plc4go/internal/bacnetip/mock_RecurringTaskRequirements_test.go b/plc4go/internal/bacnetip/mock_RecurringTaskRequirements_test.go deleted file mode 100644 index 01a8a6046eb..00000000000 --- a/plc4go/internal/bacnetip/mock_RecurringTaskRequirements_test.go +++ /dev/null @@ -1,96 +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 - * - * https://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. - */ - -// Code generated by mockery v2.42.2. DO NOT EDIT. - -package bacnetip - -import mock "github.com/stretchr/testify/mock" - -// MockRecurringTaskRequirements is an autogenerated mock type for the RecurringTaskRequirements type -type MockRecurringTaskRequirements struct { - mock.Mock -} - -type MockRecurringTaskRequirements_Expecter struct { - mock *mock.Mock -} - -func (_m *MockRecurringTaskRequirements) EXPECT() *MockRecurringTaskRequirements_Expecter { - return &MockRecurringTaskRequirements_Expecter{mock: &_m.Mock} -} - -// ProcessTask provides a mock function with given fields: -func (_m *MockRecurringTaskRequirements) ProcessTask() error { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for ProcessTask") - } - - var r0 error - if rf, ok := ret.Get(0).(func() error); ok { - r0 = rf() - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockRecurringTaskRequirements_ProcessTask_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ProcessTask' -type MockRecurringTaskRequirements_ProcessTask_Call struct { - *mock.Call -} - -// ProcessTask is a helper method to define mock.On call -func (_e *MockRecurringTaskRequirements_Expecter) ProcessTask() *MockRecurringTaskRequirements_ProcessTask_Call { - return &MockRecurringTaskRequirements_ProcessTask_Call{Call: _e.mock.On("ProcessTask")} -} - -func (_c *MockRecurringTaskRequirements_ProcessTask_Call) Run(run func()) *MockRecurringTaskRequirements_ProcessTask_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockRecurringTaskRequirements_ProcessTask_Call) Return(_a0 error) *MockRecurringTaskRequirements_ProcessTask_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockRecurringTaskRequirements_ProcessTask_Call) RunAndReturn(run func() error) *MockRecurringTaskRequirements_ProcessTask_Call { - _c.Call.Return(run) - return _c -} - -// NewMockRecurringTaskRequirements creates a new instance of MockRecurringTaskRequirements. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewMockRecurringTaskRequirements(t interface { - mock.TestingT - Cleanup(func()) -}) *MockRecurringTaskRequirements { - mock := &MockRecurringTaskRequirements{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/plc4go/internal/bacnetip/mock_SSMProcessingRequirements_test.go b/plc4go/internal/bacnetip/mock_SSMProcessingRequirements_test.go deleted file mode 100644 index 0cf9ed30ffc..00000000000 --- a/plc4go/internal/bacnetip/mock_SSMProcessingRequirements_test.go +++ /dev/null @@ -1,96 +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 - * - * https://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. - */ - -// Code generated by mockery v2.42.2. DO NOT EDIT. - -package bacnetip - -import mock "github.com/stretchr/testify/mock" - -// MockSSMProcessingRequirements is an autogenerated mock type for the SSMProcessingRequirements type -type MockSSMProcessingRequirements struct { - mock.Mock -} - -type MockSSMProcessingRequirements_Expecter struct { - mock *mock.Mock -} - -func (_m *MockSSMProcessingRequirements) EXPECT() *MockSSMProcessingRequirements_Expecter { - return &MockSSMProcessingRequirements_Expecter{mock: &_m.Mock} -} - -// processTask provides a mock function with given fields: -func (_m *MockSSMProcessingRequirements) processTask() error { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for processTask") - } - - var r0 error - if rf, ok := ret.Get(0).(func() error); ok { - r0 = rf() - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockSSMProcessingRequirements_processTask_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'processTask' -type MockSSMProcessingRequirements_processTask_Call struct { - *mock.Call -} - -// processTask is a helper method to define mock.On call -func (_e *MockSSMProcessingRequirements_Expecter) processTask() *MockSSMProcessingRequirements_processTask_Call { - return &MockSSMProcessingRequirements_processTask_Call{Call: _e.mock.On("processTask")} -} - -func (_c *MockSSMProcessingRequirements_processTask_Call) Run(run func()) *MockSSMProcessingRequirements_processTask_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockSSMProcessingRequirements_processTask_Call) Return(_a0 error) *MockSSMProcessingRequirements_processTask_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockSSMProcessingRequirements_processTask_Call) RunAndReturn(run func() error) *MockSSMProcessingRequirements_processTask_Call { - _c.Call.Return(run) - return _c -} - -// NewMockSSMProcessingRequirements creates a new instance of MockSSMProcessingRequirements. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewMockSSMProcessingRequirements(t interface { - mock.TestingT - Cleanup(func()) -}) *MockSSMProcessingRequirements { - mock := &MockSSMProcessingRequirements{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/plc4go/internal/bacnetip/mock_SSMSAPRequirements_test.go b/plc4go/internal/bacnetip/mock_SSMSAPRequirements_test.go deleted file mode 100644 index 5b929ade6e2..00000000000 --- a/plc4go/internal/bacnetip/mock_SSMSAPRequirements_test.go +++ /dev/null @@ -1,1063 +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 - * - * https://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. - */ - -// Code generated by mockery v2.42.2. DO NOT EDIT. - -package bacnetip - -import ( - model "github.com/apache/plc4x/plc4go/protocols/bacnetip/readwrite/model" - mock "github.com/stretchr/testify/mock" -) - -// MockSSMSAPRequirements is an autogenerated mock type for the SSMSAPRequirements type -type MockSSMSAPRequirements struct { - mock.Mock -} - -type MockSSMSAPRequirements_Expecter struct { - mock *mock.Mock -} - -func (_m *MockSSMSAPRequirements) EXPECT() *MockSSMSAPRequirements_Expecter { - return &MockSSMSAPRequirements_Expecter{mock: &_m.Mock} -} - -// Confirmation provides a mock function with given fields: args, kwargs -func (_m *MockSSMSAPRequirements) Confirmation(args Args, kwargs KWArgs) error { - ret := _m.Called(args, kwargs) - - if len(ret) == 0 { - panic("no return value specified for Confirmation") - } - - var r0 error - if rf, ok := ret.Get(0).(func(Args, KWArgs) error); ok { - r0 = rf(args, kwargs) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockSSMSAPRequirements_Confirmation_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Confirmation' -type MockSSMSAPRequirements_Confirmation_Call struct { - *mock.Call -} - -// Confirmation is a helper method to define mock.On call -// - args Args -// - kwargs KWArgs -func (_e *MockSSMSAPRequirements_Expecter) Confirmation(args interface{}, kwargs interface{}) *MockSSMSAPRequirements_Confirmation_Call { - return &MockSSMSAPRequirements_Confirmation_Call{Call: _e.mock.On("Confirmation", args, kwargs)} -} - -func (_c *MockSSMSAPRequirements_Confirmation_Call) Run(run func(args Args, kwargs KWArgs)) *MockSSMSAPRequirements_Confirmation_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(Args), args[1].(KWArgs)) - }) - return _c -} - -func (_c *MockSSMSAPRequirements_Confirmation_Call) Return(_a0 error) *MockSSMSAPRequirements_Confirmation_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockSSMSAPRequirements_Confirmation_Call) RunAndReturn(run func(Args, KWArgs) error) *MockSSMSAPRequirements_Confirmation_Call { - _c.Call.Return(run) - return _c -} - -// GetApplicationTimeout provides a mock function with given fields: -func (_m *MockSSMSAPRequirements) GetApplicationTimeout() uint { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetApplicationTimeout") - } - - var r0 uint - if rf, ok := ret.Get(0).(func() uint); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(uint) - } - - return r0 -} - -// MockSSMSAPRequirements_GetApplicationTimeout_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetApplicationTimeout' -type MockSSMSAPRequirements_GetApplicationTimeout_Call struct { - *mock.Call -} - -// GetApplicationTimeout is a helper method to define mock.On call -func (_e *MockSSMSAPRequirements_Expecter) GetApplicationTimeout() *MockSSMSAPRequirements_GetApplicationTimeout_Call { - return &MockSSMSAPRequirements_GetApplicationTimeout_Call{Call: _e.mock.On("GetApplicationTimeout")} -} - -func (_c *MockSSMSAPRequirements_GetApplicationTimeout_Call) Run(run func()) *MockSSMSAPRequirements_GetApplicationTimeout_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockSSMSAPRequirements_GetApplicationTimeout_Call) Return(_a0 uint) *MockSSMSAPRequirements_GetApplicationTimeout_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockSSMSAPRequirements_GetApplicationTimeout_Call) RunAndReturn(run func() uint) *MockSSMSAPRequirements_GetApplicationTimeout_Call { - _c.Call.Return(run) - return _c -} - -// GetClientTransactions provides a mock function with given fields: -func (_m *MockSSMSAPRequirements) GetClientTransactions() []*ClientSSM { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetClientTransactions") - } - - var r0 []*ClientSSM - if rf, ok := ret.Get(0).(func() []*ClientSSM); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]*ClientSSM) - } - } - - return r0 -} - -// MockSSMSAPRequirements_GetClientTransactions_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetClientTransactions' -type MockSSMSAPRequirements_GetClientTransactions_Call struct { - *mock.Call -} - -// GetClientTransactions is a helper method to define mock.On call -func (_e *MockSSMSAPRequirements_Expecter) GetClientTransactions() *MockSSMSAPRequirements_GetClientTransactions_Call { - return &MockSSMSAPRequirements_GetClientTransactions_Call{Call: _e.mock.On("GetClientTransactions")} -} - -func (_c *MockSSMSAPRequirements_GetClientTransactions_Call) Run(run func()) *MockSSMSAPRequirements_GetClientTransactions_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockSSMSAPRequirements_GetClientTransactions_Call) Return(_a0 []*ClientSSM) *MockSSMSAPRequirements_GetClientTransactions_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockSSMSAPRequirements_GetClientTransactions_Call) RunAndReturn(run func() []*ClientSSM) *MockSSMSAPRequirements_GetClientTransactions_Call { - _c.Call.Return(run) - return _c -} - -// GetDefaultAPDUSegmentTimeout provides a mock function with given fields: -func (_m *MockSSMSAPRequirements) GetDefaultAPDUSegmentTimeout() uint { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetDefaultAPDUSegmentTimeout") - } - - var r0 uint - if rf, ok := ret.Get(0).(func() uint); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(uint) - } - - return r0 -} - -// MockSSMSAPRequirements_GetDefaultAPDUSegmentTimeout_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetDefaultAPDUSegmentTimeout' -type MockSSMSAPRequirements_GetDefaultAPDUSegmentTimeout_Call struct { - *mock.Call -} - -// GetDefaultAPDUSegmentTimeout is a helper method to define mock.On call -func (_e *MockSSMSAPRequirements_Expecter) GetDefaultAPDUSegmentTimeout() *MockSSMSAPRequirements_GetDefaultAPDUSegmentTimeout_Call { - return &MockSSMSAPRequirements_GetDefaultAPDUSegmentTimeout_Call{Call: _e.mock.On("GetDefaultAPDUSegmentTimeout")} -} - -func (_c *MockSSMSAPRequirements_GetDefaultAPDUSegmentTimeout_Call) Run(run func()) *MockSSMSAPRequirements_GetDefaultAPDUSegmentTimeout_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockSSMSAPRequirements_GetDefaultAPDUSegmentTimeout_Call) Return(_a0 uint) *MockSSMSAPRequirements_GetDefaultAPDUSegmentTimeout_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockSSMSAPRequirements_GetDefaultAPDUSegmentTimeout_Call) RunAndReturn(run func() uint) *MockSSMSAPRequirements_GetDefaultAPDUSegmentTimeout_Call { - _c.Call.Return(run) - return _c -} - -// GetDefaultAPDUTimeout provides a mock function with given fields: -func (_m *MockSSMSAPRequirements) GetDefaultAPDUTimeout() uint { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetDefaultAPDUTimeout") - } - - var r0 uint - if rf, ok := ret.Get(0).(func() uint); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(uint) - } - - return r0 -} - -// MockSSMSAPRequirements_GetDefaultAPDUTimeout_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetDefaultAPDUTimeout' -type MockSSMSAPRequirements_GetDefaultAPDUTimeout_Call struct { - *mock.Call -} - -// GetDefaultAPDUTimeout is a helper method to define mock.On call -func (_e *MockSSMSAPRequirements_Expecter) GetDefaultAPDUTimeout() *MockSSMSAPRequirements_GetDefaultAPDUTimeout_Call { - return &MockSSMSAPRequirements_GetDefaultAPDUTimeout_Call{Call: _e.mock.On("GetDefaultAPDUTimeout")} -} - -func (_c *MockSSMSAPRequirements_GetDefaultAPDUTimeout_Call) Run(run func()) *MockSSMSAPRequirements_GetDefaultAPDUTimeout_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockSSMSAPRequirements_GetDefaultAPDUTimeout_Call) Return(_a0 uint) *MockSSMSAPRequirements_GetDefaultAPDUTimeout_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockSSMSAPRequirements_GetDefaultAPDUTimeout_Call) RunAndReturn(run func() uint) *MockSSMSAPRequirements_GetDefaultAPDUTimeout_Call { - _c.Call.Return(run) - return _c -} - -// GetDefaultMaxSegmentsAccepted provides a mock function with given fields: -func (_m *MockSSMSAPRequirements) GetDefaultMaxSegmentsAccepted() model.MaxSegmentsAccepted { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetDefaultMaxSegmentsAccepted") - } - - var r0 model.MaxSegmentsAccepted - if rf, ok := ret.Get(0).(func() model.MaxSegmentsAccepted); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(model.MaxSegmentsAccepted) - } - - return r0 -} - -// MockSSMSAPRequirements_GetDefaultMaxSegmentsAccepted_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetDefaultMaxSegmentsAccepted' -type MockSSMSAPRequirements_GetDefaultMaxSegmentsAccepted_Call struct { - *mock.Call -} - -// GetDefaultMaxSegmentsAccepted is a helper method to define mock.On call -func (_e *MockSSMSAPRequirements_Expecter) GetDefaultMaxSegmentsAccepted() *MockSSMSAPRequirements_GetDefaultMaxSegmentsAccepted_Call { - return &MockSSMSAPRequirements_GetDefaultMaxSegmentsAccepted_Call{Call: _e.mock.On("GetDefaultMaxSegmentsAccepted")} -} - -func (_c *MockSSMSAPRequirements_GetDefaultMaxSegmentsAccepted_Call) Run(run func()) *MockSSMSAPRequirements_GetDefaultMaxSegmentsAccepted_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockSSMSAPRequirements_GetDefaultMaxSegmentsAccepted_Call) Return(_a0 model.MaxSegmentsAccepted) *MockSSMSAPRequirements_GetDefaultMaxSegmentsAccepted_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockSSMSAPRequirements_GetDefaultMaxSegmentsAccepted_Call) RunAndReturn(run func() model.MaxSegmentsAccepted) *MockSSMSAPRequirements_GetDefaultMaxSegmentsAccepted_Call { - _c.Call.Return(run) - return _c -} - -// GetDefaultMaximumApduLengthAccepted provides a mock function with given fields: -func (_m *MockSSMSAPRequirements) GetDefaultMaximumApduLengthAccepted() model.MaxApduLengthAccepted { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetDefaultMaximumApduLengthAccepted") - } - - var r0 model.MaxApduLengthAccepted - if rf, ok := ret.Get(0).(func() model.MaxApduLengthAccepted); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(model.MaxApduLengthAccepted) - } - - return r0 -} - -// MockSSMSAPRequirements_GetDefaultMaximumApduLengthAccepted_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetDefaultMaximumApduLengthAccepted' -type MockSSMSAPRequirements_GetDefaultMaximumApduLengthAccepted_Call struct { - *mock.Call -} - -// GetDefaultMaximumApduLengthAccepted is a helper method to define mock.On call -func (_e *MockSSMSAPRequirements_Expecter) GetDefaultMaximumApduLengthAccepted() *MockSSMSAPRequirements_GetDefaultMaximumApduLengthAccepted_Call { - return &MockSSMSAPRequirements_GetDefaultMaximumApduLengthAccepted_Call{Call: _e.mock.On("GetDefaultMaximumApduLengthAccepted")} -} - -func (_c *MockSSMSAPRequirements_GetDefaultMaximumApduLengthAccepted_Call) Run(run func()) *MockSSMSAPRequirements_GetDefaultMaximumApduLengthAccepted_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockSSMSAPRequirements_GetDefaultMaximumApduLengthAccepted_Call) Return(_a0 model.MaxApduLengthAccepted) *MockSSMSAPRequirements_GetDefaultMaximumApduLengthAccepted_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockSSMSAPRequirements_GetDefaultMaximumApduLengthAccepted_Call) RunAndReturn(run func() model.MaxApduLengthAccepted) *MockSSMSAPRequirements_GetDefaultMaximumApduLengthAccepted_Call { - _c.Call.Return(run) - return _c -} - -// GetDefaultSegmentationSupported provides a mock function with given fields: -func (_m *MockSSMSAPRequirements) GetDefaultSegmentationSupported() model.BACnetSegmentation { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetDefaultSegmentationSupported") - } - - var r0 model.BACnetSegmentation - if rf, ok := ret.Get(0).(func() model.BACnetSegmentation); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(model.BACnetSegmentation) - } - - return r0 -} - -// MockSSMSAPRequirements_GetDefaultSegmentationSupported_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetDefaultSegmentationSupported' -type MockSSMSAPRequirements_GetDefaultSegmentationSupported_Call struct { - *mock.Call -} - -// GetDefaultSegmentationSupported is a helper method to define mock.On call -func (_e *MockSSMSAPRequirements_Expecter) GetDefaultSegmentationSupported() *MockSSMSAPRequirements_GetDefaultSegmentationSupported_Call { - return &MockSSMSAPRequirements_GetDefaultSegmentationSupported_Call{Call: _e.mock.On("GetDefaultSegmentationSupported")} -} - -func (_c *MockSSMSAPRequirements_GetDefaultSegmentationSupported_Call) Run(run func()) *MockSSMSAPRequirements_GetDefaultSegmentationSupported_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockSSMSAPRequirements_GetDefaultSegmentationSupported_Call) Return(_a0 model.BACnetSegmentation) *MockSSMSAPRequirements_GetDefaultSegmentationSupported_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockSSMSAPRequirements_GetDefaultSegmentationSupported_Call) RunAndReturn(run func() model.BACnetSegmentation) *MockSSMSAPRequirements_GetDefaultSegmentationSupported_Call { - _c.Call.Return(run) - return _c -} - -// GetDeviceInfoCache provides a mock function with given fields: -func (_m *MockSSMSAPRequirements) GetDeviceInfoCache() *DeviceInfoCache { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetDeviceInfoCache") - } - - var r0 *DeviceInfoCache - if rf, ok := ret.Get(0).(func() *DeviceInfoCache); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*DeviceInfoCache) - } - } - - return r0 -} - -// MockSSMSAPRequirements_GetDeviceInfoCache_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetDeviceInfoCache' -type MockSSMSAPRequirements_GetDeviceInfoCache_Call struct { - *mock.Call -} - -// GetDeviceInfoCache is a helper method to define mock.On call -func (_e *MockSSMSAPRequirements_Expecter) GetDeviceInfoCache() *MockSSMSAPRequirements_GetDeviceInfoCache_Call { - return &MockSSMSAPRequirements_GetDeviceInfoCache_Call{Call: _e.mock.On("GetDeviceInfoCache")} -} - -func (_c *MockSSMSAPRequirements_GetDeviceInfoCache_Call) Run(run func()) *MockSSMSAPRequirements_GetDeviceInfoCache_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockSSMSAPRequirements_GetDeviceInfoCache_Call) Return(_a0 *DeviceInfoCache) *MockSSMSAPRequirements_GetDeviceInfoCache_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockSSMSAPRequirements_GetDeviceInfoCache_Call) RunAndReturn(run func() *DeviceInfoCache) *MockSSMSAPRequirements_GetDeviceInfoCache_Call { - _c.Call.Return(run) - return _c -} - -// GetLocalDevice provides a mock function with given fields: -func (_m *MockSSMSAPRequirements) GetLocalDevice() *LocalDeviceObject { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetLocalDevice") - } - - var r0 *LocalDeviceObject - if rf, ok := ret.Get(0).(func() *LocalDeviceObject); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*LocalDeviceObject) - } - } - - return r0 -} - -// MockSSMSAPRequirements_GetLocalDevice_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetLocalDevice' -type MockSSMSAPRequirements_GetLocalDevice_Call struct { - *mock.Call -} - -// GetLocalDevice is a helper method to define mock.On call -func (_e *MockSSMSAPRequirements_Expecter) GetLocalDevice() *MockSSMSAPRequirements_GetLocalDevice_Call { - return &MockSSMSAPRequirements_GetLocalDevice_Call{Call: _e.mock.On("GetLocalDevice")} -} - -func (_c *MockSSMSAPRequirements_GetLocalDevice_Call) Run(run func()) *MockSSMSAPRequirements_GetLocalDevice_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockSSMSAPRequirements_GetLocalDevice_Call) Return(_a0 *LocalDeviceObject) *MockSSMSAPRequirements_GetLocalDevice_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockSSMSAPRequirements_GetLocalDevice_Call) RunAndReturn(run func() *LocalDeviceObject) *MockSSMSAPRequirements_GetLocalDevice_Call { - _c.Call.Return(run) - return _c -} - -// GetProposedWindowSize provides a mock function with given fields: -func (_m *MockSSMSAPRequirements) GetProposedWindowSize() uint8 { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetProposedWindowSize") - } - - var r0 uint8 - if rf, ok := ret.Get(0).(func() uint8); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(uint8) - } - - return r0 -} - -// MockSSMSAPRequirements_GetProposedWindowSize_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetProposedWindowSize' -type MockSSMSAPRequirements_GetProposedWindowSize_Call struct { - *mock.Call -} - -// GetProposedWindowSize is a helper method to define mock.On call -func (_e *MockSSMSAPRequirements_Expecter) GetProposedWindowSize() *MockSSMSAPRequirements_GetProposedWindowSize_Call { - return &MockSSMSAPRequirements_GetProposedWindowSize_Call{Call: _e.mock.On("GetProposedWindowSize")} -} - -func (_c *MockSSMSAPRequirements_GetProposedWindowSize_Call) Run(run func()) *MockSSMSAPRequirements_GetProposedWindowSize_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockSSMSAPRequirements_GetProposedWindowSize_Call) Return(_a0 uint8) *MockSSMSAPRequirements_GetProposedWindowSize_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockSSMSAPRequirements_GetProposedWindowSize_Call) RunAndReturn(run func() uint8) *MockSSMSAPRequirements_GetProposedWindowSize_Call { - _c.Call.Return(run) - return _c -} - -// GetServerTransactions provides a mock function with given fields: -func (_m *MockSSMSAPRequirements) GetServerTransactions() []*ServerSSM { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetServerTransactions") - } - - var r0 []*ServerSSM - if rf, ok := ret.Get(0).(func() []*ServerSSM); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]*ServerSSM) - } - } - - return r0 -} - -// MockSSMSAPRequirements_GetServerTransactions_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetServerTransactions' -type MockSSMSAPRequirements_GetServerTransactions_Call struct { - *mock.Call -} - -// GetServerTransactions is a helper method to define mock.On call -func (_e *MockSSMSAPRequirements_Expecter) GetServerTransactions() *MockSSMSAPRequirements_GetServerTransactions_Call { - return &MockSSMSAPRequirements_GetServerTransactions_Call{Call: _e.mock.On("GetServerTransactions")} -} - -func (_c *MockSSMSAPRequirements_GetServerTransactions_Call) Run(run func()) *MockSSMSAPRequirements_GetServerTransactions_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockSSMSAPRequirements_GetServerTransactions_Call) Return(_a0 []*ServerSSM) *MockSSMSAPRequirements_GetServerTransactions_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockSSMSAPRequirements_GetServerTransactions_Call) RunAndReturn(run func() []*ServerSSM) *MockSSMSAPRequirements_GetServerTransactions_Call { - _c.Call.Return(run) - return _c -} - -// RemoveClientTransaction provides a mock function with given fields: _a0 -func (_m *MockSSMSAPRequirements) RemoveClientTransaction(_a0 *ClientSSM) { - _m.Called(_a0) -} - -// MockSSMSAPRequirements_RemoveClientTransaction_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemoveClientTransaction' -type MockSSMSAPRequirements_RemoveClientTransaction_Call struct { - *mock.Call -} - -// RemoveClientTransaction is a helper method to define mock.On call -// - _a0 *ClientSSM -func (_e *MockSSMSAPRequirements_Expecter) RemoveClientTransaction(_a0 interface{}) *MockSSMSAPRequirements_RemoveClientTransaction_Call { - return &MockSSMSAPRequirements_RemoveClientTransaction_Call{Call: _e.mock.On("RemoveClientTransaction", _a0)} -} - -func (_c *MockSSMSAPRequirements_RemoveClientTransaction_Call) Run(run func(_a0 *ClientSSM)) *MockSSMSAPRequirements_RemoveClientTransaction_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(*ClientSSM)) - }) - return _c -} - -func (_c *MockSSMSAPRequirements_RemoveClientTransaction_Call) Return() *MockSSMSAPRequirements_RemoveClientTransaction_Call { - _c.Call.Return() - return _c -} - -func (_c *MockSSMSAPRequirements_RemoveClientTransaction_Call) RunAndReturn(run func(*ClientSSM)) *MockSSMSAPRequirements_RemoveClientTransaction_Call { - _c.Call.Return(run) - return _c -} - -// RemoveServerTransaction provides a mock function with given fields: _a0 -func (_m *MockSSMSAPRequirements) RemoveServerTransaction(_a0 *ServerSSM) { - _m.Called(_a0) -} - -// MockSSMSAPRequirements_RemoveServerTransaction_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemoveServerTransaction' -type MockSSMSAPRequirements_RemoveServerTransaction_Call struct { - *mock.Call -} - -// RemoveServerTransaction is a helper method to define mock.On call -// - _a0 *ServerSSM -func (_e *MockSSMSAPRequirements_Expecter) RemoveServerTransaction(_a0 interface{}) *MockSSMSAPRequirements_RemoveServerTransaction_Call { - return &MockSSMSAPRequirements_RemoveServerTransaction_Call{Call: _e.mock.On("RemoveServerTransaction", _a0)} -} - -func (_c *MockSSMSAPRequirements_RemoveServerTransaction_Call) Run(run func(_a0 *ServerSSM)) *MockSSMSAPRequirements_RemoveServerTransaction_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(*ServerSSM)) - }) - return _c -} - -func (_c *MockSSMSAPRequirements_RemoveServerTransaction_Call) Return() *MockSSMSAPRequirements_RemoveServerTransaction_Call { - _c.Call.Return() - return _c -} - -func (_c *MockSSMSAPRequirements_RemoveServerTransaction_Call) RunAndReturn(run func(*ServerSSM)) *MockSSMSAPRequirements_RemoveServerTransaction_Call { - _c.Call.Return(run) - return _c -} - -// Request provides a mock function with given fields: args, kwargs -func (_m *MockSSMSAPRequirements) Request(args Args, kwargs KWArgs) error { - ret := _m.Called(args, kwargs) - - if len(ret) == 0 { - panic("no return value specified for Request") - } - - var r0 error - if rf, ok := ret.Get(0).(func(Args, KWArgs) error); ok { - r0 = rf(args, kwargs) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockSSMSAPRequirements_Request_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Request' -type MockSSMSAPRequirements_Request_Call struct { - *mock.Call -} - -// Request is a helper method to define mock.On call -// - args Args -// - kwargs KWArgs -func (_e *MockSSMSAPRequirements_Expecter) Request(args interface{}, kwargs interface{}) *MockSSMSAPRequirements_Request_Call { - return &MockSSMSAPRequirements_Request_Call{Call: _e.mock.On("Request", args, kwargs)} -} - -func (_c *MockSSMSAPRequirements_Request_Call) Run(run func(args Args, kwargs KWArgs)) *MockSSMSAPRequirements_Request_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(Args), args[1].(KWArgs)) - }) - return _c -} - -func (_c *MockSSMSAPRequirements_Request_Call) Return(_a0 error) *MockSSMSAPRequirements_Request_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockSSMSAPRequirements_Request_Call) RunAndReturn(run func(Args, KWArgs) error) *MockSSMSAPRequirements_Request_Call { - _c.Call.Return(run) - return _c -} - -// SapConfirmation provides a mock function with given fields: _a0, _a1 -func (_m *MockSSMSAPRequirements) SapConfirmation(_a0 Args, _a1 KWArgs) error { - ret := _m.Called(_a0, _a1) - - if len(ret) == 0 { - panic("no return value specified for SapConfirmation") - } - - var r0 error - if rf, ok := ret.Get(0).(func(Args, KWArgs) error); ok { - r0 = rf(_a0, _a1) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockSSMSAPRequirements_SapConfirmation_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SapConfirmation' -type MockSSMSAPRequirements_SapConfirmation_Call struct { - *mock.Call -} - -// SapConfirmation is a helper method to define mock.On call -// - _a0 Args -// - _a1 KWArgs -func (_e *MockSSMSAPRequirements_Expecter) SapConfirmation(_a0 interface{}, _a1 interface{}) *MockSSMSAPRequirements_SapConfirmation_Call { - return &MockSSMSAPRequirements_SapConfirmation_Call{Call: _e.mock.On("SapConfirmation", _a0, _a1)} -} - -func (_c *MockSSMSAPRequirements_SapConfirmation_Call) Run(run func(_a0 Args, _a1 KWArgs)) *MockSSMSAPRequirements_SapConfirmation_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(Args), args[1].(KWArgs)) - }) - return _c -} - -func (_c *MockSSMSAPRequirements_SapConfirmation_Call) Return(_a0 error) *MockSSMSAPRequirements_SapConfirmation_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockSSMSAPRequirements_SapConfirmation_Call) RunAndReturn(run func(Args, KWArgs) error) *MockSSMSAPRequirements_SapConfirmation_Call { - _c.Call.Return(run) - return _c -} - -// SapIndication provides a mock function with given fields: _a0, _a1 -func (_m *MockSSMSAPRequirements) SapIndication(_a0 Args, _a1 KWArgs) error { - ret := _m.Called(_a0, _a1) - - if len(ret) == 0 { - panic("no return value specified for SapIndication") - } - - var r0 error - if rf, ok := ret.Get(0).(func(Args, KWArgs) error); ok { - r0 = rf(_a0, _a1) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockSSMSAPRequirements_SapIndication_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SapIndication' -type MockSSMSAPRequirements_SapIndication_Call struct { - *mock.Call -} - -// SapIndication is a helper method to define mock.On call -// - _a0 Args -// - _a1 KWArgs -func (_e *MockSSMSAPRequirements_Expecter) SapIndication(_a0 interface{}, _a1 interface{}) *MockSSMSAPRequirements_SapIndication_Call { - return &MockSSMSAPRequirements_SapIndication_Call{Call: _e.mock.On("SapIndication", _a0, _a1)} -} - -func (_c *MockSSMSAPRequirements_SapIndication_Call) Run(run func(_a0 Args, _a1 KWArgs)) *MockSSMSAPRequirements_SapIndication_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(Args), args[1].(KWArgs)) - }) - return _c -} - -func (_c *MockSSMSAPRequirements_SapIndication_Call) Return(_a0 error) *MockSSMSAPRequirements_SapIndication_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockSSMSAPRequirements_SapIndication_Call) RunAndReturn(run func(Args, KWArgs) error) *MockSSMSAPRequirements_SapIndication_Call { - _c.Call.Return(run) - return _c -} - -// SapRequest provides a mock function with given fields: _a0, _a1 -func (_m *MockSSMSAPRequirements) SapRequest(_a0 Args, _a1 KWArgs) error { - ret := _m.Called(_a0, _a1) - - if len(ret) == 0 { - panic("no return value specified for SapRequest") - } - - var r0 error - if rf, ok := ret.Get(0).(func(Args, KWArgs) error); ok { - r0 = rf(_a0, _a1) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockSSMSAPRequirements_SapRequest_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SapRequest' -type MockSSMSAPRequirements_SapRequest_Call struct { - *mock.Call -} - -// SapRequest is a helper method to define mock.On call -// - _a0 Args -// - _a1 KWArgs -func (_e *MockSSMSAPRequirements_Expecter) SapRequest(_a0 interface{}, _a1 interface{}) *MockSSMSAPRequirements_SapRequest_Call { - return &MockSSMSAPRequirements_SapRequest_Call{Call: _e.mock.On("SapRequest", _a0, _a1)} -} - -func (_c *MockSSMSAPRequirements_SapRequest_Call) Run(run func(_a0 Args, _a1 KWArgs)) *MockSSMSAPRequirements_SapRequest_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(Args), args[1].(KWArgs)) - }) - return _c -} - -func (_c *MockSSMSAPRequirements_SapRequest_Call) Return(_a0 error) *MockSSMSAPRequirements_SapRequest_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockSSMSAPRequirements_SapRequest_Call) RunAndReturn(run func(Args, KWArgs) error) *MockSSMSAPRequirements_SapRequest_Call { - _c.Call.Return(run) - return _c -} - -// SapResponse provides a mock function with given fields: _a0, _a1 -func (_m *MockSSMSAPRequirements) SapResponse(_a0 Args, _a1 KWArgs) error { - ret := _m.Called(_a0, _a1) - - if len(ret) == 0 { - panic("no return value specified for SapResponse") - } - - var r0 error - if rf, ok := ret.Get(0).(func(Args, KWArgs) error); ok { - r0 = rf(_a0, _a1) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockSSMSAPRequirements_SapResponse_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SapResponse' -type MockSSMSAPRequirements_SapResponse_Call struct { - *mock.Call -} - -// SapResponse is a helper method to define mock.On call -// - _a0 Args -// - _a1 KWArgs -func (_e *MockSSMSAPRequirements_Expecter) SapResponse(_a0 interface{}, _a1 interface{}) *MockSSMSAPRequirements_SapResponse_Call { - return &MockSSMSAPRequirements_SapResponse_Call{Call: _e.mock.On("SapResponse", _a0, _a1)} -} - -func (_c *MockSSMSAPRequirements_SapResponse_Call) Run(run func(_a0 Args, _a1 KWArgs)) *MockSSMSAPRequirements_SapResponse_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(Args), args[1].(KWArgs)) - }) - return _c -} - -func (_c *MockSSMSAPRequirements_SapResponse_Call) Return(_a0 error) *MockSSMSAPRequirements_SapResponse_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockSSMSAPRequirements_SapResponse_Call) RunAndReturn(run func(Args, KWArgs) error) *MockSSMSAPRequirements_SapResponse_Call { - _c.Call.Return(run) - return _c -} - -// String provides a mock function with given fields: -func (_m *MockSSMSAPRequirements) String() string { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for String") - } - - var r0 string - if rf, ok := ret.Get(0).(func() string); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(string) - } - - return r0 -} - -// MockSSMSAPRequirements_String_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'String' -type MockSSMSAPRequirements_String_Call struct { - *mock.Call -} - -// String is a helper method to define mock.On call -func (_e *MockSSMSAPRequirements_Expecter) String() *MockSSMSAPRequirements_String_Call { - return &MockSSMSAPRequirements_String_Call{Call: _e.mock.On("String")} -} - -func (_c *MockSSMSAPRequirements_String_Call) Run(run func()) *MockSSMSAPRequirements_String_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockSSMSAPRequirements_String_Call) Return(_a0 string) *MockSSMSAPRequirements_String_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockSSMSAPRequirements_String_Call) RunAndReturn(run func() string) *MockSSMSAPRequirements_String_Call { - _c.Call.Return(run) - return _c -} - -// _setClientPeer provides a mock function with given fields: server -func (_m *MockSSMSAPRequirements) _setClientPeer(server Server) { - _m.Called(server) -} - -// MockSSMSAPRequirements__setClientPeer_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method '_setClientPeer' -type MockSSMSAPRequirements__setClientPeer_Call struct { - *mock.Call -} - -// _setClientPeer is a helper method to define mock.On call -// - server Server -func (_e *MockSSMSAPRequirements_Expecter) _setClientPeer(server interface{}) *MockSSMSAPRequirements__setClientPeer_Call { - return &MockSSMSAPRequirements__setClientPeer_Call{Call: _e.mock.On("_setClientPeer", server)} -} - -func (_c *MockSSMSAPRequirements__setClientPeer_Call) Run(run func(server Server)) *MockSSMSAPRequirements__setClientPeer_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(Server)) - }) - return _c -} - -func (_c *MockSSMSAPRequirements__setClientPeer_Call) Return() *MockSSMSAPRequirements__setClientPeer_Call { - _c.Call.Return() - return _c -} - -func (_c *MockSSMSAPRequirements__setClientPeer_Call) RunAndReturn(run func(Server)) *MockSSMSAPRequirements__setClientPeer_Call { - _c.Call.Return(run) - return _c -} - -// _setServiceElement provides a mock function with given fields: serviceElement -func (_m *MockSSMSAPRequirements) _setServiceElement(serviceElement ApplicationServiceElementContract) { - _m.Called(serviceElement) -} - -// MockSSMSAPRequirements__setServiceElement_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method '_setServiceElement' -type MockSSMSAPRequirements__setServiceElement_Call struct { - *mock.Call -} - -// _setServiceElement is a helper method to define mock.On call -// - serviceElement ApplicationServiceElementContract -func (_e *MockSSMSAPRequirements_Expecter) _setServiceElement(serviceElement interface{}) *MockSSMSAPRequirements__setServiceElement_Call { - return &MockSSMSAPRequirements__setServiceElement_Call{Call: _e.mock.On("_setServiceElement", serviceElement)} -} - -func (_c *MockSSMSAPRequirements__setServiceElement_Call) Run(run func(serviceElement ApplicationServiceElementContract)) *MockSSMSAPRequirements__setServiceElement_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(ApplicationServiceElementContract)) - }) - return _c -} - -func (_c *MockSSMSAPRequirements__setServiceElement_Call) Return() *MockSSMSAPRequirements__setServiceElement_Call { - _c.Call.Return() - return _c -} - -func (_c *MockSSMSAPRequirements__setServiceElement_Call) RunAndReturn(run func(ApplicationServiceElementContract)) *MockSSMSAPRequirements__setServiceElement_Call { - _c.Call.Return(run) - return _c -} - -// getClientId provides a mock function with given fields: -func (_m *MockSSMSAPRequirements) getClientId() *int { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for getClientId") - } - - var r0 *int - if rf, ok := ret.Get(0).(func() *int); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*int) - } - } - - return r0 -} - -// MockSSMSAPRequirements_getClientId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'getClientId' -type MockSSMSAPRequirements_getClientId_Call struct { - *mock.Call -} - -// getClientId is a helper method to define mock.On call -func (_e *MockSSMSAPRequirements_Expecter) getClientId() *MockSSMSAPRequirements_getClientId_Call { - return &MockSSMSAPRequirements_getClientId_Call{Call: _e.mock.On("getClientId")} -} - -func (_c *MockSSMSAPRequirements_getClientId_Call) Run(run func()) *MockSSMSAPRequirements_getClientId_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockSSMSAPRequirements_getClientId_Call) Return(_a0 *int) *MockSSMSAPRequirements_getClientId_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockSSMSAPRequirements_getClientId_Call) RunAndReturn(run func() *int) *MockSSMSAPRequirements_getClientId_Call { - _c.Call.Return(run) - return _c -} - -// NewMockSSMSAPRequirements creates a new instance of MockSSMSAPRequirements. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewMockSSMSAPRequirements(t interface { - mock.TestingT - Cleanup(func()) -}) *MockSSMSAPRequirements { - mock := &MockSSMSAPRequirements{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/plc4go/internal/bacnetip/mock_SequenceContractRequirement_test.go b/plc4go/internal/bacnetip/mock_SequenceContractRequirement_test.go deleted file mode 100644 index 9e9addd4c7f..00000000000 --- a/plc4go/internal/bacnetip/mock_SequenceContractRequirement_test.go +++ /dev/null @@ -1,131 +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 - * - * https://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. - */ - -// Code generated by mockery v2.42.2. DO NOT EDIT. - -package bacnetip - -import mock "github.com/stretchr/testify/mock" - -// MockSequenceContractRequirement is an autogenerated mock type for the SequenceContractRequirement type -type MockSequenceContractRequirement struct { - mock.Mock -} - -type MockSequenceContractRequirement_Expecter struct { - mock *mock.Mock -} - -func (_m *MockSequenceContractRequirement) EXPECT() *MockSequenceContractRequirement_Expecter { - return &MockSequenceContractRequirement_Expecter{mock: &_m.Mock} -} - -// GetSequenceElements provides a mock function with given fields: -func (_m *MockSequenceContractRequirement) GetSequenceElements() []Element { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetSequenceElements") - } - - var r0 []Element - if rf, ok := ret.Get(0).(func() []Element); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]Element) - } - } - - return r0 -} - -// MockSequenceContractRequirement_GetSequenceElements_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetSequenceElements' -type MockSequenceContractRequirement_GetSequenceElements_Call struct { - *mock.Call -} - -// GetSequenceElements is a helper method to define mock.On call -func (_e *MockSequenceContractRequirement_Expecter) GetSequenceElements() *MockSequenceContractRequirement_GetSequenceElements_Call { - return &MockSequenceContractRequirement_GetSequenceElements_Call{Call: _e.mock.On("GetSequenceElements")} -} - -func (_c *MockSequenceContractRequirement_GetSequenceElements_Call) Run(run func()) *MockSequenceContractRequirement_GetSequenceElements_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockSequenceContractRequirement_GetSequenceElements_Call) Return(_a0 []Element) *MockSequenceContractRequirement_GetSequenceElements_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockSequenceContractRequirement_GetSequenceElements_Call) RunAndReturn(run func() []Element) *MockSequenceContractRequirement_GetSequenceElements_Call { - _c.Call.Return(run) - return _c -} - -// SetSequence provides a mock function with given fields: sequence -func (_m *MockSequenceContractRequirement) SetSequence(sequence *Sequence) { - _m.Called(sequence) -} - -// MockSequenceContractRequirement_SetSequence_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetSequence' -type MockSequenceContractRequirement_SetSequence_Call struct { - *mock.Call -} - -// SetSequence is a helper method to define mock.On call -// - sequence *Sequence -func (_e *MockSequenceContractRequirement_Expecter) SetSequence(sequence interface{}) *MockSequenceContractRequirement_SetSequence_Call { - return &MockSequenceContractRequirement_SetSequence_Call{Call: _e.mock.On("SetSequence", sequence)} -} - -func (_c *MockSequenceContractRequirement_SetSequence_Call) Run(run func(sequence *Sequence)) *MockSequenceContractRequirement_SetSequence_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(*Sequence)) - }) - return _c -} - -func (_c *MockSequenceContractRequirement_SetSequence_Call) Return() *MockSequenceContractRequirement_SetSequence_Call { - _c.Call.Return() - return _c -} - -func (_c *MockSequenceContractRequirement_SetSequence_Call) RunAndReturn(run func(*Sequence)) *MockSequenceContractRequirement_SetSequence_Call { - _c.Call.Return(run) - return _c -} - -// NewMockSequenceContractRequirement creates a new instance of MockSequenceContractRequirement. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewMockSequenceContractRequirement(t interface { - mock.TestingT - Cleanup(func()) -}) *MockSequenceContractRequirement { - mock := &MockSequenceContractRequirement{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/plc4go/internal/bacnetip/mock_SequenceContract_test.go b/plc4go/internal/bacnetip/mock_SequenceContract_test.go deleted file mode 100644 index 153627d2c35..00000000000 --- a/plc4go/internal/bacnetip/mock_SequenceContract_test.go +++ /dev/null @@ -1,98 +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 - * - * https://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. - */ - -// Code generated by mockery v2.42.2. DO NOT EDIT. - -package bacnetip - -import mock "github.com/stretchr/testify/mock" - -// MockSequenceContract is an autogenerated mock type for the SequenceContract type -type MockSequenceContract struct { - mock.Mock -} - -type MockSequenceContract_Expecter struct { - mock *mock.Mock -} - -func (_m *MockSequenceContract) EXPECT() *MockSequenceContract_Expecter { - return &MockSequenceContract_Expecter{mock: &_m.Mock} -} - -// GetSequenceElements provides a mock function with given fields: -func (_m *MockSequenceContract) GetSequenceElements() []Element { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetSequenceElements") - } - - var r0 []Element - if rf, ok := ret.Get(0).(func() []Element); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]Element) - } - } - - return r0 -} - -// MockSequenceContract_GetSequenceElements_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetSequenceElements' -type MockSequenceContract_GetSequenceElements_Call struct { - *mock.Call -} - -// GetSequenceElements is a helper method to define mock.On call -func (_e *MockSequenceContract_Expecter) GetSequenceElements() *MockSequenceContract_GetSequenceElements_Call { - return &MockSequenceContract_GetSequenceElements_Call{Call: _e.mock.On("GetSequenceElements")} -} - -func (_c *MockSequenceContract_GetSequenceElements_Call) Run(run func()) *MockSequenceContract_GetSequenceElements_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockSequenceContract_GetSequenceElements_Call) Return(_a0 []Element) *MockSequenceContract_GetSequenceElements_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockSequenceContract_GetSequenceElements_Call) RunAndReturn(run func() []Element) *MockSequenceContract_GetSequenceElements_Call { - _c.Call.Return(run) - return _c -} - -// NewMockSequenceContract creates a new instance of MockSequenceContract. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewMockSequenceContract(t interface { - mock.TestingT - Cleanup(func()) -}) *MockSequenceContract { - mock := &MockSequenceContract{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/plc4go/internal/bacnetip/mock_ServerContract_test.go b/plc4go/internal/bacnetip/mock_ServerContract_test.go deleted file mode 100644 index c4799b2c193..00000000000 --- a/plc4go/internal/bacnetip/mock_ServerContract_test.go +++ /dev/null @@ -1,315 +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 - * - * https://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. - */ - -// Code generated by mockery v2.42.2. DO NOT EDIT. - -package bacnetip - -import mock "github.com/stretchr/testify/mock" - -// MockServerContract is an autogenerated mock type for the ServerContract type -type MockServerContract struct { - mock.Mock -} - -type MockServerContract_Expecter struct { - mock *mock.Mock -} - -func (_m *MockServerContract) EXPECT() *MockServerContract_Expecter { - return &MockServerContract_Expecter{mock: &_m.Mock} -} - -// Indication provides a mock function with given fields: args, kwargs -func (_m *MockServerContract) Indication(args Args, kwargs KWArgs) error { - ret := _m.Called(args, kwargs) - - if len(ret) == 0 { - panic("no return value specified for Indication") - } - - var r0 error - if rf, ok := ret.Get(0).(func(Args, KWArgs) error); ok { - r0 = rf(args, kwargs) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockServerContract_Indication_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Indication' -type MockServerContract_Indication_Call struct { - *mock.Call -} - -// Indication is a helper method to define mock.On call -// - args Args -// - kwargs KWArgs -func (_e *MockServerContract_Expecter) Indication(args interface{}, kwargs interface{}) *MockServerContract_Indication_Call { - return &MockServerContract_Indication_Call{Call: _e.mock.On("Indication", args, kwargs)} -} - -func (_c *MockServerContract_Indication_Call) Run(run func(args Args, kwargs KWArgs)) *MockServerContract_Indication_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(Args), args[1].(KWArgs)) - }) - return _c -} - -func (_c *MockServerContract_Indication_Call) Return(_a0 error) *MockServerContract_Indication_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockServerContract_Indication_Call) RunAndReturn(run func(Args, KWArgs) error) *MockServerContract_Indication_Call { - _c.Call.Return(run) - return _c -} - -// Response provides a mock function with given fields: args, kwargs -func (_m *MockServerContract) Response(args Args, kwargs KWArgs) error { - ret := _m.Called(args, kwargs) - - if len(ret) == 0 { - panic("no return value specified for Response") - } - - var r0 error - if rf, ok := ret.Get(0).(func(Args, KWArgs) error); ok { - r0 = rf(args, kwargs) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockServerContract_Response_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Response' -type MockServerContract_Response_Call struct { - *mock.Call -} - -// Response is a helper method to define mock.On call -// - args Args -// - kwargs KWArgs -func (_e *MockServerContract_Expecter) Response(args interface{}, kwargs interface{}) *MockServerContract_Response_Call { - return &MockServerContract_Response_Call{Call: _e.mock.On("Response", args, kwargs)} -} - -func (_c *MockServerContract_Response_Call) Run(run func(args Args, kwargs KWArgs)) *MockServerContract_Response_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(Args), args[1].(KWArgs)) - }) - return _c -} - -func (_c *MockServerContract_Response_Call) Return(_a0 error) *MockServerContract_Response_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockServerContract_Response_Call) RunAndReturn(run func(Args, KWArgs) error) *MockServerContract_Response_Call { - _c.Call.Return(run) - return _c -} - -// String provides a mock function with given fields: -func (_m *MockServerContract) String() string { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for String") - } - - var r0 string - if rf, ok := ret.Get(0).(func() string); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(string) - } - - return r0 -} - -// MockServerContract_String_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'String' -type MockServerContract_String_Call struct { - *mock.Call -} - -// String is a helper method to define mock.On call -func (_e *MockServerContract_Expecter) String() *MockServerContract_String_Call { - return &MockServerContract_String_Call{Call: _e.mock.On("String")} -} - -func (_c *MockServerContract_String_Call) Run(run func()) *MockServerContract_String_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockServerContract_String_Call) Return(_a0 string) *MockServerContract_String_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockServerContract_String_Call) RunAndReturn(run func() string) *MockServerContract_String_Call { - _c.Call.Return(run) - return _c -} - -// _setServerPeer provides a mock function with given fields: serverPeer -func (_m *MockServerContract) _setServerPeer(serverPeer Client) { - _m.Called(serverPeer) -} - -// MockServerContract__setServerPeer_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method '_setServerPeer' -type MockServerContract__setServerPeer_Call struct { - *mock.Call -} - -// _setServerPeer is a helper method to define mock.On call -// - serverPeer Client -func (_e *MockServerContract_Expecter) _setServerPeer(serverPeer interface{}) *MockServerContract__setServerPeer_Call { - return &MockServerContract__setServerPeer_Call{Call: _e.mock.On("_setServerPeer", serverPeer)} -} - -func (_c *MockServerContract__setServerPeer_Call) Run(run func(serverPeer Client)) *MockServerContract__setServerPeer_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(Client)) - }) - return _c -} - -func (_c *MockServerContract__setServerPeer_Call) Return() *MockServerContract__setServerPeer_Call { - _c.Call.Return() - return _c -} - -func (_c *MockServerContract__setServerPeer_Call) RunAndReturn(run func(Client)) *MockServerContract__setServerPeer_Call { - _c.Call.Return(run) - return _c -} - -// getServerId provides a mock function with given fields: -func (_m *MockServerContract) getServerId() *int { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for getServerId") - } - - var r0 *int - if rf, ok := ret.Get(0).(func() *int); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*int) - } - } - - return r0 -} - -// MockServerContract_getServerId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'getServerId' -type MockServerContract_getServerId_Call struct { - *mock.Call -} - -// getServerId is a helper method to define mock.On call -func (_e *MockServerContract_Expecter) getServerId() *MockServerContract_getServerId_Call { - return &MockServerContract_getServerId_Call{Call: _e.mock.On("getServerId")} -} - -func (_c *MockServerContract_getServerId_Call) Run(run func()) *MockServerContract_getServerId_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockServerContract_getServerId_Call) Return(_a0 *int) *MockServerContract_getServerId_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockServerContract_getServerId_Call) RunAndReturn(run func() *int) *MockServerContract_getServerId_Call { - _c.Call.Return(run) - return _c -} - -// hasServerPeer provides a mock function with given fields: -func (_m *MockServerContract) hasServerPeer() bool { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for hasServerPeer") - } - - var r0 bool - if rf, ok := ret.Get(0).(func() bool); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(bool) - } - - return r0 -} - -// MockServerContract_hasServerPeer_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'hasServerPeer' -type MockServerContract_hasServerPeer_Call struct { - *mock.Call -} - -// hasServerPeer is a helper method to define mock.On call -func (_e *MockServerContract_Expecter) hasServerPeer() *MockServerContract_hasServerPeer_Call { - return &MockServerContract_hasServerPeer_Call{Call: _e.mock.On("hasServerPeer")} -} - -func (_c *MockServerContract_hasServerPeer_Call) Run(run func()) *MockServerContract_hasServerPeer_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockServerContract_hasServerPeer_Call) Return(_a0 bool) *MockServerContract_hasServerPeer_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockServerContract_hasServerPeer_Call) RunAndReturn(run func() bool) *MockServerContract_hasServerPeer_Call { - _c.Call.Return(run) - return _c -} - -// NewMockServerContract creates a new instance of MockServerContract. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewMockServerContract(t interface { - mock.TestingT - Cleanup(func()) -}) *MockServerContract { - mock := &MockServerContract{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/plc4go/internal/bacnetip/mock_ServerRequirements_test.go b/plc4go/internal/bacnetip/mock_ServerRequirements_test.go deleted file mode 100644 index 6edc5eaa918..00000000000 --- a/plc4go/internal/bacnetip/mock_ServerRequirements_test.go +++ /dev/null @@ -1,51 +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 - * - * https://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. - */ - -// Code generated by mockery v2.42.2. DO NOT EDIT. - -package bacnetip - -import mock "github.com/stretchr/testify/mock" - -// MockServerRequirements is an autogenerated mock type for the ServerRequirements type -type MockServerRequirements struct { - mock.Mock -} - -type MockServerRequirements_Expecter struct { - mock *mock.Mock -} - -func (_m *MockServerRequirements) EXPECT() *MockServerRequirements_Expecter { - return &MockServerRequirements_Expecter{mock: &_m.Mock} -} - -// NewMockServerRequirements creates a new instance of MockServerRequirements. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewMockServerRequirements(t interface { - mock.TestingT - Cleanup(func()) -}) *MockServerRequirements { - mock := &MockServerRequirements{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/plc4go/internal/bacnetip/mock_Server_test.go b/plc4go/internal/bacnetip/mock_Server_test.go deleted file mode 100644 index 9ba98d6269e..00000000000 --- a/plc4go/internal/bacnetip/mock_Server_test.go +++ /dev/null @@ -1,315 +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 - * - * https://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. - */ - -// Code generated by mockery v2.42.2. DO NOT EDIT. - -package bacnetip - -import mock "github.com/stretchr/testify/mock" - -// MockServer is an autogenerated mock type for the Server type -type MockServer struct { - mock.Mock -} - -type MockServer_Expecter struct { - mock *mock.Mock -} - -func (_m *MockServer) EXPECT() *MockServer_Expecter { - return &MockServer_Expecter{mock: &_m.Mock} -} - -// Indication provides a mock function with given fields: args, kwargs -func (_m *MockServer) Indication(args Args, kwargs KWArgs) error { - ret := _m.Called(args, kwargs) - - if len(ret) == 0 { - panic("no return value specified for Indication") - } - - var r0 error - if rf, ok := ret.Get(0).(func(Args, KWArgs) error); ok { - r0 = rf(args, kwargs) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockServer_Indication_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Indication' -type MockServer_Indication_Call struct { - *mock.Call -} - -// Indication is a helper method to define mock.On call -// - args Args -// - kwargs KWArgs -func (_e *MockServer_Expecter) Indication(args interface{}, kwargs interface{}) *MockServer_Indication_Call { - return &MockServer_Indication_Call{Call: _e.mock.On("Indication", args, kwargs)} -} - -func (_c *MockServer_Indication_Call) Run(run func(args Args, kwargs KWArgs)) *MockServer_Indication_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(Args), args[1].(KWArgs)) - }) - return _c -} - -func (_c *MockServer_Indication_Call) Return(_a0 error) *MockServer_Indication_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockServer_Indication_Call) RunAndReturn(run func(Args, KWArgs) error) *MockServer_Indication_Call { - _c.Call.Return(run) - return _c -} - -// Response provides a mock function with given fields: args, kwargs -func (_m *MockServer) Response(args Args, kwargs KWArgs) error { - ret := _m.Called(args, kwargs) - - if len(ret) == 0 { - panic("no return value specified for Response") - } - - var r0 error - if rf, ok := ret.Get(0).(func(Args, KWArgs) error); ok { - r0 = rf(args, kwargs) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockServer_Response_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Response' -type MockServer_Response_Call struct { - *mock.Call -} - -// Response is a helper method to define mock.On call -// - args Args -// - kwargs KWArgs -func (_e *MockServer_Expecter) Response(args interface{}, kwargs interface{}) *MockServer_Response_Call { - return &MockServer_Response_Call{Call: _e.mock.On("Response", args, kwargs)} -} - -func (_c *MockServer_Response_Call) Run(run func(args Args, kwargs KWArgs)) *MockServer_Response_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(Args), args[1].(KWArgs)) - }) - return _c -} - -func (_c *MockServer_Response_Call) Return(_a0 error) *MockServer_Response_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockServer_Response_Call) RunAndReturn(run func(Args, KWArgs) error) *MockServer_Response_Call { - _c.Call.Return(run) - return _c -} - -// String provides a mock function with given fields: -func (_m *MockServer) String() string { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for String") - } - - var r0 string - if rf, ok := ret.Get(0).(func() string); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(string) - } - - return r0 -} - -// MockServer_String_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'String' -type MockServer_String_Call struct { - *mock.Call -} - -// String is a helper method to define mock.On call -func (_e *MockServer_Expecter) String() *MockServer_String_Call { - return &MockServer_String_Call{Call: _e.mock.On("String")} -} - -func (_c *MockServer_String_Call) Run(run func()) *MockServer_String_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockServer_String_Call) Return(_a0 string) *MockServer_String_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockServer_String_Call) RunAndReturn(run func() string) *MockServer_String_Call { - _c.Call.Return(run) - return _c -} - -// _setServerPeer provides a mock function with given fields: serverPeer -func (_m *MockServer) _setServerPeer(serverPeer Client) { - _m.Called(serverPeer) -} - -// MockServer__setServerPeer_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method '_setServerPeer' -type MockServer__setServerPeer_Call struct { - *mock.Call -} - -// _setServerPeer is a helper method to define mock.On call -// - serverPeer Client -func (_e *MockServer_Expecter) _setServerPeer(serverPeer interface{}) *MockServer__setServerPeer_Call { - return &MockServer__setServerPeer_Call{Call: _e.mock.On("_setServerPeer", serverPeer)} -} - -func (_c *MockServer__setServerPeer_Call) Run(run func(serverPeer Client)) *MockServer__setServerPeer_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(Client)) - }) - return _c -} - -func (_c *MockServer__setServerPeer_Call) Return() *MockServer__setServerPeer_Call { - _c.Call.Return() - return _c -} - -func (_c *MockServer__setServerPeer_Call) RunAndReturn(run func(Client)) *MockServer__setServerPeer_Call { - _c.Call.Return(run) - return _c -} - -// getServerId provides a mock function with given fields: -func (_m *MockServer) getServerId() *int { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for getServerId") - } - - var r0 *int - if rf, ok := ret.Get(0).(func() *int); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*int) - } - } - - return r0 -} - -// MockServer_getServerId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'getServerId' -type MockServer_getServerId_Call struct { - *mock.Call -} - -// getServerId is a helper method to define mock.On call -func (_e *MockServer_Expecter) getServerId() *MockServer_getServerId_Call { - return &MockServer_getServerId_Call{Call: _e.mock.On("getServerId")} -} - -func (_c *MockServer_getServerId_Call) Run(run func()) *MockServer_getServerId_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockServer_getServerId_Call) Return(_a0 *int) *MockServer_getServerId_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockServer_getServerId_Call) RunAndReturn(run func() *int) *MockServer_getServerId_Call { - _c.Call.Return(run) - return _c -} - -// hasServerPeer provides a mock function with given fields: -func (_m *MockServer) hasServerPeer() bool { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for hasServerPeer") - } - - var r0 bool - if rf, ok := ret.Get(0).(func() bool); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(bool) - } - - return r0 -} - -// MockServer_hasServerPeer_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'hasServerPeer' -type MockServer_hasServerPeer_Call struct { - *mock.Call -} - -// hasServerPeer is a helper method to define mock.On call -func (_e *MockServer_Expecter) hasServerPeer() *MockServer_hasServerPeer_Call { - return &MockServer_hasServerPeer_Call{Call: _e.mock.On("hasServerPeer")} -} - -func (_c *MockServer_hasServerPeer_Call) Run(run func()) *MockServer_hasServerPeer_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockServer_hasServerPeer_Call) Return(_a0 bool) *MockServer_hasServerPeer_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockServer_hasServerPeer_Call) RunAndReturn(run func() bool) *MockServer_hasServerPeer_Call { - _c.Call.Return(run) - return _c -} - -// NewMockServer creates a new instance of MockServer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewMockServer(t interface { - mock.TestingT - Cleanup(func()) -}) *MockServer { - mock := &MockServer{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/plc4go/internal/bacnetip/mock_ServiceAccessPointContract_test.go b/plc4go/internal/bacnetip/mock_ServiceAccessPointContract_test.go deleted file mode 100644 index 1c5a70f3f8f..00000000000 --- a/plc4go/internal/bacnetip/mock_ServiceAccessPointContract_test.go +++ /dev/null @@ -1,317 +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 - * - * https://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. - */ - -// Code generated by mockery v2.42.2. DO NOT EDIT. - -package bacnetip - -import mock "github.com/stretchr/testify/mock" - -// MockServiceAccessPointContract is an autogenerated mock type for the ServiceAccessPointContract type -type MockServiceAccessPointContract struct { - mock.Mock -} - -type MockServiceAccessPointContract_Expecter struct { - mock *mock.Mock -} - -func (_m *MockServiceAccessPointContract) EXPECT() *MockServiceAccessPointContract_Expecter { - return &MockServiceAccessPointContract_Expecter{mock: &_m.Mock} -} - -// SapConfirmation provides a mock function with given fields: _a0, _a1 -func (_m *MockServiceAccessPointContract) SapConfirmation(_a0 Args, _a1 KWArgs) error { - ret := _m.Called(_a0, _a1) - - if len(ret) == 0 { - panic("no return value specified for SapConfirmation") - } - - var r0 error - if rf, ok := ret.Get(0).(func(Args, KWArgs) error); ok { - r0 = rf(_a0, _a1) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockServiceAccessPointContract_SapConfirmation_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SapConfirmation' -type MockServiceAccessPointContract_SapConfirmation_Call struct { - *mock.Call -} - -// SapConfirmation is a helper method to define mock.On call -// - _a0 Args -// - _a1 KWArgs -func (_e *MockServiceAccessPointContract_Expecter) SapConfirmation(_a0 interface{}, _a1 interface{}) *MockServiceAccessPointContract_SapConfirmation_Call { - return &MockServiceAccessPointContract_SapConfirmation_Call{Call: _e.mock.On("SapConfirmation", _a0, _a1)} -} - -func (_c *MockServiceAccessPointContract_SapConfirmation_Call) Run(run func(_a0 Args, _a1 KWArgs)) *MockServiceAccessPointContract_SapConfirmation_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(Args), args[1].(KWArgs)) - }) - return _c -} - -func (_c *MockServiceAccessPointContract_SapConfirmation_Call) Return(_a0 error) *MockServiceAccessPointContract_SapConfirmation_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockServiceAccessPointContract_SapConfirmation_Call) RunAndReturn(run func(Args, KWArgs) error) *MockServiceAccessPointContract_SapConfirmation_Call { - _c.Call.Return(run) - return _c -} - -// SapIndication provides a mock function with given fields: _a0, _a1 -func (_m *MockServiceAccessPointContract) SapIndication(_a0 Args, _a1 KWArgs) error { - ret := _m.Called(_a0, _a1) - - if len(ret) == 0 { - panic("no return value specified for SapIndication") - } - - var r0 error - if rf, ok := ret.Get(0).(func(Args, KWArgs) error); ok { - r0 = rf(_a0, _a1) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockServiceAccessPointContract_SapIndication_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SapIndication' -type MockServiceAccessPointContract_SapIndication_Call struct { - *mock.Call -} - -// SapIndication is a helper method to define mock.On call -// - _a0 Args -// - _a1 KWArgs -func (_e *MockServiceAccessPointContract_Expecter) SapIndication(_a0 interface{}, _a1 interface{}) *MockServiceAccessPointContract_SapIndication_Call { - return &MockServiceAccessPointContract_SapIndication_Call{Call: _e.mock.On("SapIndication", _a0, _a1)} -} - -func (_c *MockServiceAccessPointContract_SapIndication_Call) Run(run func(_a0 Args, _a1 KWArgs)) *MockServiceAccessPointContract_SapIndication_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(Args), args[1].(KWArgs)) - }) - return _c -} - -func (_c *MockServiceAccessPointContract_SapIndication_Call) Return(_a0 error) *MockServiceAccessPointContract_SapIndication_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockServiceAccessPointContract_SapIndication_Call) RunAndReturn(run func(Args, KWArgs) error) *MockServiceAccessPointContract_SapIndication_Call { - _c.Call.Return(run) - return _c -} - -// SapRequest provides a mock function with given fields: _a0, _a1 -func (_m *MockServiceAccessPointContract) SapRequest(_a0 Args, _a1 KWArgs) error { - ret := _m.Called(_a0, _a1) - - if len(ret) == 0 { - panic("no return value specified for SapRequest") - } - - var r0 error - if rf, ok := ret.Get(0).(func(Args, KWArgs) error); ok { - r0 = rf(_a0, _a1) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockServiceAccessPointContract_SapRequest_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SapRequest' -type MockServiceAccessPointContract_SapRequest_Call struct { - *mock.Call -} - -// SapRequest is a helper method to define mock.On call -// - _a0 Args -// - _a1 KWArgs -func (_e *MockServiceAccessPointContract_Expecter) SapRequest(_a0 interface{}, _a1 interface{}) *MockServiceAccessPointContract_SapRequest_Call { - return &MockServiceAccessPointContract_SapRequest_Call{Call: _e.mock.On("SapRequest", _a0, _a1)} -} - -func (_c *MockServiceAccessPointContract_SapRequest_Call) Run(run func(_a0 Args, _a1 KWArgs)) *MockServiceAccessPointContract_SapRequest_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(Args), args[1].(KWArgs)) - }) - return _c -} - -func (_c *MockServiceAccessPointContract_SapRequest_Call) Return(_a0 error) *MockServiceAccessPointContract_SapRequest_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockServiceAccessPointContract_SapRequest_Call) RunAndReturn(run func(Args, KWArgs) error) *MockServiceAccessPointContract_SapRequest_Call { - _c.Call.Return(run) - return _c -} - -// SapResponse provides a mock function with given fields: _a0, _a1 -func (_m *MockServiceAccessPointContract) SapResponse(_a0 Args, _a1 KWArgs) error { - ret := _m.Called(_a0, _a1) - - if len(ret) == 0 { - panic("no return value specified for SapResponse") - } - - var r0 error - if rf, ok := ret.Get(0).(func(Args, KWArgs) error); ok { - r0 = rf(_a0, _a1) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockServiceAccessPointContract_SapResponse_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SapResponse' -type MockServiceAccessPointContract_SapResponse_Call struct { - *mock.Call -} - -// SapResponse is a helper method to define mock.On call -// - _a0 Args -// - _a1 KWArgs -func (_e *MockServiceAccessPointContract_Expecter) SapResponse(_a0 interface{}, _a1 interface{}) *MockServiceAccessPointContract_SapResponse_Call { - return &MockServiceAccessPointContract_SapResponse_Call{Call: _e.mock.On("SapResponse", _a0, _a1)} -} - -func (_c *MockServiceAccessPointContract_SapResponse_Call) Run(run func(_a0 Args, _a1 KWArgs)) *MockServiceAccessPointContract_SapResponse_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(Args), args[1].(KWArgs)) - }) - return _c -} - -func (_c *MockServiceAccessPointContract_SapResponse_Call) Return(_a0 error) *MockServiceAccessPointContract_SapResponse_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockServiceAccessPointContract_SapResponse_Call) RunAndReturn(run func(Args, KWArgs) error) *MockServiceAccessPointContract_SapResponse_Call { - _c.Call.Return(run) - return _c -} - -// String provides a mock function with given fields: -func (_m *MockServiceAccessPointContract) String() string { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for String") - } - - var r0 string - if rf, ok := ret.Get(0).(func() string); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(string) - } - - return r0 -} - -// MockServiceAccessPointContract_String_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'String' -type MockServiceAccessPointContract_String_Call struct { - *mock.Call -} - -// String is a helper method to define mock.On call -func (_e *MockServiceAccessPointContract_Expecter) String() *MockServiceAccessPointContract_String_Call { - return &MockServiceAccessPointContract_String_Call{Call: _e.mock.On("String")} -} - -func (_c *MockServiceAccessPointContract_String_Call) Run(run func()) *MockServiceAccessPointContract_String_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockServiceAccessPointContract_String_Call) Return(_a0 string) *MockServiceAccessPointContract_String_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockServiceAccessPointContract_String_Call) RunAndReturn(run func() string) *MockServiceAccessPointContract_String_Call { - _c.Call.Return(run) - return _c -} - -// _setServiceElement provides a mock function with given fields: serviceElement -func (_m *MockServiceAccessPointContract) _setServiceElement(serviceElement ApplicationServiceElementContract) { - _m.Called(serviceElement) -} - -// MockServiceAccessPointContract__setServiceElement_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method '_setServiceElement' -type MockServiceAccessPointContract__setServiceElement_Call struct { - *mock.Call -} - -// _setServiceElement is a helper method to define mock.On call -// - serviceElement ApplicationServiceElementContract -func (_e *MockServiceAccessPointContract_Expecter) _setServiceElement(serviceElement interface{}) *MockServiceAccessPointContract__setServiceElement_Call { - return &MockServiceAccessPointContract__setServiceElement_Call{Call: _e.mock.On("_setServiceElement", serviceElement)} -} - -func (_c *MockServiceAccessPointContract__setServiceElement_Call) Run(run func(serviceElement ApplicationServiceElementContract)) *MockServiceAccessPointContract__setServiceElement_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(ApplicationServiceElementContract)) - }) - return _c -} - -func (_c *MockServiceAccessPointContract__setServiceElement_Call) Return() *MockServiceAccessPointContract__setServiceElement_Call { - _c.Call.Return() - return _c -} - -func (_c *MockServiceAccessPointContract__setServiceElement_Call) RunAndReturn(run func(ApplicationServiceElementContract)) *MockServiceAccessPointContract__setServiceElement_Call { - _c.Call.Return(run) - return _c -} - -// NewMockServiceAccessPointContract creates a new instance of MockServiceAccessPointContract. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewMockServiceAccessPointContract(t interface { - mock.TestingT - Cleanup(func()) -}) *MockServiceAccessPointContract { - mock := &MockServiceAccessPointContract{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/plc4go/internal/bacnetip/mock_ServiceAccessPointRequirements_test.go b/plc4go/internal/bacnetip/mock_ServiceAccessPointRequirements_test.go deleted file mode 100644 index b22ed10733b..00000000000 --- a/plc4go/internal/bacnetip/mock_ServiceAccessPointRequirements_test.go +++ /dev/null @@ -1,272 +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 - * - * https://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. - */ - -// Code generated by mockery v2.42.2. DO NOT EDIT. - -package bacnetip - -import mock "github.com/stretchr/testify/mock" - -// MockServiceAccessPointRequirements is an autogenerated mock type for the ServiceAccessPointRequirements type -type MockServiceAccessPointRequirements struct { - mock.Mock -} - -type MockServiceAccessPointRequirements_Expecter struct { - mock *mock.Mock -} - -func (_m *MockServiceAccessPointRequirements) EXPECT() *MockServiceAccessPointRequirements_Expecter { - return &MockServiceAccessPointRequirements_Expecter{mock: &_m.Mock} -} - -// SapConfirmation provides a mock function with given fields: _a0, _a1 -func (_m *MockServiceAccessPointRequirements) SapConfirmation(_a0 Args, _a1 KWArgs) error { - ret := _m.Called(_a0, _a1) - - if len(ret) == 0 { - panic("no return value specified for SapConfirmation") - } - - var r0 error - if rf, ok := ret.Get(0).(func(Args, KWArgs) error); ok { - r0 = rf(_a0, _a1) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockServiceAccessPointRequirements_SapConfirmation_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SapConfirmation' -type MockServiceAccessPointRequirements_SapConfirmation_Call struct { - *mock.Call -} - -// SapConfirmation is a helper method to define mock.On call -// - _a0 Args -// - _a1 KWArgs -func (_e *MockServiceAccessPointRequirements_Expecter) SapConfirmation(_a0 interface{}, _a1 interface{}) *MockServiceAccessPointRequirements_SapConfirmation_Call { - return &MockServiceAccessPointRequirements_SapConfirmation_Call{Call: _e.mock.On("SapConfirmation", _a0, _a1)} -} - -func (_c *MockServiceAccessPointRequirements_SapConfirmation_Call) Run(run func(_a0 Args, _a1 KWArgs)) *MockServiceAccessPointRequirements_SapConfirmation_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(Args), args[1].(KWArgs)) - }) - return _c -} - -func (_c *MockServiceAccessPointRequirements_SapConfirmation_Call) Return(_a0 error) *MockServiceAccessPointRequirements_SapConfirmation_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockServiceAccessPointRequirements_SapConfirmation_Call) RunAndReturn(run func(Args, KWArgs) error) *MockServiceAccessPointRequirements_SapConfirmation_Call { - _c.Call.Return(run) - return _c -} - -// SapIndication provides a mock function with given fields: _a0, _a1 -func (_m *MockServiceAccessPointRequirements) SapIndication(_a0 Args, _a1 KWArgs) error { - ret := _m.Called(_a0, _a1) - - if len(ret) == 0 { - panic("no return value specified for SapIndication") - } - - var r0 error - if rf, ok := ret.Get(0).(func(Args, KWArgs) error); ok { - r0 = rf(_a0, _a1) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockServiceAccessPointRequirements_SapIndication_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SapIndication' -type MockServiceAccessPointRequirements_SapIndication_Call struct { - *mock.Call -} - -// SapIndication is a helper method to define mock.On call -// - _a0 Args -// - _a1 KWArgs -func (_e *MockServiceAccessPointRequirements_Expecter) SapIndication(_a0 interface{}, _a1 interface{}) *MockServiceAccessPointRequirements_SapIndication_Call { - return &MockServiceAccessPointRequirements_SapIndication_Call{Call: _e.mock.On("SapIndication", _a0, _a1)} -} - -func (_c *MockServiceAccessPointRequirements_SapIndication_Call) Run(run func(_a0 Args, _a1 KWArgs)) *MockServiceAccessPointRequirements_SapIndication_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(Args), args[1].(KWArgs)) - }) - return _c -} - -func (_c *MockServiceAccessPointRequirements_SapIndication_Call) Return(_a0 error) *MockServiceAccessPointRequirements_SapIndication_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockServiceAccessPointRequirements_SapIndication_Call) RunAndReturn(run func(Args, KWArgs) error) *MockServiceAccessPointRequirements_SapIndication_Call { - _c.Call.Return(run) - return _c -} - -// SapRequest provides a mock function with given fields: _a0, _a1 -func (_m *MockServiceAccessPointRequirements) SapRequest(_a0 Args, _a1 KWArgs) error { - ret := _m.Called(_a0, _a1) - - if len(ret) == 0 { - panic("no return value specified for SapRequest") - } - - var r0 error - if rf, ok := ret.Get(0).(func(Args, KWArgs) error); ok { - r0 = rf(_a0, _a1) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockServiceAccessPointRequirements_SapRequest_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SapRequest' -type MockServiceAccessPointRequirements_SapRequest_Call struct { - *mock.Call -} - -// SapRequest is a helper method to define mock.On call -// - _a0 Args -// - _a1 KWArgs -func (_e *MockServiceAccessPointRequirements_Expecter) SapRequest(_a0 interface{}, _a1 interface{}) *MockServiceAccessPointRequirements_SapRequest_Call { - return &MockServiceAccessPointRequirements_SapRequest_Call{Call: _e.mock.On("SapRequest", _a0, _a1)} -} - -func (_c *MockServiceAccessPointRequirements_SapRequest_Call) Run(run func(_a0 Args, _a1 KWArgs)) *MockServiceAccessPointRequirements_SapRequest_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(Args), args[1].(KWArgs)) - }) - return _c -} - -func (_c *MockServiceAccessPointRequirements_SapRequest_Call) Return(_a0 error) *MockServiceAccessPointRequirements_SapRequest_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockServiceAccessPointRequirements_SapRequest_Call) RunAndReturn(run func(Args, KWArgs) error) *MockServiceAccessPointRequirements_SapRequest_Call { - _c.Call.Return(run) - return _c -} - -// SapResponse provides a mock function with given fields: _a0, _a1 -func (_m *MockServiceAccessPointRequirements) SapResponse(_a0 Args, _a1 KWArgs) error { - ret := _m.Called(_a0, _a1) - - if len(ret) == 0 { - panic("no return value specified for SapResponse") - } - - var r0 error - if rf, ok := ret.Get(0).(func(Args, KWArgs) error); ok { - r0 = rf(_a0, _a1) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockServiceAccessPointRequirements_SapResponse_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SapResponse' -type MockServiceAccessPointRequirements_SapResponse_Call struct { - *mock.Call -} - -// SapResponse is a helper method to define mock.On call -// - _a0 Args -// - _a1 KWArgs -func (_e *MockServiceAccessPointRequirements_Expecter) SapResponse(_a0 interface{}, _a1 interface{}) *MockServiceAccessPointRequirements_SapResponse_Call { - return &MockServiceAccessPointRequirements_SapResponse_Call{Call: _e.mock.On("SapResponse", _a0, _a1)} -} - -func (_c *MockServiceAccessPointRequirements_SapResponse_Call) Run(run func(_a0 Args, _a1 KWArgs)) *MockServiceAccessPointRequirements_SapResponse_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(Args), args[1].(KWArgs)) - }) - return _c -} - -func (_c *MockServiceAccessPointRequirements_SapResponse_Call) Return(_a0 error) *MockServiceAccessPointRequirements_SapResponse_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockServiceAccessPointRequirements_SapResponse_Call) RunAndReturn(run func(Args, KWArgs) error) *MockServiceAccessPointRequirements_SapResponse_Call { - _c.Call.Return(run) - return _c -} - -// _setServiceElement provides a mock function with given fields: serviceElement -func (_m *MockServiceAccessPointRequirements) _setServiceElement(serviceElement ApplicationServiceElementContract) { - _m.Called(serviceElement) -} - -// MockServiceAccessPointRequirements__setServiceElement_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method '_setServiceElement' -type MockServiceAccessPointRequirements__setServiceElement_Call struct { - *mock.Call -} - -// _setServiceElement is a helper method to define mock.On call -// - serviceElement ApplicationServiceElementContract -func (_e *MockServiceAccessPointRequirements_Expecter) _setServiceElement(serviceElement interface{}) *MockServiceAccessPointRequirements__setServiceElement_Call { - return &MockServiceAccessPointRequirements__setServiceElement_Call{Call: _e.mock.On("_setServiceElement", serviceElement)} -} - -func (_c *MockServiceAccessPointRequirements__setServiceElement_Call) Run(run func(serviceElement ApplicationServiceElementContract)) *MockServiceAccessPointRequirements__setServiceElement_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(ApplicationServiceElementContract)) - }) - return _c -} - -func (_c *MockServiceAccessPointRequirements__setServiceElement_Call) Return() *MockServiceAccessPointRequirements__setServiceElement_Call { - _c.Call.Return() - return _c -} - -func (_c *MockServiceAccessPointRequirements__setServiceElement_Call) RunAndReturn(run func(ApplicationServiceElementContract)) *MockServiceAccessPointRequirements__setServiceElement_Call { - _c.Call.Return(run) - return _c -} - -// NewMockServiceAccessPointRequirements creates a new instance of MockServiceAccessPointRequirements. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewMockServiceAccessPointRequirements(t interface { - mock.TestingT - Cleanup(func()) -}) *MockServiceAccessPointRequirements { - mock := &MockServiceAccessPointRequirements{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/plc4go/internal/bacnetip/mock_Tag_test.go b/plc4go/internal/bacnetip/mock_Tag_test.go deleted file mode 100644 index e73daff540a..00000000000 --- a/plc4go/internal/bacnetip/mock_Tag_test.go +++ /dev/null @@ -1,555 +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 - * - * https://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. - */ - -// Code generated by mockery v2.42.2. DO NOT EDIT. - -package bacnetip - -import ( - model "github.com/apache/plc4x/plc4go/protocols/bacnetip/readwrite/model" - mock "github.com/stretchr/testify/mock" -) - -// MockTag is an autogenerated mock type for the Tag type -type MockTag struct { - mock.Mock -} - -type MockTag_Expecter struct { - mock *mock.Mock -} - -func (_m *MockTag) EXPECT() *MockTag_Expecter { - return &MockTag_Expecter{mock: &_m.Mock} -} - -// AppToContext provides a mock function with given fields: context -func (_m *MockTag) AppToContext(context uint) (*ContextTag, error) { - ret := _m.Called(context) - - if len(ret) == 0 { - panic("no return value specified for AppToContext") - } - - var r0 *ContextTag - var r1 error - if rf, ok := ret.Get(0).(func(uint) (*ContextTag, error)); ok { - return rf(context) - } - if rf, ok := ret.Get(0).(func(uint) *ContextTag); ok { - r0 = rf(context) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*ContextTag) - } - } - - if rf, ok := ret.Get(1).(func(uint) error); ok { - r1 = rf(context) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockTag_AppToContext_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AppToContext' -type MockTag_AppToContext_Call struct { - *mock.Call -} - -// AppToContext is a helper method to define mock.On call -// - context uint -func (_e *MockTag_Expecter) AppToContext(context interface{}) *MockTag_AppToContext_Call { - return &MockTag_AppToContext_Call{Call: _e.mock.On("AppToContext", context)} -} - -func (_c *MockTag_AppToContext_Call) Run(run func(context uint)) *MockTag_AppToContext_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(uint)) - }) - return _c -} - -func (_c *MockTag_AppToContext_Call) Return(_a0 *ContextTag, _a1 error) *MockTag_AppToContext_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockTag_AppToContext_Call) RunAndReturn(run func(uint) (*ContextTag, error)) *MockTag_AppToContext_Call { - _c.Call.Return(run) - return _c -} - -// AppToObject provides a mock function with given fields: -func (_m *MockTag) AppToObject() (interface{}, error) { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for AppToObject") - } - - var r0 interface{} - var r1 error - if rf, ok := ret.Get(0).(func() (interface{}, error)); ok { - return rf() - } - if rf, ok := ret.Get(0).(func() interface{}); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(interface{}) - } - } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockTag_AppToObject_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AppToObject' -type MockTag_AppToObject_Call struct { - *mock.Call -} - -// AppToObject is a helper method to define mock.On call -func (_e *MockTag_Expecter) AppToObject() *MockTag_AppToObject_Call { - return &MockTag_AppToObject_Call{Call: _e.mock.On("AppToObject")} -} - -func (_c *MockTag_AppToObject_Call) Run(run func()) *MockTag_AppToObject_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockTag_AppToObject_Call) Return(_a0 interface{}, _a1 error) *MockTag_AppToObject_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockTag_AppToObject_Call) RunAndReturn(run func() (interface{}, error)) *MockTag_AppToObject_Call { - _c.Call.Return(run) - return _c -} - -// ContextToApp provides a mock function with given fields: dataType -func (_m *MockTag) ContextToApp(dataType uint) (Tag, error) { - ret := _m.Called(dataType) - - if len(ret) == 0 { - panic("no return value specified for ContextToApp") - } - - var r0 Tag - var r1 error - if rf, ok := ret.Get(0).(func(uint) (Tag, error)); ok { - return rf(dataType) - } - if rf, ok := ret.Get(0).(func(uint) Tag); ok { - r0 = rf(dataType) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(Tag) - } - } - - if rf, ok := ret.Get(1).(func(uint) error); ok { - r1 = rf(dataType) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockTag_ContextToApp_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ContextToApp' -type MockTag_ContextToApp_Call struct { - *mock.Call -} - -// ContextToApp is a helper method to define mock.On call -// - dataType uint -func (_e *MockTag_Expecter) ContextToApp(dataType interface{}) *MockTag_ContextToApp_Call { - return &MockTag_ContextToApp_Call{Call: _e.mock.On("ContextToApp", dataType)} -} - -func (_c *MockTag_ContextToApp_Call) Run(run func(dataType uint)) *MockTag_ContextToApp_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(uint)) - }) - return _c -} - -func (_c *MockTag_ContextToApp_Call) Return(_a0 Tag, _a1 error) *MockTag_ContextToApp_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockTag_ContextToApp_Call) RunAndReturn(run func(uint) (Tag, error)) *MockTag_ContextToApp_Call { - _c.Call.Return(run) - return _c -} - -// Decode provides a mock function with given fields: pdu -func (_m *MockTag) Decode(pdu PDUData) error { - ret := _m.Called(pdu) - - if len(ret) == 0 { - panic("no return value specified for Decode") - } - - var r0 error - if rf, ok := ret.Get(0).(func(PDUData) error); ok { - r0 = rf(pdu) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockTag_Decode_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Decode' -type MockTag_Decode_Call struct { - *mock.Call -} - -// Decode is a helper method to define mock.On call -// - pdu PDUData -func (_e *MockTag_Expecter) Decode(pdu interface{}) *MockTag_Decode_Call { - return &MockTag_Decode_Call{Call: _e.mock.On("Decode", pdu)} -} - -func (_c *MockTag_Decode_Call) Run(run func(pdu PDUData)) *MockTag_Decode_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(PDUData)) - }) - return _c -} - -func (_c *MockTag_Decode_Call) Return(_a0 error) *MockTag_Decode_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockTag_Decode_Call) RunAndReturn(run func(PDUData) error) *MockTag_Decode_Call { - _c.Call.Return(run) - return _c -} - -// Encode provides a mock function with given fields: pdu -func (_m *MockTag) Encode(pdu PDUData) { - _m.Called(pdu) -} - -// MockTag_Encode_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Encode' -type MockTag_Encode_Call struct { - *mock.Call -} - -// Encode is a helper method to define mock.On call -// - pdu PDUData -func (_e *MockTag_Expecter) Encode(pdu interface{}) *MockTag_Encode_Call { - return &MockTag_Encode_Call{Call: _e.mock.On("Encode", pdu)} -} - -func (_c *MockTag_Encode_Call) Run(run func(pdu PDUData)) *MockTag_Encode_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(PDUData)) - }) - return _c -} - -func (_c *MockTag_Encode_Call) Return() *MockTag_Encode_Call { - _c.Call.Return() - return _c -} - -func (_c *MockTag_Encode_Call) RunAndReturn(run func(PDUData)) *MockTag_Encode_Call { - _c.Call.Return(run) - return _c -} - -// GetTagClass provides a mock function with given fields: -func (_m *MockTag) GetTagClass() model.TagClass { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetTagClass") - } - - var r0 model.TagClass - if rf, ok := ret.Get(0).(func() model.TagClass); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(model.TagClass) - } - - return r0 -} - -// MockTag_GetTagClass_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetTagClass' -type MockTag_GetTagClass_Call struct { - *mock.Call -} - -// GetTagClass is a helper method to define mock.On call -func (_e *MockTag_Expecter) GetTagClass() *MockTag_GetTagClass_Call { - return &MockTag_GetTagClass_Call{Call: _e.mock.On("GetTagClass")} -} - -func (_c *MockTag_GetTagClass_Call) Run(run func()) *MockTag_GetTagClass_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockTag_GetTagClass_Call) Return(_a0 model.TagClass) *MockTag_GetTagClass_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockTag_GetTagClass_Call) RunAndReturn(run func() model.TagClass) *MockTag_GetTagClass_Call { - _c.Call.Return(run) - return _c -} - -// GetTagData provides a mock function with given fields: -func (_m *MockTag) GetTagData() []byte { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetTagData") - } - - var r0 []byte - if rf, ok := ret.Get(0).(func() []byte); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]byte) - } - } - - return r0 -} - -// MockTag_GetTagData_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetTagData' -type MockTag_GetTagData_Call struct { - *mock.Call -} - -// GetTagData is a helper method to define mock.On call -func (_e *MockTag_Expecter) GetTagData() *MockTag_GetTagData_Call { - return &MockTag_GetTagData_Call{Call: _e.mock.On("GetTagData")} -} - -func (_c *MockTag_GetTagData_Call) Run(run func()) *MockTag_GetTagData_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockTag_GetTagData_Call) Return(_a0 []byte) *MockTag_GetTagData_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockTag_GetTagData_Call) RunAndReturn(run func() []byte) *MockTag_GetTagData_Call { - _c.Call.Return(run) - return _c -} - -// GetTagLvt provides a mock function with given fields: -func (_m *MockTag) GetTagLvt() int { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetTagLvt") - } - - var r0 int - if rf, ok := ret.Get(0).(func() int); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(int) - } - - return r0 -} - -// MockTag_GetTagLvt_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetTagLvt' -type MockTag_GetTagLvt_Call struct { - *mock.Call -} - -// GetTagLvt is a helper method to define mock.On call -func (_e *MockTag_Expecter) GetTagLvt() *MockTag_GetTagLvt_Call { - return &MockTag_GetTagLvt_Call{Call: _e.mock.On("GetTagLvt")} -} - -func (_c *MockTag_GetTagLvt_Call) Run(run func()) *MockTag_GetTagLvt_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockTag_GetTagLvt_Call) Return(_a0 int) *MockTag_GetTagLvt_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockTag_GetTagLvt_Call) RunAndReturn(run func() int) *MockTag_GetTagLvt_Call { - _c.Call.Return(run) - return _c -} - -// GetTagNumber provides a mock function with given fields: -func (_m *MockTag) GetTagNumber() uint { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetTagNumber") - } - - var r0 uint - if rf, ok := ret.Get(0).(func() uint); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(uint) - } - - return r0 -} - -// MockTag_GetTagNumber_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetTagNumber' -type MockTag_GetTagNumber_Call struct { - *mock.Call -} - -// GetTagNumber is a helper method to define mock.On call -func (_e *MockTag_Expecter) GetTagNumber() *MockTag_GetTagNumber_Call { - return &MockTag_GetTagNumber_Call{Call: _e.mock.On("GetTagNumber")} -} - -func (_c *MockTag_GetTagNumber_Call) Run(run func()) *MockTag_GetTagNumber_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockTag_GetTagNumber_Call) Return(_a0 uint) *MockTag_GetTagNumber_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockTag_GetTagNumber_Call) RunAndReturn(run func() uint) *MockTag_GetTagNumber_Call { - _c.Call.Return(run) - return _c -} - -// set provides a mock function with given fields: args -func (_m *MockTag) set(args Args) { - _m.Called(args) -} - -// MockTag_set_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'set' -type MockTag_set_Call struct { - *mock.Call -} - -// set is a helper method to define mock.On call -// - args Args -func (_e *MockTag_Expecter) set(args interface{}) *MockTag_set_Call { - return &MockTag_set_Call{Call: _e.mock.On("set", args)} -} - -func (_c *MockTag_set_Call) Run(run func(args Args)) *MockTag_set_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(Args)) - }) - return _c -} - -func (_c *MockTag_set_Call) Return() *MockTag_set_Call { - _c.Call.Return() - return _c -} - -func (_c *MockTag_set_Call) RunAndReturn(run func(Args)) *MockTag_set_Call { - _c.Call.Return(run) - return _c -} - -// setAppData provides a mock function with given fields: tagNumber, tdata -func (_m *MockTag) setAppData(tagNumber uint, tdata []byte) { - _m.Called(tagNumber, tdata) -} - -// MockTag_setAppData_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'setAppData' -type MockTag_setAppData_Call struct { - *mock.Call -} - -// setAppData is a helper method to define mock.On call -// - tagNumber uint -// - tdata []byte -func (_e *MockTag_Expecter) setAppData(tagNumber interface{}, tdata interface{}) *MockTag_setAppData_Call { - return &MockTag_setAppData_Call{Call: _e.mock.On("setAppData", tagNumber, tdata)} -} - -func (_c *MockTag_setAppData_Call) Run(run func(tagNumber uint, tdata []byte)) *MockTag_setAppData_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(uint), args[1].([]byte)) - }) - return _c -} - -func (_c *MockTag_setAppData_Call) Return() *MockTag_setAppData_Call { - _c.Call.Return() - return _c -} - -func (_c *MockTag_setAppData_Call) RunAndReturn(run func(uint, []byte)) *MockTag_setAppData_Call { - _c.Call.Return(run) - return _c -} - -// NewMockTag creates a new instance of MockTag. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewMockTag(t interface { - mock.TestingT - Cleanup(func()) -}) *MockTag { - mock := &MockTag{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/plc4go/internal/bacnetip/mock_TaskManager_test.go b/plc4go/internal/bacnetip/mock_TaskManager_test.go deleted file mode 100644 index 1993b26531c..00000000000 --- a/plc4go/internal/bacnetip/mock_TaskManager_test.go +++ /dev/null @@ -1,507 +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 - * - * https://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. - */ - -// Code generated by mockery v2.42.2. DO NOT EDIT. - -package bacnetip - -import ( - time "time" - - mock "github.com/stretchr/testify/mock" -) - -// MockTaskManager is an autogenerated mock type for the TaskManager type -type MockTaskManager struct { - mock.Mock -} - -type MockTaskManager_Expecter struct { - mock *mock.Mock -} - -func (_m *MockTaskManager) EXPECT() *MockTaskManager_Expecter { - return &MockTaskManager_Expecter{mock: &_m.Mock} -} - -// ClearTasks provides a mock function with given fields: -func (_m *MockTaskManager) ClearTasks() { - _m.Called() -} - -// MockTaskManager_ClearTasks_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ClearTasks' -type MockTaskManager_ClearTasks_Call struct { - *mock.Call -} - -// ClearTasks is a helper method to define mock.On call -func (_e *MockTaskManager_Expecter) ClearTasks() *MockTaskManager_ClearTasks_Call { - return &MockTaskManager_ClearTasks_Call{Call: _e.mock.On("ClearTasks")} -} - -func (_c *MockTaskManager_ClearTasks_Call) Run(run func()) *MockTaskManager_ClearTasks_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockTaskManager_ClearTasks_Call) Return() *MockTaskManager_ClearTasks_Call { - _c.Call.Return() - return _c -} - -func (_c *MockTaskManager_ClearTasks_Call) RunAndReturn(run func()) *MockTaskManager_ClearTasks_Call { - _c.Call.Return(run) - return _c -} - -// CountTasks provides a mock function with given fields: -func (_m *MockTaskManager) CountTasks() int { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for CountTasks") - } - - var r0 int - if rf, ok := ret.Get(0).(func() int); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(int) - } - - return r0 -} - -// MockTaskManager_CountTasks_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CountTasks' -type MockTaskManager_CountTasks_Call struct { - *mock.Call -} - -// CountTasks is a helper method to define mock.On call -func (_e *MockTaskManager_Expecter) CountTasks() *MockTaskManager_CountTasks_Call { - return &MockTaskManager_CountTasks_Call{Call: _e.mock.On("CountTasks")} -} - -func (_c *MockTaskManager_CountTasks_Call) Run(run func()) *MockTaskManager_CountTasks_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockTaskManager_CountTasks_Call) Return(_a0 int) *MockTaskManager_CountTasks_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockTaskManager_CountTasks_Call) RunAndReturn(run func() int) *MockTaskManager_CountTasks_Call { - _c.Call.Return(run) - return _c -} - -// GetNextTask provides a mock function with given fields: -func (_m *MockTaskManager) GetNextTask() (TaskRequirements, *time.Duration) { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetNextTask") - } - - var r0 TaskRequirements - var r1 *time.Duration - if rf, ok := ret.Get(0).(func() (TaskRequirements, *time.Duration)); ok { - return rf() - } - if rf, ok := ret.Get(0).(func() TaskRequirements); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(TaskRequirements) - } - } - - if rf, ok := ret.Get(1).(func() *time.Duration); ok { - r1 = rf() - } else { - if ret.Get(1) != nil { - r1 = ret.Get(1).(*time.Duration) - } - } - - return r0, r1 -} - -// MockTaskManager_GetNextTask_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetNextTask' -type MockTaskManager_GetNextTask_Call struct { - *mock.Call -} - -// GetNextTask is a helper method to define mock.On call -func (_e *MockTaskManager_Expecter) GetNextTask() *MockTaskManager_GetNextTask_Call { - return &MockTaskManager_GetNextTask_Call{Call: _e.mock.On("GetNextTask")} -} - -func (_c *MockTaskManager_GetNextTask_Call) Run(run func()) *MockTaskManager_GetNextTask_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockTaskManager_GetNextTask_Call) Return(_a0 TaskRequirements, _a1 *time.Duration) *MockTaskManager_GetNextTask_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockTaskManager_GetNextTask_Call) RunAndReturn(run func() (TaskRequirements, *time.Duration)) *MockTaskManager_GetNextTask_Call { - _c.Call.Return(run) - return _c -} - -// GetTasks provides a mock function with given fields: -func (_m *MockTaskManager) GetTasks() []TaskRequirements { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetTasks") - } - - var r0 []TaskRequirements - if rf, ok := ret.Get(0).(func() []TaskRequirements); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]TaskRequirements) - } - } - - return r0 -} - -// MockTaskManager_GetTasks_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetTasks' -type MockTaskManager_GetTasks_Call struct { - *mock.Call -} - -// GetTasks is a helper method to define mock.On call -func (_e *MockTaskManager_Expecter) GetTasks() *MockTaskManager_GetTasks_Call { - return &MockTaskManager_GetTasks_Call{Call: _e.mock.On("GetTasks")} -} - -func (_c *MockTaskManager_GetTasks_Call) Run(run func()) *MockTaskManager_GetTasks_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockTaskManager_GetTasks_Call) Return(_a0 []TaskRequirements) *MockTaskManager_GetTasks_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockTaskManager_GetTasks_Call) RunAndReturn(run func() []TaskRequirements) *MockTaskManager_GetTasks_Call { - _c.Call.Return(run) - return _c -} - -// GetTime provides a mock function with given fields: -func (_m *MockTaskManager) GetTime() time.Time { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetTime") - } - - var r0 time.Time - if rf, ok := ret.Get(0).(func() time.Time); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(time.Time) - } - - return r0 -} - -// MockTaskManager_GetTime_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetTime' -type MockTaskManager_GetTime_Call struct { - *mock.Call -} - -// GetTime is a helper method to define mock.On call -func (_e *MockTaskManager_Expecter) GetTime() *MockTaskManager_GetTime_Call { - return &MockTaskManager_GetTime_Call{Call: _e.mock.On("GetTime")} -} - -func (_c *MockTaskManager_GetTime_Call) Run(run func()) *MockTaskManager_GetTime_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockTaskManager_GetTime_Call) Return(_a0 time.Time) *MockTaskManager_GetTime_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockTaskManager_GetTime_Call) RunAndReturn(run func() time.Time) *MockTaskManager_GetTime_Call { - _c.Call.Return(run) - return _c -} - -// InstallTask provides a mock function with given fields: task -func (_m *MockTaskManager) InstallTask(task TaskRequirements) { - _m.Called(task) -} - -// MockTaskManager_InstallTask_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'InstallTask' -type MockTaskManager_InstallTask_Call struct { - *mock.Call -} - -// InstallTask is a helper method to define mock.On call -// - task TaskRequirements -func (_e *MockTaskManager_Expecter) InstallTask(task interface{}) *MockTaskManager_InstallTask_Call { - return &MockTaskManager_InstallTask_Call{Call: _e.mock.On("InstallTask", task)} -} - -func (_c *MockTaskManager_InstallTask_Call) Run(run func(task TaskRequirements)) *MockTaskManager_InstallTask_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(TaskRequirements)) - }) - return _c -} - -func (_c *MockTaskManager_InstallTask_Call) Return() *MockTaskManager_InstallTask_Call { - _c.Call.Return() - return _c -} - -func (_c *MockTaskManager_InstallTask_Call) RunAndReturn(run func(TaskRequirements)) *MockTaskManager_InstallTask_Call { - _c.Call.Return(run) - return _c -} - -// PopTask provides a mock function with given fields: -func (_m *MockTaskManager) PopTask() TaskRequirements { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for PopTask") - } - - var r0 TaskRequirements - if rf, ok := ret.Get(0).(func() TaskRequirements); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(TaskRequirements) - } - } - - return r0 -} - -// MockTaskManager_PopTask_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PopTask' -type MockTaskManager_PopTask_Call struct { - *mock.Call -} - -// PopTask is a helper method to define mock.On call -func (_e *MockTaskManager_Expecter) PopTask() *MockTaskManager_PopTask_Call { - return &MockTaskManager_PopTask_Call{Call: _e.mock.On("PopTask")} -} - -func (_c *MockTaskManager_PopTask_Call) Run(run func()) *MockTaskManager_PopTask_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockTaskManager_PopTask_Call) Return(_a0 TaskRequirements) *MockTaskManager_PopTask_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockTaskManager_PopTask_Call) RunAndReturn(run func() TaskRequirements) *MockTaskManager_PopTask_Call { - _c.Call.Return(run) - return _c -} - -// ProcessTask provides a mock function with given fields: task -func (_m *MockTaskManager) ProcessTask(task TaskRequirements) { - _m.Called(task) -} - -// MockTaskManager_ProcessTask_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ProcessTask' -type MockTaskManager_ProcessTask_Call struct { - *mock.Call -} - -// ProcessTask is a helper method to define mock.On call -// - task TaskRequirements -func (_e *MockTaskManager_Expecter) ProcessTask(task interface{}) *MockTaskManager_ProcessTask_Call { - return &MockTaskManager_ProcessTask_Call{Call: _e.mock.On("ProcessTask", task)} -} - -func (_c *MockTaskManager_ProcessTask_Call) Run(run func(task TaskRequirements)) *MockTaskManager_ProcessTask_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(TaskRequirements)) - }) - return _c -} - -func (_c *MockTaskManager_ProcessTask_Call) Return() *MockTaskManager_ProcessTask_Call { - _c.Call.Return() - return _c -} - -func (_c *MockTaskManager_ProcessTask_Call) RunAndReturn(run func(TaskRequirements)) *MockTaskManager_ProcessTask_Call { - _c.Call.Return(run) - return _c -} - -// ResumeTask provides a mock function with given fields: task -func (_m *MockTaskManager) ResumeTask(task TaskRequirements) { - _m.Called(task) -} - -// MockTaskManager_ResumeTask_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ResumeTask' -type MockTaskManager_ResumeTask_Call struct { - *mock.Call -} - -// ResumeTask is a helper method to define mock.On call -// - task TaskRequirements -func (_e *MockTaskManager_Expecter) ResumeTask(task interface{}) *MockTaskManager_ResumeTask_Call { - return &MockTaskManager_ResumeTask_Call{Call: _e.mock.On("ResumeTask", task)} -} - -func (_c *MockTaskManager_ResumeTask_Call) Run(run func(task TaskRequirements)) *MockTaskManager_ResumeTask_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(TaskRequirements)) - }) - return _c -} - -func (_c *MockTaskManager_ResumeTask_Call) Return() *MockTaskManager_ResumeTask_Call { - _c.Call.Return() - return _c -} - -func (_c *MockTaskManager_ResumeTask_Call) RunAndReturn(run func(TaskRequirements)) *MockTaskManager_ResumeTask_Call { - _c.Call.Return(run) - return _c -} - -// String provides a mock function with given fields: -func (_m *MockTaskManager) String() string { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for String") - } - - var r0 string - if rf, ok := ret.Get(0).(func() string); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(string) - } - - return r0 -} - -// MockTaskManager_String_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'String' -type MockTaskManager_String_Call struct { - *mock.Call -} - -// String is a helper method to define mock.On call -func (_e *MockTaskManager_Expecter) String() *MockTaskManager_String_Call { - return &MockTaskManager_String_Call{Call: _e.mock.On("String")} -} - -func (_c *MockTaskManager_String_Call) Run(run func()) *MockTaskManager_String_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockTaskManager_String_Call) Return(_a0 string) *MockTaskManager_String_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockTaskManager_String_Call) RunAndReturn(run func() string) *MockTaskManager_String_Call { - _c.Call.Return(run) - return _c -} - -// SuspendTask provides a mock function with given fields: task -func (_m *MockTaskManager) SuspendTask(task TaskRequirements) { - _m.Called(task) -} - -// MockTaskManager_SuspendTask_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SuspendTask' -type MockTaskManager_SuspendTask_Call struct { - *mock.Call -} - -// SuspendTask is a helper method to define mock.On call -// - task TaskRequirements -func (_e *MockTaskManager_Expecter) SuspendTask(task interface{}) *MockTaskManager_SuspendTask_Call { - return &MockTaskManager_SuspendTask_Call{Call: _e.mock.On("SuspendTask", task)} -} - -func (_c *MockTaskManager_SuspendTask_Call) Run(run func(task TaskRequirements)) *MockTaskManager_SuspendTask_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(TaskRequirements)) - }) - return _c -} - -func (_c *MockTaskManager_SuspendTask_Call) Return() *MockTaskManager_SuspendTask_Call { - _c.Call.Return() - return _c -} - -func (_c *MockTaskManager_SuspendTask_Call) RunAndReturn(run func(TaskRequirements)) *MockTaskManager_SuspendTask_Call { - _c.Call.Return(run) - return _c -} - -// NewMockTaskManager creates a new instance of MockTaskManager. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewMockTaskManager(t interface { - mock.TestingT - Cleanup(func()) -}) *MockTaskManager { - mock := &MockTaskManager{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/plc4go/internal/bacnetip/mock_TaskRequirements_test.go b/plc4go/internal/bacnetip/mock_TaskRequirements_test.go deleted file mode 100644 index 1cc9675afcf..00000000000 --- a/plc4go/internal/bacnetip/mock_TaskRequirements_test.go +++ /dev/null @@ -1,303 +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 - * - * https://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. - */ - -// Code generated by mockery v2.42.2. DO NOT EDIT. - -package bacnetip - -import ( - time "time" - - mock "github.com/stretchr/testify/mock" -) - -// MockTaskRequirements is an autogenerated mock type for the TaskRequirements type -type MockTaskRequirements struct { - mock.Mock -} - -type MockTaskRequirements_Expecter struct { - mock *mock.Mock -} - -func (_m *MockTaskRequirements) EXPECT() *MockTaskRequirements_Expecter { - return &MockTaskRequirements_Expecter{mock: &_m.Mock} -} - -// GetIsScheduled provides a mock function with given fields: -func (_m *MockTaskRequirements) GetIsScheduled() bool { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetIsScheduled") - } - - var r0 bool - if rf, ok := ret.Get(0).(func() bool); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(bool) - } - - return r0 -} - -// MockTaskRequirements_GetIsScheduled_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetIsScheduled' -type MockTaskRequirements_GetIsScheduled_Call struct { - *mock.Call -} - -// GetIsScheduled is a helper method to define mock.On call -func (_e *MockTaskRequirements_Expecter) GetIsScheduled() *MockTaskRequirements_GetIsScheduled_Call { - return &MockTaskRequirements_GetIsScheduled_Call{Call: _e.mock.On("GetIsScheduled")} -} - -func (_c *MockTaskRequirements_GetIsScheduled_Call) Run(run func()) *MockTaskRequirements_GetIsScheduled_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockTaskRequirements_GetIsScheduled_Call) Return(_a0 bool) *MockTaskRequirements_GetIsScheduled_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockTaskRequirements_GetIsScheduled_Call) RunAndReturn(run func() bool) *MockTaskRequirements_GetIsScheduled_Call { - _c.Call.Return(run) - return _c -} - -// GetTaskTime provides a mock function with given fields: -func (_m *MockTaskRequirements) GetTaskTime() *time.Time { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetTaskTime") - } - - var r0 *time.Time - if rf, ok := ret.Get(0).(func() *time.Time); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*time.Time) - } - } - - return r0 -} - -// MockTaskRequirements_GetTaskTime_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetTaskTime' -type MockTaskRequirements_GetTaskTime_Call struct { - *mock.Call -} - -// GetTaskTime is a helper method to define mock.On call -func (_e *MockTaskRequirements_Expecter) GetTaskTime() *MockTaskRequirements_GetTaskTime_Call { - return &MockTaskRequirements_GetTaskTime_Call{Call: _e.mock.On("GetTaskTime")} -} - -func (_c *MockTaskRequirements_GetTaskTime_Call) Run(run func()) *MockTaskRequirements_GetTaskTime_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockTaskRequirements_GetTaskTime_Call) Return(_a0 *time.Time) *MockTaskRequirements_GetTaskTime_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockTaskRequirements_GetTaskTime_Call) RunAndReturn(run func() *time.Time) *MockTaskRequirements_GetTaskTime_Call { - _c.Call.Return(run) - return _c -} - -// InstallTask provides a mock function with given fields: options -func (_m *MockTaskRequirements) InstallTask(options InstallTaskOptions) { - _m.Called(options) -} - -// MockTaskRequirements_InstallTask_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'InstallTask' -type MockTaskRequirements_InstallTask_Call struct { - *mock.Call -} - -// InstallTask is a helper method to define mock.On call -// - options InstallTaskOptions -func (_e *MockTaskRequirements_Expecter) InstallTask(options interface{}) *MockTaskRequirements_InstallTask_Call { - return &MockTaskRequirements_InstallTask_Call{Call: _e.mock.On("InstallTask", options)} -} - -func (_c *MockTaskRequirements_InstallTask_Call) Run(run func(options InstallTaskOptions)) *MockTaskRequirements_InstallTask_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(InstallTaskOptions)) - }) - return _c -} - -func (_c *MockTaskRequirements_InstallTask_Call) Return() *MockTaskRequirements_InstallTask_Call { - _c.Call.Return() - return _c -} - -func (_c *MockTaskRequirements_InstallTask_Call) RunAndReturn(run func(InstallTaskOptions)) *MockTaskRequirements_InstallTask_Call { - _c.Call.Return(run) - return _c -} - -// ProcessTask provides a mock function with given fields: -func (_m *MockTaskRequirements) ProcessTask() error { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for ProcessTask") - } - - var r0 error - if rf, ok := ret.Get(0).(func() error); ok { - r0 = rf() - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockTaskRequirements_ProcessTask_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ProcessTask' -type MockTaskRequirements_ProcessTask_Call struct { - *mock.Call -} - -// ProcessTask is a helper method to define mock.On call -func (_e *MockTaskRequirements_Expecter) ProcessTask() *MockTaskRequirements_ProcessTask_Call { - return &MockTaskRequirements_ProcessTask_Call{Call: _e.mock.On("ProcessTask")} -} - -func (_c *MockTaskRequirements_ProcessTask_Call) Run(run func()) *MockTaskRequirements_ProcessTask_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockTaskRequirements_ProcessTask_Call) Return(_a0 error) *MockTaskRequirements_ProcessTask_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockTaskRequirements_ProcessTask_Call) RunAndReturn(run func() error) *MockTaskRequirements_ProcessTask_Call { - _c.Call.Return(run) - return _c -} - -// SetIsScheduled provides a mock function with given fields: isScheduled -func (_m *MockTaskRequirements) SetIsScheduled(isScheduled bool) { - _m.Called(isScheduled) -} - -// MockTaskRequirements_SetIsScheduled_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetIsScheduled' -type MockTaskRequirements_SetIsScheduled_Call struct { - *mock.Call -} - -// SetIsScheduled is a helper method to define mock.On call -// - isScheduled bool -func (_e *MockTaskRequirements_Expecter) SetIsScheduled(isScheduled interface{}) *MockTaskRequirements_SetIsScheduled_Call { - return &MockTaskRequirements_SetIsScheduled_Call{Call: _e.mock.On("SetIsScheduled", isScheduled)} -} - -func (_c *MockTaskRequirements_SetIsScheduled_Call) Run(run func(isScheduled bool)) *MockTaskRequirements_SetIsScheduled_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(bool)) - }) - return _c -} - -func (_c *MockTaskRequirements_SetIsScheduled_Call) Return() *MockTaskRequirements_SetIsScheduled_Call { - _c.Call.Return() - return _c -} - -func (_c *MockTaskRequirements_SetIsScheduled_Call) RunAndReturn(run func(bool)) *MockTaskRequirements_SetIsScheduled_Call { - _c.Call.Return(run) - return _c -} - -// String provides a mock function with given fields: -func (_m *MockTaskRequirements) String() string { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for String") - } - - var r0 string - if rf, ok := ret.Get(0).(func() string); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(string) - } - - return r0 -} - -// MockTaskRequirements_String_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'String' -type MockTaskRequirements_String_Call struct { - *mock.Call -} - -// String is a helper method to define mock.On call -func (_e *MockTaskRequirements_Expecter) String() *MockTaskRequirements_String_Call { - return &MockTaskRequirements_String_Call{Call: _e.mock.On("String")} -} - -func (_c *MockTaskRequirements_String_Call) Run(run func()) *MockTaskRequirements_String_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockTaskRequirements_String_Call) Return(_a0 string) *MockTaskRequirements_String_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockTaskRequirements_String_Call) RunAndReturn(run func() string) *MockTaskRequirements_String_Call { - _c.Call.Return(run) - return _c -} - -// NewMockTaskRequirements creates a new instance of MockTaskRequirements. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewMockTaskRequirements(t interface { - mock.TestingT - Cleanup(func()) -}) *MockTaskRequirements { - mock := &MockTaskRequirements{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/plc4go/internal/bacnetip/mock_TrafficLogger_test.go b/plc4go/internal/bacnetip/mock_TrafficLogger_test.go deleted file mode 100644 index 98126786f72..00000000000 --- a/plc4go/internal/bacnetip/mock_TrafficLogger_test.go +++ /dev/null @@ -1,84 +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 - * - * https://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. - */ - -// Code generated by mockery v2.42.2. DO NOT EDIT. - -package bacnetip - -import mock "github.com/stretchr/testify/mock" - -// MockTrafficLogger is an autogenerated mock type for the TrafficLogger type -type MockTrafficLogger struct { - mock.Mock -} - -type MockTrafficLogger_Expecter struct { - mock *mock.Mock -} - -func (_m *MockTrafficLogger) EXPECT() *MockTrafficLogger_Expecter { - return &MockTrafficLogger_Expecter{mock: &_m.Mock} -} - -// Call provides a mock function with given fields: args -func (_m *MockTrafficLogger) Call(args Args) { - _m.Called(args) -} - -// MockTrafficLogger_Call_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Call' -type MockTrafficLogger_Call_Call struct { - *mock.Call -} - -// Call is a helper method to define mock.On call -// - args Args -func (_e *MockTrafficLogger_Expecter) Call(args interface{}) *MockTrafficLogger_Call_Call { - return &MockTrafficLogger_Call_Call{Call: _e.mock.On("Call", args)} -} - -func (_c *MockTrafficLogger_Call_Call) Run(run func(args Args)) *MockTrafficLogger_Call_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(Args)) - }) - return _c -} - -func (_c *MockTrafficLogger_Call_Call) Return() *MockTrafficLogger_Call_Call { - _c.Call.Return() - return _c -} - -func (_c *MockTrafficLogger_Call_Call) RunAndReturn(run func(Args)) *MockTrafficLogger_Call_Call { - _c.Call.Return(run) - return _c -} - -// NewMockTrafficLogger creates a new instance of MockTrafficLogger. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewMockTrafficLogger(t interface { - mock.TestingT - Cleanup(func()) -}) *MockTrafficLogger { - mock := &MockTrafficLogger{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/plc4go/internal/bacnetip/mock_WhoIsIAmServicesRequirements_test.go b/plc4go/internal/bacnetip/mock_WhoIsIAmServicesRequirements_test.go deleted file mode 100644 index 3088620415d..00000000000 --- a/plc4go/internal/bacnetip/mock_WhoIsIAmServicesRequirements_test.go +++ /dev/null @@ -1,98 +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 - * - * https://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. - */ - -// Code generated by mockery v2.42.2. DO NOT EDIT. - -package bacnetip - -import mock "github.com/stretchr/testify/mock" - -// MockWhoIsIAmServicesRequirements is an autogenerated mock type for the WhoIsIAmServicesRequirements type -type MockWhoIsIAmServicesRequirements struct { - mock.Mock -} - -type MockWhoIsIAmServicesRequirements_Expecter struct { - mock *mock.Mock -} - -func (_m *MockWhoIsIAmServicesRequirements) EXPECT() *MockWhoIsIAmServicesRequirements_Expecter { - return &MockWhoIsIAmServicesRequirements_Expecter{mock: &_m.Mock} -} - -// Request provides a mock function with given fields: args, kwargs -func (_m *MockWhoIsIAmServicesRequirements) Request(args Args, kwargs KWArgs) error { - ret := _m.Called(args, kwargs) - - if len(ret) == 0 { - panic("no return value specified for Request") - } - - var r0 error - if rf, ok := ret.Get(0).(func(Args, KWArgs) error); ok { - r0 = rf(args, kwargs) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockWhoIsIAmServicesRequirements_Request_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Request' -type MockWhoIsIAmServicesRequirements_Request_Call struct { - *mock.Call -} - -// Request is a helper method to define mock.On call -// - args Args -// - kwargs KWArgs -func (_e *MockWhoIsIAmServicesRequirements_Expecter) Request(args interface{}, kwargs interface{}) *MockWhoIsIAmServicesRequirements_Request_Call { - return &MockWhoIsIAmServicesRequirements_Request_Call{Call: _e.mock.On("Request", args, kwargs)} -} - -func (_c *MockWhoIsIAmServicesRequirements_Request_Call) Run(run func(args Args, kwargs KWArgs)) *MockWhoIsIAmServicesRequirements_Request_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(Args), args[1].(KWArgs)) - }) - return _c -} - -func (_c *MockWhoIsIAmServicesRequirements_Request_Call) Return(_a0 error) *MockWhoIsIAmServicesRequirements_Request_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockWhoIsIAmServicesRequirements_Request_Call) RunAndReturn(run func(Args, KWArgs) error) *MockWhoIsIAmServicesRequirements_Request_Call { - _c.Call.Return(run) - return _c -} - -// NewMockWhoIsIAmServicesRequirements creates a new instance of MockWhoIsIAmServicesRequirements. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewMockWhoIsIAmServicesRequirements(t interface { - mock.TestingT - Cleanup(func()) -}) *MockWhoIsIAmServicesRequirements { - mock := &MockWhoIsIAmServicesRequirements{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/plc4go/internal/bacnetip/mock__APDU_test.go b/plc4go/internal/bacnetip/mock__APDU_test.go deleted file mode 100644 index fdbf4fde415..00000000000 --- a/plc4go/internal/bacnetip/mock__APDU_test.go +++ /dev/null @@ -1,1502 +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 - * - * https://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. - */ - -// Code generated by mockery v2.42.2. DO NOT EDIT. - -package bacnetip - -import ( - context "context" - - model "github.com/apache/plc4x/plc4go/protocols/bacnetip/readwrite/model" - mock "github.com/stretchr/testify/mock" - - spi "github.com/apache/plc4x/plc4go/spi" - - utils "github.com/apache/plc4x/plc4go/spi/utils" -) - -// mock_APDU is an autogenerated mock type for the _APDU type -type mock_APDU struct { - mock.Mock -} - -type mock_APDU_Expecter struct { - mock *mock.Mock -} - -func (_m *mock_APDU) EXPECT() *mock_APDU_Expecter { - return &mock_APDU_Expecter{mock: &_m.Mock} -} - -// Decode provides a mock function with given fields: pdu -func (_m *mock_APDU) Decode(pdu Arg) error { - ret := _m.Called(pdu) - - if len(ret) == 0 { - panic("no return value specified for Decode") - } - - var r0 error - if rf, ok := ret.Get(0).(func(Arg) error); ok { - r0 = rf(pdu) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// mock_APDU_Decode_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Decode' -type mock_APDU_Decode_Call struct { - *mock.Call -} - -// Decode is a helper method to define mock.On call -// - pdu Arg -func (_e *mock_APDU_Expecter) Decode(pdu interface{}) *mock_APDU_Decode_Call { - return &mock_APDU_Decode_Call{Call: _e.mock.On("Decode", pdu)} -} - -func (_c *mock_APDU_Decode_Call) Run(run func(pdu Arg)) *mock_APDU_Decode_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(Arg)) - }) - return _c -} - -func (_c *mock_APDU_Decode_Call) Return(_a0 error) *mock_APDU_Decode_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *mock_APDU_Decode_Call) RunAndReturn(run func(Arg) error) *mock_APDU_Decode_Call { - _c.Call.Return(run) - return _c -} - -// Encode provides a mock function with given fields: pdu -func (_m *mock_APDU) Encode(pdu Arg) error { - ret := _m.Called(pdu) - - if len(ret) == 0 { - panic("no return value specified for Encode") - } - - var r0 error - if rf, ok := ret.Get(0).(func(Arg) error); ok { - r0 = rf(pdu) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// mock_APDU_Encode_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Encode' -type mock_APDU_Encode_Call struct { - *mock.Call -} - -// Encode is a helper method to define mock.On call -// - pdu Arg -func (_e *mock_APDU_Expecter) Encode(pdu interface{}) *mock_APDU_Encode_Call { - return &mock_APDU_Encode_Call{Call: _e.mock.On("Encode", pdu)} -} - -func (_c *mock_APDU_Encode_Call) Run(run func(pdu Arg)) *mock_APDU_Encode_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(Arg)) - }) - return _c -} - -func (_c *mock_APDU_Encode_Call) Return(_a0 error) *mock_APDU_Encode_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *mock_APDU_Encode_Call) RunAndReturn(run func(Arg) error) *mock_APDU_Encode_Call { - _c.Call.Return(run) - return _c -} - -// Get provides a mock function with given fields: -func (_m *mock_APDU) Get() (byte, error) { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Get") - } - - var r0 byte - var r1 error - if rf, ok := ret.Get(0).(func() (byte, error)); ok { - return rf() - } - if rf, ok := ret.Get(0).(func() byte); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(byte) - } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// mock_APDU_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' -type mock_APDU_Get_Call struct { - *mock.Call -} - -// Get is a helper method to define mock.On call -func (_e *mock_APDU_Expecter) Get() *mock_APDU_Get_Call { - return &mock_APDU_Get_Call{Call: _e.mock.On("Get")} -} - -func (_c *mock_APDU_Get_Call) Run(run func()) *mock_APDU_Get_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *mock_APDU_Get_Call) Return(_a0 byte, _a1 error) *mock_APDU_Get_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *mock_APDU_Get_Call) RunAndReturn(run func() (byte, error)) *mock_APDU_Get_Call { - _c.Call.Return(run) - return _c -} - -// GetApduInvokeID provides a mock function with given fields: -func (_m *mock_APDU) GetApduInvokeID() *uint8 { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetApduInvokeID") - } - - var r0 *uint8 - if rf, ok := ret.Get(0).(func() *uint8); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*uint8) - } - } - - return r0 -} - -// mock_APDU_GetApduInvokeID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetApduInvokeID' -type mock_APDU_GetApduInvokeID_Call struct { - *mock.Call -} - -// GetApduInvokeID is a helper method to define mock.On call -func (_e *mock_APDU_Expecter) GetApduInvokeID() *mock_APDU_GetApduInvokeID_Call { - return &mock_APDU_GetApduInvokeID_Call{Call: _e.mock.On("GetApduInvokeID")} -} - -func (_c *mock_APDU_GetApduInvokeID_Call) Run(run func()) *mock_APDU_GetApduInvokeID_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *mock_APDU_GetApduInvokeID_Call) Return(_a0 *uint8) *mock_APDU_GetApduInvokeID_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *mock_APDU_GetApduInvokeID_Call) RunAndReturn(run func() *uint8) *mock_APDU_GetApduInvokeID_Call { - _c.Call.Return(run) - return _c -} - -// GetApduType provides a mock function with given fields: -func (_m *mock_APDU) GetApduType() model.ApduType { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetApduType") - } - - var r0 model.ApduType - if rf, ok := ret.Get(0).(func() model.ApduType); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(model.ApduType) - } - - return r0 -} - -// mock_APDU_GetApduType_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetApduType' -type mock_APDU_GetApduType_Call struct { - *mock.Call -} - -// GetApduType is a helper method to define mock.On call -func (_e *mock_APDU_Expecter) GetApduType() *mock_APDU_GetApduType_Call { - return &mock_APDU_GetApduType_Call{Call: _e.mock.On("GetApduType")} -} - -func (_c *mock_APDU_GetApduType_Call) Run(run func()) *mock_APDU_GetApduType_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *mock_APDU_GetApduType_Call) Return(_a0 model.ApduType) *mock_APDU_GetApduType_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *mock_APDU_GetApduType_Call) RunAndReturn(run func() model.ApduType) *mock_APDU_GetApduType_Call { - _c.Call.Return(run) - return _c -} - -// GetData provides a mock function with given fields: dlen -func (_m *mock_APDU) GetData(dlen int) ([]byte, error) { - ret := _m.Called(dlen) - - if len(ret) == 0 { - panic("no return value specified for GetData") - } - - var r0 []byte - var r1 error - if rf, ok := ret.Get(0).(func(int) ([]byte, error)); ok { - return rf(dlen) - } - if rf, ok := ret.Get(0).(func(int) []byte); ok { - r0 = rf(dlen) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]byte) - } - } - - if rf, ok := ret.Get(1).(func(int) error); ok { - r1 = rf(dlen) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// mock_APDU_GetData_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetData' -type mock_APDU_GetData_Call struct { - *mock.Call -} - -// GetData is a helper method to define mock.On call -// - dlen int -func (_e *mock_APDU_Expecter) GetData(dlen interface{}) *mock_APDU_GetData_Call { - return &mock_APDU_GetData_Call{Call: _e.mock.On("GetData", dlen)} -} - -func (_c *mock_APDU_GetData_Call) Run(run func(dlen int)) *mock_APDU_GetData_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(int)) - }) - return _c -} - -func (_c *mock_APDU_GetData_Call) Return(_a0 []byte, _a1 error) *mock_APDU_GetData_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *mock_APDU_GetData_Call) RunAndReturn(run func(int) ([]byte, error)) *mock_APDU_GetData_Call { - _c.Call.Return(run) - return _c -} - -// GetExpectingReply provides a mock function with given fields: -func (_m *mock_APDU) GetExpectingReply() bool { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetExpectingReply") - } - - var r0 bool - if rf, ok := ret.Get(0).(func() bool); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(bool) - } - - return r0 -} - -// mock_APDU_GetExpectingReply_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetExpectingReply' -type mock_APDU_GetExpectingReply_Call struct { - *mock.Call -} - -// GetExpectingReply is a helper method to define mock.On call -func (_e *mock_APDU_Expecter) GetExpectingReply() *mock_APDU_GetExpectingReply_Call { - return &mock_APDU_GetExpectingReply_Call{Call: _e.mock.On("GetExpectingReply")} -} - -func (_c *mock_APDU_GetExpectingReply_Call) Run(run func()) *mock_APDU_GetExpectingReply_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *mock_APDU_GetExpectingReply_Call) Return(_a0 bool) *mock_APDU_GetExpectingReply_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *mock_APDU_GetExpectingReply_Call) RunAndReturn(run func() bool) *mock_APDU_GetExpectingReply_Call { - _c.Call.Return(run) - return _c -} - -// GetLengthInBits provides a mock function with given fields: ctx -func (_m *mock_APDU) GetLengthInBits(ctx context.Context) uint16 { - ret := _m.Called(ctx) - - if len(ret) == 0 { - panic("no return value specified for GetLengthInBits") - } - - var r0 uint16 - if rf, ok := ret.Get(0).(func(context.Context) uint16); ok { - r0 = rf(ctx) - } else { - r0 = ret.Get(0).(uint16) - } - - return r0 -} - -// mock_APDU_GetLengthInBits_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetLengthInBits' -type mock_APDU_GetLengthInBits_Call struct { - *mock.Call -} - -// GetLengthInBits is a helper method to define mock.On call -// - ctx context.Context -func (_e *mock_APDU_Expecter) GetLengthInBits(ctx interface{}) *mock_APDU_GetLengthInBits_Call { - return &mock_APDU_GetLengthInBits_Call{Call: _e.mock.On("GetLengthInBits", ctx)} -} - -func (_c *mock_APDU_GetLengthInBits_Call) Run(run func(ctx context.Context)) *mock_APDU_GetLengthInBits_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context)) - }) - return _c -} - -func (_c *mock_APDU_GetLengthInBits_Call) Return(_a0 uint16) *mock_APDU_GetLengthInBits_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *mock_APDU_GetLengthInBits_Call) RunAndReturn(run func(context.Context) uint16) *mock_APDU_GetLengthInBits_Call { - _c.Call.Return(run) - return _c -} - -// GetLengthInBytes provides a mock function with given fields: ctx -func (_m *mock_APDU) GetLengthInBytes(ctx context.Context) uint16 { - ret := _m.Called(ctx) - - if len(ret) == 0 { - panic("no return value specified for GetLengthInBytes") - } - - var r0 uint16 - if rf, ok := ret.Get(0).(func(context.Context) uint16); ok { - r0 = rf(ctx) - } else { - r0 = ret.Get(0).(uint16) - } - - return r0 -} - -// mock_APDU_GetLengthInBytes_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetLengthInBytes' -type mock_APDU_GetLengthInBytes_Call struct { - *mock.Call -} - -// GetLengthInBytes is a helper method to define mock.On call -// - ctx context.Context -func (_e *mock_APDU_Expecter) GetLengthInBytes(ctx interface{}) *mock_APDU_GetLengthInBytes_Call { - return &mock_APDU_GetLengthInBytes_Call{Call: _e.mock.On("GetLengthInBytes", ctx)} -} - -func (_c *mock_APDU_GetLengthInBytes_Call) Run(run func(ctx context.Context)) *mock_APDU_GetLengthInBytes_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context)) - }) - return _c -} - -func (_c *mock_APDU_GetLengthInBytes_Call) Return(_a0 uint16) *mock_APDU_GetLengthInBytes_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *mock_APDU_GetLengthInBytes_Call) RunAndReturn(run func(context.Context) uint16) *mock_APDU_GetLengthInBytes_Call { - _c.Call.Return(run) - return _c -} - -// GetLong provides a mock function with given fields: -func (_m *mock_APDU) GetLong() (int64, error) { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetLong") - } - - var r0 int64 - var r1 error - if rf, ok := ret.Get(0).(func() (int64, error)); ok { - return rf() - } - if rf, ok := ret.Get(0).(func() int64); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(int64) - } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// mock_APDU_GetLong_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetLong' -type mock_APDU_GetLong_Call struct { - *mock.Call -} - -// GetLong is a helper method to define mock.On call -func (_e *mock_APDU_Expecter) GetLong() *mock_APDU_GetLong_Call { - return &mock_APDU_GetLong_Call{Call: _e.mock.On("GetLong")} -} - -func (_c *mock_APDU_GetLong_Call) Run(run func()) *mock_APDU_GetLong_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *mock_APDU_GetLong_Call) Return(_a0 int64, _a1 error) *mock_APDU_GetLong_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *mock_APDU_GetLong_Call) RunAndReturn(run func() (int64, error)) *mock_APDU_GetLong_Call { - _c.Call.Return(run) - return _c -} - -// GetNetworkPriority provides a mock function with given fields: -func (_m *mock_APDU) GetNetworkPriority() model.NPDUNetworkPriority { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetNetworkPriority") - } - - var r0 model.NPDUNetworkPriority - if rf, ok := ret.Get(0).(func() model.NPDUNetworkPriority); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(model.NPDUNetworkPriority) - } - - return r0 -} - -// mock_APDU_GetNetworkPriority_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetNetworkPriority' -type mock_APDU_GetNetworkPriority_Call struct { - *mock.Call -} - -// GetNetworkPriority is a helper method to define mock.On call -func (_e *mock_APDU_Expecter) GetNetworkPriority() *mock_APDU_GetNetworkPriority_Call { - return &mock_APDU_GetNetworkPriority_Call{Call: _e.mock.On("GetNetworkPriority")} -} - -func (_c *mock_APDU_GetNetworkPriority_Call) Run(run func()) *mock_APDU_GetNetworkPriority_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *mock_APDU_GetNetworkPriority_Call) Return(_a0 model.NPDUNetworkPriority) *mock_APDU_GetNetworkPriority_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *mock_APDU_GetNetworkPriority_Call) RunAndReturn(run func() model.NPDUNetworkPriority) *mock_APDU_GetNetworkPriority_Call { - _c.Call.Return(run) - return _c -} - -// GetPDUDestination provides a mock function with given fields: -func (_m *mock_APDU) GetPDUDestination() *Address { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetPDUDestination") - } - - var r0 *Address - if rf, ok := ret.Get(0).(func() *Address); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*Address) - } - } - - return r0 -} - -// mock_APDU_GetPDUDestination_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPDUDestination' -type mock_APDU_GetPDUDestination_Call struct { - *mock.Call -} - -// GetPDUDestination is a helper method to define mock.On call -func (_e *mock_APDU_Expecter) GetPDUDestination() *mock_APDU_GetPDUDestination_Call { - return &mock_APDU_GetPDUDestination_Call{Call: _e.mock.On("GetPDUDestination")} -} - -func (_c *mock_APDU_GetPDUDestination_Call) Run(run func()) *mock_APDU_GetPDUDestination_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *mock_APDU_GetPDUDestination_Call) Return(_a0 *Address) *mock_APDU_GetPDUDestination_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *mock_APDU_GetPDUDestination_Call) RunAndReturn(run func() *Address) *mock_APDU_GetPDUDestination_Call { - _c.Call.Return(run) - return _c -} - -// GetPDUSource provides a mock function with given fields: -func (_m *mock_APDU) GetPDUSource() *Address { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetPDUSource") - } - - var r0 *Address - if rf, ok := ret.Get(0).(func() *Address); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*Address) - } - } - - return r0 -} - -// mock_APDU_GetPDUSource_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPDUSource' -type mock_APDU_GetPDUSource_Call struct { - *mock.Call -} - -// GetPDUSource is a helper method to define mock.On call -func (_e *mock_APDU_Expecter) GetPDUSource() *mock_APDU_GetPDUSource_Call { - return &mock_APDU_GetPDUSource_Call{Call: _e.mock.On("GetPDUSource")} -} - -func (_c *mock_APDU_GetPDUSource_Call) Run(run func()) *mock_APDU_GetPDUSource_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *mock_APDU_GetPDUSource_Call) Return(_a0 *Address) *mock_APDU_GetPDUSource_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *mock_APDU_GetPDUSource_Call) RunAndReturn(run func() *Address) *mock_APDU_GetPDUSource_Call { - _c.Call.Return(run) - return _c -} - -// GetPDUUserData provides a mock function with given fields: -func (_m *mock_APDU) GetPDUUserData() spi.Message { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetPDUUserData") - } - - var r0 spi.Message - if rf, ok := ret.Get(0).(func() spi.Message); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(spi.Message) - } - } - - return r0 -} - -// mock_APDU_GetPDUUserData_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPDUUserData' -type mock_APDU_GetPDUUserData_Call struct { - *mock.Call -} - -// GetPDUUserData is a helper method to define mock.On call -func (_e *mock_APDU_Expecter) GetPDUUserData() *mock_APDU_GetPDUUserData_Call { - return &mock_APDU_GetPDUUserData_Call{Call: _e.mock.On("GetPDUUserData")} -} - -func (_c *mock_APDU_GetPDUUserData_Call) Run(run func()) *mock_APDU_GetPDUUserData_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *mock_APDU_GetPDUUserData_Call) Return(_a0 spi.Message) *mock_APDU_GetPDUUserData_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *mock_APDU_GetPDUUserData_Call) RunAndReturn(run func() spi.Message) *mock_APDU_GetPDUUserData_Call { - _c.Call.Return(run) - return _c -} - -// GetPduData provides a mock function with given fields: -func (_m *mock_APDU) GetPduData() []byte { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetPduData") - } - - var r0 []byte - if rf, ok := ret.Get(0).(func() []byte); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]byte) - } - } - - return r0 -} - -// mock_APDU_GetPduData_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPduData' -type mock_APDU_GetPduData_Call struct { - *mock.Call -} - -// GetPduData is a helper method to define mock.On call -func (_e *mock_APDU_Expecter) GetPduData() *mock_APDU_GetPduData_Call { - return &mock_APDU_GetPduData_Call{Call: _e.mock.On("GetPduData")} -} - -func (_c *mock_APDU_GetPduData_Call) Run(run func()) *mock_APDU_GetPduData_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *mock_APDU_GetPduData_Call) Return(_a0 []byte) *mock_APDU_GetPduData_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *mock_APDU_GetPduData_Call) RunAndReturn(run func() []byte) *mock_APDU_GetPduData_Call { - _c.Call.Return(run) - return _c -} - -// GetRootMessage provides a mock function with given fields: -func (_m *mock_APDU) GetRootMessage() spi.Message { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetRootMessage") - } - - var r0 spi.Message - if rf, ok := ret.Get(0).(func() spi.Message); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(spi.Message) - } - } - - return r0 -} - -// mock_APDU_GetRootMessage_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRootMessage' -type mock_APDU_GetRootMessage_Call struct { - *mock.Call -} - -// GetRootMessage is a helper method to define mock.On call -func (_e *mock_APDU_Expecter) GetRootMessage() *mock_APDU_GetRootMessage_Call { - return &mock_APDU_GetRootMessage_Call{Call: _e.mock.On("GetRootMessage")} -} - -func (_c *mock_APDU_GetRootMessage_Call) Run(run func()) *mock_APDU_GetRootMessage_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *mock_APDU_GetRootMessage_Call) Return(_a0 spi.Message) *mock_APDU_GetRootMessage_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *mock_APDU_GetRootMessage_Call) RunAndReturn(run func() spi.Message) *mock_APDU_GetRootMessage_Call { - _c.Call.Return(run) - return _c -} - -// GetShort provides a mock function with given fields: -func (_m *mock_APDU) GetShort() (int16, error) { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetShort") - } - - var r0 int16 - var r1 error - if rf, ok := ret.Get(0).(func() (int16, error)); ok { - return rf() - } - if rf, ok := ret.Get(0).(func() int16); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(int16) - } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// mock_APDU_GetShort_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetShort' -type mock_APDU_GetShort_Call struct { - *mock.Call -} - -// GetShort is a helper method to define mock.On call -func (_e *mock_APDU_Expecter) GetShort() *mock_APDU_GetShort_Call { - return &mock_APDU_GetShort_Call{Call: _e.mock.On("GetShort")} -} - -func (_c *mock_APDU_GetShort_Call) Run(run func()) *mock_APDU_GetShort_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *mock_APDU_GetShort_Call) Return(_a0 int16, _a1 error) *mock_APDU_GetShort_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *mock_APDU_GetShort_Call) RunAndReturn(run func() (int16, error)) *mock_APDU_GetShort_Call { - _c.Call.Return(run) - return _c -} - -// Put provides a mock function with given fields: _a0 -func (_m *mock_APDU) Put(_a0 byte) { - _m.Called(_a0) -} - -// mock_APDU_Put_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Put' -type mock_APDU_Put_Call struct { - *mock.Call -} - -// Put is a helper method to define mock.On call -// - _a0 byte -func (_e *mock_APDU_Expecter) Put(_a0 interface{}) *mock_APDU_Put_Call { - return &mock_APDU_Put_Call{Call: _e.mock.On("Put", _a0)} -} - -func (_c *mock_APDU_Put_Call) Run(run func(_a0 byte)) *mock_APDU_Put_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(byte)) - }) - return _c -} - -func (_c *mock_APDU_Put_Call) Return() *mock_APDU_Put_Call { - _c.Call.Return() - return _c -} - -func (_c *mock_APDU_Put_Call) RunAndReturn(run func(byte)) *mock_APDU_Put_Call { - _c.Call.Return(run) - return _c -} - -// PutData provides a mock function with given fields: _a0 -func (_m *mock_APDU) PutData(_a0 ...byte) { - _va := make([]interface{}, len(_a0)) - for _i := range _a0 { - _va[_i] = _a0[_i] - } - var _ca []interface{} - _ca = append(_ca, _va...) - _m.Called(_ca...) -} - -// mock_APDU_PutData_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PutData' -type mock_APDU_PutData_Call struct { - *mock.Call -} - -// PutData is a helper method to define mock.On call -// - _a0 ...byte -func (_e *mock_APDU_Expecter) PutData(_a0 ...interface{}) *mock_APDU_PutData_Call { - return &mock_APDU_PutData_Call{Call: _e.mock.On("PutData", - append([]interface{}{}, _a0...)...)} -} - -func (_c *mock_APDU_PutData_Call) Run(run func(_a0 ...byte)) *mock_APDU_PutData_Call { - _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]byte, len(args)-0) - for i, a := range args[0:] { - if a != nil { - variadicArgs[i] = a.(byte) - } - } - run(variadicArgs...) - }) - return _c -} - -func (_c *mock_APDU_PutData_Call) Return() *mock_APDU_PutData_Call { - _c.Call.Return() - return _c -} - -func (_c *mock_APDU_PutData_Call) RunAndReturn(run func(...byte)) *mock_APDU_PutData_Call { - _c.Call.Return(run) - return _c -} - -// PutLong provides a mock function with given fields: _a0 -func (_m *mock_APDU) PutLong(_a0 uint32) { - _m.Called(_a0) -} - -// mock_APDU_PutLong_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PutLong' -type mock_APDU_PutLong_Call struct { - *mock.Call -} - -// PutLong is a helper method to define mock.On call -// - _a0 uint32 -func (_e *mock_APDU_Expecter) PutLong(_a0 interface{}) *mock_APDU_PutLong_Call { - return &mock_APDU_PutLong_Call{Call: _e.mock.On("PutLong", _a0)} -} - -func (_c *mock_APDU_PutLong_Call) Run(run func(_a0 uint32)) *mock_APDU_PutLong_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(uint32)) - }) - return _c -} - -func (_c *mock_APDU_PutLong_Call) Return() *mock_APDU_PutLong_Call { - _c.Call.Return() - return _c -} - -func (_c *mock_APDU_PutLong_Call) RunAndReturn(run func(uint32)) *mock_APDU_PutLong_Call { - _c.Call.Return(run) - return _c -} - -// PutShort provides a mock function with given fields: _a0 -func (_m *mock_APDU) PutShort(_a0 uint16) { - _m.Called(_a0) -} - -// mock_APDU_PutShort_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PutShort' -type mock_APDU_PutShort_Call struct { - *mock.Call -} - -// PutShort is a helper method to define mock.On call -// - _a0 uint16 -func (_e *mock_APDU_Expecter) PutShort(_a0 interface{}) *mock_APDU_PutShort_Call { - return &mock_APDU_PutShort_Call{Call: _e.mock.On("PutShort", _a0)} -} - -func (_c *mock_APDU_PutShort_Call) Run(run func(_a0 uint16)) *mock_APDU_PutShort_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(uint16)) - }) - return _c -} - -func (_c *mock_APDU_PutShort_Call) Return() *mock_APDU_PutShort_Call { - _c.Call.Return() - return _c -} - -func (_c *mock_APDU_PutShort_Call) RunAndReturn(run func(uint16)) *mock_APDU_PutShort_Call { - _c.Call.Return(run) - return _c -} - -// Serialize provides a mock function with given fields: -func (_m *mock_APDU) Serialize() ([]byte, error) { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Serialize") - } - - var r0 []byte - var r1 error - if rf, ok := ret.Get(0).(func() ([]byte, error)); ok { - return rf() - } - if rf, ok := ret.Get(0).(func() []byte); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]byte) - } - } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// mock_APDU_Serialize_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Serialize' -type mock_APDU_Serialize_Call struct { - *mock.Call -} - -// Serialize is a helper method to define mock.On call -func (_e *mock_APDU_Expecter) Serialize() *mock_APDU_Serialize_Call { - return &mock_APDU_Serialize_Call{Call: _e.mock.On("Serialize")} -} - -func (_c *mock_APDU_Serialize_Call) Run(run func()) *mock_APDU_Serialize_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *mock_APDU_Serialize_Call) Return(_a0 []byte, _a1 error) *mock_APDU_Serialize_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *mock_APDU_Serialize_Call) RunAndReturn(run func() ([]byte, error)) *mock_APDU_Serialize_Call { - _c.Call.Return(run) - return _c -} - -// SerializeWithWriteBuffer provides a mock function with given fields: ctx, writeBuffer -func (_m *mock_APDU) SerializeWithWriteBuffer(ctx context.Context, writeBuffer utils.WriteBuffer) error { - ret := _m.Called(ctx, writeBuffer) - - if len(ret) == 0 { - panic("no return value specified for SerializeWithWriteBuffer") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, utils.WriteBuffer) error); ok { - r0 = rf(ctx, writeBuffer) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// mock_APDU_SerializeWithWriteBuffer_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SerializeWithWriteBuffer' -type mock_APDU_SerializeWithWriteBuffer_Call struct { - *mock.Call -} - -// SerializeWithWriteBuffer is a helper method to define mock.On call -// - ctx context.Context -// - writeBuffer utils.WriteBuffer -func (_e *mock_APDU_Expecter) SerializeWithWriteBuffer(ctx interface{}, writeBuffer interface{}) *mock_APDU_SerializeWithWriteBuffer_Call { - return &mock_APDU_SerializeWithWriteBuffer_Call{Call: _e.mock.On("SerializeWithWriteBuffer", ctx, writeBuffer)} -} - -func (_c *mock_APDU_SerializeWithWriteBuffer_Call) Run(run func(ctx context.Context, writeBuffer utils.WriteBuffer)) *mock_APDU_SerializeWithWriteBuffer_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(utils.WriteBuffer)) - }) - return _c -} - -func (_c *mock_APDU_SerializeWithWriteBuffer_Call) Return(_a0 error) *mock_APDU_SerializeWithWriteBuffer_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *mock_APDU_SerializeWithWriteBuffer_Call) RunAndReturn(run func(context.Context, utils.WriteBuffer) error) *mock_APDU_SerializeWithWriteBuffer_Call { - _c.Call.Return(run) - return _c -} - -// SetExpectingReply provides a mock function with given fields: _a0 -func (_m *mock_APDU) SetExpectingReply(_a0 bool) { - _m.Called(_a0) -} - -// mock_APDU_SetExpectingReply_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetExpectingReply' -type mock_APDU_SetExpectingReply_Call struct { - *mock.Call -} - -// SetExpectingReply is a helper method to define mock.On call -// - _a0 bool -func (_e *mock_APDU_Expecter) SetExpectingReply(_a0 interface{}) *mock_APDU_SetExpectingReply_Call { - return &mock_APDU_SetExpectingReply_Call{Call: _e.mock.On("SetExpectingReply", _a0)} -} - -func (_c *mock_APDU_SetExpectingReply_Call) Run(run func(_a0 bool)) *mock_APDU_SetExpectingReply_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(bool)) - }) - return _c -} - -func (_c *mock_APDU_SetExpectingReply_Call) Return() *mock_APDU_SetExpectingReply_Call { - _c.Call.Return() - return _c -} - -func (_c *mock_APDU_SetExpectingReply_Call) RunAndReturn(run func(bool)) *mock_APDU_SetExpectingReply_Call { - _c.Call.Return(run) - return _c -} - -// SetNetworkPriority provides a mock function with given fields: _a0 -func (_m *mock_APDU) SetNetworkPriority(_a0 model.NPDUNetworkPriority) { - _m.Called(_a0) -} - -// mock_APDU_SetNetworkPriority_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetNetworkPriority' -type mock_APDU_SetNetworkPriority_Call struct { - *mock.Call -} - -// SetNetworkPriority is a helper method to define mock.On call -// - _a0 model.NPDUNetworkPriority -func (_e *mock_APDU_Expecter) SetNetworkPriority(_a0 interface{}) *mock_APDU_SetNetworkPriority_Call { - return &mock_APDU_SetNetworkPriority_Call{Call: _e.mock.On("SetNetworkPriority", _a0)} -} - -func (_c *mock_APDU_SetNetworkPriority_Call) Run(run func(_a0 model.NPDUNetworkPriority)) *mock_APDU_SetNetworkPriority_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(model.NPDUNetworkPriority)) - }) - return _c -} - -func (_c *mock_APDU_SetNetworkPriority_Call) Return() *mock_APDU_SetNetworkPriority_Call { - _c.Call.Return() - return _c -} - -func (_c *mock_APDU_SetNetworkPriority_Call) RunAndReturn(run func(model.NPDUNetworkPriority)) *mock_APDU_SetNetworkPriority_Call { - _c.Call.Return(run) - return _c -} - -// SetPDUDestination provides a mock function with given fields: _a0 -func (_m *mock_APDU) SetPDUDestination(_a0 *Address) { - _m.Called(_a0) -} - -// mock_APDU_SetPDUDestination_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetPDUDestination' -type mock_APDU_SetPDUDestination_Call struct { - *mock.Call -} - -// SetPDUDestination is a helper method to define mock.On call -// - _a0 *Address -func (_e *mock_APDU_Expecter) SetPDUDestination(_a0 interface{}) *mock_APDU_SetPDUDestination_Call { - return &mock_APDU_SetPDUDestination_Call{Call: _e.mock.On("SetPDUDestination", _a0)} -} - -func (_c *mock_APDU_SetPDUDestination_Call) Run(run func(_a0 *Address)) *mock_APDU_SetPDUDestination_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(*Address)) - }) - return _c -} - -func (_c *mock_APDU_SetPDUDestination_Call) Return() *mock_APDU_SetPDUDestination_Call { - _c.Call.Return() - return _c -} - -func (_c *mock_APDU_SetPDUDestination_Call) RunAndReturn(run func(*Address)) *mock_APDU_SetPDUDestination_Call { - _c.Call.Return(run) - return _c -} - -// SetPDUSource provides a mock function with given fields: source -func (_m *mock_APDU) SetPDUSource(source *Address) { - _m.Called(source) -} - -// mock_APDU_SetPDUSource_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetPDUSource' -type mock_APDU_SetPDUSource_Call struct { - *mock.Call -} - -// SetPDUSource is a helper method to define mock.On call -// - source *Address -func (_e *mock_APDU_Expecter) SetPDUSource(source interface{}) *mock_APDU_SetPDUSource_Call { - return &mock_APDU_SetPDUSource_Call{Call: _e.mock.On("SetPDUSource", source)} -} - -func (_c *mock_APDU_SetPDUSource_Call) Run(run func(source *Address)) *mock_APDU_SetPDUSource_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(*Address)) - }) - return _c -} - -func (_c *mock_APDU_SetPDUSource_Call) Return() *mock_APDU_SetPDUSource_Call { - _c.Call.Return() - return _c -} - -func (_c *mock_APDU_SetPDUSource_Call) RunAndReturn(run func(*Address)) *mock_APDU_SetPDUSource_Call { - _c.Call.Return(run) - return _c -} - -// SetPDUUserData provides a mock function with given fields: _a0 -func (_m *mock_APDU) SetPDUUserData(_a0 spi.Message) { - _m.Called(_a0) -} - -// mock_APDU_SetPDUUserData_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetPDUUserData' -type mock_APDU_SetPDUUserData_Call struct { - *mock.Call -} - -// SetPDUUserData is a helper method to define mock.On call -// - _a0 spi.Message -func (_e *mock_APDU_Expecter) SetPDUUserData(_a0 interface{}) *mock_APDU_SetPDUUserData_Call { - return &mock_APDU_SetPDUUserData_Call{Call: _e.mock.On("SetPDUUserData", _a0)} -} - -func (_c *mock_APDU_SetPDUUserData_Call) Run(run func(_a0 spi.Message)) *mock_APDU_SetPDUUserData_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(spi.Message)) - }) - return _c -} - -func (_c *mock_APDU_SetPDUUserData_Call) Return() *mock_APDU_SetPDUUserData_Call { - _c.Call.Return() - return _c -} - -func (_c *mock_APDU_SetPDUUserData_Call) RunAndReturn(run func(spi.Message)) *mock_APDU_SetPDUUserData_Call { - _c.Call.Return(run) - return _c -} - -// SetPduData provides a mock function with given fields: _a0 -func (_m *mock_APDU) SetPduData(_a0 []byte) { - _m.Called(_a0) -} - -// mock_APDU_SetPduData_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetPduData' -type mock_APDU_SetPduData_Call struct { - *mock.Call -} - -// SetPduData is a helper method to define mock.On call -// - _a0 []byte -func (_e *mock_APDU_Expecter) SetPduData(_a0 interface{}) *mock_APDU_SetPduData_Call { - return &mock_APDU_SetPduData_Call{Call: _e.mock.On("SetPduData", _a0)} -} - -func (_c *mock_APDU_SetPduData_Call) Run(run func(_a0 []byte)) *mock_APDU_SetPduData_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].([]byte)) - }) - return _c -} - -func (_c *mock_APDU_SetPduData_Call) Return() *mock_APDU_SetPduData_Call { - _c.Call.Return() - return _c -} - -func (_c *mock_APDU_SetPduData_Call) RunAndReturn(run func([]byte)) *mock_APDU_SetPduData_Call { - _c.Call.Return(run) - return _c -} - -// String provides a mock function with given fields: -func (_m *mock_APDU) String() string { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for String") - } - - var r0 string - if rf, ok := ret.Get(0).(func() string); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(string) - } - - return r0 -} - -// mock_APDU_String_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'String' -type mock_APDU_String_Call struct { - *mock.Call -} - -// String is a helper method to define mock.On call -func (_e *mock_APDU_Expecter) String() *mock_APDU_String_Call { - return &mock_APDU_String_Call{Call: _e.mock.On("String")} -} - -func (_c *mock_APDU_String_Call) Run(run func()) *mock_APDU_String_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *mock_APDU_String_Call) Return(_a0 string) *mock_APDU_String_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *mock_APDU_String_Call) RunAndReturn(run func() string) *mock_APDU_String_Call { - _c.Call.Return(run) - return _c -} - -// Update provides a mock function with given fields: pci -func (_m *mock_APDU) Update(pci Arg) error { - ret := _m.Called(pci) - - if len(ret) == 0 { - panic("no return value specified for Update") - } - - var r0 error - if rf, ok := ret.Get(0).(func(Arg) error); ok { - r0 = rf(pci) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// mock_APDU_Update_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Update' -type mock_APDU_Update_Call struct { - *mock.Call -} - -// Update is a helper method to define mock.On call -// - pci Arg -func (_e *mock_APDU_Expecter) Update(pci interface{}) *mock_APDU_Update_Call { - return &mock_APDU_Update_Call{Call: _e.mock.On("Update", pci)} -} - -func (_c *mock_APDU_Update_Call) Run(run func(pci Arg)) *mock_APDU_Update_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(Arg)) - }) - return _c -} - -func (_c *mock_APDU_Update_Call) Return(_a0 error) *mock_APDU_Update_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *mock_APDU_Update_Call) RunAndReturn(run func(Arg) error) *mock_APDU_Update_Call { - _c.Call.Return(run) - return _c -} - -// getAPDU provides a mock function with given fields: -func (_m *mock_APDU) getAPDU() model.APDU { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for getAPDU") - } - - var r0 model.APDU - if rf, ok := ret.Get(0).(func() model.APDU); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(model.APDU) - } - } - - return r0 -} - -// mock_APDU_getAPDU_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'getAPDU' -type mock_APDU_getAPDU_Call struct { - *mock.Call -} - -// getAPDU is a helper method to define mock.On call -func (_e *mock_APDU_Expecter) getAPDU() *mock_APDU_getAPDU_Call { - return &mock_APDU_getAPDU_Call{Call: _e.mock.On("getAPDU")} -} - -func (_c *mock_APDU_getAPDU_Call) Run(run func()) *mock_APDU_getAPDU_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *mock_APDU_getAPDU_Call) Return(_a0 model.APDU) *mock_APDU_getAPDU_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *mock_APDU_getAPDU_Call) RunAndReturn(run func() model.APDU) *mock_APDU_getAPDU_Call { - _c.Call.Return(run) - return _c -} - -// setAPDU provides a mock function with given fields: _a0 -func (_m *mock_APDU) setAPDU(_a0 model.APDU) { - _m.Called(_a0) -} - -// mock_APDU_setAPDU_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'setAPDU' -type mock_APDU_setAPDU_Call struct { - *mock.Call -} - -// setAPDU is a helper method to define mock.On call -// - _a0 model.APDU -func (_e *mock_APDU_Expecter) setAPDU(_a0 interface{}) *mock_APDU_setAPDU_Call { - return &mock_APDU_setAPDU_Call{Call: _e.mock.On("setAPDU", _a0)} -} - -func (_c *mock_APDU_setAPDU_Call) Run(run func(_a0 model.APDU)) *mock_APDU_setAPDU_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(model.APDU)) - }) - return _c -} - -func (_c *mock_APDU_setAPDU_Call) Return() *mock_APDU_setAPDU_Call { - _c.Call.Return() - return _c -} - -func (_c *mock_APDU_setAPDU_Call) RunAndReturn(run func(model.APDU)) *mock_APDU_setAPDU_Call { - _c.Call.Return(run) - return _c -} - -// newMock_APDU creates a new instance of mock_APDU. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func newMock_APDU(t interface { - mock.TestingT - Cleanup(func()) -}) *mock_APDU { - mock := &mock_APDU{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/plc4go/internal/bacnetip/mock__IOCB_test.go b/plc4go/internal/bacnetip/mock__IOCB_test.go deleted file mode 100644 index 60408d47185..00000000000 --- a/plc4go/internal/bacnetip/mock__IOCB_test.go +++ /dev/null @@ -1,522 +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 - * - * https://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. - */ - -// Code generated by mockery v2.42.2. DO NOT EDIT. - -package bacnetip - -import mock "github.com/stretchr/testify/mock" - -// mock_IOCB is an autogenerated mock type for the _IOCB type -type mock_IOCB struct { - mock.Mock -} - -type mock_IOCB_Expecter struct { - mock *mock.Mock -} - -func (_m *mock_IOCB) EXPECT() *mock_IOCB_Expecter { - return &mock_IOCB_Expecter{mock: &_m.Mock} -} - -// Abort provides a mock function with given fields: err -func (_m *mock_IOCB) Abort(err error) error { - ret := _m.Called(err) - - if len(ret) == 0 { - panic("no return value specified for Abort") - } - - var r0 error - if rf, ok := ret.Get(0).(func(error) error); ok { - r0 = rf(err) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// mock_IOCB_Abort_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Abort' -type mock_IOCB_Abort_Call struct { - *mock.Call -} - -// Abort is a helper method to define mock.On call -// - err error -func (_e *mock_IOCB_Expecter) Abort(err interface{}) *mock_IOCB_Abort_Call { - return &mock_IOCB_Abort_Call{Call: _e.mock.On("Abort", err)} -} - -func (_c *mock_IOCB_Abort_Call) Run(run func(err error)) *mock_IOCB_Abort_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(error)) - }) - return _c -} - -func (_c *mock_IOCB_Abort_Call) Return(_a0 error) *mock_IOCB_Abort_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *mock_IOCB_Abort_Call) RunAndReturn(run func(error) error) *mock_IOCB_Abort_Call { - _c.Call.Return(run) - return _c -} - -// String provides a mock function with given fields: -func (_m *mock_IOCB) String() string { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for String") - } - - var r0 string - if rf, ok := ret.Get(0).(func() string); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(string) - } - - return r0 -} - -// mock_IOCB_String_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'String' -type mock_IOCB_String_Call struct { - *mock.Call -} - -// String is a helper method to define mock.On call -func (_e *mock_IOCB_Expecter) String() *mock_IOCB_String_Call { - return &mock_IOCB_String_Call{Call: _e.mock.On("String")} -} - -func (_c *mock_IOCB_String_Call) Run(run func()) *mock_IOCB_String_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *mock_IOCB_String_Call) Return(_a0 string) *mock_IOCB_String_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *mock_IOCB_String_Call) RunAndReturn(run func() string) *mock_IOCB_String_Call { - _c.Call.Return(run) - return _c -} - -// Trigger provides a mock function with given fields: -func (_m *mock_IOCB) Trigger() { - _m.Called() -} - -// mock_IOCB_Trigger_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Trigger' -type mock_IOCB_Trigger_Call struct { - *mock.Call -} - -// Trigger is a helper method to define mock.On call -func (_e *mock_IOCB_Expecter) Trigger() *mock_IOCB_Trigger_Call { - return &mock_IOCB_Trigger_Call{Call: _e.mock.On("Trigger")} -} - -func (_c *mock_IOCB_Trigger_Call) Run(run func()) *mock_IOCB_Trigger_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *mock_IOCB_Trigger_Call) Return() *mock_IOCB_Trigger_Call { - _c.Call.Return() - return _c -} - -func (_c *mock_IOCB_Trigger_Call) RunAndReturn(run func()) *mock_IOCB_Trigger_Call { - _c.Call.Return(run) - return _c -} - -// clearQueue provides a mock function with given fields: -func (_m *mock_IOCB) clearQueue() { - _m.Called() -} - -// mock_IOCB_clearQueue_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'clearQueue' -type mock_IOCB_clearQueue_Call struct { - *mock.Call -} - -// clearQueue is a helper method to define mock.On call -func (_e *mock_IOCB_Expecter) clearQueue() *mock_IOCB_clearQueue_Call { - return &mock_IOCB_clearQueue_Call{Call: _e.mock.On("clearQueue")} -} - -func (_c *mock_IOCB_clearQueue_Call) Run(run func()) *mock_IOCB_clearQueue_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *mock_IOCB_clearQueue_Call) Return() *mock_IOCB_clearQueue_Call { - _c.Call.Return() - return _c -} - -func (_c *mock_IOCB_clearQueue_Call) RunAndReturn(run func()) *mock_IOCB_clearQueue_Call { - _c.Call.Return(run) - return _c -} - -// getDestination provides a mock function with given fields: -func (_m *mock_IOCB) getDestination() *Address { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for getDestination") - } - - var r0 *Address - if rf, ok := ret.Get(0).(func() *Address); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*Address) - } - } - - return r0 -} - -// mock_IOCB_getDestination_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'getDestination' -type mock_IOCB_getDestination_Call struct { - *mock.Call -} - -// getDestination is a helper method to define mock.On call -func (_e *mock_IOCB_Expecter) getDestination() *mock_IOCB_getDestination_Call { - return &mock_IOCB_getDestination_Call{Call: _e.mock.On("getDestination")} -} - -func (_c *mock_IOCB_getDestination_Call) Run(run func()) *mock_IOCB_getDestination_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *mock_IOCB_getDestination_Call) Return(_a0 *Address) *mock_IOCB_getDestination_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *mock_IOCB_getDestination_Call) RunAndReturn(run func() *Address) *mock_IOCB_getDestination_Call { - _c.Call.Return(run) - return _c -} - -// getIOState provides a mock function with given fields: -func (_m *mock_IOCB) getIOState() IOCBState { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for getIOState") - } - - var r0 IOCBState - if rf, ok := ret.Get(0).(func() IOCBState); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(IOCBState) - } - - return r0 -} - -// mock_IOCB_getIOState_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'getIOState' -type mock_IOCB_getIOState_Call struct { - *mock.Call -} - -// getIOState is a helper method to define mock.On call -func (_e *mock_IOCB_Expecter) getIOState() *mock_IOCB_getIOState_Call { - return &mock_IOCB_getIOState_Call{Call: _e.mock.On("getIOState")} -} - -func (_c *mock_IOCB_getIOState_Call) Run(run func()) *mock_IOCB_getIOState_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *mock_IOCB_getIOState_Call) Return(_a0 IOCBState) *mock_IOCB_getIOState_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *mock_IOCB_getIOState_Call) RunAndReturn(run func() IOCBState) *mock_IOCB_getIOState_Call { - _c.Call.Return(run) - return _c -} - -// getPriority provides a mock function with given fields: -func (_m *mock_IOCB) getPriority() int { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for getPriority") - } - - var r0 int - if rf, ok := ret.Get(0).(func() int); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(int) - } - - return r0 -} - -// mock_IOCB_getPriority_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'getPriority' -type mock_IOCB_getPriority_Call struct { - *mock.Call -} - -// getPriority is a helper method to define mock.On call -func (_e *mock_IOCB_Expecter) getPriority() *mock_IOCB_getPriority_Call { - return &mock_IOCB_getPriority_Call{Call: _e.mock.On("getPriority")} -} - -func (_c *mock_IOCB_getPriority_Call) Run(run func()) *mock_IOCB_getPriority_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *mock_IOCB_getPriority_Call) Return(_a0 int) *mock_IOCB_getPriority_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *mock_IOCB_getPriority_Call) RunAndReturn(run func() int) *mock_IOCB_getPriority_Call { - _c.Call.Return(run) - return _c -} - -// getRequest provides a mock function with given fields: -func (_m *mock_IOCB) getRequest() PDU { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for getRequest") - } - - var r0 PDU - if rf, ok := ret.Get(0).(func() PDU); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(PDU) - } - } - - return r0 -} - -// mock_IOCB_getRequest_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'getRequest' -type mock_IOCB_getRequest_Call struct { - *mock.Call -} - -// getRequest is a helper method to define mock.On call -func (_e *mock_IOCB_Expecter) getRequest() *mock_IOCB_getRequest_Call { - return &mock_IOCB_getRequest_Call{Call: _e.mock.On("getRequest")} -} - -func (_c *mock_IOCB_getRequest_Call) Run(run func()) *mock_IOCB_getRequest_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *mock_IOCB_getRequest_Call) Return(_a0 PDU) *mock_IOCB_getRequest_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *mock_IOCB_getRequest_Call) RunAndReturn(run func() PDU) *mock_IOCB_getRequest_Call { - _c.Call.Return(run) - return _c -} - -// setIOController provides a mock function with given fields: ioController -func (_m *mock_IOCB) setIOController(ioController IOControllerRequirements) { - _m.Called(ioController) -} - -// mock_IOCB_setIOController_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'setIOController' -type mock_IOCB_setIOController_Call struct { - *mock.Call -} - -// setIOController is a helper method to define mock.On call -// - ioController IOControllerRequirements -func (_e *mock_IOCB_Expecter) setIOController(ioController interface{}) *mock_IOCB_setIOController_Call { - return &mock_IOCB_setIOController_Call{Call: _e.mock.On("setIOController", ioController)} -} - -func (_c *mock_IOCB_setIOController_Call) Run(run func(ioController IOControllerRequirements)) *mock_IOCB_setIOController_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(IOControllerRequirements)) - }) - return _c -} - -func (_c *mock_IOCB_setIOController_Call) Return() *mock_IOCB_setIOController_Call { - _c.Call.Return() - return _c -} - -func (_c *mock_IOCB_setIOController_Call) RunAndReturn(run func(IOControllerRequirements)) *mock_IOCB_setIOController_Call { - _c.Call.Return(run) - return _c -} - -// setIOError provides a mock function with given fields: err -func (_m *mock_IOCB) setIOError(err error) { - _m.Called(err) -} - -// mock_IOCB_setIOError_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'setIOError' -type mock_IOCB_setIOError_Call struct { - *mock.Call -} - -// setIOError is a helper method to define mock.On call -// - err error -func (_e *mock_IOCB_Expecter) setIOError(err interface{}) *mock_IOCB_setIOError_Call { - return &mock_IOCB_setIOError_Call{Call: _e.mock.On("setIOError", err)} -} - -func (_c *mock_IOCB_setIOError_Call) Run(run func(err error)) *mock_IOCB_setIOError_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(error)) - }) - return _c -} - -func (_c *mock_IOCB_setIOError_Call) Return() *mock_IOCB_setIOError_Call { - _c.Call.Return() - return _c -} - -func (_c *mock_IOCB_setIOError_Call) RunAndReturn(run func(error)) *mock_IOCB_setIOError_Call { - _c.Call.Return(run) - return _c -} - -// setIOResponse provides a mock function with given fields: msg -func (_m *mock_IOCB) setIOResponse(msg PDU) { - _m.Called(msg) -} - -// mock_IOCB_setIOResponse_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'setIOResponse' -type mock_IOCB_setIOResponse_Call struct { - *mock.Call -} - -// setIOResponse is a helper method to define mock.On call -// - msg PDU -func (_e *mock_IOCB_Expecter) setIOResponse(msg interface{}) *mock_IOCB_setIOResponse_Call { - return &mock_IOCB_setIOResponse_Call{Call: _e.mock.On("setIOResponse", msg)} -} - -func (_c *mock_IOCB_setIOResponse_Call) Run(run func(msg PDU)) *mock_IOCB_setIOResponse_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(PDU)) - }) - return _c -} - -func (_c *mock_IOCB_setIOResponse_Call) Return() *mock_IOCB_setIOResponse_Call { - _c.Call.Return() - return _c -} - -func (_c *mock_IOCB_setIOResponse_Call) RunAndReturn(run func(PDU)) *mock_IOCB_setIOResponse_Call { - _c.Call.Return(run) - return _c -} - -// setIOState provides a mock function with given fields: newState -func (_m *mock_IOCB) setIOState(newState IOCBState) { - _m.Called(newState) -} - -// mock_IOCB_setIOState_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'setIOState' -type mock_IOCB_setIOState_Call struct { - *mock.Call -} - -// setIOState is a helper method to define mock.On call -// - newState IOCBState -func (_e *mock_IOCB_Expecter) setIOState(newState interface{}) *mock_IOCB_setIOState_Call { - return &mock_IOCB_setIOState_Call{Call: _e.mock.On("setIOState", newState)} -} - -func (_c *mock_IOCB_setIOState_Call) Run(run func(newState IOCBState)) *mock_IOCB_setIOState_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(IOCBState)) - }) - return _c -} - -func (_c *mock_IOCB_setIOState_Call) Return() *mock_IOCB_setIOState_Call { - _c.Call.Return() - return _c -} - -func (_c *mock_IOCB_setIOState_Call) RunAndReturn(run func(IOCBState)) *mock_IOCB_setIOState_Call { - _c.Call.Return(run) - return _c -} - -// newMock_IOCB creates a new instance of mock_IOCB. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func newMock_IOCB(t interface { - mock.TestingT - Cleanup(func()) -}) *mock_IOCB { - mock := &mock_IOCB{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/plc4go/internal/bacnetip/mock__IOController_test.go b/plc4go/internal/bacnetip/mock__IOController_test.go deleted file mode 100644 index 0878c1d1197..00000000000 --- a/plc4go/internal/bacnetip/mock__IOController_test.go +++ /dev/null @@ -1,237 +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 - * - * https://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. - */ - -// Code generated by mockery v2.42.2. DO NOT EDIT. - -package bacnetip - -import mock "github.com/stretchr/testify/mock" - -// mock_IOController is an autogenerated mock type for the _IOController type -type mock_IOController struct { - mock.Mock -} - -type mock_IOController_Expecter struct { - mock *mock.Mock -} - -func (_m *mock_IOController) EXPECT() *mock_IOController_Expecter { - return &mock_IOController_Expecter{mock: &_m.Mock} -} - -// Abort provides a mock function with given fields: err -func (_m *mock_IOController) Abort(err error) error { - ret := _m.Called(err) - - if len(ret) == 0 { - panic("no return value specified for Abort") - } - - var r0 error - if rf, ok := ret.Get(0).(func(error) error); ok { - r0 = rf(err) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// mock_IOController_Abort_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Abort' -type mock_IOController_Abort_Call struct { - *mock.Call -} - -// Abort is a helper method to define mock.On call -// - err error -func (_e *mock_IOController_Expecter) Abort(err interface{}) *mock_IOController_Abort_Call { - return &mock_IOController_Abort_Call{Call: _e.mock.On("Abort", err)} -} - -func (_c *mock_IOController_Abort_Call) Run(run func(err error)) *mock_IOController_Abort_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(error)) - }) - return _c -} - -func (_c *mock_IOController_Abort_Call) Return(_a0 error) *mock_IOController_Abort_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *mock_IOController_Abort_Call) RunAndReturn(run func(error) error) *mock_IOController_Abort_Call { - _c.Call.Return(run) - return _c -} - -// AbortIO provides a mock function with given fields: iocb, err -func (_m *mock_IOController) AbortIO(iocb _IOCB, err error) error { - ret := _m.Called(iocb, err) - - if len(ret) == 0 { - panic("no return value specified for AbortIO") - } - - var r0 error - if rf, ok := ret.Get(0).(func(_IOCB, error) error); ok { - r0 = rf(iocb, err) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// mock_IOController_AbortIO_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AbortIO' -type mock_IOController_AbortIO_Call struct { - *mock.Call -} - -// AbortIO is a helper method to define mock.On call -// - iocb _IOCB -// - err error -func (_e *mock_IOController_Expecter) AbortIO(iocb interface{}, err interface{}) *mock_IOController_AbortIO_Call { - return &mock_IOController_AbortIO_Call{Call: _e.mock.On("AbortIO", iocb, err)} -} - -func (_c *mock_IOController_AbortIO_Call) Run(run func(iocb _IOCB, err error)) *mock_IOController_AbortIO_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(_IOCB), args[1].(error)) - }) - return _c -} - -func (_c *mock_IOController_AbortIO_Call) Return(_a0 error) *mock_IOController_AbortIO_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *mock_IOController_AbortIO_Call) RunAndReturn(run func(_IOCB, error) error) *mock_IOController_AbortIO_Call { - _c.Call.Return(run) - return _c -} - -// CompleteIO provides a mock function with given fields: iocb, pdu -func (_m *mock_IOController) CompleteIO(iocb _IOCB, pdu PDU) error { - ret := _m.Called(iocb, pdu) - - if len(ret) == 0 { - panic("no return value specified for CompleteIO") - } - - var r0 error - if rf, ok := ret.Get(0).(func(_IOCB, PDU) error); ok { - r0 = rf(iocb, pdu) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// mock_IOController_CompleteIO_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CompleteIO' -type mock_IOController_CompleteIO_Call struct { - *mock.Call -} - -// CompleteIO is a helper method to define mock.On call -// - iocb _IOCB -// - pdu PDU -func (_e *mock_IOController_Expecter) CompleteIO(iocb interface{}, pdu interface{}) *mock_IOController_CompleteIO_Call { - return &mock_IOController_CompleteIO_Call{Call: _e.mock.On("CompleteIO", iocb, pdu)} -} - -func (_c *mock_IOController_CompleteIO_Call) Run(run func(iocb _IOCB, pdu PDU)) *mock_IOController_CompleteIO_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(_IOCB), args[1].(PDU)) - }) - return _c -} - -func (_c *mock_IOController_CompleteIO_Call) Return(_a0 error) *mock_IOController_CompleteIO_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *mock_IOController_CompleteIO_Call) RunAndReturn(run func(_IOCB, PDU) error) *mock_IOController_CompleteIO_Call { - _c.Call.Return(run) - return _c -} - -// ProcessIO provides a mock function with given fields: iocb -func (_m *mock_IOController) ProcessIO(iocb _IOCB) error { - ret := _m.Called(iocb) - - if len(ret) == 0 { - panic("no return value specified for ProcessIO") - } - - var r0 error - if rf, ok := ret.Get(0).(func(_IOCB) error); ok { - r0 = rf(iocb) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// mock_IOController_ProcessIO_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ProcessIO' -type mock_IOController_ProcessIO_Call struct { - *mock.Call -} - -// ProcessIO is a helper method to define mock.On call -// - iocb _IOCB -func (_e *mock_IOController_Expecter) ProcessIO(iocb interface{}) *mock_IOController_ProcessIO_Call { - return &mock_IOController_ProcessIO_Call{Call: _e.mock.On("ProcessIO", iocb)} -} - -func (_c *mock_IOController_ProcessIO_Call) Run(run func(iocb _IOCB)) *mock_IOController_ProcessIO_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(_IOCB)) - }) - return _c -} - -func (_c *mock_IOController_ProcessIO_Call) Return(_a0 error) *mock_IOController_ProcessIO_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *mock_IOController_ProcessIO_Call) RunAndReturn(run func(_IOCB) error) *mock_IOController_ProcessIO_Call { - _c.Call.Return(run) - return _c -} - -// newMock_IOController creates a new instance of mock_IOController. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func newMock_IOController(t interface { - mock.TestingT - Cleanup(func()) -}) *mock_IOController { - mock := &mock_IOController{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/plc4go/internal/bacnetip/mock__IOQController_test.go b/plc4go/internal/bacnetip/mock__IOQController_test.go deleted file mode 100644 index 510e61f951e..00000000000 --- a/plc4go/internal/bacnetip/mock__IOQController_test.go +++ /dev/null @@ -1,97 +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 - * - * https://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. - */ - -// Code generated by mockery v2.42.2. DO NOT EDIT. - -package bacnetip - -import mock "github.com/stretchr/testify/mock" - -// mock_IOQController is an autogenerated mock type for the _IOQController type -type mock_IOQController struct { - mock.Mock -} - -type mock_IOQController_Expecter struct { - mock *mock.Mock -} - -func (_m *mock_IOQController) EXPECT() *mock_IOQController_Expecter { - return &mock_IOQController_Expecter{mock: &_m.Mock} -} - -// ProcessIO provides a mock function with given fields: iocb -func (_m *mock_IOQController) ProcessIO(iocb _IOCB) error { - ret := _m.Called(iocb) - - if len(ret) == 0 { - panic("no return value specified for ProcessIO") - } - - var r0 error - if rf, ok := ret.Get(0).(func(_IOCB) error); ok { - r0 = rf(iocb) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// mock_IOQController_ProcessIO_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ProcessIO' -type mock_IOQController_ProcessIO_Call struct { - *mock.Call -} - -// ProcessIO is a helper method to define mock.On call -// - iocb _IOCB -func (_e *mock_IOQController_Expecter) ProcessIO(iocb interface{}) *mock_IOQController_ProcessIO_Call { - return &mock_IOQController_ProcessIO_Call{Call: _e.mock.On("ProcessIO", iocb)} -} - -func (_c *mock_IOQController_ProcessIO_Call) Run(run func(iocb _IOCB)) *mock_IOQController_ProcessIO_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(_IOCB)) - }) - return _c -} - -func (_c *mock_IOQController_ProcessIO_Call) Return(_a0 error) *mock_IOQController_ProcessIO_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *mock_IOQController_ProcessIO_Call) RunAndReturn(run func(_IOCB) error) *mock_IOQController_ProcessIO_Call { - _c.Call.Return(run) - return _c -} - -// newMock_IOQController creates a new instance of mock_IOQController. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func newMock_IOQController(t interface { - mock.TestingT - Cleanup(func()) -}) *mock_IOQController { - mock := &mock_IOQController{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/plc4go/internal/bacnetip/mock__PDUDataRequirements_test.go b/plc4go/internal/bacnetip/mock__PDUDataRequirements_test.go deleted file mode 100644 index 68887b5f549..00000000000 --- a/plc4go/internal/bacnetip/mock__PDUDataRequirements_test.go +++ /dev/null @@ -1,98 +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 - * - * https://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. - */ - -// Code generated by mockery v2.42.2. DO NOT EDIT. - -package bacnetip - -import mock "github.com/stretchr/testify/mock" - -// mock_PDUDataRequirements is an autogenerated mock type for the _PDUDataRequirements type -type mock_PDUDataRequirements struct { - mock.Mock -} - -type mock_PDUDataRequirements_Expecter struct { - mock *mock.Mock -} - -func (_m *mock_PDUDataRequirements) EXPECT() *mock_PDUDataRequirements_Expecter { - return &mock_PDUDataRequirements_Expecter{mock: &_m.Mock} -} - -// getPDUData provides a mock function with given fields: -func (_m *mock_PDUDataRequirements) getPDUData() []byte { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for getPDUData") - } - - var r0 []byte - if rf, ok := ret.Get(0).(func() []byte); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]byte) - } - } - - return r0 -} - -// mock_PDUDataRequirements_getPDUData_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'getPDUData' -type mock_PDUDataRequirements_getPDUData_Call struct { - *mock.Call -} - -// getPDUData is a helper method to define mock.On call -func (_e *mock_PDUDataRequirements_Expecter) getPDUData() *mock_PDUDataRequirements_getPDUData_Call { - return &mock_PDUDataRequirements_getPDUData_Call{Call: _e.mock.On("getPDUData")} -} - -func (_c *mock_PDUDataRequirements_getPDUData_Call) Run(run func()) *mock_PDUDataRequirements_getPDUData_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *mock_PDUDataRequirements_getPDUData_Call) Return(_a0 []byte) *mock_PDUDataRequirements_getPDUData_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *mock_PDUDataRequirements_getPDUData_Call) RunAndReturn(run func() []byte) *mock_PDUDataRequirements_getPDUData_Call { - _c.Call.Return(run) - return _c -} - -// newMock_PDUDataRequirements creates a new instance of mock_PDUDataRequirements. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func newMock_PDUDataRequirements(t interface { - mock.TestingT - Cleanup(func()) -}) *mock_PDUDataRequirements { - mock := &mock_PDUDataRequirements{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/plc4go/internal/bacnetip/mock__PDU_test.go b/plc4go/internal/bacnetip/mock__PDU_test.go deleted file mode 100644 index c2796e234a4..00000000000 --- a/plc4go/internal/bacnetip/mock__PDU_test.go +++ /dev/null @@ -1,364 +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 - * - * https://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. - */ - -// Code generated by mockery v2.42.2. DO NOT EDIT. - -package bacnetip - -import ( - model "github.com/apache/plc4x/plc4go/protocols/bacnetip/readwrite/model" - spi "github.com/apache/plc4x/plc4go/spi" - mock "github.com/stretchr/testify/mock" -) - -// mock_PDU is an autogenerated mock type for the _PDU type -type mock_PDU struct { - mock.Mock -} - -type mock_PDU_Expecter struct { - mock *mock.Mock -} - -func (_m *mock_PDU) EXPECT() *mock_PDU_Expecter { - return &mock_PDU_Expecter{mock: &_m.Mock} -} - -// GetExpectingReply provides a mock function with given fields: -func (_m *mock_PDU) GetExpectingReply() bool { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetExpectingReply") - } - - var r0 bool - if rf, ok := ret.Get(0).(func() bool); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(bool) - } - - return r0 -} - -// mock_PDU_GetExpectingReply_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetExpectingReply' -type mock_PDU_GetExpectingReply_Call struct { - *mock.Call -} - -// GetExpectingReply is a helper method to define mock.On call -func (_e *mock_PDU_Expecter) GetExpectingReply() *mock_PDU_GetExpectingReply_Call { - return &mock_PDU_GetExpectingReply_Call{Call: _e.mock.On("GetExpectingReply")} -} - -func (_c *mock_PDU_GetExpectingReply_Call) Run(run func()) *mock_PDU_GetExpectingReply_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *mock_PDU_GetExpectingReply_Call) Return(_a0 bool) *mock_PDU_GetExpectingReply_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *mock_PDU_GetExpectingReply_Call) RunAndReturn(run func() bool) *mock_PDU_GetExpectingReply_Call { - _c.Call.Return(run) - return _c -} - -// GetMessage provides a mock function with given fields: -func (_m *mock_PDU) GetMessage() spi.Message { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetMessage") - } - - var r0 spi.Message - if rf, ok := ret.Get(0).(func() spi.Message); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(spi.Message) - } - } - - return r0 -} - -// mock_PDU_GetMessage_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetMessage' -type mock_PDU_GetMessage_Call struct { - *mock.Call -} - -// GetMessage is a helper method to define mock.On call -func (_e *mock_PDU_Expecter) GetMessage() *mock_PDU_GetMessage_Call { - return &mock_PDU_GetMessage_Call{Call: _e.mock.On("GetMessage")} -} - -func (_c *mock_PDU_GetMessage_Call) Run(run func()) *mock_PDU_GetMessage_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *mock_PDU_GetMessage_Call) Return(_a0 spi.Message) *mock_PDU_GetMessage_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *mock_PDU_GetMessage_Call) RunAndReturn(run func() spi.Message) *mock_PDU_GetMessage_Call { - _c.Call.Return(run) - return _c -} - -// GetNetworkPriority provides a mock function with given fields: -func (_m *mock_PDU) GetNetworkPriority() model.NPDUNetworkPriority { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetNetworkPriority") - } - - var r0 model.NPDUNetworkPriority - if rf, ok := ret.Get(0).(func() model.NPDUNetworkPriority); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(model.NPDUNetworkPriority) - } - - return r0 -} - -// mock_PDU_GetNetworkPriority_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetNetworkPriority' -type mock_PDU_GetNetworkPriority_Call struct { - *mock.Call -} - -// GetNetworkPriority is a helper method to define mock.On call -func (_e *mock_PDU_Expecter) GetNetworkPriority() *mock_PDU_GetNetworkPriority_Call { - return &mock_PDU_GetNetworkPriority_Call{Call: _e.mock.On("GetNetworkPriority")} -} - -func (_c *mock_PDU_GetNetworkPriority_Call) Run(run func()) *mock_PDU_GetNetworkPriority_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *mock_PDU_GetNetworkPriority_Call) Return(_a0 model.NPDUNetworkPriority) *mock_PDU_GetNetworkPriority_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *mock_PDU_GetNetworkPriority_Call) RunAndReturn(run func() model.NPDUNetworkPriority) *mock_PDU_GetNetworkPriority_Call { - _c.Call.Return(run) - return _c -} - -// GetPDUDestination provides a mock function with given fields: -func (_m *mock_PDU) GetPDUDestination() *Address { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetPDUDestination") - } - - var r0 *Address - if rf, ok := ret.Get(0).(func() *Address); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*Address) - } - } - - return r0 -} - -// mock_PDU_GetPDUDestination_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPDUDestination' -type mock_PDU_GetPDUDestination_Call struct { - *mock.Call -} - -// GetPDUDestination is a helper method to define mock.On call -func (_e *mock_PDU_Expecter) GetPDUDestination() *mock_PDU_GetPDUDestination_Call { - return &mock_PDU_GetPDUDestination_Call{Call: _e.mock.On("GetPDUDestination")} -} - -func (_c *mock_PDU_GetPDUDestination_Call) Run(run func()) *mock_PDU_GetPDUDestination_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *mock_PDU_GetPDUDestination_Call) Return(_a0 *Address) *mock_PDU_GetPDUDestination_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *mock_PDU_GetPDUDestination_Call) RunAndReturn(run func() *Address) *mock_PDU_GetPDUDestination_Call { - _c.Call.Return(run) - return _c -} - -// GetPDUSource provides a mock function with given fields: -func (_m *mock_PDU) GetPDUSource() *Address { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetPDUSource") - } - - var r0 *Address - if rf, ok := ret.Get(0).(func() *Address); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*Address) - } - } - - return r0 -} - -// mock_PDU_GetPDUSource_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPDUSource' -type mock_PDU_GetPDUSource_Call struct { - *mock.Call -} - -// GetPDUSource is a helper method to define mock.On call -func (_e *mock_PDU_Expecter) GetPDUSource() *mock_PDU_GetPDUSource_Call { - return &mock_PDU_GetPDUSource_Call{Call: _e.mock.On("GetPDUSource")} -} - -func (_c *mock_PDU_GetPDUSource_Call) Run(run func()) *mock_PDU_GetPDUSource_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *mock_PDU_GetPDUSource_Call) Return(_a0 *Address) *mock_PDU_GetPDUSource_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *mock_PDU_GetPDUSource_Call) RunAndReturn(run func() *Address) *mock_PDU_GetPDUSource_Call { - _c.Call.Return(run) - return _c -} - -// SetPDUDestination provides a mock function with given fields: _a0 -func (_m *mock_PDU) SetPDUDestination(_a0 *Address) { - _m.Called(_a0) -} - -// mock_PDU_SetPDUDestination_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetPDUDestination' -type mock_PDU_SetPDUDestination_Call struct { - *mock.Call -} - -// SetPDUDestination is a helper method to define mock.On call -// - _a0 *Address -func (_e *mock_PDU_Expecter) SetPDUDestination(_a0 interface{}) *mock_PDU_SetPDUDestination_Call { - return &mock_PDU_SetPDUDestination_Call{Call: _e.mock.On("SetPDUDestination", _a0)} -} - -func (_c *mock_PDU_SetPDUDestination_Call) Run(run func(_a0 *Address)) *mock_PDU_SetPDUDestination_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(*Address)) - }) - return _c -} - -func (_c *mock_PDU_SetPDUDestination_Call) Return() *mock_PDU_SetPDUDestination_Call { - _c.Call.Return() - return _c -} - -func (_c *mock_PDU_SetPDUDestination_Call) RunAndReturn(run func(*Address)) *mock_PDU_SetPDUDestination_Call { - _c.Call.Return(run) - return _c -} - -// String provides a mock function with given fields: -func (_m *mock_PDU) String() string { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for String") - } - - var r0 string - if rf, ok := ret.Get(0).(func() string); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(string) - } - - return r0 -} - -// mock_PDU_String_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'String' -type mock_PDU_String_Call struct { - *mock.Call -} - -// String is a helper method to define mock.On call -func (_e *mock_PDU_Expecter) String() *mock_PDU_String_Call { - return &mock_PDU_String_Call{Call: _e.mock.On("String")} -} - -func (_c *mock_PDU_String_Call) Run(run func()) *mock_PDU_String_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *mock_PDU_String_Call) Return(_a0 string) *mock_PDU_String_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *mock_PDU_String_Call) RunAndReturn(run func() string) *mock_PDU_String_Call { - _c.Call.Return(run) - return _c -} - -// newMock_PDU creates a new instance of mock_PDU. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func newMock_PDU(t interface { - mock.TestingT - Cleanup(func()) -}) *mock_PDU { - mock := &mock_PDU{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/plc4go/internal/bacnetip/mock__TaskRequirements_test.go b/plc4go/internal/bacnetip/mock__TaskRequirements_test.go deleted file mode 100644 index 5523daed96f..00000000000 --- a/plc4go/internal/bacnetip/mock__TaskRequirements_test.go +++ /dev/null @@ -1,259 +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 - * - * https://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. - */ - -// Code generated by mockery v2.42.2. DO NOT EDIT. - -package bacnetip - -import ( - time "time" - - mock "github.com/stretchr/testify/mock" -) - -// mock_TaskRequirements is an autogenerated mock type for the _TaskRequirements type -type mock_TaskRequirements struct { - mock.Mock -} - -type mock_TaskRequirements_Expecter struct { - mock *mock.Mock -} - -func (_m *mock_TaskRequirements) EXPECT() *mock_TaskRequirements_Expecter { - return &mock_TaskRequirements_Expecter{mock: &_m.Mock} -} - -// InstallTask provides a mock function with given fields: when, delta -func (_m *mock_TaskRequirements) InstallTask(when *time.Time, delta *time.Duration) { - _m.Called(when, delta) -} - -// mock_TaskRequirements_InstallTask_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'InstallTask' -type mock_TaskRequirements_InstallTask_Call struct { - *mock.Call -} - -// InstallTask is a helper method to define mock.On call -// - when *time.Time -// - delta *time.Duration -func (_e *mock_TaskRequirements_Expecter) InstallTask(when interface{}, delta interface{}) *mock_TaskRequirements_InstallTask_Call { - return &mock_TaskRequirements_InstallTask_Call{Call: _e.mock.On("InstallTask", when, delta)} -} - -func (_c *mock_TaskRequirements_InstallTask_Call) Run(run func(when *time.Time, delta *time.Duration)) *mock_TaskRequirements_InstallTask_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(*time.Time), args[1].(*time.Duration)) - }) - return _c -} - -func (_c *mock_TaskRequirements_InstallTask_Call) Return() *mock_TaskRequirements_InstallTask_Call { - _c.Call.Return() - return _c -} - -func (_c *mock_TaskRequirements_InstallTask_Call) RunAndReturn(run func(*time.Time, *time.Duration)) *mock_TaskRequirements_InstallTask_Call { - _c.Call.Return(run) - return _c -} - -// getIsScheduled provides a mock function with given fields: -func (_m *mock_TaskRequirements) getIsScheduled() bool { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for getIsScheduled") - } - - var r0 bool - if rf, ok := ret.Get(0).(func() bool); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(bool) - } - - return r0 -} - -// mock_TaskRequirements_getIsScheduled_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'getIsScheduled' -type mock_TaskRequirements_getIsScheduled_Call struct { - *mock.Call -} - -// getIsScheduled is a helper method to define mock.On call -func (_e *mock_TaskRequirements_Expecter) getIsScheduled() *mock_TaskRequirements_getIsScheduled_Call { - return &mock_TaskRequirements_getIsScheduled_Call{Call: _e.mock.On("getIsScheduled")} -} - -func (_c *mock_TaskRequirements_getIsScheduled_Call) Run(run func()) *mock_TaskRequirements_getIsScheduled_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *mock_TaskRequirements_getIsScheduled_Call) Return(_a0 bool) *mock_TaskRequirements_getIsScheduled_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *mock_TaskRequirements_getIsScheduled_Call) RunAndReturn(run func() bool) *mock_TaskRequirements_getIsScheduled_Call { - _c.Call.Return(run) - return _c -} - -// getTaskTime provides a mock function with given fields: -func (_m *mock_TaskRequirements) getTaskTime() *time.Time { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for getTaskTime") - } - - var r0 *time.Time - if rf, ok := ret.Get(0).(func() *time.Time); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*time.Time) - } - } - - return r0 -} - -// mock_TaskRequirements_getTaskTime_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'getTaskTime' -type mock_TaskRequirements_getTaskTime_Call struct { - *mock.Call -} - -// getTaskTime is a helper method to define mock.On call -func (_e *mock_TaskRequirements_Expecter) getTaskTime() *mock_TaskRequirements_getTaskTime_Call { - return &mock_TaskRequirements_getTaskTime_Call{Call: _e.mock.On("getTaskTime")} -} - -func (_c *mock_TaskRequirements_getTaskTime_Call) Run(run func()) *mock_TaskRequirements_getTaskTime_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *mock_TaskRequirements_getTaskTime_Call) Return(_a0 *time.Time) *mock_TaskRequirements_getTaskTime_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *mock_TaskRequirements_getTaskTime_Call) RunAndReturn(run func() *time.Time) *mock_TaskRequirements_getTaskTime_Call { - _c.Call.Return(run) - return _c -} - -// processTask provides a mock function with given fields: -func (_m *mock_TaskRequirements) processTask() error { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for processTask") - } - - var r0 error - if rf, ok := ret.Get(0).(func() error); ok { - r0 = rf() - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// mock_TaskRequirements_processTask_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'processTask' -type mock_TaskRequirements_processTask_Call struct { - *mock.Call -} - -// processTask is a helper method to define mock.On call -func (_e *mock_TaskRequirements_Expecter) processTask() *mock_TaskRequirements_processTask_Call { - return &mock_TaskRequirements_processTask_Call{Call: _e.mock.On("processTask")} -} - -func (_c *mock_TaskRequirements_processTask_Call) Run(run func()) *mock_TaskRequirements_processTask_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *mock_TaskRequirements_processTask_Call) Return(_a0 error) *mock_TaskRequirements_processTask_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *mock_TaskRequirements_processTask_Call) RunAndReturn(run func() error) *mock_TaskRequirements_processTask_Call { - _c.Call.Return(run) - return _c -} - -// setIsScheduled provides a mock function with given fields: isScheduled -func (_m *mock_TaskRequirements) setIsScheduled(isScheduled bool) { - _m.Called(isScheduled) -} - -// mock_TaskRequirements_setIsScheduled_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'setIsScheduled' -type mock_TaskRequirements_setIsScheduled_Call struct { - *mock.Call -} - -// setIsScheduled is a helper method to define mock.On call -// - isScheduled bool -func (_e *mock_TaskRequirements_Expecter) setIsScheduled(isScheduled interface{}) *mock_TaskRequirements_setIsScheduled_Call { - return &mock_TaskRequirements_setIsScheduled_Call{Call: _e.mock.On("setIsScheduled", isScheduled)} -} - -func (_c *mock_TaskRequirements_setIsScheduled_Call) Run(run func(isScheduled bool)) *mock_TaskRequirements_setIsScheduled_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(bool)) - }) - return _c -} - -func (_c *mock_TaskRequirements_setIsScheduled_Call) Return() *mock_TaskRequirements_setIsScheduled_Call { - _c.Call.Return() - return _c -} - -func (_c *mock_TaskRequirements_setIsScheduled_Call) RunAndReturn(run func(bool)) *mock_TaskRequirements_setIsScheduled_Call { - _c.Call.Return(run) - return _c -} - -// newMock_TaskRequirements creates a new instance of mock_TaskRequirements. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func newMock_TaskRequirements(t interface { - mock.TestingT - Cleanup(func()) -}) *mock_TaskRequirements { - mock := &mock_TaskRequirements{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/plc4go/internal/bacnetip/mock_option_test.go b/plc4go/internal/bacnetip/mock_option_test.go deleted file mode 100644 index f35029ec635..00000000000 --- a/plc4go/internal/bacnetip/mock_option_test.go +++ /dev/null @@ -1,97 +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 - * - * https://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. - */ - -// Code generated by mockery v2.42.2. DO NOT EDIT. - -package bacnetip - -import mock "github.com/stretchr/testify/mock" - -// mockOption is an autogenerated mock type for the option type -type mockOption struct { - mock.Mock -} - -type mockOption_Expecter struct { - mock *mock.Mock -} - -func (_m *mockOption) EXPECT() *mockOption_Expecter { - return &mockOption_Expecter{mock: &_m.Mock} -} - -// Execute provides a mock function with given fields: specificOptions -func (_m *mockOption) Execute(specificOptions *protocolSpecificOptions) error { - ret := _m.Called(specificOptions) - - if len(ret) == 0 { - panic("no return value specified for Execute") - } - - var r0 error - if rf, ok := ret.Get(0).(func(*protocolSpecificOptions) error); ok { - r0 = rf(specificOptions) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// mockOption_Execute_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Execute' -type mockOption_Execute_Call struct { - *mock.Call -} - -// Execute is a helper method to define mock.On call -// - specificOptions *protocolSpecificOptions -func (_e *mockOption_Expecter) Execute(specificOptions interface{}) *mockOption_Execute_Call { - return &mockOption_Execute_Call{Call: _e.mock.On("Execute", specificOptions)} -} - -func (_c *mockOption_Execute_Call) Run(run func(specificOptions *protocolSpecificOptions)) *mockOption_Execute_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(*protocolSpecificOptions)) - }) - return _c -} - -func (_c *mockOption_Execute_Call) Return(_a0 error) *mockOption_Execute_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *mockOption_Execute_Call) RunAndReturn(run func(*protocolSpecificOptions) error) *mockOption_Execute_Call { - _c.Call.Return(run) - return _c -} - -// newMockOption creates a new instance of mockOption. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func newMockOption(t interface { - mock.TestingT - Cleanup(func()) -}) *mockOption { - mock := &mockOption{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/plc4go/internal/bacnetip/tests/mock_ClientStateMachineContract_test.go b/plc4go/internal/bacnetip/tests/mock_ClientStateMachineContract_test.go deleted file mode 100644 index 21bd7b423bf..00000000000 --- a/plc4go/internal/bacnetip/tests/mock_ClientStateMachineContract_test.go +++ /dev/null @@ -1,1266 +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 - * - * https://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. - */ - -// Code generated by mockery v2.42.2. DO NOT EDIT. - -package tests - -import ( - bacnetip "github.com/apache/plc4x/plc4go/internal/bacnetip" - mock "github.com/stretchr/testify/mock" -) - -// MockClientStateMachineContract is an autogenerated mock type for the ClientStateMachineContract type -type MockClientStateMachineContract struct { - mock.Mock -} - -type MockClientStateMachineContract_Expecter struct { - mock *mock.Mock -} - -func (_m *MockClientStateMachineContract) EXPECT() *MockClientStateMachineContract_Expecter { - return &MockClientStateMachineContract_Expecter{mock: &_m.Mock} -} - -// AfterReceive provides a mock function with given fields: pdu -func (_m *MockClientStateMachineContract) AfterReceive(pdu bacnetip.PDU) { - _m.Called(pdu) -} - -// MockClientStateMachineContract_AfterReceive_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AfterReceive' -type MockClientStateMachineContract_AfterReceive_Call struct { - *mock.Call -} - -// AfterReceive is a helper method to define mock.On call -// - pdu bacnetip.PDU -func (_e *MockClientStateMachineContract_Expecter) AfterReceive(pdu interface{}) *MockClientStateMachineContract_AfterReceive_Call { - return &MockClientStateMachineContract_AfterReceive_Call{Call: _e.mock.On("AfterReceive", pdu)} -} - -func (_c *MockClientStateMachineContract_AfterReceive_Call) Run(run func(pdu bacnetip.PDU)) *MockClientStateMachineContract_AfterReceive_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(bacnetip.PDU)) - }) - return _c -} - -func (_c *MockClientStateMachineContract_AfterReceive_Call) Return() *MockClientStateMachineContract_AfterReceive_Call { - _c.Call.Return() - return _c -} - -func (_c *MockClientStateMachineContract_AfterReceive_Call) RunAndReturn(run func(bacnetip.PDU)) *MockClientStateMachineContract_AfterReceive_Call { - _c.Call.Return(run) - return _c -} - -// AfterSend provides a mock function with given fields: pdu -func (_m *MockClientStateMachineContract) AfterSend(pdu bacnetip.PDU) { - _m.Called(pdu) -} - -// MockClientStateMachineContract_AfterSend_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AfterSend' -type MockClientStateMachineContract_AfterSend_Call struct { - *mock.Call -} - -// AfterSend is a helper method to define mock.On call -// - pdu bacnetip.PDU -func (_e *MockClientStateMachineContract_Expecter) AfterSend(pdu interface{}) *MockClientStateMachineContract_AfterSend_Call { - return &MockClientStateMachineContract_AfterSend_Call{Call: _e.mock.On("AfterSend", pdu)} -} - -func (_c *MockClientStateMachineContract_AfterSend_Call) Run(run func(pdu bacnetip.PDU)) *MockClientStateMachineContract_AfterSend_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(bacnetip.PDU)) - }) - return _c -} - -func (_c *MockClientStateMachineContract_AfterSend_Call) Return() *MockClientStateMachineContract_AfterSend_Call { - _c.Call.Return() - return _c -} - -func (_c *MockClientStateMachineContract_AfterSend_Call) RunAndReturn(run func(bacnetip.PDU)) *MockClientStateMachineContract_AfterSend_Call { - _c.Call.Return(run) - return _c -} - -// BeforeReceive provides a mock function with given fields: pdu -func (_m *MockClientStateMachineContract) BeforeReceive(pdu bacnetip.PDU) { - _m.Called(pdu) -} - -// MockClientStateMachineContract_BeforeReceive_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BeforeReceive' -type MockClientStateMachineContract_BeforeReceive_Call struct { - *mock.Call -} - -// BeforeReceive is a helper method to define mock.On call -// - pdu bacnetip.PDU -func (_e *MockClientStateMachineContract_Expecter) BeforeReceive(pdu interface{}) *MockClientStateMachineContract_BeforeReceive_Call { - return &MockClientStateMachineContract_BeforeReceive_Call{Call: _e.mock.On("BeforeReceive", pdu)} -} - -func (_c *MockClientStateMachineContract_BeforeReceive_Call) Run(run func(pdu bacnetip.PDU)) *MockClientStateMachineContract_BeforeReceive_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(bacnetip.PDU)) - }) - return _c -} - -func (_c *MockClientStateMachineContract_BeforeReceive_Call) Return() *MockClientStateMachineContract_BeforeReceive_Call { - _c.Call.Return() - return _c -} - -func (_c *MockClientStateMachineContract_BeforeReceive_Call) RunAndReturn(run func(bacnetip.PDU)) *MockClientStateMachineContract_BeforeReceive_Call { - _c.Call.Return(run) - return _c -} - -// BeforeSend provides a mock function with given fields: pdu -func (_m *MockClientStateMachineContract) BeforeSend(pdu bacnetip.PDU) { - _m.Called(pdu) -} - -// MockClientStateMachineContract_BeforeSend_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BeforeSend' -type MockClientStateMachineContract_BeforeSend_Call struct { - *mock.Call -} - -// BeforeSend is a helper method to define mock.On call -// - pdu bacnetip.PDU -func (_e *MockClientStateMachineContract_Expecter) BeforeSend(pdu interface{}) *MockClientStateMachineContract_BeforeSend_Call { - return &MockClientStateMachineContract_BeforeSend_Call{Call: _e.mock.On("BeforeSend", pdu)} -} - -func (_c *MockClientStateMachineContract_BeforeSend_Call) Run(run func(pdu bacnetip.PDU)) *MockClientStateMachineContract_BeforeSend_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(bacnetip.PDU)) - }) - return _c -} - -func (_c *MockClientStateMachineContract_BeforeSend_Call) Return() *MockClientStateMachineContract_BeforeSend_Call { - _c.Call.Return() - return _c -} - -func (_c *MockClientStateMachineContract_BeforeSend_Call) RunAndReturn(run func(bacnetip.PDU)) *MockClientStateMachineContract_BeforeSend_Call { - _c.Call.Return(run) - return _c -} - -// Confirmation provides a mock function with given fields: args, kwargs -func (_m *MockClientStateMachineContract) Confirmation(args bacnetip.Args, kwargs bacnetip.KWArgs) error { - ret := _m.Called(args, kwargs) - - if len(ret) == 0 { - panic("no return value specified for Confirmation") - } - - var r0 error - if rf, ok := ret.Get(0).(func(bacnetip.Args, bacnetip.KWArgs) error); ok { - r0 = rf(args, kwargs) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockClientStateMachineContract_Confirmation_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Confirmation' -type MockClientStateMachineContract_Confirmation_Call struct { - *mock.Call -} - -// Confirmation is a helper method to define mock.On call -// - args bacnetip.Args -// - kwargs bacnetip.KWArgs -func (_e *MockClientStateMachineContract_Expecter) Confirmation(args interface{}, kwargs interface{}) *MockClientStateMachineContract_Confirmation_Call { - return &MockClientStateMachineContract_Confirmation_Call{Call: _e.mock.On("Confirmation", args, kwargs)} -} - -func (_c *MockClientStateMachineContract_Confirmation_Call) Run(run func(args bacnetip.Args, kwargs bacnetip.KWArgs)) *MockClientStateMachineContract_Confirmation_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(bacnetip.Args), args[1].(bacnetip.KWArgs)) - }) - return _c -} - -func (_c *MockClientStateMachineContract_Confirmation_Call) Return(_a0 error) *MockClientStateMachineContract_Confirmation_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockClientStateMachineContract_Confirmation_Call) RunAndReturn(run func(bacnetip.Args, bacnetip.KWArgs) error) *MockClientStateMachineContract_Confirmation_Call { - _c.Call.Return(run) - return _c -} - -// EventSet provides a mock function with given fields: id -func (_m *MockClientStateMachineContract) EventSet(id string) { - _m.Called(id) -} - -// MockClientStateMachineContract_EventSet_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'EventSet' -type MockClientStateMachineContract_EventSet_Call struct { - *mock.Call -} - -// EventSet is a helper method to define mock.On call -// - id string -func (_e *MockClientStateMachineContract_Expecter) EventSet(id interface{}) *MockClientStateMachineContract_EventSet_Call { - return &MockClientStateMachineContract_EventSet_Call{Call: _e.mock.On("EventSet", id)} -} - -func (_c *MockClientStateMachineContract_EventSet_Call) Run(run func(id string)) *MockClientStateMachineContract_EventSet_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string)) - }) - return _c -} - -func (_c *MockClientStateMachineContract_EventSet_Call) Return() *MockClientStateMachineContract_EventSet_Call { - _c.Call.Return() - return _c -} - -func (_c *MockClientStateMachineContract_EventSet_Call) RunAndReturn(run func(string)) *MockClientStateMachineContract_EventSet_Call { - _c.Call.Return(run) - return _c -} - -// GetCurrentState provides a mock function with given fields: -func (_m *MockClientStateMachineContract) GetCurrentState() State { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetCurrentState") - } - - var r0 State - if rf, ok := ret.Get(0).(func() State); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(State) - } - } - - return r0 -} - -// MockClientStateMachineContract_GetCurrentState_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetCurrentState' -type MockClientStateMachineContract_GetCurrentState_Call struct { - *mock.Call -} - -// GetCurrentState is a helper method to define mock.On call -func (_e *MockClientStateMachineContract_Expecter) GetCurrentState() *MockClientStateMachineContract_GetCurrentState_Call { - return &MockClientStateMachineContract_GetCurrentState_Call{Call: _e.mock.On("GetCurrentState")} -} - -func (_c *MockClientStateMachineContract_GetCurrentState_Call) Run(run func()) *MockClientStateMachineContract_GetCurrentState_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockClientStateMachineContract_GetCurrentState_Call) Return(_a0 State) *MockClientStateMachineContract_GetCurrentState_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockClientStateMachineContract_GetCurrentState_Call) RunAndReturn(run func() State) *MockClientStateMachineContract_GetCurrentState_Call { - _c.Call.Return(run) - return _c -} - -// GetStartState provides a mock function with given fields: -func (_m *MockClientStateMachineContract) GetStartState() State { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetStartState") - } - - var r0 State - if rf, ok := ret.Get(0).(func() State); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(State) - } - } - - return r0 -} - -// MockClientStateMachineContract_GetStartState_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetStartState' -type MockClientStateMachineContract_GetStartState_Call struct { - *mock.Call -} - -// GetStartState is a helper method to define mock.On call -func (_e *MockClientStateMachineContract_Expecter) GetStartState() *MockClientStateMachineContract_GetStartState_Call { - return &MockClientStateMachineContract_GetStartState_Call{Call: _e.mock.On("GetStartState")} -} - -func (_c *MockClientStateMachineContract_GetStartState_Call) Run(run func()) *MockClientStateMachineContract_GetStartState_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockClientStateMachineContract_GetStartState_Call) Return(_a0 State) *MockClientStateMachineContract_GetStartState_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockClientStateMachineContract_GetStartState_Call) RunAndReturn(run func() State) *MockClientStateMachineContract_GetStartState_Call { - _c.Call.Return(run) - return _c -} - -// GetTransactionLog provides a mock function with given fields: -func (_m *MockClientStateMachineContract) GetTransactionLog() []string { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetTransactionLog") - } - - var r0 []string - if rf, ok := ret.Get(0).(func() []string); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]string) - } - } - - return r0 -} - -// MockClientStateMachineContract_GetTransactionLog_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetTransactionLog' -type MockClientStateMachineContract_GetTransactionLog_Call struct { - *mock.Call -} - -// GetTransactionLog is a helper method to define mock.On call -func (_e *MockClientStateMachineContract_Expecter) GetTransactionLog() *MockClientStateMachineContract_GetTransactionLog_Call { - return &MockClientStateMachineContract_GetTransactionLog_Call{Call: _e.mock.On("GetTransactionLog")} -} - -func (_c *MockClientStateMachineContract_GetTransactionLog_Call) Run(run func()) *MockClientStateMachineContract_GetTransactionLog_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockClientStateMachineContract_GetTransactionLog_Call) Return(_a0 []string) *MockClientStateMachineContract_GetTransactionLog_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockClientStateMachineContract_GetTransactionLog_Call) RunAndReturn(run func() []string) *MockClientStateMachineContract_GetTransactionLog_Call { - _c.Call.Return(run) - return _c -} - -// GetUnexpectedReceiveState provides a mock function with given fields: -func (_m *MockClientStateMachineContract) GetUnexpectedReceiveState() State { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetUnexpectedReceiveState") - } - - var r0 State - if rf, ok := ret.Get(0).(func() State); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(State) - } - } - - return r0 -} - -// MockClientStateMachineContract_GetUnexpectedReceiveState_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetUnexpectedReceiveState' -type MockClientStateMachineContract_GetUnexpectedReceiveState_Call struct { - *mock.Call -} - -// GetUnexpectedReceiveState is a helper method to define mock.On call -func (_e *MockClientStateMachineContract_Expecter) GetUnexpectedReceiveState() *MockClientStateMachineContract_GetUnexpectedReceiveState_Call { - return &MockClientStateMachineContract_GetUnexpectedReceiveState_Call{Call: _e.mock.On("GetUnexpectedReceiveState")} -} - -func (_c *MockClientStateMachineContract_GetUnexpectedReceiveState_Call) Run(run func()) *MockClientStateMachineContract_GetUnexpectedReceiveState_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockClientStateMachineContract_GetUnexpectedReceiveState_Call) Return(_a0 State) *MockClientStateMachineContract_GetUnexpectedReceiveState_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockClientStateMachineContract_GetUnexpectedReceiveState_Call) RunAndReturn(run func() State) *MockClientStateMachineContract_GetUnexpectedReceiveState_Call { - _c.Call.Return(run) - return _c -} - -// IsFailState provides a mock function with given fields: -func (_m *MockClientStateMachineContract) IsFailState() bool { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for IsFailState") - } - - var r0 bool - if rf, ok := ret.Get(0).(func() bool); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(bool) - } - - return r0 -} - -// MockClientStateMachineContract_IsFailState_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsFailState' -type MockClientStateMachineContract_IsFailState_Call struct { - *mock.Call -} - -// IsFailState is a helper method to define mock.On call -func (_e *MockClientStateMachineContract_Expecter) IsFailState() *MockClientStateMachineContract_IsFailState_Call { - return &MockClientStateMachineContract_IsFailState_Call{Call: _e.mock.On("IsFailState")} -} - -func (_c *MockClientStateMachineContract_IsFailState_Call) Run(run func()) *MockClientStateMachineContract_IsFailState_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockClientStateMachineContract_IsFailState_Call) Return(_a0 bool) *MockClientStateMachineContract_IsFailState_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockClientStateMachineContract_IsFailState_Call) RunAndReturn(run func() bool) *MockClientStateMachineContract_IsFailState_Call { - _c.Call.Return(run) - return _c -} - -// IsRunning provides a mock function with given fields: -func (_m *MockClientStateMachineContract) IsRunning() bool { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for IsRunning") - } - - var r0 bool - if rf, ok := ret.Get(0).(func() bool); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(bool) - } - - return r0 -} - -// MockClientStateMachineContract_IsRunning_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsRunning' -type MockClientStateMachineContract_IsRunning_Call struct { - *mock.Call -} - -// IsRunning is a helper method to define mock.On call -func (_e *MockClientStateMachineContract_Expecter) IsRunning() *MockClientStateMachineContract_IsRunning_Call { - return &MockClientStateMachineContract_IsRunning_Call{Call: _e.mock.On("IsRunning")} -} - -func (_c *MockClientStateMachineContract_IsRunning_Call) Run(run func()) *MockClientStateMachineContract_IsRunning_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockClientStateMachineContract_IsRunning_Call) Return(_a0 bool) *MockClientStateMachineContract_IsRunning_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockClientStateMachineContract_IsRunning_Call) RunAndReturn(run func() bool) *MockClientStateMachineContract_IsRunning_Call { - _c.Call.Return(run) - return _c -} - -// IsSuccessState provides a mock function with given fields: -func (_m *MockClientStateMachineContract) IsSuccessState() bool { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for IsSuccessState") - } - - var r0 bool - if rf, ok := ret.Get(0).(func() bool); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(bool) - } - - return r0 -} - -// MockClientStateMachineContract_IsSuccessState_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsSuccessState' -type MockClientStateMachineContract_IsSuccessState_Call struct { - *mock.Call -} - -// IsSuccessState is a helper method to define mock.On call -func (_e *MockClientStateMachineContract_Expecter) IsSuccessState() *MockClientStateMachineContract_IsSuccessState_Call { - return &MockClientStateMachineContract_IsSuccessState_Call{Call: _e.mock.On("IsSuccessState")} -} - -func (_c *MockClientStateMachineContract_IsSuccessState_Call) Run(run func()) *MockClientStateMachineContract_IsSuccessState_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockClientStateMachineContract_IsSuccessState_Call) Return(_a0 bool) *MockClientStateMachineContract_IsSuccessState_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockClientStateMachineContract_IsSuccessState_Call) RunAndReturn(run func() bool) *MockClientStateMachineContract_IsSuccessState_Call { - _c.Call.Return(run) - return _c -} - -// NewState provides a mock function with given fields: _a0 -func (_m *MockClientStateMachineContract) NewState(_a0 string) State { - ret := _m.Called(_a0) - - if len(ret) == 0 { - panic("no return value specified for NewState") - } - - var r0 State - if rf, ok := ret.Get(0).(func(string) State); ok { - r0 = rf(_a0) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(State) - } - } - - return r0 -} - -// MockClientStateMachineContract_NewState_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'NewState' -type MockClientStateMachineContract_NewState_Call struct { - *mock.Call -} - -// NewState is a helper method to define mock.On call -// - _a0 string -func (_e *MockClientStateMachineContract_Expecter) NewState(_a0 interface{}) *MockClientStateMachineContract_NewState_Call { - return &MockClientStateMachineContract_NewState_Call{Call: _e.mock.On("NewState", _a0)} -} - -func (_c *MockClientStateMachineContract_NewState_Call) Run(run func(_a0 string)) *MockClientStateMachineContract_NewState_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string)) - }) - return _c -} - -func (_c *MockClientStateMachineContract_NewState_Call) Return(_a0 State) *MockClientStateMachineContract_NewState_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockClientStateMachineContract_NewState_Call) RunAndReturn(run func(string) State) *MockClientStateMachineContract_NewState_Call { - _c.Call.Return(run) - return _c -} - -// Receive provides a mock function with given fields: args, kwargs -func (_m *MockClientStateMachineContract) Receive(args bacnetip.Args, kwargs bacnetip.KWArgs) error { - ret := _m.Called(args, kwargs) - - if len(ret) == 0 { - panic("no return value specified for Receive") - } - - var r0 error - if rf, ok := ret.Get(0).(func(bacnetip.Args, bacnetip.KWArgs) error); ok { - r0 = rf(args, kwargs) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockClientStateMachineContract_Receive_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Receive' -type MockClientStateMachineContract_Receive_Call struct { - *mock.Call -} - -// Receive is a helper method to define mock.On call -// - args bacnetip.Args -// - kwargs bacnetip.KWArgs -func (_e *MockClientStateMachineContract_Expecter) Receive(args interface{}, kwargs interface{}) *MockClientStateMachineContract_Receive_Call { - return &MockClientStateMachineContract_Receive_Call{Call: _e.mock.On("Receive", args, kwargs)} -} - -func (_c *MockClientStateMachineContract_Receive_Call) Run(run func(args bacnetip.Args, kwargs bacnetip.KWArgs)) *MockClientStateMachineContract_Receive_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(bacnetip.Args), args[1].(bacnetip.KWArgs)) - }) - return _c -} - -func (_c *MockClientStateMachineContract_Receive_Call) Return(_a0 error) *MockClientStateMachineContract_Receive_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockClientStateMachineContract_Receive_Call) RunAndReturn(run func(bacnetip.Args, bacnetip.KWArgs) error) *MockClientStateMachineContract_Receive_Call { - _c.Call.Return(run) - return _c -} - -// Request provides a mock function with given fields: args, kwargs -func (_m *MockClientStateMachineContract) Request(args bacnetip.Args, kwargs bacnetip.KWArgs) error { - ret := _m.Called(args, kwargs) - - if len(ret) == 0 { - panic("no return value specified for Request") - } - - var r0 error - if rf, ok := ret.Get(0).(func(bacnetip.Args, bacnetip.KWArgs) error); ok { - r0 = rf(args, kwargs) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockClientStateMachineContract_Request_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Request' -type MockClientStateMachineContract_Request_Call struct { - *mock.Call -} - -// Request is a helper method to define mock.On call -// - args bacnetip.Args -// - kwargs bacnetip.KWArgs -func (_e *MockClientStateMachineContract_Expecter) Request(args interface{}, kwargs interface{}) *MockClientStateMachineContract_Request_Call { - return &MockClientStateMachineContract_Request_Call{Call: _e.mock.On("Request", args, kwargs)} -} - -func (_c *MockClientStateMachineContract_Request_Call) Run(run func(args bacnetip.Args, kwargs bacnetip.KWArgs)) *MockClientStateMachineContract_Request_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(bacnetip.Args), args[1].(bacnetip.KWArgs)) - }) - return _c -} - -func (_c *MockClientStateMachineContract_Request_Call) Return(_a0 error) *MockClientStateMachineContract_Request_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockClientStateMachineContract_Request_Call) RunAndReturn(run func(bacnetip.Args, bacnetip.KWArgs) error) *MockClientStateMachineContract_Request_Call { - _c.Call.Return(run) - return _c -} - -// Reset provides a mock function with given fields: -func (_m *MockClientStateMachineContract) Reset() { - _m.Called() -} - -// MockClientStateMachineContract_Reset_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Reset' -type MockClientStateMachineContract_Reset_Call struct { - *mock.Call -} - -// Reset is a helper method to define mock.On call -func (_e *MockClientStateMachineContract_Expecter) Reset() *MockClientStateMachineContract_Reset_Call { - return &MockClientStateMachineContract_Reset_Call{Call: _e.mock.On("Reset")} -} - -func (_c *MockClientStateMachineContract_Reset_Call) Run(run func()) *MockClientStateMachineContract_Reset_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockClientStateMachineContract_Reset_Call) Return() *MockClientStateMachineContract_Reset_Call { - _c.Call.Return() - return _c -} - -func (_c *MockClientStateMachineContract_Reset_Call) RunAndReturn(run func()) *MockClientStateMachineContract_Reset_Call { - _c.Call.Return(run) - return _c -} - -// Run provides a mock function with given fields: -func (_m *MockClientStateMachineContract) Run() error { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Run") - } - - var r0 error - if rf, ok := ret.Get(0).(func() error); ok { - r0 = rf() - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockClientStateMachineContract_Run_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Run' -type MockClientStateMachineContract_Run_Call struct { - *mock.Call -} - -// Run is a helper method to define mock.On call -func (_e *MockClientStateMachineContract_Expecter) Run() *MockClientStateMachineContract_Run_Call { - return &MockClientStateMachineContract_Run_Call{Call: _e.mock.On("Run")} -} - -func (_c *MockClientStateMachineContract_Run_Call) Run(run func()) *MockClientStateMachineContract_Run_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockClientStateMachineContract_Run_Call) Return(_a0 error) *MockClientStateMachineContract_Run_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockClientStateMachineContract_Run_Call) RunAndReturn(run func() error) *MockClientStateMachineContract_Run_Call { - _c.Call.Return(run) - return _c -} - -// Send provides a mock function with given fields: args, kwargs -func (_m *MockClientStateMachineContract) Send(args bacnetip.Args, kwargs bacnetip.KWArgs) error { - ret := _m.Called(args, kwargs) - - if len(ret) == 0 { - panic("no return value specified for Send") - } - - var r0 error - if rf, ok := ret.Get(0).(func(bacnetip.Args, bacnetip.KWArgs) error); ok { - r0 = rf(args, kwargs) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockClientStateMachineContract_Send_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Send' -type MockClientStateMachineContract_Send_Call struct { - *mock.Call -} - -// Send is a helper method to define mock.On call -// - args bacnetip.Args -// - kwargs bacnetip.KWArgs -func (_e *MockClientStateMachineContract_Expecter) Send(args interface{}, kwargs interface{}) *MockClientStateMachineContract_Send_Call { - return &MockClientStateMachineContract_Send_Call{Call: _e.mock.On("Send", args, kwargs)} -} - -func (_c *MockClientStateMachineContract_Send_Call) Run(run func(args bacnetip.Args, kwargs bacnetip.KWArgs)) *MockClientStateMachineContract_Send_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(bacnetip.Args), args[1].(bacnetip.KWArgs)) - }) - return _c -} - -func (_c *MockClientStateMachineContract_Send_Call) Return(_a0 error) *MockClientStateMachineContract_Send_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockClientStateMachineContract_Send_Call) RunAndReturn(run func(bacnetip.Args, bacnetip.KWArgs) error) *MockClientStateMachineContract_Send_Call { - _c.Call.Return(run) - return _c -} - -// String provides a mock function with given fields: -func (_m *MockClientStateMachineContract) String() string { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for String") - } - - var r0 string - if rf, ok := ret.Get(0).(func() string); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(string) - } - - return r0 -} - -// MockClientStateMachineContract_String_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'String' -type MockClientStateMachineContract_String_Call struct { - *mock.Call -} - -// String is a helper method to define mock.On call -func (_e *MockClientStateMachineContract_Expecter) String() *MockClientStateMachineContract_String_Call { - return &MockClientStateMachineContract_String_Call{Call: _e.mock.On("String")} -} - -func (_c *MockClientStateMachineContract_String_Call) Run(run func()) *MockClientStateMachineContract_String_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockClientStateMachineContract_String_Call) Return(_a0 string) *MockClientStateMachineContract_String_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockClientStateMachineContract_String_Call) RunAndReturn(run func() string) *MockClientStateMachineContract_String_Call { - _c.Call.Return(run) - return _c -} - -// UnexpectedReceive provides a mock function with given fields: pdu -func (_m *MockClientStateMachineContract) UnexpectedReceive(pdu bacnetip.PDU) { - _m.Called(pdu) -} - -// MockClientStateMachineContract_UnexpectedReceive_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UnexpectedReceive' -type MockClientStateMachineContract_UnexpectedReceive_Call struct { - *mock.Call -} - -// UnexpectedReceive is a helper method to define mock.On call -// - pdu bacnetip.PDU -func (_e *MockClientStateMachineContract_Expecter) UnexpectedReceive(pdu interface{}) *MockClientStateMachineContract_UnexpectedReceive_Call { - return &MockClientStateMachineContract_UnexpectedReceive_Call{Call: _e.mock.On("UnexpectedReceive", pdu)} -} - -func (_c *MockClientStateMachineContract_UnexpectedReceive_Call) Run(run func(pdu bacnetip.PDU)) *MockClientStateMachineContract_UnexpectedReceive_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(bacnetip.PDU)) - }) - return _c -} - -func (_c *MockClientStateMachineContract_UnexpectedReceive_Call) Return() *MockClientStateMachineContract_UnexpectedReceive_Call { - _c.Call.Return() - return _c -} - -func (_c *MockClientStateMachineContract_UnexpectedReceive_Call) RunAndReturn(run func(bacnetip.PDU)) *MockClientStateMachineContract_UnexpectedReceive_Call { - _c.Call.Return(run) - return _c -} - -// _setClientPeer provides a mock function with given fields: server -func (_m *MockClientStateMachineContract) _setClientPeer(server bacnetip.Server) { - _m.Called(server) -} - -// MockClientStateMachineContract__setClientPeer_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method '_setClientPeer' -type MockClientStateMachineContract__setClientPeer_Call struct { - *mock.Call -} - -// _setClientPeer is a helper method to define mock.On call -// - server bacnetip.Server -func (_e *MockClientStateMachineContract_Expecter) _setClientPeer(server interface{}) *MockClientStateMachineContract__setClientPeer_Call { - return &MockClientStateMachineContract__setClientPeer_Call{Call: _e.mock.On("_setClientPeer", server)} -} - -func (_c *MockClientStateMachineContract__setClientPeer_Call) Run(run func(server bacnetip.Server)) *MockClientStateMachineContract__setClientPeer_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(bacnetip.Server)) - }) - return _c -} - -func (_c *MockClientStateMachineContract__setClientPeer_Call) Return() *MockClientStateMachineContract__setClientPeer_Call { - _c.Call.Return() - return _c -} - -func (_c *MockClientStateMachineContract__setClientPeer_Call) RunAndReturn(run func(bacnetip.Server)) *MockClientStateMachineContract__setClientPeer_Call { - _c.Call.Return(run) - return _c -} - -// getClientId provides a mock function with given fields: -func (_m *MockClientStateMachineContract) getClientId() *int { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for getClientId") - } - - var r0 *int - if rf, ok := ret.Get(0).(func() *int); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*int) - } - } - - return r0 -} - -// MockClientStateMachineContract_getClientId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'getClientId' -type MockClientStateMachineContract_getClientId_Call struct { - *mock.Call -} - -// getClientId is a helper method to define mock.On call -func (_e *MockClientStateMachineContract_Expecter) getClientId() *MockClientStateMachineContract_getClientId_Call { - return &MockClientStateMachineContract_getClientId_Call{Call: _e.mock.On("getClientId")} -} - -func (_c *MockClientStateMachineContract_getClientId_Call) Run(run func()) *MockClientStateMachineContract_getClientId_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockClientStateMachineContract_getClientId_Call) Return(_a0 *int) *MockClientStateMachineContract_getClientId_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockClientStateMachineContract_getClientId_Call) RunAndReturn(run func() *int) *MockClientStateMachineContract_getClientId_Call { - _c.Call.Return(run) - return _c -} - -// getCurrentState provides a mock function with given fields: -func (_m *MockClientStateMachineContract) getCurrentState() State { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for getCurrentState") - } - - var r0 State - if rf, ok := ret.Get(0).(func() State); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(State) - } - } - - return r0 -} - -// MockClientStateMachineContract_getCurrentState_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'getCurrentState' -type MockClientStateMachineContract_getCurrentState_Call struct { - *mock.Call -} - -// getCurrentState is a helper method to define mock.On call -func (_e *MockClientStateMachineContract_Expecter) getCurrentState() *MockClientStateMachineContract_getCurrentState_Call { - return &MockClientStateMachineContract_getCurrentState_Call{Call: _e.mock.On("getCurrentState")} -} - -func (_c *MockClientStateMachineContract_getCurrentState_Call) Run(run func()) *MockClientStateMachineContract_getCurrentState_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockClientStateMachineContract_getCurrentState_Call) Return(_a0 State) *MockClientStateMachineContract_getCurrentState_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockClientStateMachineContract_getCurrentState_Call) RunAndReturn(run func() State) *MockClientStateMachineContract_getCurrentState_Call { - _c.Call.Return(run) - return _c -} - -// getMachineGroup provides a mock function with given fields: -func (_m *MockClientStateMachineContract) getMachineGroup() *StateMachineGroup { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for getMachineGroup") - } - - var r0 *StateMachineGroup - if rf, ok := ret.Get(0).(func() *StateMachineGroup); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*StateMachineGroup) - } - } - - return r0 -} - -// MockClientStateMachineContract_getMachineGroup_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'getMachineGroup' -type MockClientStateMachineContract_getMachineGroup_Call struct { - *mock.Call -} - -// getMachineGroup is a helper method to define mock.On call -func (_e *MockClientStateMachineContract_Expecter) getMachineGroup() *MockClientStateMachineContract_getMachineGroup_Call { - return &MockClientStateMachineContract_getMachineGroup_Call{Call: _e.mock.On("getMachineGroup")} -} - -func (_c *MockClientStateMachineContract_getMachineGroup_Call) Run(run func()) *MockClientStateMachineContract_getMachineGroup_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockClientStateMachineContract_getMachineGroup_Call) Return(_a0 *StateMachineGroup) *MockClientStateMachineContract_getMachineGroup_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockClientStateMachineContract_getMachineGroup_Call) RunAndReturn(run func() *StateMachineGroup) *MockClientStateMachineContract_getMachineGroup_Call { - _c.Call.Return(run) - return _c -} - -// getStateTimeoutTask provides a mock function with given fields: -func (_m *MockClientStateMachineContract) getStateTimeoutTask() *TimeoutTask { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for getStateTimeoutTask") - } - - var r0 *TimeoutTask - if rf, ok := ret.Get(0).(func() *TimeoutTask); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*TimeoutTask) - } - } - - return r0 -} - -// MockClientStateMachineContract_getStateTimeoutTask_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'getStateTimeoutTask' -type MockClientStateMachineContract_getStateTimeoutTask_Call struct { - *mock.Call -} - -// getStateTimeoutTask is a helper method to define mock.On call -func (_e *MockClientStateMachineContract_Expecter) getStateTimeoutTask() *MockClientStateMachineContract_getStateTimeoutTask_Call { - return &MockClientStateMachineContract_getStateTimeoutTask_Call{Call: _e.mock.On("getStateTimeoutTask")} -} - -func (_c *MockClientStateMachineContract_getStateTimeoutTask_Call) Run(run func()) *MockClientStateMachineContract_getStateTimeoutTask_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockClientStateMachineContract_getStateTimeoutTask_Call) Return(_a0 *TimeoutTask) *MockClientStateMachineContract_getStateTimeoutTask_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockClientStateMachineContract_getStateTimeoutTask_Call) RunAndReturn(run func() *TimeoutTask) *MockClientStateMachineContract_getStateTimeoutTask_Call { - _c.Call.Return(run) - return _c -} - -// getStates provides a mock function with given fields: -func (_m *MockClientStateMachineContract) getStates() []State { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for getStates") - } - - var r0 []State - if rf, ok := ret.Get(0).(func() []State); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]State) - } - } - - return r0 -} - -// MockClientStateMachineContract_getStates_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'getStates' -type MockClientStateMachineContract_getStates_Call struct { - *mock.Call -} - -// getStates is a helper method to define mock.On call -func (_e *MockClientStateMachineContract_Expecter) getStates() *MockClientStateMachineContract_getStates_Call { - return &MockClientStateMachineContract_getStates_Call{Call: _e.mock.On("getStates")} -} - -func (_c *MockClientStateMachineContract_getStates_Call) Run(run func()) *MockClientStateMachineContract_getStates_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockClientStateMachineContract_getStates_Call) Return(_a0 []State) *MockClientStateMachineContract_getStates_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockClientStateMachineContract_getStates_Call) RunAndReturn(run func() []State) *MockClientStateMachineContract_getStates_Call { - _c.Call.Return(run) - return _c -} - -// halt provides a mock function with given fields: -func (_m *MockClientStateMachineContract) halt() { - _m.Called() -} - -// MockClientStateMachineContract_halt_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'halt' -type MockClientStateMachineContract_halt_Call struct { - *mock.Call -} - -// halt is a helper method to define mock.On call -func (_e *MockClientStateMachineContract_Expecter) halt() *MockClientStateMachineContract_halt_Call { - return &MockClientStateMachineContract_halt_Call{Call: _e.mock.On("halt")} -} - -func (_c *MockClientStateMachineContract_halt_Call) Run(run func()) *MockClientStateMachineContract_halt_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockClientStateMachineContract_halt_Call) Return() *MockClientStateMachineContract_halt_Call { - _c.Call.Return() - return _c -} - -func (_c *MockClientStateMachineContract_halt_Call) RunAndReturn(run func()) *MockClientStateMachineContract_halt_Call { - _c.Call.Return(run) - return _c -} - -// setMachineGroup provides a mock function with given fields: machineGroup -func (_m *MockClientStateMachineContract) setMachineGroup(machineGroup *StateMachineGroup) { - _m.Called(machineGroup) -} - -// MockClientStateMachineContract_setMachineGroup_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'setMachineGroup' -type MockClientStateMachineContract_setMachineGroup_Call struct { - *mock.Call -} - -// setMachineGroup is a helper method to define mock.On call -// - machineGroup *StateMachineGroup -func (_e *MockClientStateMachineContract_Expecter) setMachineGroup(machineGroup interface{}) *MockClientStateMachineContract_setMachineGroup_Call { - return &MockClientStateMachineContract_setMachineGroup_Call{Call: _e.mock.On("setMachineGroup", machineGroup)} -} - -func (_c *MockClientStateMachineContract_setMachineGroup_Call) Run(run func(machineGroup *StateMachineGroup)) *MockClientStateMachineContract_setMachineGroup_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(*StateMachineGroup)) - }) - return _c -} - -func (_c *MockClientStateMachineContract_setMachineGroup_Call) Return() *MockClientStateMachineContract_setMachineGroup_Call { - _c.Call.Return() - return _c -} - -func (_c *MockClientStateMachineContract_setMachineGroup_Call) RunAndReturn(run func(*StateMachineGroup)) *MockClientStateMachineContract_setMachineGroup_Call { - _c.Call.Return(run) - return _c -} - -// NewMockClientStateMachineContract creates a new instance of MockClientStateMachineContract. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewMockClientStateMachineContract(t interface { - mock.TestingT - Cleanup(func()) -}) *MockClientStateMachineContract { - mock := &MockClientStateMachineContract{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/plc4go/internal/bacnetip/tests/mock_StateInterceptor_test.go b/plc4go/internal/bacnetip/tests/mock_StateInterceptor_test.go deleted file mode 100644 index 9b58734fa2e..00000000000 --- a/plc4go/internal/bacnetip/tests/mock_StateInterceptor_test.go +++ /dev/null @@ -1,219 +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 - * - * https://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. - */ - -// Code generated by mockery v2.42.2. DO NOT EDIT. - -package tests - -import ( - bacnetip "github.com/apache/plc4x/plc4go/internal/bacnetip" - mock "github.com/stretchr/testify/mock" -) - -// MockStateInterceptor is an autogenerated mock type for the StateInterceptor type -type MockStateInterceptor struct { - mock.Mock -} - -type MockStateInterceptor_Expecter struct { - mock *mock.Mock -} - -func (_m *MockStateInterceptor) EXPECT() *MockStateInterceptor_Expecter { - return &MockStateInterceptor_Expecter{mock: &_m.Mock} -} - -// AfterReceive provides a mock function with given fields: pdu -func (_m *MockStateInterceptor) AfterReceive(pdu bacnetip.PDU) { - _m.Called(pdu) -} - -// MockStateInterceptor_AfterReceive_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AfterReceive' -type MockStateInterceptor_AfterReceive_Call struct { - *mock.Call -} - -// AfterReceive is a helper method to define mock.On call -// - pdu bacnetip.PDU -func (_e *MockStateInterceptor_Expecter) AfterReceive(pdu interface{}) *MockStateInterceptor_AfterReceive_Call { - return &MockStateInterceptor_AfterReceive_Call{Call: _e.mock.On("AfterReceive", pdu)} -} - -func (_c *MockStateInterceptor_AfterReceive_Call) Run(run func(pdu bacnetip.PDU)) *MockStateInterceptor_AfterReceive_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(bacnetip.PDU)) - }) - return _c -} - -func (_c *MockStateInterceptor_AfterReceive_Call) Return() *MockStateInterceptor_AfterReceive_Call { - _c.Call.Return() - return _c -} - -func (_c *MockStateInterceptor_AfterReceive_Call) RunAndReturn(run func(bacnetip.PDU)) *MockStateInterceptor_AfterReceive_Call { - _c.Call.Return(run) - return _c -} - -// AfterSend provides a mock function with given fields: pdu -func (_m *MockStateInterceptor) AfterSend(pdu bacnetip.PDU) { - _m.Called(pdu) -} - -// MockStateInterceptor_AfterSend_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AfterSend' -type MockStateInterceptor_AfterSend_Call struct { - *mock.Call -} - -// AfterSend is a helper method to define mock.On call -// - pdu bacnetip.PDU -func (_e *MockStateInterceptor_Expecter) AfterSend(pdu interface{}) *MockStateInterceptor_AfterSend_Call { - return &MockStateInterceptor_AfterSend_Call{Call: _e.mock.On("AfterSend", pdu)} -} - -func (_c *MockStateInterceptor_AfterSend_Call) Run(run func(pdu bacnetip.PDU)) *MockStateInterceptor_AfterSend_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(bacnetip.PDU)) - }) - return _c -} - -func (_c *MockStateInterceptor_AfterSend_Call) Return() *MockStateInterceptor_AfterSend_Call { - _c.Call.Return() - return _c -} - -func (_c *MockStateInterceptor_AfterSend_Call) RunAndReturn(run func(bacnetip.PDU)) *MockStateInterceptor_AfterSend_Call { - _c.Call.Return(run) - return _c -} - -// BeforeReceive provides a mock function with given fields: pdu -func (_m *MockStateInterceptor) BeforeReceive(pdu bacnetip.PDU) { - _m.Called(pdu) -} - -// MockStateInterceptor_BeforeReceive_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BeforeReceive' -type MockStateInterceptor_BeforeReceive_Call struct { - *mock.Call -} - -// BeforeReceive is a helper method to define mock.On call -// - pdu bacnetip.PDU -func (_e *MockStateInterceptor_Expecter) BeforeReceive(pdu interface{}) *MockStateInterceptor_BeforeReceive_Call { - return &MockStateInterceptor_BeforeReceive_Call{Call: _e.mock.On("BeforeReceive", pdu)} -} - -func (_c *MockStateInterceptor_BeforeReceive_Call) Run(run func(pdu bacnetip.PDU)) *MockStateInterceptor_BeforeReceive_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(bacnetip.PDU)) - }) - return _c -} - -func (_c *MockStateInterceptor_BeforeReceive_Call) Return() *MockStateInterceptor_BeforeReceive_Call { - _c.Call.Return() - return _c -} - -func (_c *MockStateInterceptor_BeforeReceive_Call) RunAndReturn(run func(bacnetip.PDU)) *MockStateInterceptor_BeforeReceive_Call { - _c.Call.Return(run) - return _c -} - -// BeforeSend provides a mock function with given fields: pdu -func (_m *MockStateInterceptor) BeforeSend(pdu bacnetip.PDU) { - _m.Called(pdu) -} - -// MockStateInterceptor_BeforeSend_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BeforeSend' -type MockStateInterceptor_BeforeSend_Call struct { - *mock.Call -} - -// BeforeSend is a helper method to define mock.On call -// - pdu bacnetip.PDU -func (_e *MockStateInterceptor_Expecter) BeforeSend(pdu interface{}) *MockStateInterceptor_BeforeSend_Call { - return &MockStateInterceptor_BeforeSend_Call{Call: _e.mock.On("BeforeSend", pdu)} -} - -func (_c *MockStateInterceptor_BeforeSend_Call) Run(run func(pdu bacnetip.PDU)) *MockStateInterceptor_BeforeSend_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(bacnetip.PDU)) - }) - return _c -} - -func (_c *MockStateInterceptor_BeforeSend_Call) Return() *MockStateInterceptor_BeforeSend_Call { - _c.Call.Return() - return _c -} - -func (_c *MockStateInterceptor_BeforeSend_Call) RunAndReturn(run func(bacnetip.PDU)) *MockStateInterceptor_BeforeSend_Call { - _c.Call.Return(run) - return _c -} - -// UnexpectedReceive provides a mock function with given fields: pdu -func (_m *MockStateInterceptor) UnexpectedReceive(pdu bacnetip.PDU) { - _m.Called(pdu) -} - -// MockStateInterceptor_UnexpectedReceive_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UnexpectedReceive' -type MockStateInterceptor_UnexpectedReceive_Call struct { - *mock.Call -} - -// UnexpectedReceive is a helper method to define mock.On call -// - pdu bacnetip.PDU -func (_e *MockStateInterceptor_Expecter) UnexpectedReceive(pdu interface{}) *MockStateInterceptor_UnexpectedReceive_Call { - return &MockStateInterceptor_UnexpectedReceive_Call{Call: _e.mock.On("UnexpectedReceive", pdu)} -} - -func (_c *MockStateInterceptor_UnexpectedReceive_Call) Run(run func(pdu bacnetip.PDU)) *MockStateInterceptor_UnexpectedReceive_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(bacnetip.PDU)) - }) - return _c -} - -func (_c *MockStateInterceptor_UnexpectedReceive_Call) Return() *MockStateInterceptor_UnexpectedReceive_Call { - _c.Call.Return() - return _c -} - -func (_c *MockStateInterceptor_UnexpectedReceive_Call) RunAndReturn(run func(bacnetip.PDU)) *MockStateInterceptor_UnexpectedReceive_Call { - _c.Call.Return(run) - return _c -} - -// NewMockStateInterceptor creates a new instance of MockStateInterceptor. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewMockStateInterceptor(t interface { - mock.TestingT - Cleanup(func()) -}) *MockStateInterceptor { - mock := &MockStateInterceptor{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/plc4go/internal/bacnetip/tests/mock_StateMachineContract_test.go b/plc4go/internal/bacnetip/tests/mock_StateMachineContract_test.go deleted file mode 100644 index 9b0001d08f3..00000000000 --- a/plc4go/internal/bacnetip/tests/mock_StateMachineContract_test.go +++ /dev/null @@ -1,1045 +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 - * - * https://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. - */ - -// Code generated by mockery v2.42.2. DO NOT EDIT. - -package tests - -import ( - bacnetip "github.com/apache/plc4x/plc4go/internal/bacnetip" - mock "github.com/stretchr/testify/mock" -) - -// MockStateMachineContract is an autogenerated mock type for the StateMachineContract type -type MockStateMachineContract struct { - mock.Mock -} - -type MockStateMachineContract_Expecter struct { - mock *mock.Mock -} - -func (_m *MockStateMachineContract) EXPECT() *MockStateMachineContract_Expecter { - return &MockStateMachineContract_Expecter{mock: &_m.Mock} -} - -// AfterReceive provides a mock function with given fields: pdu -func (_m *MockStateMachineContract) AfterReceive(pdu bacnetip.PDU) { - _m.Called(pdu) -} - -// MockStateMachineContract_AfterReceive_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AfterReceive' -type MockStateMachineContract_AfterReceive_Call struct { - *mock.Call -} - -// AfterReceive is a helper method to define mock.On call -// - pdu bacnetip.PDU -func (_e *MockStateMachineContract_Expecter) AfterReceive(pdu interface{}) *MockStateMachineContract_AfterReceive_Call { - return &MockStateMachineContract_AfterReceive_Call{Call: _e.mock.On("AfterReceive", pdu)} -} - -func (_c *MockStateMachineContract_AfterReceive_Call) Run(run func(pdu bacnetip.PDU)) *MockStateMachineContract_AfterReceive_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(bacnetip.PDU)) - }) - return _c -} - -func (_c *MockStateMachineContract_AfterReceive_Call) Return() *MockStateMachineContract_AfterReceive_Call { - _c.Call.Return() - return _c -} - -func (_c *MockStateMachineContract_AfterReceive_Call) RunAndReturn(run func(bacnetip.PDU)) *MockStateMachineContract_AfterReceive_Call { - _c.Call.Return(run) - return _c -} - -// AfterSend provides a mock function with given fields: pdu -func (_m *MockStateMachineContract) AfterSend(pdu bacnetip.PDU) { - _m.Called(pdu) -} - -// MockStateMachineContract_AfterSend_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AfterSend' -type MockStateMachineContract_AfterSend_Call struct { - *mock.Call -} - -// AfterSend is a helper method to define mock.On call -// - pdu bacnetip.PDU -func (_e *MockStateMachineContract_Expecter) AfterSend(pdu interface{}) *MockStateMachineContract_AfterSend_Call { - return &MockStateMachineContract_AfterSend_Call{Call: _e.mock.On("AfterSend", pdu)} -} - -func (_c *MockStateMachineContract_AfterSend_Call) Run(run func(pdu bacnetip.PDU)) *MockStateMachineContract_AfterSend_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(bacnetip.PDU)) - }) - return _c -} - -func (_c *MockStateMachineContract_AfterSend_Call) Return() *MockStateMachineContract_AfterSend_Call { - _c.Call.Return() - return _c -} - -func (_c *MockStateMachineContract_AfterSend_Call) RunAndReturn(run func(bacnetip.PDU)) *MockStateMachineContract_AfterSend_Call { - _c.Call.Return(run) - return _c -} - -// BeforeReceive provides a mock function with given fields: pdu -func (_m *MockStateMachineContract) BeforeReceive(pdu bacnetip.PDU) { - _m.Called(pdu) -} - -// MockStateMachineContract_BeforeReceive_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BeforeReceive' -type MockStateMachineContract_BeforeReceive_Call struct { - *mock.Call -} - -// BeforeReceive is a helper method to define mock.On call -// - pdu bacnetip.PDU -func (_e *MockStateMachineContract_Expecter) BeforeReceive(pdu interface{}) *MockStateMachineContract_BeforeReceive_Call { - return &MockStateMachineContract_BeforeReceive_Call{Call: _e.mock.On("BeforeReceive", pdu)} -} - -func (_c *MockStateMachineContract_BeforeReceive_Call) Run(run func(pdu bacnetip.PDU)) *MockStateMachineContract_BeforeReceive_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(bacnetip.PDU)) - }) - return _c -} - -func (_c *MockStateMachineContract_BeforeReceive_Call) Return() *MockStateMachineContract_BeforeReceive_Call { - _c.Call.Return() - return _c -} - -func (_c *MockStateMachineContract_BeforeReceive_Call) RunAndReturn(run func(bacnetip.PDU)) *MockStateMachineContract_BeforeReceive_Call { - _c.Call.Return(run) - return _c -} - -// BeforeSend provides a mock function with given fields: pdu -func (_m *MockStateMachineContract) BeforeSend(pdu bacnetip.PDU) { - _m.Called(pdu) -} - -// MockStateMachineContract_BeforeSend_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BeforeSend' -type MockStateMachineContract_BeforeSend_Call struct { - *mock.Call -} - -// BeforeSend is a helper method to define mock.On call -// - pdu bacnetip.PDU -func (_e *MockStateMachineContract_Expecter) BeforeSend(pdu interface{}) *MockStateMachineContract_BeforeSend_Call { - return &MockStateMachineContract_BeforeSend_Call{Call: _e.mock.On("BeforeSend", pdu)} -} - -func (_c *MockStateMachineContract_BeforeSend_Call) Run(run func(pdu bacnetip.PDU)) *MockStateMachineContract_BeforeSend_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(bacnetip.PDU)) - }) - return _c -} - -func (_c *MockStateMachineContract_BeforeSend_Call) Return() *MockStateMachineContract_BeforeSend_Call { - _c.Call.Return() - return _c -} - -func (_c *MockStateMachineContract_BeforeSend_Call) RunAndReturn(run func(bacnetip.PDU)) *MockStateMachineContract_BeforeSend_Call { - _c.Call.Return(run) - return _c -} - -// EventSet provides a mock function with given fields: id -func (_m *MockStateMachineContract) EventSet(id string) { - _m.Called(id) -} - -// MockStateMachineContract_EventSet_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'EventSet' -type MockStateMachineContract_EventSet_Call struct { - *mock.Call -} - -// EventSet is a helper method to define mock.On call -// - id string -func (_e *MockStateMachineContract_Expecter) EventSet(id interface{}) *MockStateMachineContract_EventSet_Call { - return &MockStateMachineContract_EventSet_Call{Call: _e.mock.On("EventSet", id)} -} - -func (_c *MockStateMachineContract_EventSet_Call) Run(run func(id string)) *MockStateMachineContract_EventSet_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string)) - }) - return _c -} - -func (_c *MockStateMachineContract_EventSet_Call) Return() *MockStateMachineContract_EventSet_Call { - _c.Call.Return() - return _c -} - -func (_c *MockStateMachineContract_EventSet_Call) RunAndReturn(run func(string)) *MockStateMachineContract_EventSet_Call { - _c.Call.Return(run) - return _c -} - -// GetCurrentState provides a mock function with given fields: -func (_m *MockStateMachineContract) GetCurrentState() State { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetCurrentState") - } - - var r0 State - if rf, ok := ret.Get(0).(func() State); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(State) - } - } - - return r0 -} - -// MockStateMachineContract_GetCurrentState_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetCurrentState' -type MockStateMachineContract_GetCurrentState_Call struct { - *mock.Call -} - -// GetCurrentState is a helper method to define mock.On call -func (_e *MockStateMachineContract_Expecter) GetCurrentState() *MockStateMachineContract_GetCurrentState_Call { - return &MockStateMachineContract_GetCurrentState_Call{Call: _e.mock.On("GetCurrentState")} -} - -func (_c *MockStateMachineContract_GetCurrentState_Call) Run(run func()) *MockStateMachineContract_GetCurrentState_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockStateMachineContract_GetCurrentState_Call) Return(_a0 State) *MockStateMachineContract_GetCurrentState_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockStateMachineContract_GetCurrentState_Call) RunAndReturn(run func() State) *MockStateMachineContract_GetCurrentState_Call { - _c.Call.Return(run) - return _c -} - -// GetStartState provides a mock function with given fields: -func (_m *MockStateMachineContract) GetStartState() State { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetStartState") - } - - var r0 State - if rf, ok := ret.Get(0).(func() State); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(State) - } - } - - return r0 -} - -// MockStateMachineContract_GetStartState_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetStartState' -type MockStateMachineContract_GetStartState_Call struct { - *mock.Call -} - -// GetStartState is a helper method to define mock.On call -func (_e *MockStateMachineContract_Expecter) GetStartState() *MockStateMachineContract_GetStartState_Call { - return &MockStateMachineContract_GetStartState_Call{Call: _e.mock.On("GetStartState")} -} - -func (_c *MockStateMachineContract_GetStartState_Call) Run(run func()) *MockStateMachineContract_GetStartState_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockStateMachineContract_GetStartState_Call) Return(_a0 State) *MockStateMachineContract_GetStartState_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockStateMachineContract_GetStartState_Call) RunAndReturn(run func() State) *MockStateMachineContract_GetStartState_Call { - _c.Call.Return(run) - return _c -} - -// GetTransactionLog provides a mock function with given fields: -func (_m *MockStateMachineContract) GetTransactionLog() []string { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetTransactionLog") - } - - var r0 []string - if rf, ok := ret.Get(0).(func() []string); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]string) - } - } - - return r0 -} - -// MockStateMachineContract_GetTransactionLog_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetTransactionLog' -type MockStateMachineContract_GetTransactionLog_Call struct { - *mock.Call -} - -// GetTransactionLog is a helper method to define mock.On call -func (_e *MockStateMachineContract_Expecter) GetTransactionLog() *MockStateMachineContract_GetTransactionLog_Call { - return &MockStateMachineContract_GetTransactionLog_Call{Call: _e.mock.On("GetTransactionLog")} -} - -func (_c *MockStateMachineContract_GetTransactionLog_Call) Run(run func()) *MockStateMachineContract_GetTransactionLog_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockStateMachineContract_GetTransactionLog_Call) Return(_a0 []string) *MockStateMachineContract_GetTransactionLog_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockStateMachineContract_GetTransactionLog_Call) RunAndReturn(run func() []string) *MockStateMachineContract_GetTransactionLog_Call { - _c.Call.Return(run) - return _c -} - -// GetUnexpectedReceiveState provides a mock function with given fields: -func (_m *MockStateMachineContract) GetUnexpectedReceiveState() State { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetUnexpectedReceiveState") - } - - var r0 State - if rf, ok := ret.Get(0).(func() State); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(State) - } - } - - return r0 -} - -// MockStateMachineContract_GetUnexpectedReceiveState_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetUnexpectedReceiveState' -type MockStateMachineContract_GetUnexpectedReceiveState_Call struct { - *mock.Call -} - -// GetUnexpectedReceiveState is a helper method to define mock.On call -func (_e *MockStateMachineContract_Expecter) GetUnexpectedReceiveState() *MockStateMachineContract_GetUnexpectedReceiveState_Call { - return &MockStateMachineContract_GetUnexpectedReceiveState_Call{Call: _e.mock.On("GetUnexpectedReceiveState")} -} - -func (_c *MockStateMachineContract_GetUnexpectedReceiveState_Call) Run(run func()) *MockStateMachineContract_GetUnexpectedReceiveState_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockStateMachineContract_GetUnexpectedReceiveState_Call) Return(_a0 State) *MockStateMachineContract_GetUnexpectedReceiveState_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockStateMachineContract_GetUnexpectedReceiveState_Call) RunAndReturn(run func() State) *MockStateMachineContract_GetUnexpectedReceiveState_Call { - _c.Call.Return(run) - return _c -} - -// IsFailState provides a mock function with given fields: -func (_m *MockStateMachineContract) IsFailState() bool { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for IsFailState") - } - - var r0 bool - if rf, ok := ret.Get(0).(func() bool); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(bool) - } - - return r0 -} - -// MockStateMachineContract_IsFailState_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsFailState' -type MockStateMachineContract_IsFailState_Call struct { - *mock.Call -} - -// IsFailState is a helper method to define mock.On call -func (_e *MockStateMachineContract_Expecter) IsFailState() *MockStateMachineContract_IsFailState_Call { - return &MockStateMachineContract_IsFailState_Call{Call: _e.mock.On("IsFailState")} -} - -func (_c *MockStateMachineContract_IsFailState_Call) Run(run func()) *MockStateMachineContract_IsFailState_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockStateMachineContract_IsFailState_Call) Return(_a0 bool) *MockStateMachineContract_IsFailState_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockStateMachineContract_IsFailState_Call) RunAndReturn(run func() bool) *MockStateMachineContract_IsFailState_Call { - _c.Call.Return(run) - return _c -} - -// IsRunning provides a mock function with given fields: -func (_m *MockStateMachineContract) IsRunning() bool { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for IsRunning") - } - - var r0 bool - if rf, ok := ret.Get(0).(func() bool); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(bool) - } - - return r0 -} - -// MockStateMachineContract_IsRunning_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsRunning' -type MockStateMachineContract_IsRunning_Call struct { - *mock.Call -} - -// IsRunning is a helper method to define mock.On call -func (_e *MockStateMachineContract_Expecter) IsRunning() *MockStateMachineContract_IsRunning_Call { - return &MockStateMachineContract_IsRunning_Call{Call: _e.mock.On("IsRunning")} -} - -func (_c *MockStateMachineContract_IsRunning_Call) Run(run func()) *MockStateMachineContract_IsRunning_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockStateMachineContract_IsRunning_Call) Return(_a0 bool) *MockStateMachineContract_IsRunning_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockStateMachineContract_IsRunning_Call) RunAndReturn(run func() bool) *MockStateMachineContract_IsRunning_Call { - _c.Call.Return(run) - return _c -} - -// IsSuccessState provides a mock function with given fields: -func (_m *MockStateMachineContract) IsSuccessState() bool { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for IsSuccessState") - } - - var r0 bool - if rf, ok := ret.Get(0).(func() bool); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(bool) - } - - return r0 -} - -// MockStateMachineContract_IsSuccessState_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsSuccessState' -type MockStateMachineContract_IsSuccessState_Call struct { - *mock.Call -} - -// IsSuccessState is a helper method to define mock.On call -func (_e *MockStateMachineContract_Expecter) IsSuccessState() *MockStateMachineContract_IsSuccessState_Call { - return &MockStateMachineContract_IsSuccessState_Call{Call: _e.mock.On("IsSuccessState")} -} - -func (_c *MockStateMachineContract_IsSuccessState_Call) Run(run func()) *MockStateMachineContract_IsSuccessState_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockStateMachineContract_IsSuccessState_Call) Return(_a0 bool) *MockStateMachineContract_IsSuccessState_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockStateMachineContract_IsSuccessState_Call) RunAndReturn(run func() bool) *MockStateMachineContract_IsSuccessState_Call { - _c.Call.Return(run) - return _c -} - -// NewState provides a mock function with given fields: _a0 -func (_m *MockStateMachineContract) NewState(_a0 string) State { - ret := _m.Called(_a0) - - if len(ret) == 0 { - panic("no return value specified for NewState") - } - - var r0 State - if rf, ok := ret.Get(0).(func(string) State); ok { - r0 = rf(_a0) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(State) - } - } - - return r0 -} - -// MockStateMachineContract_NewState_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'NewState' -type MockStateMachineContract_NewState_Call struct { - *mock.Call -} - -// NewState is a helper method to define mock.On call -// - _a0 string -func (_e *MockStateMachineContract_Expecter) NewState(_a0 interface{}) *MockStateMachineContract_NewState_Call { - return &MockStateMachineContract_NewState_Call{Call: _e.mock.On("NewState", _a0)} -} - -func (_c *MockStateMachineContract_NewState_Call) Run(run func(_a0 string)) *MockStateMachineContract_NewState_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string)) - }) - return _c -} - -func (_c *MockStateMachineContract_NewState_Call) Return(_a0 State) *MockStateMachineContract_NewState_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockStateMachineContract_NewState_Call) RunAndReturn(run func(string) State) *MockStateMachineContract_NewState_Call { - _c.Call.Return(run) - return _c -} - -// Receive provides a mock function with given fields: args, kwargs -func (_m *MockStateMachineContract) Receive(args bacnetip.Args, kwargs bacnetip.KWArgs) error { - ret := _m.Called(args, kwargs) - - if len(ret) == 0 { - panic("no return value specified for Receive") - } - - var r0 error - if rf, ok := ret.Get(0).(func(bacnetip.Args, bacnetip.KWArgs) error); ok { - r0 = rf(args, kwargs) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockStateMachineContract_Receive_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Receive' -type MockStateMachineContract_Receive_Call struct { - *mock.Call -} - -// Receive is a helper method to define mock.On call -// - args bacnetip.Args -// - kwargs bacnetip.KWArgs -func (_e *MockStateMachineContract_Expecter) Receive(args interface{}, kwargs interface{}) *MockStateMachineContract_Receive_Call { - return &MockStateMachineContract_Receive_Call{Call: _e.mock.On("Receive", args, kwargs)} -} - -func (_c *MockStateMachineContract_Receive_Call) Run(run func(args bacnetip.Args, kwargs bacnetip.KWArgs)) *MockStateMachineContract_Receive_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(bacnetip.Args), args[1].(bacnetip.KWArgs)) - }) - return _c -} - -func (_c *MockStateMachineContract_Receive_Call) Return(_a0 error) *MockStateMachineContract_Receive_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockStateMachineContract_Receive_Call) RunAndReturn(run func(bacnetip.Args, bacnetip.KWArgs) error) *MockStateMachineContract_Receive_Call { - _c.Call.Return(run) - return _c -} - -// Reset provides a mock function with given fields: -func (_m *MockStateMachineContract) Reset() { - _m.Called() -} - -// MockStateMachineContract_Reset_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Reset' -type MockStateMachineContract_Reset_Call struct { - *mock.Call -} - -// Reset is a helper method to define mock.On call -func (_e *MockStateMachineContract_Expecter) Reset() *MockStateMachineContract_Reset_Call { - return &MockStateMachineContract_Reset_Call{Call: _e.mock.On("Reset")} -} - -func (_c *MockStateMachineContract_Reset_Call) Run(run func()) *MockStateMachineContract_Reset_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockStateMachineContract_Reset_Call) Return() *MockStateMachineContract_Reset_Call { - _c.Call.Return() - return _c -} - -func (_c *MockStateMachineContract_Reset_Call) RunAndReturn(run func()) *MockStateMachineContract_Reset_Call { - _c.Call.Return(run) - return _c -} - -// Run provides a mock function with given fields: -func (_m *MockStateMachineContract) Run() error { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Run") - } - - var r0 error - if rf, ok := ret.Get(0).(func() error); ok { - r0 = rf() - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockStateMachineContract_Run_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Run' -type MockStateMachineContract_Run_Call struct { - *mock.Call -} - -// Run is a helper method to define mock.On call -func (_e *MockStateMachineContract_Expecter) Run() *MockStateMachineContract_Run_Call { - return &MockStateMachineContract_Run_Call{Call: _e.mock.On("Run")} -} - -func (_c *MockStateMachineContract_Run_Call) Run(run func()) *MockStateMachineContract_Run_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockStateMachineContract_Run_Call) Return(_a0 error) *MockStateMachineContract_Run_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockStateMachineContract_Run_Call) RunAndReturn(run func() error) *MockStateMachineContract_Run_Call { - _c.Call.Return(run) - return _c -} - -// String provides a mock function with given fields: -func (_m *MockStateMachineContract) String() string { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for String") - } - - var r0 string - if rf, ok := ret.Get(0).(func() string); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(string) - } - - return r0 -} - -// MockStateMachineContract_String_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'String' -type MockStateMachineContract_String_Call struct { - *mock.Call -} - -// String is a helper method to define mock.On call -func (_e *MockStateMachineContract_Expecter) String() *MockStateMachineContract_String_Call { - return &MockStateMachineContract_String_Call{Call: _e.mock.On("String")} -} - -func (_c *MockStateMachineContract_String_Call) Run(run func()) *MockStateMachineContract_String_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockStateMachineContract_String_Call) Return(_a0 string) *MockStateMachineContract_String_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockStateMachineContract_String_Call) RunAndReturn(run func() string) *MockStateMachineContract_String_Call { - _c.Call.Return(run) - return _c -} - -// UnexpectedReceive provides a mock function with given fields: pdu -func (_m *MockStateMachineContract) UnexpectedReceive(pdu bacnetip.PDU) { - _m.Called(pdu) -} - -// MockStateMachineContract_UnexpectedReceive_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UnexpectedReceive' -type MockStateMachineContract_UnexpectedReceive_Call struct { - *mock.Call -} - -// UnexpectedReceive is a helper method to define mock.On call -// - pdu bacnetip.PDU -func (_e *MockStateMachineContract_Expecter) UnexpectedReceive(pdu interface{}) *MockStateMachineContract_UnexpectedReceive_Call { - return &MockStateMachineContract_UnexpectedReceive_Call{Call: _e.mock.On("UnexpectedReceive", pdu)} -} - -func (_c *MockStateMachineContract_UnexpectedReceive_Call) Run(run func(pdu bacnetip.PDU)) *MockStateMachineContract_UnexpectedReceive_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(bacnetip.PDU)) - }) - return _c -} - -func (_c *MockStateMachineContract_UnexpectedReceive_Call) Return() *MockStateMachineContract_UnexpectedReceive_Call { - _c.Call.Return() - return _c -} - -func (_c *MockStateMachineContract_UnexpectedReceive_Call) RunAndReturn(run func(bacnetip.PDU)) *MockStateMachineContract_UnexpectedReceive_Call { - _c.Call.Return(run) - return _c -} - -// getCurrentState provides a mock function with given fields: -func (_m *MockStateMachineContract) getCurrentState() State { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for getCurrentState") - } - - var r0 State - if rf, ok := ret.Get(0).(func() State); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(State) - } - } - - return r0 -} - -// MockStateMachineContract_getCurrentState_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'getCurrentState' -type MockStateMachineContract_getCurrentState_Call struct { - *mock.Call -} - -// getCurrentState is a helper method to define mock.On call -func (_e *MockStateMachineContract_Expecter) getCurrentState() *MockStateMachineContract_getCurrentState_Call { - return &MockStateMachineContract_getCurrentState_Call{Call: _e.mock.On("getCurrentState")} -} - -func (_c *MockStateMachineContract_getCurrentState_Call) Run(run func()) *MockStateMachineContract_getCurrentState_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockStateMachineContract_getCurrentState_Call) Return(_a0 State) *MockStateMachineContract_getCurrentState_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockStateMachineContract_getCurrentState_Call) RunAndReturn(run func() State) *MockStateMachineContract_getCurrentState_Call { - _c.Call.Return(run) - return _c -} - -// getMachineGroup provides a mock function with given fields: -func (_m *MockStateMachineContract) getMachineGroup() *StateMachineGroup { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for getMachineGroup") - } - - var r0 *StateMachineGroup - if rf, ok := ret.Get(0).(func() *StateMachineGroup); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*StateMachineGroup) - } - } - - return r0 -} - -// MockStateMachineContract_getMachineGroup_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'getMachineGroup' -type MockStateMachineContract_getMachineGroup_Call struct { - *mock.Call -} - -// getMachineGroup is a helper method to define mock.On call -func (_e *MockStateMachineContract_Expecter) getMachineGroup() *MockStateMachineContract_getMachineGroup_Call { - return &MockStateMachineContract_getMachineGroup_Call{Call: _e.mock.On("getMachineGroup")} -} - -func (_c *MockStateMachineContract_getMachineGroup_Call) Run(run func()) *MockStateMachineContract_getMachineGroup_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockStateMachineContract_getMachineGroup_Call) Return(_a0 *StateMachineGroup) *MockStateMachineContract_getMachineGroup_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockStateMachineContract_getMachineGroup_Call) RunAndReturn(run func() *StateMachineGroup) *MockStateMachineContract_getMachineGroup_Call { - _c.Call.Return(run) - return _c -} - -// getStateTimeoutTask provides a mock function with given fields: -func (_m *MockStateMachineContract) getStateTimeoutTask() *TimeoutTask { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for getStateTimeoutTask") - } - - var r0 *TimeoutTask - if rf, ok := ret.Get(0).(func() *TimeoutTask); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*TimeoutTask) - } - } - - return r0 -} - -// MockStateMachineContract_getStateTimeoutTask_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'getStateTimeoutTask' -type MockStateMachineContract_getStateTimeoutTask_Call struct { - *mock.Call -} - -// getStateTimeoutTask is a helper method to define mock.On call -func (_e *MockStateMachineContract_Expecter) getStateTimeoutTask() *MockStateMachineContract_getStateTimeoutTask_Call { - return &MockStateMachineContract_getStateTimeoutTask_Call{Call: _e.mock.On("getStateTimeoutTask")} -} - -func (_c *MockStateMachineContract_getStateTimeoutTask_Call) Run(run func()) *MockStateMachineContract_getStateTimeoutTask_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockStateMachineContract_getStateTimeoutTask_Call) Return(_a0 *TimeoutTask) *MockStateMachineContract_getStateTimeoutTask_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockStateMachineContract_getStateTimeoutTask_Call) RunAndReturn(run func() *TimeoutTask) *MockStateMachineContract_getStateTimeoutTask_Call { - _c.Call.Return(run) - return _c -} - -// getStates provides a mock function with given fields: -func (_m *MockStateMachineContract) getStates() []State { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for getStates") - } - - var r0 []State - if rf, ok := ret.Get(0).(func() []State); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]State) - } - } - - return r0 -} - -// MockStateMachineContract_getStates_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'getStates' -type MockStateMachineContract_getStates_Call struct { - *mock.Call -} - -// getStates is a helper method to define mock.On call -func (_e *MockStateMachineContract_Expecter) getStates() *MockStateMachineContract_getStates_Call { - return &MockStateMachineContract_getStates_Call{Call: _e.mock.On("getStates")} -} - -func (_c *MockStateMachineContract_getStates_Call) Run(run func()) *MockStateMachineContract_getStates_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockStateMachineContract_getStates_Call) Return(_a0 []State) *MockStateMachineContract_getStates_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockStateMachineContract_getStates_Call) RunAndReturn(run func() []State) *MockStateMachineContract_getStates_Call { - _c.Call.Return(run) - return _c -} - -// halt provides a mock function with given fields: -func (_m *MockStateMachineContract) halt() { - _m.Called() -} - -// MockStateMachineContract_halt_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'halt' -type MockStateMachineContract_halt_Call struct { - *mock.Call -} - -// halt is a helper method to define mock.On call -func (_e *MockStateMachineContract_Expecter) halt() *MockStateMachineContract_halt_Call { - return &MockStateMachineContract_halt_Call{Call: _e.mock.On("halt")} -} - -func (_c *MockStateMachineContract_halt_Call) Run(run func()) *MockStateMachineContract_halt_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockStateMachineContract_halt_Call) Return() *MockStateMachineContract_halt_Call { - _c.Call.Return() - return _c -} - -func (_c *MockStateMachineContract_halt_Call) RunAndReturn(run func()) *MockStateMachineContract_halt_Call { - _c.Call.Return(run) - return _c -} - -// setMachineGroup provides a mock function with given fields: machineGroup -func (_m *MockStateMachineContract) setMachineGroup(machineGroup *StateMachineGroup) { - _m.Called(machineGroup) -} - -// MockStateMachineContract_setMachineGroup_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'setMachineGroup' -type MockStateMachineContract_setMachineGroup_Call struct { - *mock.Call -} - -// setMachineGroup is a helper method to define mock.On call -// - machineGroup *StateMachineGroup -func (_e *MockStateMachineContract_Expecter) setMachineGroup(machineGroup interface{}) *MockStateMachineContract_setMachineGroup_Call { - return &MockStateMachineContract_setMachineGroup_Call{Call: _e.mock.On("setMachineGroup", machineGroup)} -} - -func (_c *MockStateMachineContract_setMachineGroup_Call) Run(run func(machineGroup *StateMachineGroup)) *MockStateMachineContract_setMachineGroup_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(*StateMachineGroup)) - }) - return _c -} - -func (_c *MockStateMachineContract_setMachineGroup_Call) Return() *MockStateMachineContract_setMachineGroup_Call { - _c.Call.Return() - return _c -} - -func (_c *MockStateMachineContract_setMachineGroup_Call) RunAndReturn(run func(*StateMachineGroup)) *MockStateMachineContract_setMachineGroup_Call { - _c.Call.Return(run) - return _c -} - -// NewMockStateMachineContract creates a new instance of MockStateMachineContract. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewMockStateMachineContract(t interface { - mock.TestingT - Cleanup(func()) -}) *MockStateMachineContract { - mock := &MockStateMachineContract{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/plc4go/internal/bacnetip/tests/mock_StateMachineRequirements_test.go b/plc4go/internal/bacnetip/tests/mock_StateMachineRequirements_test.go deleted file mode 100644 index 8993439851c..00000000000 --- a/plc4go/internal/bacnetip/tests/mock_StateMachineRequirements_test.go +++ /dev/null @@ -1,1092 +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 - * - * https://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. - */ - -// Code generated by mockery v2.42.2. DO NOT EDIT. - -package tests - -import ( - bacnetip "github.com/apache/plc4x/plc4go/internal/bacnetip" - mock "github.com/stretchr/testify/mock" -) - -// MockStateMachineRequirements is an autogenerated mock type for the StateMachineRequirements type -type MockStateMachineRequirements struct { - mock.Mock -} - -type MockStateMachineRequirements_Expecter struct { - mock *mock.Mock -} - -func (_m *MockStateMachineRequirements) EXPECT() *MockStateMachineRequirements_Expecter { - return &MockStateMachineRequirements_Expecter{mock: &_m.Mock} -} - -// AfterReceive provides a mock function with given fields: pdu -func (_m *MockStateMachineRequirements) AfterReceive(pdu bacnetip.PDU) { - _m.Called(pdu) -} - -// MockStateMachineRequirements_AfterReceive_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AfterReceive' -type MockStateMachineRequirements_AfterReceive_Call struct { - *mock.Call -} - -// AfterReceive is a helper method to define mock.On call -// - pdu bacnetip.PDU -func (_e *MockStateMachineRequirements_Expecter) AfterReceive(pdu interface{}) *MockStateMachineRequirements_AfterReceive_Call { - return &MockStateMachineRequirements_AfterReceive_Call{Call: _e.mock.On("AfterReceive", pdu)} -} - -func (_c *MockStateMachineRequirements_AfterReceive_Call) Run(run func(pdu bacnetip.PDU)) *MockStateMachineRequirements_AfterReceive_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(bacnetip.PDU)) - }) - return _c -} - -func (_c *MockStateMachineRequirements_AfterReceive_Call) Return() *MockStateMachineRequirements_AfterReceive_Call { - _c.Call.Return() - return _c -} - -func (_c *MockStateMachineRequirements_AfterReceive_Call) RunAndReturn(run func(bacnetip.PDU)) *MockStateMachineRequirements_AfterReceive_Call { - _c.Call.Return(run) - return _c -} - -// AfterSend provides a mock function with given fields: pdu -func (_m *MockStateMachineRequirements) AfterSend(pdu bacnetip.PDU) { - _m.Called(pdu) -} - -// MockStateMachineRequirements_AfterSend_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AfterSend' -type MockStateMachineRequirements_AfterSend_Call struct { - *mock.Call -} - -// AfterSend is a helper method to define mock.On call -// - pdu bacnetip.PDU -func (_e *MockStateMachineRequirements_Expecter) AfterSend(pdu interface{}) *MockStateMachineRequirements_AfterSend_Call { - return &MockStateMachineRequirements_AfterSend_Call{Call: _e.mock.On("AfterSend", pdu)} -} - -func (_c *MockStateMachineRequirements_AfterSend_Call) Run(run func(pdu bacnetip.PDU)) *MockStateMachineRequirements_AfterSend_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(bacnetip.PDU)) - }) - return _c -} - -func (_c *MockStateMachineRequirements_AfterSend_Call) Return() *MockStateMachineRequirements_AfterSend_Call { - _c.Call.Return() - return _c -} - -func (_c *MockStateMachineRequirements_AfterSend_Call) RunAndReturn(run func(bacnetip.PDU)) *MockStateMachineRequirements_AfterSend_Call { - _c.Call.Return(run) - return _c -} - -// BeforeReceive provides a mock function with given fields: pdu -func (_m *MockStateMachineRequirements) BeforeReceive(pdu bacnetip.PDU) { - _m.Called(pdu) -} - -// MockStateMachineRequirements_BeforeReceive_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BeforeReceive' -type MockStateMachineRequirements_BeforeReceive_Call struct { - *mock.Call -} - -// BeforeReceive is a helper method to define mock.On call -// - pdu bacnetip.PDU -func (_e *MockStateMachineRequirements_Expecter) BeforeReceive(pdu interface{}) *MockStateMachineRequirements_BeforeReceive_Call { - return &MockStateMachineRequirements_BeforeReceive_Call{Call: _e.mock.On("BeforeReceive", pdu)} -} - -func (_c *MockStateMachineRequirements_BeforeReceive_Call) Run(run func(pdu bacnetip.PDU)) *MockStateMachineRequirements_BeforeReceive_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(bacnetip.PDU)) - }) - return _c -} - -func (_c *MockStateMachineRequirements_BeforeReceive_Call) Return() *MockStateMachineRequirements_BeforeReceive_Call { - _c.Call.Return() - return _c -} - -func (_c *MockStateMachineRequirements_BeforeReceive_Call) RunAndReturn(run func(bacnetip.PDU)) *MockStateMachineRequirements_BeforeReceive_Call { - _c.Call.Return(run) - return _c -} - -// BeforeSend provides a mock function with given fields: pdu -func (_m *MockStateMachineRequirements) BeforeSend(pdu bacnetip.PDU) { - _m.Called(pdu) -} - -// MockStateMachineRequirements_BeforeSend_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BeforeSend' -type MockStateMachineRequirements_BeforeSend_Call struct { - *mock.Call -} - -// BeforeSend is a helper method to define mock.On call -// - pdu bacnetip.PDU -func (_e *MockStateMachineRequirements_Expecter) BeforeSend(pdu interface{}) *MockStateMachineRequirements_BeforeSend_Call { - return &MockStateMachineRequirements_BeforeSend_Call{Call: _e.mock.On("BeforeSend", pdu)} -} - -func (_c *MockStateMachineRequirements_BeforeSend_Call) Run(run func(pdu bacnetip.PDU)) *MockStateMachineRequirements_BeforeSend_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(bacnetip.PDU)) - }) - return _c -} - -func (_c *MockStateMachineRequirements_BeforeSend_Call) Return() *MockStateMachineRequirements_BeforeSend_Call { - _c.Call.Return() - return _c -} - -func (_c *MockStateMachineRequirements_BeforeSend_Call) RunAndReturn(run func(bacnetip.PDU)) *MockStateMachineRequirements_BeforeSend_Call { - _c.Call.Return(run) - return _c -} - -// EventSet provides a mock function with given fields: id -func (_m *MockStateMachineRequirements) EventSet(id string) { - _m.Called(id) -} - -// MockStateMachineRequirements_EventSet_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'EventSet' -type MockStateMachineRequirements_EventSet_Call struct { - *mock.Call -} - -// EventSet is a helper method to define mock.On call -// - id string -func (_e *MockStateMachineRequirements_Expecter) EventSet(id interface{}) *MockStateMachineRequirements_EventSet_Call { - return &MockStateMachineRequirements_EventSet_Call{Call: _e.mock.On("EventSet", id)} -} - -func (_c *MockStateMachineRequirements_EventSet_Call) Run(run func(id string)) *MockStateMachineRequirements_EventSet_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string)) - }) - return _c -} - -func (_c *MockStateMachineRequirements_EventSet_Call) Return() *MockStateMachineRequirements_EventSet_Call { - _c.Call.Return() - return _c -} - -func (_c *MockStateMachineRequirements_EventSet_Call) RunAndReturn(run func(string)) *MockStateMachineRequirements_EventSet_Call { - _c.Call.Return(run) - return _c -} - -// GetCurrentState provides a mock function with given fields: -func (_m *MockStateMachineRequirements) GetCurrentState() State { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetCurrentState") - } - - var r0 State - if rf, ok := ret.Get(0).(func() State); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(State) - } - } - - return r0 -} - -// MockStateMachineRequirements_GetCurrentState_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetCurrentState' -type MockStateMachineRequirements_GetCurrentState_Call struct { - *mock.Call -} - -// GetCurrentState is a helper method to define mock.On call -func (_e *MockStateMachineRequirements_Expecter) GetCurrentState() *MockStateMachineRequirements_GetCurrentState_Call { - return &MockStateMachineRequirements_GetCurrentState_Call{Call: _e.mock.On("GetCurrentState")} -} - -func (_c *MockStateMachineRequirements_GetCurrentState_Call) Run(run func()) *MockStateMachineRequirements_GetCurrentState_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockStateMachineRequirements_GetCurrentState_Call) Return(_a0 State) *MockStateMachineRequirements_GetCurrentState_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockStateMachineRequirements_GetCurrentState_Call) RunAndReturn(run func() State) *MockStateMachineRequirements_GetCurrentState_Call { - _c.Call.Return(run) - return _c -} - -// GetStartState provides a mock function with given fields: -func (_m *MockStateMachineRequirements) GetStartState() State { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetStartState") - } - - var r0 State - if rf, ok := ret.Get(0).(func() State); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(State) - } - } - - return r0 -} - -// MockStateMachineRequirements_GetStartState_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetStartState' -type MockStateMachineRequirements_GetStartState_Call struct { - *mock.Call -} - -// GetStartState is a helper method to define mock.On call -func (_e *MockStateMachineRequirements_Expecter) GetStartState() *MockStateMachineRequirements_GetStartState_Call { - return &MockStateMachineRequirements_GetStartState_Call{Call: _e.mock.On("GetStartState")} -} - -func (_c *MockStateMachineRequirements_GetStartState_Call) Run(run func()) *MockStateMachineRequirements_GetStartState_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockStateMachineRequirements_GetStartState_Call) Return(_a0 State) *MockStateMachineRequirements_GetStartState_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockStateMachineRequirements_GetStartState_Call) RunAndReturn(run func() State) *MockStateMachineRequirements_GetStartState_Call { - _c.Call.Return(run) - return _c -} - -// GetTransactionLog provides a mock function with given fields: -func (_m *MockStateMachineRequirements) GetTransactionLog() []string { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetTransactionLog") - } - - var r0 []string - if rf, ok := ret.Get(0).(func() []string); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]string) - } - } - - return r0 -} - -// MockStateMachineRequirements_GetTransactionLog_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetTransactionLog' -type MockStateMachineRequirements_GetTransactionLog_Call struct { - *mock.Call -} - -// GetTransactionLog is a helper method to define mock.On call -func (_e *MockStateMachineRequirements_Expecter) GetTransactionLog() *MockStateMachineRequirements_GetTransactionLog_Call { - return &MockStateMachineRequirements_GetTransactionLog_Call{Call: _e.mock.On("GetTransactionLog")} -} - -func (_c *MockStateMachineRequirements_GetTransactionLog_Call) Run(run func()) *MockStateMachineRequirements_GetTransactionLog_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockStateMachineRequirements_GetTransactionLog_Call) Return(_a0 []string) *MockStateMachineRequirements_GetTransactionLog_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockStateMachineRequirements_GetTransactionLog_Call) RunAndReturn(run func() []string) *MockStateMachineRequirements_GetTransactionLog_Call { - _c.Call.Return(run) - return _c -} - -// GetUnexpectedReceiveState provides a mock function with given fields: -func (_m *MockStateMachineRequirements) GetUnexpectedReceiveState() State { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetUnexpectedReceiveState") - } - - var r0 State - if rf, ok := ret.Get(0).(func() State); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(State) - } - } - - return r0 -} - -// MockStateMachineRequirements_GetUnexpectedReceiveState_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetUnexpectedReceiveState' -type MockStateMachineRequirements_GetUnexpectedReceiveState_Call struct { - *mock.Call -} - -// GetUnexpectedReceiveState is a helper method to define mock.On call -func (_e *MockStateMachineRequirements_Expecter) GetUnexpectedReceiveState() *MockStateMachineRequirements_GetUnexpectedReceiveState_Call { - return &MockStateMachineRequirements_GetUnexpectedReceiveState_Call{Call: _e.mock.On("GetUnexpectedReceiveState")} -} - -func (_c *MockStateMachineRequirements_GetUnexpectedReceiveState_Call) Run(run func()) *MockStateMachineRequirements_GetUnexpectedReceiveState_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockStateMachineRequirements_GetUnexpectedReceiveState_Call) Return(_a0 State) *MockStateMachineRequirements_GetUnexpectedReceiveState_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockStateMachineRequirements_GetUnexpectedReceiveState_Call) RunAndReturn(run func() State) *MockStateMachineRequirements_GetUnexpectedReceiveState_Call { - _c.Call.Return(run) - return _c -} - -// IsFailState provides a mock function with given fields: -func (_m *MockStateMachineRequirements) IsFailState() bool { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for IsFailState") - } - - var r0 bool - if rf, ok := ret.Get(0).(func() bool); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(bool) - } - - return r0 -} - -// MockStateMachineRequirements_IsFailState_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsFailState' -type MockStateMachineRequirements_IsFailState_Call struct { - *mock.Call -} - -// IsFailState is a helper method to define mock.On call -func (_e *MockStateMachineRequirements_Expecter) IsFailState() *MockStateMachineRequirements_IsFailState_Call { - return &MockStateMachineRequirements_IsFailState_Call{Call: _e.mock.On("IsFailState")} -} - -func (_c *MockStateMachineRequirements_IsFailState_Call) Run(run func()) *MockStateMachineRequirements_IsFailState_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockStateMachineRequirements_IsFailState_Call) Return(_a0 bool) *MockStateMachineRequirements_IsFailState_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockStateMachineRequirements_IsFailState_Call) RunAndReturn(run func() bool) *MockStateMachineRequirements_IsFailState_Call { - _c.Call.Return(run) - return _c -} - -// IsRunning provides a mock function with given fields: -func (_m *MockStateMachineRequirements) IsRunning() bool { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for IsRunning") - } - - var r0 bool - if rf, ok := ret.Get(0).(func() bool); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(bool) - } - - return r0 -} - -// MockStateMachineRequirements_IsRunning_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsRunning' -type MockStateMachineRequirements_IsRunning_Call struct { - *mock.Call -} - -// IsRunning is a helper method to define mock.On call -func (_e *MockStateMachineRequirements_Expecter) IsRunning() *MockStateMachineRequirements_IsRunning_Call { - return &MockStateMachineRequirements_IsRunning_Call{Call: _e.mock.On("IsRunning")} -} - -func (_c *MockStateMachineRequirements_IsRunning_Call) Run(run func()) *MockStateMachineRequirements_IsRunning_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockStateMachineRequirements_IsRunning_Call) Return(_a0 bool) *MockStateMachineRequirements_IsRunning_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockStateMachineRequirements_IsRunning_Call) RunAndReturn(run func() bool) *MockStateMachineRequirements_IsRunning_Call { - _c.Call.Return(run) - return _c -} - -// IsSuccessState provides a mock function with given fields: -func (_m *MockStateMachineRequirements) IsSuccessState() bool { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for IsSuccessState") - } - - var r0 bool - if rf, ok := ret.Get(0).(func() bool); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(bool) - } - - return r0 -} - -// MockStateMachineRequirements_IsSuccessState_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsSuccessState' -type MockStateMachineRequirements_IsSuccessState_Call struct { - *mock.Call -} - -// IsSuccessState is a helper method to define mock.On call -func (_e *MockStateMachineRequirements_Expecter) IsSuccessState() *MockStateMachineRequirements_IsSuccessState_Call { - return &MockStateMachineRequirements_IsSuccessState_Call{Call: _e.mock.On("IsSuccessState")} -} - -func (_c *MockStateMachineRequirements_IsSuccessState_Call) Run(run func()) *MockStateMachineRequirements_IsSuccessState_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockStateMachineRequirements_IsSuccessState_Call) Return(_a0 bool) *MockStateMachineRequirements_IsSuccessState_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockStateMachineRequirements_IsSuccessState_Call) RunAndReturn(run func() bool) *MockStateMachineRequirements_IsSuccessState_Call { - _c.Call.Return(run) - return _c -} - -// NewState provides a mock function with given fields: _a0 -func (_m *MockStateMachineRequirements) NewState(_a0 string) State { - ret := _m.Called(_a0) - - if len(ret) == 0 { - panic("no return value specified for NewState") - } - - var r0 State - if rf, ok := ret.Get(0).(func(string) State); ok { - r0 = rf(_a0) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(State) - } - } - - return r0 -} - -// MockStateMachineRequirements_NewState_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'NewState' -type MockStateMachineRequirements_NewState_Call struct { - *mock.Call -} - -// NewState is a helper method to define mock.On call -// - _a0 string -func (_e *MockStateMachineRequirements_Expecter) NewState(_a0 interface{}) *MockStateMachineRequirements_NewState_Call { - return &MockStateMachineRequirements_NewState_Call{Call: _e.mock.On("NewState", _a0)} -} - -func (_c *MockStateMachineRequirements_NewState_Call) Run(run func(_a0 string)) *MockStateMachineRequirements_NewState_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string)) - }) - return _c -} - -func (_c *MockStateMachineRequirements_NewState_Call) Return(_a0 State) *MockStateMachineRequirements_NewState_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockStateMachineRequirements_NewState_Call) RunAndReturn(run func(string) State) *MockStateMachineRequirements_NewState_Call { - _c.Call.Return(run) - return _c -} - -// Receive provides a mock function with given fields: args, kwargs -func (_m *MockStateMachineRequirements) Receive(args bacnetip.Args, kwargs bacnetip.KWArgs) error { - ret := _m.Called(args, kwargs) - - if len(ret) == 0 { - panic("no return value specified for Receive") - } - - var r0 error - if rf, ok := ret.Get(0).(func(bacnetip.Args, bacnetip.KWArgs) error); ok { - r0 = rf(args, kwargs) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockStateMachineRequirements_Receive_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Receive' -type MockStateMachineRequirements_Receive_Call struct { - *mock.Call -} - -// Receive is a helper method to define mock.On call -// - args bacnetip.Args -// - kwargs bacnetip.KWArgs -func (_e *MockStateMachineRequirements_Expecter) Receive(args interface{}, kwargs interface{}) *MockStateMachineRequirements_Receive_Call { - return &MockStateMachineRequirements_Receive_Call{Call: _e.mock.On("Receive", args, kwargs)} -} - -func (_c *MockStateMachineRequirements_Receive_Call) Run(run func(args bacnetip.Args, kwargs bacnetip.KWArgs)) *MockStateMachineRequirements_Receive_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(bacnetip.Args), args[1].(bacnetip.KWArgs)) - }) - return _c -} - -func (_c *MockStateMachineRequirements_Receive_Call) Return(_a0 error) *MockStateMachineRequirements_Receive_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockStateMachineRequirements_Receive_Call) RunAndReturn(run func(bacnetip.Args, bacnetip.KWArgs) error) *MockStateMachineRequirements_Receive_Call { - _c.Call.Return(run) - return _c -} - -// Reset provides a mock function with given fields: -func (_m *MockStateMachineRequirements) Reset() { - _m.Called() -} - -// MockStateMachineRequirements_Reset_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Reset' -type MockStateMachineRequirements_Reset_Call struct { - *mock.Call -} - -// Reset is a helper method to define mock.On call -func (_e *MockStateMachineRequirements_Expecter) Reset() *MockStateMachineRequirements_Reset_Call { - return &MockStateMachineRequirements_Reset_Call{Call: _e.mock.On("Reset")} -} - -func (_c *MockStateMachineRequirements_Reset_Call) Run(run func()) *MockStateMachineRequirements_Reset_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockStateMachineRequirements_Reset_Call) Return() *MockStateMachineRequirements_Reset_Call { - _c.Call.Return() - return _c -} - -func (_c *MockStateMachineRequirements_Reset_Call) RunAndReturn(run func()) *MockStateMachineRequirements_Reset_Call { - _c.Call.Return(run) - return _c -} - -// Run provides a mock function with given fields: -func (_m *MockStateMachineRequirements) Run() error { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Run") - } - - var r0 error - if rf, ok := ret.Get(0).(func() error); ok { - r0 = rf() - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockStateMachineRequirements_Run_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Run' -type MockStateMachineRequirements_Run_Call struct { - *mock.Call -} - -// Run is a helper method to define mock.On call -func (_e *MockStateMachineRequirements_Expecter) Run() *MockStateMachineRequirements_Run_Call { - return &MockStateMachineRequirements_Run_Call{Call: _e.mock.On("Run")} -} - -func (_c *MockStateMachineRequirements_Run_Call) Run(run func()) *MockStateMachineRequirements_Run_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockStateMachineRequirements_Run_Call) Return(_a0 error) *MockStateMachineRequirements_Run_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockStateMachineRequirements_Run_Call) RunAndReturn(run func() error) *MockStateMachineRequirements_Run_Call { - _c.Call.Return(run) - return _c -} - -// Send provides a mock function with given fields: args, kwargs -func (_m *MockStateMachineRequirements) Send(args bacnetip.Args, kwargs bacnetip.KWArgs) error { - ret := _m.Called(args, kwargs) - - if len(ret) == 0 { - panic("no return value specified for Send") - } - - var r0 error - if rf, ok := ret.Get(0).(func(bacnetip.Args, bacnetip.KWArgs) error); ok { - r0 = rf(args, kwargs) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockStateMachineRequirements_Send_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Send' -type MockStateMachineRequirements_Send_Call struct { - *mock.Call -} - -// Send is a helper method to define mock.On call -// - args bacnetip.Args -// - kwargs bacnetip.KWArgs -func (_e *MockStateMachineRequirements_Expecter) Send(args interface{}, kwargs interface{}) *MockStateMachineRequirements_Send_Call { - return &MockStateMachineRequirements_Send_Call{Call: _e.mock.On("Send", args, kwargs)} -} - -func (_c *MockStateMachineRequirements_Send_Call) Run(run func(args bacnetip.Args, kwargs bacnetip.KWArgs)) *MockStateMachineRequirements_Send_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(bacnetip.Args), args[1].(bacnetip.KWArgs)) - }) - return _c -} - -func (_c *MockStateMachineRequirements_Send_Call) Return(_a0 error) *MockStateMachineRequirements_Send_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockStateMachineRequirements_Send_Call) RunAndReturn(run func(bacnetip.Args, bacnetip.KWArgs) error) *MockStateMachineRequirements_Send_Call { - _c.Call.Return(run) - return _c -} - -// String provides a mock function with given fields: -func (_m *MockStateMachineRequirements) String() string { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for String") - } - - var r0 string - if rf, ok := ret.Get(0).(func() string); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(string) - } - - return r0 -} - -// MockStateMachineRequirements_String_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'String' -type MockStateMachineRequirements_String_Call struct { - *mock.Call -} - -// String is a helper method to define mock.On call -func (_e *MockStateMachineRequirements_Expecter) String() *MockStateMachineRequirements_String_Call { - return &MockStateMachineRequirements_String_Call{Call: _e.mock.On("String")} -} - -func (_c *MockStateMachineRequirements_String_Call) Run(run func()) *MockStateMachineRequirements_String_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockStateMachineRequirements_String_Call) Return(_a0 string) *MockStateMachineRequirements_String_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockStateMachineRequirements_String_Call) RunAndReturn(run func() string) *MockStateMachineRequirements_String_Call { - _c.Call.Return(run) - return _c -} - -// UnexpectedReceive provides a mock function with given fields: pdu -func (_m *MockStateMachineRequirements) UnexpectedReceive(pdu bacnetip.PDU) { - _m.Called(pdu) -} - -// MockStateMachineRequirements_UnexpectedReceive_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UnexpectedReceive' -type MockStateMachineRequirements_UnexpectedReceive_Call struct { - *mock.Call -} - -// UnexpectedReceive is a helper method to define mock.On call -// - pdu bacnetip.PDU -func (_e *MockStateMachineRequirements_Expecter) UnexpectedReceive(pdu interface{}) *MockStateMachineRequirements_UnexpectedReceive_Call { - return &MockStateMachineRequirements_UnexpectedReceive_Call{Call: _e.mock.On("UnexpectedReceive", pdu)} -} - -func (_c *MockStateMachineRequirements_UnexpectedReceive_Call) Run(run func(pdu bacnetip.PDU)) *MockStateMachineRequirements_UnexpectedReceive_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(bacnetip.PDU)) - }) - return _c -} - -func (_c *MockStateMachineRequirements_UnexpectedReceive_Call) Return() *MockStateMachineRequirements_UnexpectedReceive_Call { - _c.Call.Return() - return _c -} - -func (_c *MockStateMachineRequirements_UnexpectedReceive_Call) RunAndReturn(run func(bacnetip.PDU)) *MockStateMachineRequirements_UnexpectedReceive_Call { - _c.Call.Return(run) - return _c -} - -// getCurrentState provides a mock function with given fields: -func (_m *MockStateMachineRequirements) getCurrentState() State { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for getCurrentState") - } - - var r0 State - if rf, ok := ret.Get(0).(func() State); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(State) - } - } - - return r0 -} - -// MockStateMachineRequirements_getCurrentState_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'getCurrentState' -type MockStateMachineRequirements_getCurrentState_Call struct { - *mock.Call -} - -// getCurrentState is a helper method to define mock.On call -func (_e *MockStateMachineRequirements_Expecter) getCurrentState() *MockStateMachineRequirements_getCurrentState_Call { - return &MockStateMachineRequirements_getCurrentState_Call{Call: _e.mock.On("getCurrentState")} -} - -func (_c *MockStateMachineRequirements_getCurrentState_Call) Run(run func()) *MockStateMachineRequirements_getCurrentState_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockStateMachineRequirements_getCurrentState_Call) Return(_a0 State) *MockStateMachineRequirements_getCurrentState_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockStateMachineRequirements_getCurrentState_Call) RunAndReturn(run func() State) *MockStateMachineRequirements_getCurrentState_Call { - _c.Call.Return(run) - return _c -} - -// getMachineGroup provides a mock function with given fields: -func (_m *MockStateMachineRequirements) getMachineGroup() *StateMachineGroup { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for getMachineGroup") - } - - var r0 *StateMachineGroup - if rf, ok := ret.Get(0).(func() *StateMachineGroup); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*StateMachineGroup) - } - } - - return r0 -} - -// MockStateMachineRequirements_getMachineGroup_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'getMachineGroup' -type MockStateMachineRequirements_getMachineGroup_Call struct { - *mock.Call -} - -// getMachineGroup is a helper method to define mock.On call -func (_e *MockStateMachineRequirements_Expecter) getMachineGroup() *MockStateMachineRequirements_getMachineGroup_Call { - return &MockStateMachineRequirements_getMachineGroup_Call{Call: _e.mock.On("getMachineGroup")} -} - -func (_c *MockStateMachineRequirements_getMachineGroup_Call) Run(run func()) *MockStateMachineRequirements_getMachineGroup_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockStateMachineRequirements_getMachineGroup_Call) Return(_a0 *StateMachineGroup) *MockStateMachineRequirements_getMachineGroup_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockStateMachineRequirements_getMachineGroup_Call) RunAndReturn(run func() *StateMachineGroup) *MockStateMachineRequirements_getMachineGroup_Call { - _c.Call.Return(run) - return _c -} - -// getStateTimeoutTask provides a mock function with given fields: -func (_m *MockStateMachineRequirements) getStateTimeoutTask() *TimeoutTask { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for getStateTimeoutTask") - } - - var r0 *TimeoutTask - if rf, ok := ret.Get(0).(func() *TimeoutTask); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*TimeoutTask) - } - } - - return r0 -} - -// MockStateMachineRequirements_getStateTimeoutTask_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'getStateTimeoutTask' -type MockStateMachineRequirements_getStateTimeoutTask_Call struct { - *mock.Call -} - -// getStateTimeoutTask is a helper method to define mock.On call -func (_e *MockStateMachineRequirements_Expecter) getStateTimeoutTask() *MockStateMachineRequirements_getStateTimeoutTask_Call { - return &MockStateMachineRequirements_getStateTimeoutTask_Call{Call: _e.mock.On("getStateTimeoutTask")} -} - -func (_c *MockStateMachineRequirements_getStateTimeoutTask_Call) Run(run func()) *MockStateMachineRequirements_getStateTimeoutTask_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockStateMachineRequirements_getStateTimeoutTask_Call) Return(_a0 *TimeoutTask) *MockStateMachineRequirements_getStateTimeoutTask_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockStateMachineRequirements_getStateTimeoutTask_Call) RunAndReturn(run func() *TimeoutTask) *MockStateMachineRequirements_getStateTimeoutTask_Call { - _c.Call.Return(run) - return _c -} - -// getStates provides a mock function with given fields: -func (_m *MockStateMachineRequirements) getStates() []State { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for getStates") - } - - var r0 []State - if rf, ok := ret.Get(0).(func() []State); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]State) - } - } - - return r0 -} - -// MockStateMachineRequirements_getStates_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'getStates' -type MockStateMachineRequirements_getStates_Call struct { - *mock.Call -} - -// getStates is a helper method to define mock.On call -func (_e *MockStateMachineRequirements_Expecter) getStates() *MockStateMachineRequirements_getStates_Call { - return &MockStateMachineRequirements_getStates_Call{Call: _e.mock.On("getStates")} -} - -func (_c *MockStateMachineRequirements_getStates_Call) Run(run func()) *MockStateMachineRequirements_getStates_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockStateMachineRequirements_getStates_Call) Return(_a0 []State) *MockStateMachineRequirements_getStates_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockStateMachineRequirements_getStates_Call) RunAndReturn(run func() []State) *MockStateMachineRequirements_getStates_Call { - _c.Call.Return(run) - return _c -} - -// halt provides a mock function with given fields: -func (_m *MockStateMachineRequirements) halt() { - _m.Called() -} - -// MockStateMachineRequirements_halt_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'halt' -type MockStateMachineRequirements_halt_Call struct { - *mock.Call -} - -// halt is a helper method to define mock.On call -func (_e *MockStateMachineRequirements_Expecter) halt() *MockStateMachineRequirements_halt_Call { - return &MockStateMachineRequirements_halt_Call{Call: _e.mock.On("halt")} -} - -func (_c *MockStateMachineRequirements_halt_Call) Run(run func()) *MockStateMachineRequirements_halt_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockStateMachineRequirements_halt_Call) Return() *MockStateMachineRequirements_halt_Call { - _c.Call.Return() - return _c -} - -func (_c *MockStateMachineRequirements_halt_Call) RunAndReturn(run func()) *MockStateMachineRequirements_halt_Call { - _c.Call.Return(run) - return _c -} - -// setMachineGroup provides a mock function with given fields: machineGroup -func (_m *MockStateMachineRequirements) setMachineGroup(machineGroup *StateMachineGroup) { - _m.Called(machineGroup) -} - -// MockStateMachineRequirements_setMachineGroup_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'setMachineGroup' -type MockStateMachineRequirements_setMachineGroup_Call struct { - *mock.Call -} - -// setMachineGroup is a helper method to define mock.On call -// - machineGroup *StateMachineGroup -func (_e *MockStateMachineRequirements_Expecter) setMachineGroup(machineGroup interface{}) *MockStateMachineRequirements_setMachineGroup_Call { - return &MockStateMachineRequirements_setMachineGroup_Call{Call: _e.mock.On("setMachineGroup", machineGroup)} -} - -func (_c *MockStateMachineRequirements_setMachineGroup_Call) Run(run func(machineGroup *StateMachineGroup)) *MockStateMachineRequirements_setMachineGroup_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(*StateMachineGroup)) - }) - return _c -} - -func (_c *MockStateMachineRequirements_setMachineGroup_Call) Return() *MockStateMachineRequirements_setMachineGroup_Call { - _c.Call.Return() - return _c -} - -func (_c *MockStateMachineRequirements_setMachineGroup_Call) RunAndReturn(run func(*StateMachineGroup)) *MockStateMachineRequirements_setMachineGroup_Call { - _c.Call.Return(run) - return _c -} - -// NewMockStateMachineRequirements creates a new instance of MockStateMachineRequirements. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewMockStateMachineRequirements(t interface { - mock.TestingT - Cleanup(func()) -}) *MockStateMachineRequirements { - mock := &MockStateMachineRequirements{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/plc4go/internal/bacnetip/tests/mock_StateMachine_test.go b/plc4go/internal/bacnetip/tests/mock_StateMachine_test.go deleted file mode 100644 index 54fab71755d..00000000000 --- a/plc4go/internal/bacnetip/tests/mock_StateMachine_test.go +++ /dev/null @@ -1,1092 +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 - * - * https://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. - */ - -// Code generated by mockery v2.42.2. DO NOT EDIT. - -package tests - -import ( - bacnetip "github.com/apache/plc4x/plc4go/internal/bacnetip" - mock "github.com/stretchr/testify/mock" -) - -// MockStateMachine is an autogenerated mock type for the StateMachine type -type MockStateMachine struct { - mock.Mock -} - -type MockStateMachine_Expecter struct { - mock *mock.Mock -} - -func (_m *MockStateMachine) EXPECT() *MockStateMachine_Expecter { - return &MockStateMachine_Expecter{mock: &_m.Mock} -} - -// AfterReceive provides a mock function with given fields: pdu -func (_m *MockStateMachine) AfterReceive(pdu bacnetip.PDU) { - _m.Called(pdu) -} - -// MockStateMachine_AfterReceive_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AfterReceive' -type MockStateMachine_AfterReceive_Call struct { - *mock.Call -} - -// AfterReceive is a helper method to define mock.On call -// - pdu bacnetip.PDU -func (_e *MockStateMachine_Expecter) AfterReceive(pdu interface{}) *MockStateMachine_AfterReceive_Call { - return &MockStateMachine_AfterReceive_Call{Call: _e.mock.On("AfterReceive", pdu)} -} - -func (_c *MockStateMachine_AfterReceive_Call) Run(run func(pdu bacnetip.PDU)) *MockStateMachine_AfterReceive_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(bacnetip.PDU)) - }) - return _c -} - -func (_c *MockStateMachine_AfterReceive_Call) Return() *MockStateMachine_AfterReceive_Call { - _c.Call.Return() - return _c -} - -func (_c *MockStateMachine_AfterReceive_Call) RunAndReturn(run func(bacnetip.PDU)) *MockStateMachine_AfterReceive_Call { - _c.Call.Return(run) - return _c -} - -// AfterSend provides a mock function with given fields: pdu -func (_m *MockStateMachine) AfterSend(pdu bacnetip.PDU) { - _m.Called(pdu) -} - -// MockStateMachine_AfterSend_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AfterSend' -type MockStateMachine_AfterSend_Call struct { - *mock.Call -} - -// AfterSend is a helper method to define mock.On call -// - pdu bacnetip.PDU -func (_e *MockStateMachine_Expecter) AfterSend(pdu interface{}) *MockStateMachine_AfterSend_Call { - return &MockStateMachine_AfterSend_Call{Call: _e.mock.On("AfterSend", pdu)} -} - -func (_c *MockStateMachine_AfterSend_Call) Run(run func(pdu bacnetip.PDU)) *MockStateMachine_AfterSend_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(bacnetip.PDU)) - }) - return _c -} - -func (_c *MockStateMachine_AfterSend_Call) Return() *MockStateMachine_AfterSend_Call { - _c.Call.Return() - return _c -} - -func (_c *MockStateMachine_AfterSend_Call) RunAndReturn(run func(bacnetip.PDU)) *MockStateMachine_AfterSend_Call { - _c.Call.Return(run) - return _c -} - -// BeforeReceive provides a mock function with given fields: pdu -func (_m *MockStateMachine) BeforeReceive(pdu bacnetip.PDU) { - _m.Called(pdu) -} - -// MockStateMachine_BeforeReceive_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BeforeReceive' -type MockStateMachine_BeforeReceive_Call struct { - *mock.Call -} - -// BeforeReceive is a helper method to define mock.On call -// - pdu bacnetip.PDU -func (_e *MockStateMachine_Expecter) BeforeReceive(pdu interface{}) *MockStateMachine_BeforeReceive_Call { - return &MockStateMachine_BeforeReceive_Call{Call: _e.mock.On("BeforeReceive", pdu)} -} - -func (_c *MockStateMachine_BeforeReceive_Call) Run(run func(pdu bacnetip.PDU)) *MockStateMachine_BeforeReceive_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(bacnetip.PDU)) - }) - return _c -} - -func (_c *MockStateMachine_BeforeReceive_Call) Return() *MockStateMachine_BeforeReceive_Call { - _c.Call.Return() - return _c -} - -func (_c *MockStateMachine_BeforeReceive_Call) RunAndReturn(run func(bacnetip.PDU)) *MockStateMachine_BeforeReceive_Call { - _c.Call.Return(run) - return _c -} - -// BeforeSend provides a mock function with given fields: pdu -func (_m *MockStateMachine) BeforeSend(pdu bacnetip.PDU) { - _m.Called(pdu) -} - -// MockStateMachine_BeforeSend_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BeforeSend' -type MockStateMachine_BeforeSend_Call struct { - *mock.Call -} - -// BeforeSend is a helper method to define mock.On call -// - pdu bacnetip.PDU -func (_e *MockStateMachine_Expecter) BeforeSend(pdu interface{}) *MockStateMachine_BeforeSend_Call { - return &MockStateMachine_BeforeSend_Call{Call: _e.mock.On("BeforeSend", pdu)} -} - -func (_c *MockStateMachine_BeforeSend_Call) Run(run func(pdu bacnetip.PDU)) *MockStateMachine_BeforeSend_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(bacnetip.PDU)) - }) - return _c -} - -func (_c *MockStateMachine_BeforeSend_Call) Return() *MockStateMachine_BeforeSend_Call { - _c.Call.Return() - return _c -} - -func (_c *MockStateMachine_BeforeSend_Call) RunAndReturn(run func(bacnetip.PDU)) *MockStateMachine_BeforeSend_Call { - _c.Call.Return(run) - return _c -} - -// EventSet provides a mock function with given fields: id -func (_m *MockStateMachine) EventSet(id string) { - _m.Called(id) -} - -// MockStateMachine_EventSet_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'EventSet' -type MockStateMachine_EventSet_Call struct { - *mock.Call -} - -// EventSet is a helper method to define mock.On call -// - id string -func (_e *MockStateMachine_Expecter) EventSet(id interface{}) *MockStateMachine_EventSet_Call { - return &MockStateMachine_EventSet_Call{Call: _e.mock.On("EventSet", id)} -} - -func (_c *MockStateMachine_EventSet_Call) Run(run func(id string)) *MockStateMachine_EventSet_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string)) - }) - return _c -} - -func (_c *MockStateMachine_EventSet_Call) Return() *MockStateMachine_EventSet_Call { - _c.Call.Return() - return _c -} - -func (_c *MockStateMachine_EventSet_Call) RunAndReturn(run func(string)) *MockStateMachine_EventSet_Call { - _c.Call.Return(run) - return _c -} - -// GetCurrentState provides a mock function with given fields: -func (_m *MockStateMachine) GetCurrentState() State { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetCurrentState") - } - - var r0 State - if rf, ok := ret.Get(0).(func() State); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(State) - } - } - - return r0 -} - -// MockStateMachine_GetCurrentState_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetCurrentState' -type MockStateMachine_GetCurrentState_Call struct { - *mock.Call -} - -// GetCurrentState is a helper method to define mock.On call -func (_e *MockStateMachine_Expecter) GetCurrentState() *MockStateMachine_GetCurrentState_Call { - return &MockStateMachine_GetCurrentState_Call{Call: _e.mock.On("GetCurrentState")} -} - -func (_c *MockStateMachine_GetCurrentState_Call) Run(run func()) *MockStateMachine_GetCurrentState_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockStateMachine_GetCurrentState_Call) Return(_a0 State) *MockStateMachine_GetCurrentState_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockStateMachine_GetCurrentState_Call) RunAndReturn(run func() State) *MockStateMachine_GetCurrentState_Call { - _c.Call.Return(run) - return _c -} - -// GetStartState provides a mock function with given fields: -func (_m *MockStateMachine) GetStartState() State { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetStartState") - } - - var r0 State - if rf, ok := ret.Get(0).(func() State); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(State) - } - } - - return r0 -} - -// MockStateMachine_GetStartState_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetStartState' -type MockStateMachine_GetStartState_Call struct { - *mock.Call -} - -// GetStartState is a helper method to define mock.On call -func (_e *MockStateMachine_Expecter) GetStartState() *MockStateMachine_GetStartState_Call { - return &MockStateMachine_GetStartState_Call{Call: _e.mock.On("GetStartState")} -} - -func (_c *MockStateMachine_GetStartState_Call) Run(run func()) *MockStateMachine_GetStartState_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockStateMachine_GetStartState_Call) Return(_a0 State) *MockStateMachine_GetStartState_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockStateMachine_GetStartState_Call) RunAndReturn(run func() State) *MockStateMachine_GetStartState_Call { - _c.Call.Return(run) - return _c -} - -// GetTransactionLog provides a mock function with given fields: -func (_m *MockStateMachine) GetTransactionLog() []string { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetTransactionLog") - } - - var r0 []string - if rf, ok := ret.Get(0).(func() []string); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]string) - } - } - - return r0 -} - -// MockStateMachine_GetTransactionLog_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetTransactionLog' -type MockStateMachine_GetTransactionLog_Call struct { - *mock.Call -} - -// GetTransactionLog is a helper method to define mock.On call -func (_e *MockStateMachine_Expecter) GetTransactionLog() *MockStateMachine_GetTransactionLog_Call { - return &MockStateMachine_GetTransactionLog_Call{Call: _e.mock.On("GetTransactionLog")} -} - -func (_c *MockStateMachine_GetTransactionLog_Call) Run(run func()) *MockStateMachine_GetTransactionLog_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockStateMachine_GetTransactionLog_Call) Return(_a0 []string) *MockStateMachine_GetTransactionLog_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockStateMachine_GetTransactionLog_Call) RunAndReturn(run func() []string) *MockStateMachine_GetTransactionLog_Call { - _c.Call.Return(run) - return _c -} - -// GetUnexpectedReceiveState provides a mock function with given fields: -func (_m *MockStateMachine) GetUnexpectedReceiveState() State { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetUnexpectedReceiveState") - } - - var r0 State - if rf, ok := ret.Get(0).(func() State); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(State) - } - } - - return r0 -} - -// MockStateMachine_GetUnexpectedReceiveState_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetUnexpectedReceiveState' -type MockStateMachine_GetUnexpectedReceiveState_Call struct { - *mock.Call -} - -// GetUnexpectedReceiveState is a helper method to define mock.On call -func (_e *MockStateMachine_Expecter) GetUnexpectedReceiveState() *MockStateMachine_GetUnexpectedReceiveState_Call { - return &MockStateMachine_GetUnexpectedReceiveState_Call{Call: _e.mock.On("GetUnexpectedReceiveState")} -} - -func (_c *MockStateMachine_GetUnexpectedReceiveState_Call) Run(run func()) *MockStateMachine_GetUnexpectedReceiveState_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockStateMachine_GetUnexpectedReceiveState_Call) Return(_a0 State) *MockStateMachine_GetUnexpectedReceiveState_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockStateMachine_GetUnexpectedReceiveState_Call) RunAndReturn(run func() State) *MockStateMachine_GetUnexpectedReceiveState_Call { - _c.Call.Return(run) - return _c -} - -// IsFailState provides a mock function with given fields: -func (_m *MockStateMachine) IsFailState() bool { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for IsFailState") - } - - var r0 bool - if rf, ok := ret.Get(0).(func() bool); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(bool) - } - - return r0 -} - -// MockStateMachine_IsFailState_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsFailState' -type MockStateMachine_IsFailState_Call struct { - *mock.Call -} - -// IsFailState is a helper method to define mock.On call -func (_e *MockStateMachine_Expecter) IsFailState() *MockStateMachine_IsFailState_Call { - return &MockStateMachine_IsFailState_Call{Call: _e.mock.On("IsFailState")} -} - -func (_c *MockStateMachine_IsFailState_Call) Run(run func()) *MockStateMachine_IsFailState_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockStateMachine_IsFailState_Call) Return(_a0 bool) *MockStateMachine_IsFailState_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockStateMachine_IsFailState_Call) RunAndReturn(run func() bool) *MockStateMachine_IsFailState_Call { - _c.Call.Return(run) - return _c -} - -// IsRunning provides a mock function with given fields: -func (_m *MockStateMachine) IsRunning() bool { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for IsRunning") - } - - var r0 bool - if rf, ok := ret.Get(0).(func() bool); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(bool) - } - - return r0 -} - -// MockStateMachine_IsRunning_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsRunning' -type MockStateMachine_IsRunning_Call struct { - *mock.Call -} - -// IsRunning is a helper method to define mock.On call -func (_e *MockStateMachine_Expecter) IsRunning() *MockStateMachine_IsRunning_Call { - return &MockStateMachine_IsRunning_Call{Call: _e.mock.On("IsRunning")} -} - -func (_c *MockStateMachine_IsRunning_Call) Run(run func()) *MockStateMachine_IsRunning_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockStateMachine_IsRunning_Call) Return(_a0 bool) *MockStateMachine_IsRunning_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockStateMachine_IsRunning_Call) RunAndReturn(run func() bool) *MockStateMachine_IsRunning_Call { - _c.Call.Return(run) - return _c -} - -// IsSuccessState provides a mock function with given fields: -func (_m *MockStateMachine) IsSuccessState() bool { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for IsSuccessState") - } - - var r0 bool - if rf, ok := ret.Get(0).(func() bool); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(bool) - } - - return r0 -} - -// MockStateMachine_IsSuccessState_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsSuccessState' -type MockStateMachine_IsSuccessState_Call struct { - *mock.Call -} - -// IsSuccessState is a helper method to define mock.On call -func (_e *MockStateMachine_Expecter) IsSuccessState() *MockStateMachine_IsSuccessState_Call { - return &MockStateMachine_IsSuccessState_Call{Call: _e.mock.On("IsSuccessState")} -} - -func (_c *MockStateMachine_IsSuccessState_Call) Run(run func()) *MockStateMachine_IsSuccessState_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockStateMachine_IsSuccessState_Call) Return(_a0 bool) *MockStateMachine_IsSuccessState_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockStateMachine_IsSuccessState_Call) RunAndReturn(run func() bool) *MockStateMachine_IsSuccessState_Call { - _c.Call.Return(run) - return _c -} - -// NewState provides a mock function with given fields: _a0 -func (_m *MockStateMachine) NewState(_a0 string) State { - ret := _m.Called(_a0) - - if len(ret) == 0 { - panic("no return value specified for NewState") - } - - var r0 State - if rf, ok := ret.Get(0).(func(string) State); ok { - r0 = rf(_a0) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(State) - } - } - - return r0 -} - -// MockStateMachine_NewState_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'NewState' -type MockStateMachine_NewState_Call struct { - *mock.Call -} - -// NewState is a helper method to define mock.On call -// - _a0 string -func (_e *MockStateMachine_Expecter) NewState(_a0 interface{}) *MockStateMachine_NewState_Call { - return &MockStateMachine_NewState_Call{Call: _e.mock.On("NewState", _a0)} -} - -func (_c *MockStateMachine_NewState_Call) Run(run func(_a0 string)) *MockStateMachine_NewState_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string)) - }) - return _c -} - -func (_c *MockStateMachine_NewState_Call) Return(_a0 State) *MockStateMachine_NewState_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockStateMachine_NewState_Call) RunAndReturn(run func(string) State) *MockStateMachine_NewState_Call { - _c.Call.Return(run) - return _c -} - -// Receive provides a mock function with given fields: args, kwargs -func (_m *MockStateMachine) Receive(args bacnetip.Args, kwargs bacnetip.KWArgs) error { - ret := _m.Called(args, kwargs) - - if len(ret) == 0 { - panic("no return value specified for Receive") - } - - var r0 error - if rf, ok := ret.Get(0).(func(bacnetip.Args, bacnetip.KWArgs) error); ok { - r0 = rf(args, kwargs) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockStateMachine_Receive_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Receive' -type MockStateMachine_Receive_Call struct { - *mock.Call -} - -// Receive is a helper method to define mock.On call -// - args bacnetip.Args -// - kwargs bacnetip.KWArgs -func (_e *MockStateMachine_Expecter) Receive(args interface{}, kwargs interface{}) *MockStateMachine_Receive_Call { - return &MockStateMachine_Receive_Call{Call: _e.mock.On("Receive", args, kwargs)} -} - -func (_c *MockStateMachine_Receive_Call) Run(run func(args bacnetip.Args, kwargs bacnetip.KWArgs)) *MockStateMachine_Receive_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(bacnetip.Args), args[1].(bacnetip.KWArgs)) - }) - return _c -} - -func (_c *MockStateMachine_Receive_Call) Return(_a0 error) *MockStateMachine_Receive_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockStateMachine_Receive_Call) RunAndReturn(run func(bacnetip.Args, bacnetip.KWArgs) error) *MockStateMachine_Receive_Call { - _c.Call.Return(run) - return _c -} - -// Reset provides a mock function with given fields: -func (_m *MockStateMachine) Reset() { - _m.Called() -} - -// MockStateMachine_Reset_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Reset' -type MockStateMachine_Reset_Call struct { - *mock.Call -} - -// Reset is a helper method to define mock.On call -func (_e *MockStateMachine_Expecter) Reset() *MockStateMachine_Reset_Call { - return &MockStateMachine_Reset_Call{Call: _e.mock.On("Reset")} -} - -func (_c *MockStateMachine_Reset_Call) Run(run func()) *MockStateMachine_Reset_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockStateMachine_Reset_Call) Return() *MockStateMachine_Reset_Call { - _c.Call.Return() - return _c -} - -func (_c *MockStateMachine_Reset_Call) RunAndReturn(run func()) *MockStateMachine_Reset_Call { - _c.Call.Return(run) - return _c -} - -// Run provides a mock function with given fields: -func (_m *MockStateMachine) Run() error { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Run") - } - - var r0 error - if rf, ok := ret.Get(0).(func() error); ok { - r0 = rf() - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockStateMachine_Run_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Run' -type MockStateMachine_Run_Call struct { - *mock.Call -} - -// Run is a helper method to define mock.On call -func (_e *MockStateMachine_Expecter) Run() *MockStateMachine_Run_Call { - return &MockStateMachine_Run_Call{Call: _e.mock.On("Run")} -} - -func (_c *MockStateMachine_Run_Call) Run(run func()) *MockStateMachine_Run_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockStateMachine_Run_Call) Return(_a0 error) *MockStateMachine_Run_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockStateMachine_Run_Call) RunAndReturn(run func() error) *MockStateMachine_Run_Call { - _c.Call.Return(run) - return _c -} - -// Send provides a mock function with given fields: args, kwargs -func (_m *MockStateMachine) Send(args bacnetip.Args, kwargs bacnetip.KWArgs) error { - ret := _m.Called(args, kwargs) - - if len(ret) == 0 { - panic("no return value specified for Send") - } - - var r0 error - if rf, ok := ret.Get(0).(func(bacnetip.Args, bacnetip.KWArgs) error); ok { - r0 = rf(args, kwargs) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockStateMachine_Send_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Send' -type MockStateMachine_Send_Call struct { - *mock.Call -} - -// Send is a helper method to define mock.On call -// - args bacnetip.Args -// - kwargs bacnetip.KWArgs -func (_e *MockStateMachine_Expecter) Send(args interface{}, kwargs interface{}) *MockStateMachine_Send_Call { - return &MockStateMachine_Send_Call{Call: _e.mock.On("Send", args, kwargs)} -} - -func (_c *MockStateMachine_Send_Call) Run(run func(args bacnetip.Args, kwargs bacnetip.KWArgs)) *MockStateMachine_Send_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(bacnetip.Args), args[1].(bacnetip.KWArgs)) - }) - return _c -} - -func (_c *MockStateMachine_Send_Call) Return(_a0 error) *MockStateMachine_Send_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockStateMachine_Send_Call) RunAndReturn(run func(bacnetip.Args, bacnetip.KWArgs) error) *MockStateMachine_Send_Call { - _c.Call.Return(run) - return _c -} - -// String provides a mock function with given fields: -func (_m *MockStateMachine) String() string { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for String") - } - - var r0 string - if rf, ok := ret.Get(0).(func() string); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(string) - } - - return r0 -} - -// MockStateMachine_String_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'String' -type MockStateMachine_String_Call struct { - *mock.Call -} - -// String is a helper method to define mock.On call -func (_e *MockStateMachine_Expecter) String() *MockStateMachine_String_Call { - return &MockStateMachine_String_Call{Call: _e.mock.On("String")} -} - -func (_c *MockStateMachine_String_Call) Run(run func()) *MockStateMachine_String_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockStateMachine_String_Call) Return(_a0 string) *MockStateMachine_String_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockStateMachine_String_Call) RunAndReturn(run func() string) *MockStateMachine_String_Call { - _c.Call.Return(run) - return _c -} - -// UnexpectedReceive provides a mock function with given fields: pdu -func (_m *MockStateMachine) UnexpectedReceive(pdu bacnetip.PDU) { - _m.Called(pdu) -} - -// MockStateMachine_UnexpectedReceive_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UnexpectedReceive' -type MockStateMachine_UnexpectedReceive_Call struct { - *mock.Call -} - -// UnexpectedReceive is a helper method to define mock.On call -// - pdu bacnetip.PDU -func (_e *MockStateMachine_Expecter) UnexpectedReceive(pdu interface{}) *MockStateMachine_UnexpectedReceive_Call { - return &MockStateMachine_UnexpectedReceive_Call{Call: _e.mock.On("UnexpectedReceive", pdu)} -} - -func (_c *MockStateMachine_UnexpectedReceive_Call) Run(run func(pdu bacnetip.PDU)) *MockStateMachine_UnexpectedReceive_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(bacnetip.PDU)) - }) - return _c -} - -func (_c *MockStateMachine_UnexpectedReceive_Call) Return() *MockStateMachine_UnexpectedReceive_Call { - _c.Call.Return() - return _c -} - -func (_c *MockStateMachine_UnexpectedReceive_Call) RunAndReturn(run func(bacnetip.PDU)) *MockStateMachine_UnexpectedReceive_Call { - _c.Call.Return(run) - return _c -} - -// getCurrentState provides a mock function with given fields: -func (_m *MockStateMachine) getCurrentState() State { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for getCurrentState") - } - - var r0 State - if rf, ok := ret.Get(0).(func() State); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(State) - } - } - - return r0 -} - -// MockStateMachine_getCurrentState_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'getCurrentState' -type MockStateMachine_getCurrentState_Call struct { - *mock.Call -} - -// getCurrentState is a helper method to define mock.On call -func (_e *MockStateMachine_Expecter) getCurrentState() *MockStateMachine_getCurrentState_Call { - return &MockStateMachine_getCurrentState_Call{Call: _e.mock.On("getCurrentState")} -} - -func (_c *MockStateMachine_getCurrentState_Call) Run(run func()) *MockStateMachine_getCurrentState_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockStateMachine_getCurrentState_Call) Return(_a0 State) *MockStateMachine_getCurrentState_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockStateMachine_getCurrentState_Call) RunAndReturn(run func() State) *MockStateMachine_getCurrentState_Call { - _c.Call.Return(run) - return _c -} - -// getMachineGroup provides a mock function with given fields: -func (_m *MockStateMachine) getMachineGroup() *StateMachineGroup { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for getMachineGroup") - } - - var r0 *StateMachineGroup - if rf, ok := ret.Get(0).(func() *StateMachineGroup); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*StateMachineGroup) - } - } - - return r0 -} - -// MockStateMachine_getMachineGroup_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'getMachineGroup' -type MockStateMachine_getMachineGroup_Call struct { - *mock.Call -} - -// getMachineGroup is a helper method to define mock.On call -func (_e *MockStateMachine_Expecter) getMachineGroup() *MockStateMachine_getMachineGroup_Call { - return &MockStateMachine_getMachineGroup_Call{Call: _e.mock.On("getMachineGroup")} -} - -func (_c *MockStateMachine_getMachineGroup_Call) Run(run func()) *MockStateMachine_getMachineGroup_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockStateMachine_getMachineGroup_Call) Return(_a0 *StateMachineGroup) *MockStateMachine_getMachineGroup_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockStateMachine_getMachineGroup_Call) RunAndReturn(run func() *StateMachineGroup) *MockStateMachine_getMachineGroup_Call { - _c.Call.Return(run) - return _c -} - -// getStateTimeoutTask provides a mock function with given fields: -func (_m *MockStateMachine) getStateTimeoutTask() *TimeoutTask { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for getStateTimeoutTask") - } - - var r0 *TimeoutTask - if rf, ok := ret.Get(0).(func() *TimeoutTask); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*TimeoutTask) - } - } - - return r0 -} - -// MockStateMachine_getStateTimeoutTask_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'getStateTimeoutTask' -type MockStateMachine_getStateTimeoutTask_Call struct { - *mock.Call -} - -// getStateTimeoutTask is a helper method to define mock.On call -func (_e *MockStateMachine_Expecter) getStateTimeoutTask() *MockStateMachine_getStateTimeoutTask_Call { - return &MockStateMachine_getStateTimeoutTask_Call{Call: _e.mock.On("getStateTimeoutTask")} -} - -func (_c *MockStateMachine_getStateTimeoutTask_Call) Run(run func()) *MockStateMachine_getStateTimeoutTask_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockStateMachine_getStateTimeoutTask_Call) Return(_a0 *TimeoutTask) *MockStateMachine_getStateTimeoutTask_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockStateMachine_getStateTimeoutTask_Call) RunAndReturn(run func() *TimeoutTask) *MockStateMachine_getStateTimeoutTask_Call { - _c.Call.Return(run) - return _c -} - -// getStates provides a mock function with given fields: -func (_m *MockStateMachine) getStates() []State { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for getStates") - } - - var r0 []State - if rf, ok := ret.Get(0).(func() []State); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]State) - } - } - - return r0 -} - -// MockStateMachine_getStates_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'getStates' -type MockStateMachine_getStates_Call struct { - *mock.Call -} - -// getStates is a helper method to define mock.On call -func (_e *MockStateMachine_Expecter) getStates() *MockStateMachine_getStates_Call { - return &MockStateMachine_getStates_Call{Call: _e.mock.On("getStates")} -} - -func (_c *MockStateMachine_getStates_Call) Run(run func()) *MockStateMachine_getStates_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockStateMachine_getStates_Call) Return(_a0 []State) *MockStateMachine_getStates_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockStateMachine_getStates_Call) RunAndReturn(run func() []State) *MockStateMachine_getStates_Call { - _c.Call.Return(run) - return _c -} - -// halt provides a mock function with given fields: -func (_m *MockStateMachine) halt() { - _m.Called() -} - -// MockStateMachine_halt_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'halt' -type MockStateMachine_halt_Call struct { - *mock.Call -} - -// halt is a helper method to define mock.On call -func (_e *MockStateMachine_Expecter) halt() *MockStateMachine_halt_Call { - return &MockStateMachine_halt_Call{Call: _e.mock.On("halt")} -} - -func (_c *MockStateMachine_halt_Call) Run(run func()) *MockStateMachine_halt_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockStateMachine_halt_Call) Return() *MockStateMachine_halt_Call { - _c.Call.Return() - return _c -} - -func (_c *MockStateMachine_halt_Call) RunAndReturn(run func()) *MockStateMachine_halt_Call { - _c.Call.Return(run) - return _c -} - -// setMachineGroup provides a mock function with given fields: machineGroup -func (_m *MockStateMachine) setMachineGroup(machineGroup *StateMachineGroup) { - _m.Called(machineGroup) -} - -// MockStateMachine_setMachineGroup_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'setMachineGroup' -type MockStateMachine_setMachineGroup_Call struct { - *mock.Call -} - -// setMachineGroup is a helper method to define mock.On call -// - machineGroup *StateMachineGroup -func (_e *MockStateMachine_Expecter) setMachineGroup(machineGroup interface{}) *MockStateMachine_setMachineGroup_Call { - return &MockStateMachine_setMachineGroup_Call{Call: _e.mock.On("setMachineGroup", machineGroup)} -} - -func (_c *MockStateMachine_setMachineGroup_Call) Run(run func(machineGroup *StateMachineGroup)) *MockStateMachine_setMachineGroup_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(*StateMachineGroup)) - }) - return _c -} - -func (_c *MockStateMachine_setMachineGroup_Call) Return() *MockStateMachine_setMachineGroup_Call { - _c.Call.Return() - return _c -} - -func (_c *MockStateMachine_setMachineGroup_Call) RunAndReturn(run func(*StateMachineGroup)) *MockStateMachine_setMachineGroup_Call { - _c.Call.Return(run) - return _c -} - -// NewMockStateMachine creates a new instance of MockStateMachine. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewMockStateMachine(t interface { - mock.TestingT - Cleanup(func()) -}) *MockStateMachine { - mock := &MockStateMachine{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/plc4go/internal/bacnetip/tests/mock_State_test.go b/plc4go/internal/bacnetip/tests/mock_State_test.go deleted file mode 100644 index 4bb3cfecaf2..00000000000 --- a/plc4go/internal/bacnetip/tests/mock_State_test.go +++ /dev/null @@ -1,1350 +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 - * - * https://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. - */ - -// Code generated by mockery v2.42.2. DO NOT EDIT. - -package tests - -import ( - bacnetip "github.com/apache/plc4x/plc4go/internal/bacnetip" - mock "github.com/stretchr/testify/mock" - - time "time" -) - -// MockState is an autogenerated mock type for the State type -type MockState struct { - mock.Mock -} - -type MockState_Expecter struct { - mock *mock.Mock -} - -func (_m *MockState) EXPECT() *MockState_Expecter { - return &MockState_Expecter{mock: &_m.Mock} -} - -// Call provides a mock function with given fields: fn, args, kwargs -func (_m *MockState) Call(fn func(bacnetip.Args, bacnetip.KWArgs) error, args bacnetip.Args, kwargs bacnetip.KWArgs) State { - ret := _m.Called(fn, args, kwargs) - - if len(ret) == 0 { - panic("no return value specified for Call") - } - - var r0 State - if rf, ok := ret.Get(0).(func(func(bacnetip.Args, bacnetip.KWArgs) error, bacnetip.Args, bacnetip.KWArgs) State); ok { - r0 = rf(fn, args, kwargs) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(State) - } - } - - return r0 -} - -// MockState_Call_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Call' -type MockState_Call_Call struct { - *mock.Call -} - -// Call is a helper method to define mock.On call -// - fn func(bacnetip.Args , bacnetip.KWArgs) error -// - args bacnetip.Args -// - kwargs bacnetip.KWArgs -func (_e *MockState_Expecter) Call(fn interface{}, args interface{}, kwargs interface{}) *MockState_Call_Call { - return &MockState_Call_Call{Call: _e.mock.On("Call", fn, args, kwargs)} -} - -func (_c *MockState_Call_Call) Run(run func(fn func(bacnetip.Args, bacnetip.KWArgs) error, args bacnetip.Args, kwargs bacnetip.KWArgs)) *MockState_Call_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(func(bacnetip.Args, bacnetip.KWArgs) error), args[1].(bacnetip.Args), args[2].(bacnetip.KWArgs)) - }) - return _c -} - -func (_c *MockState_Call_Call) Return(_a0 State) *MockState_Call_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockState_Call_Call) RunAndReturn(run func(func(bacnetip.Args, bacnetip.KWArgs) error, bacnetip.Args, bacnetip.KWArgs) State) *MockState_Call_Call { - _c.Call.Return(run) - return _c -} - -// Doc provides a mock function with given fields: docstring -func (_m *MockState) Doc(docstring string) State { - ret := _m.Called(docstring) - - if len(ret) == 0 { - panic("no return value specified for Doc") - } - - var r0 State - if rf, ok := ret.Get(0).(func(string) State); ok { - r0 = rf(docstring) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(State) - } - } - - return r0 -} - -// MockState_Doc_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Doc' -type MockState_Doc_Call struct { - *mock.Call -} - -// Doc is a helper method to define mock.On call -// - docstring string -func (_e *MockState_Expecter) Doc(docstring interface{}) *MockState_Doc_Call { - return &MockState_Doc_Call{Call: _e.mock.On("Doc", docstring)} -} - -func (_c *MockState_Doc_Call) Run(run func(docstring string)) *MockState_Doc_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string)) - }) - return _c -} - -func (_c *MockState_Doc_Call) Return(_a0 State) *MockState_Doc_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockState_Doc_Call) RunAndReturn(run func(string) State) *MockState_Doc_Call { - _c.Call.Return(run) - return _c -} - -// DocString provides a mock function with given fields: -func (_m *MockState) DocString() string { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for DocString") - } - - var r0 string - if rf, ok := ret.Get(0).(func() string); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(string) - } - - return r0 -} - -// MockState_DocString_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DocString' -type MockState_DocString_Call struct { - *mock.Call -} - -// DocString is a helper method to define mock.On call -func (_e *MockState_Expecter) DocString() *MockState_DocString_Call { - return &MockState_DocString_Call{Call: _e.mock.On("DocString")} -} - -func (_c *MockState_DocString_Call) Run(run func()) *MockState_DocString_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockState_DocString_Call) Return(_a0 string) *MockState_DocString_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockState_DocString_Call) RunAndReturn(run func() string) *MockState_DocString_Call { - _c.Call.Return(run) - return _c -} - -// EnterState provides a mock function with given fields: -func (_m *MockState) EnterState() { - _m.Called() -} - -// MockState_EnterState_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'EnterState' -type MockState_EnterState_Call struct { - *mock.Call -} - -// EnterState is a helper method to define mock.On call -func (_e *MockState_Expecter) EnterState() *MockState_EnterState_Call { - return &MockState_EnterState_Call{Call: _e.mock.On("EnterState")} -} - -func (_c *MockState_EnterState_Call) Run(run func()) *MockState_EnterState_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockState_EnterState_Call) Return() *MockState_EnterState_Call { - _c.Call.Return() - return _c -} - -func (_c *MockState_EnterState_Call) RunAndReturn(run func()) *MockState_EnterState_Call { - _c.Call.Return(run) - return _c -} - -// Equals provides a mock function with given fields: other -func (_m *MockState) Equals(other State) bool { - ret := _m.Called(other) - - if len(ret) == 0 { - panic("no return value specified for Equals") - } - - var r0 bool - if rf, ok := ret.Get(0).(func(State) bool); ok { - r0 = rf(other) - } else { - r0 = ret.Get(0).(bool) - } - - return r0 -} - -// MockState_Equals_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Equals' -type MockState_Equals_Call struct { - *mock.Call -} - -// Equals is a helper method to define mock.On call -// - other State -func (_e *MockState_Expecter) Equals(other interface{}) *MockState_Equals_Call { - return &MockState_Equals_Call{Call: _e.mock.On("Equals", other)} -} - -func (_c *MockState_Equals_Call) Run(run func(other State)) *MockState_Equals_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(State)) - }) - return _c -} - -func (_c *MockState_Equals_Call) Return(_a0 bool) *MockState_Equals_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockState_Equals_Call) RunAndReturn(run func(State) bool) *MockState_Equals_Call { - _c.Call.Return(run) - return _c -} - -// EventSet provides a mock function with given fields: eventId -func (_m *MockState) EventSet(eventId string) { - _m.Called(eventId) -} - -// MockState_EventSet_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'EventSet' -type MockState_EventSet_Call struct { - *mock.Call -} - -// EventSet is a helper method to define mock.On call -// - eventId string -func (_e *MockState_Expecter) EventSet(eventId interface{}) *MockState_EventSet_Call { - return &MockState_EventSet_Call{Call: _e.mock.On("EventSet", eventId)} -} - -func (_c *MockState_EventSet_Call) Run(run func(eventId string)) *MockState_EventSet_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string)) - }) - return _c -} - -func (_c *MockState_EventSet_Call) Return() *MockState_EventSet_Call { - _c.Call.Return() - return _c -} - -func (_c *MockState_EventSet_Call) RunAndReturn(run func(string)) *MockState_EventSet_Call { - _c.Call.Return(run) - return _c -} - -// ExitState provides a mock function with given fields: -func (_m *MockState) ExitState() { - _m.Called() -} - -// MockState_ExitState_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ExitState' -type MockState_ExitState_Call struct { - *mock.Call -} - -// ExitState is a helper method to define mock.On call -func (_e *MockState_Expecter) ExitState() *MockState_ExitState_Call { - return &MockState_ExitState_Call{Call: _e.mock.On("ExitState")} -} - -func (_c *MockState_ExitState_Call) Run(run func()) *MockState_ExitState_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockState_ExitState_Call) Return() *MockState_ExitState_Call { - _c.Call.Return() - return _c -} - -func (_c *MockState_ExitState_Call) RunAndReturn(run func()) *MockState_ExitState_Call { - _c.Call.Return(run) - return _c -} - -// Fail provides a mock function with given fields: docstring -func (_m *MockState) Fail(docstring string) State { - ret := _m.Called(docstring) - - if len(ret) == 0 { - panic("no return value specified for Fail") - } - - var r0 State - if rf, ok := ret.Get(0).(func(string) State); ok { - r0 = rf(docstring) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(State) - } - } - - return r0 -} - -// MockState_Fail_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Fail' -type MockState_Fail_Call struct { - *mock.Call -} - -// Fail is a helper method to define mock.On call -// - docstring string -func (_e *MockState_Expecter) Fail(docstring interface{}) *MockState_Fail_Call { - return &MockState_Fail_Call{Call: _e.mock.On("Fail", docstring)} -} - -func (_c *MockState_Fail_Call) Run(run func(docstring string)) *MockState_Fail_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string)) - }) - return _c -} - -func (_c *MockState_Fail_Call) Return(_a0 State) *MockState_Fail_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockState_Fail_Call) RunAndReturn(run func(string) State) *MockState_Fail_Call { - _c.Call.Return(run) - return _c -} - -// IsFailState provides a mock function with given fields: -func (_m *MockState) IsFailState() bool { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for IsFailState") - } - - var r0 bool - if rf, ok := ret.Get(0).(func() bool); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(bool) - } - - return r0 -} - -// MockState_IsFailState_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsFailState' -type MockState_IsFailState_Call struct { - *mock.Call -} - -// IsFailState is a helper method to define mock.On call -func (_e *MockState_Expecter) IsFailState() *MockState_IsFailState_Call { - return &MockState_IsFailState_Call{Call: _e.mock.On("IsFailState")} -} - -func (_c *MockState_IsFailState_Call) Run(run func()) *MockState_IsFailState_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockState_IsFailState_Call) Return(_a0 bool) *MockState_IsFailState_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockState_IsFailState_Call) RunAndReturn(run func() bool) *MockState_IsFailState_Call { - _c.Call.Return(run) - return _c -} - -// IsSuccessState provides a mock function with given fields: -func (_m *MockState) IsSuccessState() bool { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for IsSuccessState") - } - - var r0 bool - if rf, ok := ret.Get(0).(func() bool); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(bool) - } - - return r0 -} - -// MockState_IsSuccessState_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsSuccessState' -type MockState_IsSuccessState_Call struct { - *mock.Call -} - -// IsSuccessState is a helper method to define mock.On call -func (_e *MockState_Expecter) IsSuccessState() *MockState_IsSuccessState_Call { - return &MockState_IsSuccessState_Call{Call: _e.mock.On("IsSuccessState")} -} - -func (_c *MockState_IsSuccessState_Call) Run(run func()) *MockState_IsSuccessState_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockState_IsSuccessState_Call) Return(_a0 bool) *MockState_IsSuccessState_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockState_IsSuccessState_Call) RunAndReturn(run func() bool) *MockState_IsSuccessState_Call { - _c.Call.Return(run) - return _c -} - -// Receive provides a mock function with given fields: args, kwargs -func (_m *MockState) Receive(args bacnetip.Args, kwargs bacnetip.KWArgs) State { - ret := _m.Called(args, kwargs) - - if len(ret) == 0 { - panic("no return value specified for Receive") - } - - var r0 State - if rf, ok := ret.Get(0).(func(bacnetip.Args, bacnetip.KWArgs) State); ok { - r0 = rf(args, kwargs) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(State) - } - } - - return r0 -} - -// MockState_Receive_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Receive' -type MockState_Receive_Call struct { - *mock.Call -} - -// Receive is a helper method to define mock.On call -// - args bacnetip.Args -// - kwargs bacnetip.KWArgs -func (_e *MockState_Expecter) Receive(args interface{}, kwargs interface{}) *MockState_Receive_Call { - return &MockState_Receive_Call{Call: _e.mock.On("Receive", args, kwargs)} -} - -func (_c *MockState_Receive_Call) Run(run func(args bacnetip.Args, kwargs bacnetip.KWArgs)) *MockState_Receive_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(bacnetip.Args), args[1].(bacnetip.KWArgs)) - }) - return _c -} - -func (_c *MockState_Receive_Call) Return(_a0 State) *MockState_Receive_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockState_Receive_Call) RunAndReturn(run func(bacnetip.Args, bacnetip.KWArgs) State) *MockState_Receive_Call { - _c.Call.Return(run) - return _c -} - -// Reset provides a mock function with given fields: -func (_m *MockState) Reset() { - _m.Called() -} - -// MockState_Reset_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Reset' -type MockState_Reset_Call struct { - *mock.Call -} - -// Reset is a helper method to define mock.On call -func (_e *MockState_Expecter) Reset() *MockState_Reset_Call { - return &MockState_Reset_Call{Call: _e.mock.On("Reset")} -} - -func (_c *MockState_Reset_Call) Run(run func()) *MockState_Reset_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockState_Reset_Call) Return() *MockState_Reset_Call { - _c.Call.Return() - return _c -} - -func (_c *MockState_Reset_Call) RunAndReturn(run func()) *MockState_Reset_Call { - _c.Call.Return(run) - return _c -} - -// Send provides a mock function with given fields: pdu, nextState -func (_m *MockState) Send(pdu bacnetip.PDU, nextState State) State { - ret := _m.Called(pdu, nextState) - - if len(ret) == 0 { - panic("no return value specified for Send") - } - - var r0 State - if rf, ok := ret.Get(0).(func(bacnetip.PDU, State) State); ok { - r0 = rf(pdu, nextState) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(State) - } - } - - return r0 -} - -// MockState_Send_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Send' -type MockState_Send_Call struct { - *mock.Call -} - -// Send is a helper method to define mock.On call -// - pdu bacnetip.PDU -// - nextState State -func (_e *MockState_Expecter) Send(pdu interface{}, nextState interface{}) *MockState_Send_Call { - return &MockState_Send_Call{Call: _e.mock.On("Send", pdu, nextState)} -} - -func (_c *MockState_Send_Call) Run(run func(pdu bacnetip.PDU, nextState State)) *MockState_Send_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(bacnetip.PDU), args[1].(State)) - }) - return _c -} - -func (_c *MockState_Send_Call) Return(_a0 State) *MockState_Send_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockState_Send_Call) RunAndReturn(run func(bacnetip.PDU, State) State) *MockState_Send_Call { - _c.Call.Return(run) - return _c -} - -// SetEvent provides a mock function with given fields: eventId -func (_m *MockState) SetEvent(eventId string) State { - ret := _m.Called(eventId) - - if len(ret) == 0 { - panic("no return value specified for SetEvent") - } - - var r0 State - if rf, ok := ret.Get(0).(func(string) State); ok { - r0 = rf(eventId) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(State) - } - } - - return r0 -} - -// MockState_SetEvent_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetEvent' -type MockState_SetEvent_Call struct { - *mock.Call -} - -// SetEvent is a helper method to define mock.On call -// - eventId string -func (_e *MockState_Expecter) SetEvent(eventId interface{}) *MockState_SetEvent_Call { - return &MockState_SetEvent_Call{Call: _e.mock.On("SetEvent", eventId)} -} - -func (_c *MockState_SetEvent_Call) Run(run func(eventId string)) *MockState_SetEvent_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string)) - }) - return _c -} - -func (_c *MockState_SetEvent_Call) Return(_a0 State) *MockState_SetEvent_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockState_SetEvent_Call) RunAndReturn(run func(string) State) *MockState_SetEvent_Call { - _c.Call.Return(run) - return _c -} - -// String provides a mock function with given fields: -func (_m *MockState) String() string { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for String") - } - - var r0 string - if rf, ok := ret.Get(0).(func() string); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(string) - } - - return r0 -} - -// MockState_String_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'String' -type MockState_String_Call struct { - *mock.Call -} - -// String is a helper method to define mock.On call -func (_e *MockState_Expecter) String() *MockState_String_Call { - return &MockState_String_Call{Call: _e.mock.On("String")} -} - -func (_c *MockState_String_Call) Run(run func()) *MockState_String_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockState_String_Call) Return(_a0 string) *MockState_String_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockState_String_Call) RunAndReturn(run func() string) *MockState_String_Call { - _c.Call.Return(run) - return _c -} - -// Success provides a mock function with given fields: docstring -func (_m *MockState) Success(docstring string) State { - ret := _m.Called(docstring) - - if len(ret) == 0 { - panic("no return value specified for Success") - } - - var r0 State - if rf, ok := ret.Get(0).(func(string) State); ok { - r0 = rf(docstring) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(State) - } - } - - return r0 -} - -// MockState_Success_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Success' -type MockState_Success_Call struct { - *mock.Call -} - -// Success is a helper method to define mock.On call -// - docstring string -func (_e *MockState_Expecter) Success(docstring interface{}) *MockState_Success_Call { - return &MockState_Success_Call{Call: _e.mock.On("Success", docstring)} -} - -func (_c *MockState_Success_Call) Run(run func(docstring string)) *MockState_Success_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string)) - }) - return _c -} - -func (_c *MockState_Success_Call) Return(_a0 State) *MockState_Success_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockState_Success_Call) RunAndReturn(run func(string) State) *MockState_Success_Call { - _c.Call.Return(run) - return _c -} - -// Timeout provides a mock function with given fields: duration, nextState -func (_m *MockState) Timeout(duration time.Duration, nextState State) State { - ret := _m.Called(duration, nextState) - - if len(ret) == 0 { - panic("no return value specified for Timeout") - } - - var r0 State - if rf, ok := ret.Get(0).(func(time.Duration, State) State); ok { - r0 = rf(duration, nextState) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(State) - } - } - - return r0 -} - -// MockState_Timeout_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Timeout' -type MockState_Timeout_Call struct { - *mock.Call -} - -// Timeout is a helper method to define mock.On call -// - duration time.Duration -// - nextState State -func (_e *MockState_Expecter) Timeout(duration interface{}, nextState interface{}) *MockState_Timeout_Call { - return &MockState_Timeout_Call{Call: _e.mock.On("Timeout", duration, nextState)} -} - -func (_c *MockState_Timeout_Call) Run(run func(duration time.Duration, nextState State)) *MockState_Timeout_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(time.Duration), args[1].(State)) - }) - return _c -} - -func (_c *MockState_Timeout_Call) Return(_a0 State) *MockState_Timeout_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockState_Timeout_Call) RunAndReturn(run func(time.Duration, State) State) *MockState_Timeout_Call { - _c.Call.Return(run) - return _c -} - -// WaitEvent provides a mock function with given fields: eventId, nextState -func (_m *MockState) WaitEvent(eventId string, nextState State) State { - ret := _m.Called(eventId, nextState) - - if len(ret) == 0 { - panic("no return value specified for WaitEvent") - } - - var r0 State - if rf, ok := ret.Get(0).(func(string, State) State); ok { - r0 = rf(eventId, nextState) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(State) - } - } - - return r0 -} - -// MockState_WaitEvent_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WaitEvent' -type MockState_WaitEvent_Call struct { - *mock.Call -} - -// WaitEvent is a helper method to define mock.On call -// - eventId string -// - nextState State -func (_e *MockState_Expecter) WaitEvent(eventId interface{}, nextState interface{}) *MockState_WaitEvent_Call { - return &MockState_WaitEvent_Call{Call: _e.mock.On("WaitEvent", eventId, nextState)} -} - -func (_c *MockState_WaitEvent_Call) Run(run func(eventId string, nextState State)) *MockState_WaitEvent_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string), args[1].(State)) - }) - return _c -} - -func (_c *MockState_WaitEvent_Call) Return(_a0 State) *MockState_WaitEvent_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockState_WaitEvent_Call) RunAndReturn(run func(string, State) State) *MockState_WaitEvent_Call { - _c.Call.Return(run) - return _c -} - -// getCallTransition provides a mock function with given fields: -func (_m *MockState) getCallTransition() *CallTransition { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for getCallTransition") - } - - var r0 *CallTransition - if rf, ok := ret.Get(0).(func() *CallTransition); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*CallTransition) - } - } - - return r0 -} - -// MockState_getCallTransition_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'getCallTransition' -type MockState_getCallTransition_Call struct { - *mock.Call -} - -// getCallTransition is a helper method to define mock.On call -func (_e *MockState_Expecter) getCallTransition() *MockState_getCallTransition_Call { - return &MockState_getCallTransition_Call{Call: _e.mock.On("getCallTransition")} -} - -func (_c *MockState_getCallTransition_Call) Run(run func()) *MockState_getCallTransition_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockState_getCallTransition_Call) Return(_a0 *CallTransition) *MockState_getCallTransition_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockState_getCallTransition_Call) RunAndReturn(run func() *CallTransition) *MockState_getCallTransition_Call { - _c.Call.Return(run) - return _c -} - -// getClearEventTransitions provides a mock function with given fields: -func (_m *MockState) getClearEventTransitions() []EventTransition { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for getClearEventTransitions") - } - - var r0 []EventTransition - if rf, ok := ret.Get(0).(func() []EventTransition); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]EventTransition) - } - } - - return r0 -} - -// MockState_getClearEventTransitions_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'getClearEventTransitions' -type MockState_getClearEventTransitions_Call struct { - *mock.Call -} - -// getClearEventTransitions is a helper method to define mock.On call -func (_e *MockState_Expecter) getClearEventTransitions() *MockState_getClearEventTransitions_Call { - return &MockState_getClearEventTransitions_Call{Call: _e.mock.On("getClearEventTransitions")} -} - -func (_c *MockState_getClearEventTransitions_Call) Run(run func()) *MockState_getClearEventTransitions_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockState_getClearEventTransitions_Call) Return(_a0 []EventTransition) *MockState_getClearEventTransitions_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockState_getClearEventTransitions_Call) RunAndReturn(run func() []EventTransition) *MockState_getClearEventTransitions_Call { - _c.Call.Return(run) - return _c -} - -// getDocString provides a mock function with given fields: -func (_m *MockState) getDocString() string { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for getDocString") - } - - var r0 string - if rf, ok := ret.Get(0).(func() string); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(string) - } - - return r0 -} - -// MockState_getDocString_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'getDocString' -type MockState_getDocString_Call struct { - *mock.Call -} - -// getDocString is a helper method to define mock.On call -func (_e *MockState_Expecter) getDocString() *MockState_getDocString_Call { - return &MockState_getDocString_Call{Call: _e.mock.On("getDocString")} -} - -func (_c *MockState_getDocString_Call) Run(run func()) *MockState_getDocString_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockState_getDocString_Call) Return(_a0 string) *MockState_getDocString_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockState_getDocString_Call) RunAndReturn(run func() string) *MockState_getDocString_Call { - _c.Call.Return(run) - return _c -} - -// getInterceptor provides a mock function with given fields: -func (_m *MockState) getInterceptor() StateInterceptor { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for getInterceptor") - } - - var r0 StateInterceptor - if rf, ok := ret.Get(0).(func() StateInterceptor); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(StateInterceptor) - } - } - - return r0 -} - -// MockState_getInterceptor_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'getInterceptor' -type MockState_getInterceptor_Call struct { - *mock.Call -} - -// getInterceptor is a helper method to define mock.On call -func (_e *MockState_Expecter) getInterceptor() *MockState_getInterceptor_Call { - return &MockState_getInterceptor_Call{Call: _e.mock.On("getInterceptor")} -} - -func (_c *MockState_getInterceptor_Call) Run(run func()) *MockState_getInterceptor_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockState_getInterceptor_Call) Return(_a0 StateInterceptor) *MockState_getInterceptor_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockState_getInterceptor_Call) RunAndReturn(run func() StateInterceptor) *MockState_getInterceptor_Call { - _c.Call.Return(run) - return _c -} - -// getReceiveTransitions provides a mock function with given fields: -func (_m *MockState) getReceiveTransitions() []ReceiveTransition { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for getReceiveTransitions") - } - - var r0 []ReceiveTransition - if rf, ok := ret.Get(0).(func() []ReceiveTransition); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]ReceiveTransition) - } - } - - return r0 -} - -// MockState_getReceiveTransitions_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'getReceiveTransitions' -type MockState_getReceiveTransitions_Call struct { - *mock.Call -} - -// getReceiveTransitions is a helper method to define mock.On call -func (_e *MockState_Expecter) getReceiveTransitions() *MockState_getReceiveTransitions_Call { - return &MockState_getReceiveTransitions_Call{Call: _e.mock.On("getReceiveTransitions")} -} - -func (_c *MockState_getReceiveTransitions_Call) Run(run func()) *MockState_getReceiveTransitions_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockState_getReceiveTransitions_Call) Return(_a0 []ReceiveTransition) *MockState_getReceiveTransitions_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockState_getReceiveTransitions_Call) RunAndReturn(run func() []ReceiveTransition) *MockState_getReceiveTransitions_Call { - _c.Call.Return(run) - return _c -} - -// getSendTransitions provides a mock function with given fields: -func (_m *MockState) getSendTransitions() []SendTransition { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for getSendTransitions") - } - - var r0 []SendTransition - if rf, ok := ret.Get(0).(func() []SendTransition); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]SendTransition) - } - } - - return r0 -} - -// MockState_getSendTransitions_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'getSendTransitions' -type MockState_getSendTransitions_Call struct { - *mock.Call -} - -// getSendTransitions is a helper method to define mock.On call -func (_e *MockState_Expecter) getSendTransitions() *MockState_getSendTransitions_Call { - return &MockState_getSendTransitions_Call{Call: _e.mock.On("getSendTransitions")} -} - -func (_c *MockState_getSendTransitions_Call) Run(run func()) *MockState_getSendTransitions_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockState_getSendTransitions_Call) Return(_a0 []SendTransition) *MockState_getSendTransitions_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockState_getSendTransitions_Call) RunAndReturn(run func() []SendTransition) *MockState_getSendTransitions_Call { - _c.Call.Return(run) - return _c -} - -// getSetEventTransitions provides a mock function with given fields: -func (_m *MockState) getSetEventTransitions() []EventTransition { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for getSetEventTransitions") - } - - var r0 []EventTransition - if rf, ok := ret.Get(0).(func() []EventTransition); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]EventTransition) - } - } - - return r0 -} - -// MockState_getSetEventTransitions_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'getSetEventTransitions' -type MockState_getSetEventTransitions_Call struct { - *mock.Call -} - -// getSetEventTransitions is a helper method to define mock.On call -func (_e *MockState_Expecter) getSetEventTransitions() *MockState_getSetEventTransitions_Call { - return &MockState_getSetEventTransitions_Call{Call: _e.mock.On("getSetEventTransitions")} -} - -func (_c *MockState_getSetEventTransitions_Call) Run(run func()) *MockState_getSetEventTransitions_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockState_getSetEventTransitions_Call) Return(_a0 []EventTransition) *MockState_getSetEventTransitions_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockState_getSetEventTransitions_Call) RunAndReturn(run func() []EventTransition) *MockState_getSetEventTransitions_Call { - _c.Call.Return(run) - return _c -} - -// getStateMachine provides a mock function with given fields: -func (_m *MockState) getStateMachine() StateMachine { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for getStateMachine") - } - - var r0 StateMachine - if rf, ok := ret.Get(0).(func() StateMachine); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(StateMachine) - } - } - - return r0 -} - -// MockState_getStateMachine_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'getStateMachine' -type MockState_getStateMachine_Call struct { - *mock.Call -} - -// getStateMachine is a helper method to define mock.On call -func (_e *MockState_Expecter) getStateMachine() *MockState_getStateMachine_Call { - return &MockState_getStateMachine_Call{Call: _e.mock.On("getStateMachine")} -} - -func (_c *MockState_getStateMachine_Call) Run(run func()) *MockState_getStateMachine_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockState_getStateMachine_Call) Return(_a0 StateMachine) *MockState_getStateMachine_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockState_getStateMachine_Call) RunAndReturn(run func() StateMachine) *MockState_getStateMachine_Call { - _c.Call.Return(run) - return _c -} - -// getTimeoutTransition provides a mock function with given fields: -func (_m *MockState) getTimeoutTransition() *TimeoutTransition { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for getTimeoutTransition") - } - - var r0 *TimeoutTransition - if rf, ok := ret.Get(0).(func() *TimeoutTransition); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*TimeoutTransition) - } - } - - return r0 -} - -// MockState_getTimeoutTransition_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'getTimeoutTransition' -type MockState_getTimeoutTransition_Call struct { - *mock.Call -} - -// getTimeoutTransition is a helper method to define mock.On call -func (_e *MockState_Expecter) getTimeoutTransition() *MockState_getTimeoutTransition_Call { - return &MockState_getTimeoutTransition_Call{Call: _e.mock.On("getTimeoutTransition")} -} - -func (_c *MockState_getTimeoutTransition_Call) Run(run func()) *MockState_getTimeoutTransition_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockState_getTimeoutTransition_Call) Return(_a0 *TimeoutTransition) *MockState_getTimeoutTransition_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockState_getTimeoutTransition_Call) RunAndReturn(run func() *TimeoutTransition) *MockState_getTimeoutTransition_Call { - _c.Call.Return(run) - return _c -} - -// getWaitEventTransitions provides a mock function with given fields: -func (_m *MockState) getWaitEventTransitions() []EventTransition { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for getWaitEventTransitions") - } - - var r0 []EventTransition - if rf, ok := ret.Get(0).(func() []EventTransition); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]EventTransition) - } - } - - return r0 -} - -// MockState_getWaitEventTransitions_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'getWaitEventTransitions' -type MockState_getWaitEventTransitions_Call struct { - *mock.Call -} - -// getWaitEventTransitions is a helper method to define mock.On call -func (_e *MockState_Expecter) getWaitEventTransitions() *MockState_getWaitEventTransitions_Call { - return &MockState_getWaitEventTransitions_Call{Call: _e.mock.On("getWaitEventTransitions")} -} - -func (_c *MockState_getWaitEventTransitions_Call) Run(run func()) *MockState_getWaitEventTransitions_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockState_getWaitEventTransitions_Call) Return(_a0 []EventTransition) *MockState_getWaitEventTransitions_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockState_getWaitEventTransitions_Call) RunAndReturn(run func() []EventTransition) *MockState_getWaitEventTransitions_Call { - _c.Call.Return(run) - return _c -} - -// setStateMachine provides a mock function with given fields: _a0 -func (_m *MockState) setStateMachine(_a0 StateMachine) { - _m.Called(_a0) -} - -// MockState_setStateMachine_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'setStateMachine' -type MockState_setStateMachine_Call struct { - *mock.Call -} - -// setStateMachine is a helper method to define mock.On call -// - _a0 StateMachine -func (_e *MockState_Expecter) setStateMachine(_a0 interface{}) *MockState_setStateMachine_Call { - return &MockState_setStateMachine_Call{Call: _e.mock.On("setStateMachine", _a0)} -} - -func (_c *MockState_setStateMachine_Call) Run(run func(_a0 StateMachine)) *MockState_setStateMachine_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(StateMachine)) - }) - return _c -} - -func (_c *MockState_setStateMachine_Call) Return() *MockState_setStateMachine_Call { - _c.Call.Return() - return _c -} - -func (_c *MockState_setStateMachine_Call) RunAndReturn(run func(StateMachine)) *MockState_setStateMachine_Call { - _c.Call.Return(run) - return _c -} - -// NewMockState creates a new instance of MockState. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewMockState(t interface { - mock.TestingT - Cleanup(func()) -}) *MockState { - mock := &MockState{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/plc4go/internal/bacnetip/tests/mock_TrappedApplicationServiceElementRequirements_test.go b/plc4go/internal/bacnetip/tests/mock_TrappedApplicationServiceElementRequirements_test.go deleted file mode 100644 index f57ee337f6a..00000000000 --- a/plc4go/internal/bacnetip/tests/mock_TrappedApplicationServiceElementRequirements_test.go +++ /dev/null @@ -1,242 +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 - * - * https://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. - */ - -// Code generated by mockery v2.42.2. DO NOT EDIT. - -package tests - -import ( - bacnetip "github.com/apache/plc4x/plc4go/internal/bacnetip" - mock "github.com/stretchr/testify/mock" -) - -// MockTrappedApplicationServiceElementRequirements is an autogenerated mock type for the TrappedApplicationServiceElementRequirements type -type MockTrappedApplicationServiceElementRequirements struct { - mock.Mock -} - -type MockTrappedApplicationServiceElementRequirements_Expecter struct { - mock *mock.Mock -} - -func (_m *MockTrappedApplicationServiceElementRequirements) EXPECT() *MockTrappedApplicationServiceElementRequirements_Expecter { - return &MockTrappedApplicationServiceElementRequirements_Expecter{mock: &_m.Mock} -} - -// Confirmation provides a mock function with given fields: args, kwargs -func (_m *MockTrappedApplicationServiceElementRequirements) Confirmation(args bacnetip.Args, kwargs bacnetip.KWArgs) error { - ret := _m.Called(args, kwargs) - - if len(ret) == 0 { - panic("no return value specified for Confirmation") - } - - var r0 error - if rf, ok := ret.Get(0).(func(bacnetip.Args, bacnetip.KWArgs) error); ok { - r0 = rf(args, kwargs) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockTrappedApplicationServiceElementRequirements_Confirmation_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Confirmation' -type MockTrappedApplicationServiceElementRequirements_Confirmation_Call struct { - *mock.Call -} - -// Confirmation is a helper method to define mock.On call -// - args bacnetip.Args -// - kwargs bacnetip.KWArgs -func (_e *MockTrappedApplicationServiceElementRequirements_Expecter) Confirmation(args interface{}, kwargs interface{}) *MockTrappedApplicationServiceElementRequirements_Confirmation_Call { - return &MockTrappedApplicationServiceElementRequirements_Confirmation_Call{Call: _e.mock.On("Confirmation", args, kwargs)} -} - -func (_c *MockTrappedApplicationServiceElementRequirements_Confirmation_Call) Run(run func(args bacnetip.Args, kwargs bacnetip.KWArgs)) *MockTrappedApplicationServiceElementRequirements_Confirmation_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(bacnetip.Args), args[1].(bacnetip.KWArgs)) - }) - return _c -} - -func (_c *MockTrappedApplicationServiceElementRequirements_Confirmation_Call) Return(_a0 error) *MockTrappedApplicationServiceElementRequirements_Confirmation_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockTrappedApplicationServiceElementRequirements_Confirmation_Call) RunAndReturn(run func(bacnetip.Args, bacnetip.KWArgs) error) *MockTrappedApplicationServiceElementRequirements_Confirmation_Call { - _c.Call.Return(run) - return _c -} - -// Indication provides a mock function with given fields: args, kwargs -func (_m *MockTrappedApplicationServiceElementRequirements) Indication(args bacnetip.Args, kwargs bacnetip.KWArgs) error { - ret := _m.Called(args, kwargs) - - if len(ret) == 0 { - panic("no return value specified for Indication") - } - - var r0 error - if rf, ok := ret.Get(0).(func(bacnetip.Args, bacnetip.KWArgs) error); ok { - r0 = rf(args, kwargs) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockTrappedApplicationServiceElementRequirements_Indication_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Indication' -type MockTrappedApplicationServiceElementRequirements_Indication_Call struct { - *mock.Call -} - -// Indication is a helper method to define mock.On call -// - args bacnetip.Args -// - kwargs bacnetip.KWArgs -func (_e *MockTrappedApplicationServiceElementRequirements_Expecter) Indication(args interface{}, kwargs interface{}) *MockTrappedApplicationServiceElementRequirements_Indication_Call { - return &MockTrappedApplicationServiceElementRequirements_Indication_Call{Call: _e.mock.On("Indication", args, kwargs)} -} - -func (_c *MockTrappedApplicationServiceElementRequirements_Indication_Call) Run(run func(args bacnetip.Args, kwargs bacnetip.KWArgs)) *MockTrappedApplicationServiceElementRequirements_Indication_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(bacnetip.Args), args[1].(bacnetip.KWArgs)) - }) - return _c -} - -func (_c *MockTrappedApplicationServiceElementRequirements_Indication_Call) Return(_a0 error) *MockTrappedApplicationServiceElementRequirements_Indication_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockTrappedApplicationServiceElementRequirements_Indication_Call) RunAndReturn(run func(bacnetip.Args, bacnetip.KWArgs) error) *MockTrappedApplicationServiceElementRequirements_Indication_Call { - _c.Call.Return(run) - return _c -} - -// Request provides a mock function with given fields: args, kwargs -func (_m *MockTrappedApplicationServiceElementRequirements) Request(args bacnetip.Args, kwargs bacnetip.KWArgs) error { - ret := _m.Called(args, kwargs) - - if len(ret) == 0 { - panic("no return value specified for Request") - } - - var r0 error - if rf, ok := ret.Get(0).(func(bacnetip.Args, bacnetip.KWArgs) error); ok { - r0 = rf(args, kwargs) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockTrappedApplicationServiceElementRequirements_Request_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Request' -type MockTrappedApplicationServiceElementRequirements_Request_Call struct { - *mock.Call -} - -// Request is a helper method to define mock.On call -// - args bacnetip.Args -// - kwargs bacnetip.KWArgs -func (_e *MockTrappedApplicationServiceElementRequirements_Expecter) Request(args interface{}, kwargs interface{}) *MockTrappedApplicationServiceElementRequirements_Request_Call { - return &MockTrappedApplicationServiceElementRequirements_Request_Call{Call: _e.mock.On("Request", args, kwargs)} -} - -func (_c *MockTrappedApplicationServiceElementRequirements_Request_Call) Run(run func(args bacnetip.Args, kwargs bacnetip.KWArgs)) *MockTrappedApplicationServiceElementRequirements_Request_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(bacnetip.Args), args[1].(bacnetip.KWArgs)) - }) - return _c -} - -func (_c *MockTrappedApplicationServiceElementRequirements_Request_Call) Return(_a0 error) *MockTrappedApplicationServiceElementRequirements_Request_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockTrappedApplicationServiceElementRequirements_Request_Call) RunAndReturn(run func(bacnetip.Args, bacnetip.KWArgs) error) *MockTrappedApplicationServiceElementRequirements_Request_Call { - _c.Call.Return(run) - return _c -} - -// Response provides a mock function with given fields: args, kwargs -func (_m *MockTrappedApplicationServiceElementRequirements) Response(args bacnetip.Args, kwargs bacnetip.KWArgs) error { - ret := _m.Called(args, kwargs) - - if len(ret) == 0 { - panic("no return value specified for Response") - } - - var r0 error - if rf, ok := ret.Get(0).(func(bacnetip.Args, bacnetip.KWArgs) error); ok { - r0 = rf(args, kwargs) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockTrappedApplicationServiceElementRequirements_Response_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Response' -type MockTrappedApplicationServiceElementRequirements_Response_Call struct { - *mock.Call -} - -// Response is a helper method to define mock.On call -// - args bacnetip.Args -// - kwargs bacnetip.KWArgs -func (_e *MockTrappedApplicationServiceElementRequirements_Expecter) Response(args interface{}, kwargs interface{}) *MockTrappedApplicationServiceElementRequirements_Response_Call { - return &MockTrappedApplicationServiceElementRequirements_Response_Call{Call: _e.mock.On("Response", args, kwargs)} -} - -func (_c *MockTrappedApplicationServiceElementRequirements_Response_Call) Run(run func(args bacnetip.Args, kwargs bacnetip.KWArgs)) *MockTrappedApplicationServiceElementRequirements_Response_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(bacnetip.Args), args[1].(bacnetip.KWArgs)) - }) - return _c -} - -func (_c *MockTrappedApplicationServiceElementRequirements_Response_Call) Return(_a0 error) *MockTrappedApplicationServiceElementRequirements_Response_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockTrappedApplicationServiceElementRequirements_Response_Call) RunAndReturn(run func(bacnetip.Args, bacnetip.KWArgs) error) *MockTrappedApplicationServiceElementRequirements_Response_Call { - _c.Call.Return(run) - return _c -} - -// NewMockTrappedApplicationServiceElementRequirements creates a new instance of MockTrappedApplicationServiceElementRequirements. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewMockTrappedApplicationServiceElementRequirements(t interface { - mock.TestingT - Cleanup(func()) -}) *MockTrappedApplicationServiceElementRequirements { - mock := &MockTrappedApplicationServiceElementRequirements{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/plc4go/internal/bacnetip/tests/mock_TrappedClientContract_test.go b/plc4go/internal/bacnetip/tests/mock_TrappedClientContract_test.go deleted file mode 100644 index 53eafb3f89d..00000000000 --- a/plc4go/internal/bacnetip/tests/mock_TrappedClientContract_test.go +++ /dev/null @@ -1,148 +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 - * - * https://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. - */ - -// Code generated by mockery v2.42.2. DO NOT EDIT. - -package tests - -import ( - bacnetip "github.com/apache/plc4x/plc4go/internal/bacnetip" - mock "github.com/stretchr/testify/mock" -) - -// MockTrappedClientContract is an autogenerated mock type for the TrappedClientContract type -type MockTrappedClientContract struct { - mock.Mock -} - -type MockTrappedClientContract_Expecter struct { - mock *mock.Mock -} - -func (_m *MockTrappedClientContract) EXPECT() *MockTrappedClientContract_Expecter { - return &MockTrappedClientContract_Expecter{mock: &_m.Mock} -} - -// Confirmation provides a mock function with given fields: args, kwargs -func (_m *MockTrappedClientContract) Confirmation(args bacnetip.Args, kwargs bacnetip.KWArgs) error { - ret := _m.Called(args, kwargs) - - if len(ret) == 0 { - panic("no return value specified for Confirmation") - } - - var r0 error - if rf, ok := ret.Get(0).(func(bacnetip.Args, bacnetip.KWArgs) error); ok { - r0 = rf(args, kwargs) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockTrappedClientContract_Confirmation_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Confirmation' -type MockTrappedClientContract_Confirmation_Call struct { - *mock.Call -} - -// Confirmation is a helper method to define mock.On call -// - args bacnetip.Args -// - kwargs bacnetip.KWArgs -func (_e *MockTrappedClientContract_Expecter) Confirmation(args interface{}, kwargs interface{}) *MockTrappedClientContract_Confirmation_Call { - return &MockTrappedClientContract_Confirmation_Call{Call: _e.mock.On("Confirmation", args, kwargs)} -} - -func (_c *MockTrappedClientContract_Confirmation_Call) Run(run func(args bacnetip.Args, kwargs bacnetip.KWArgs)) *MockTrappedClientContract_Confirmation_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(bacnetip.Args), args[1].(bacnetip.KWArgs)) - }) - return _c -} - -func (_c *MockTrappedClientContract_Confirmation_Call) Return(_a0 error) *MockTrappedClientContract_Confirmation_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockTrappedClientContract_Confirmation_Call) RunAndReturn(run func(bacnetip.Args, bacnetip.KWArgs) error) *MockTrappedClientContract_Confirmation_Call { - _c.Call.Return(run) - return _c -} - -// Request provides a mock function with given fields: _a0, _a1 -func (_m *MockTrappedClientContract) Request(_a0 bacnetip.Args, _a1 bacnetip.KWArgs) error { - ret := _m.Called(_a0, _a1) - - if len(ret) == 0 { - panic("no return value specified for Request") - } - - var r0 error - if rf, ok := ret.Get(0).(func(bacnetip.Args, bacnetip.KWArgs) error); ok { - r0 = rf(_a0, _a1) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockTrappedClientContract_Request_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Request' -type MockTrappedClientContract_Request_Call struct { - *mock.Call -} - -// Request is a helper method to define mock.On call -// - _a0 bacnetip.Args -// - _a1 bacnetip.KWArgs -func (_e *MockTrappedClientContract_Expecter) Request(_a0 interface{}, _a1 interface{}) *MockTrappedClientContract_Request_Call { - return &MockTrappedClientContract_Request_Call{Call: _e.mock.On("Request", _a0, _a1)} -} - -func (_c *MockTrappedClientContract_Request_Call) Run(run func(_a0 bacnetip.Args, _a1 bacnetip.KWArgs)) *MockTrappedClientContract_Request_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(bacnetip.Args), args[1].(bacnetip.KWArgs)) - }) - return _c -} - -func (_c *MockTrappedClientContract_Request_Call) Return(_a0 error) *MockTrappedClientContract_Request_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockTrappedClientContract_Request_Call) RunAndReturn(run func(bacnetip.Args, bacnetip.KWArgs) error) *MockTrappedClientContract_Request_Call { - _c.Call.Return(run) - return _c -} - -// NewMockTrappedClientContract creates a new instance of MockTrappedClientContract. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewMockTrappedClientContract(t interface { - mock.TestingT - Cleanup(func()) -}) *MockTrappedClientContract { - mock := &MockTrappedClientContract{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/plc4go/internal/bacnetip/tests/mock_TrappedServerContract_test.go b/plc4go/internal/bacnetip/tests/mock_TrappedServerContract_test.go deleted file mode 100644 index f0f919a20ad..00000000000 --- a/plc4go/internal/bacnetip/tests/mock_TrappedServerContract_test.go +++ /dev/null @@ -1,148 +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 - * - * https://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. - */ - -// Code generated by mockery v2.42.2. DO NOT EDIT. - -package tests - -import ( - bacnetip "github.com/apache/plc4x/plc4go/internal/bacnetip" - mock "github.com/stretchr/testify/mock" -) - -// MockTrappedServerContract is an autogenerated mock type for the TrappedServerContract type -type MockTrappedServerContract struct { - mock.Mock -} - -type MockTrappedServerContract_Expecter struct { - mock *mock.Mock -} - -func (_m *MockTrappedServerContract) EXPECT() *MockTrappedServerContract_Expecter { - return &MockTrappedServerContract_Expecter{mock: &_m.Mock} -} - -// Indication provides a mock function with given fields: args, kwargs -func (_m *MockTrappedServerContract) Indication(args bacnetip.Args, kwargs bacnetip.KWArgs) error { - ret := _m.Called(args, kwargs) - - if len(ret) == 0 { - panic("no return value specified for Indication") - } - - var r0 error - if rf, ok := ret.Get(0).(func(bacnetip.Args, bacnetip.KWArgs) error); ok { - r0 = rf(args, kwargs) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockTrappedServerContract_Indication_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Indication' -type MockTrappedServerContract_Indication_Call struct { - *mock.Call -} - -// Indication is a helper method to define mock.On call -// - args bacnetip.Args -// - kwargs bacnetip.KWArgs -func (_e *MockTrappedServerContract_Expecter) Indication(args interface{}, kwargs interface{}) *MockTrappedServerContract_Indication_Call { - return &MockTrappedServerContract_Indication_Call{Call: _e.mock.On("Indication", args, kwargs)} -} - -func (_c *MockTrappedServerContract_Indication_Call) Run(run func(args bacnetip.Args, kwargs bacnetip.KWArgs)) *MockTrappedServerContract_Indication_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(bacnetip.Args), args[1].(bacnetip.KWArgs)) - }) - return _c -} - -func (_c *MockTrappedServerContract_Indication_Call) Return(_a0 error) *MockTrappedServerContract_Indication_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockTrappedServerContract_Indication_Call) RunAndReturn(run func(bacnetip.Args, bacnetip.KWArgs) error) *MockTrappedServerContract_Indication_Call { - _c.Call.Return(run) - return _c -} - -// Response provides a mock function with given fields: _a0, _a1 -func (_m *MockTrappedServerContract) Response(_a0 bacnetip.Args, _a1 bacnetip.KWArgs) error { - ret := _m.Called(_a0, _a1) - - if len(ret) == 0 { - panic("no return value specified for Response") - } - - var r0 error - if rf, ok := ret.Get(0).(func(bacnetip.Args, bacnetip.KWArgs) error); ok { - r0 = rf(_a0, _a1) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockTrappedServerContract_Response_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Response' -type MockTrappedServerContract_Response_Call struct { - *mock.Call -} - -// Response is a helper method to define mock.On call -// - _a0 bacnetip.Args -// - _a1 bacnetip.KWArgs -func (_e *MockTrappedServerContract_Expecter) Response(_a0 interface{}, _a1 interface{}) *MockTrappedServerContract_Response_Call { - return &MockTrappedServerContract_Response_Call{Call: _e.mock.On("Response", _a0, _a1)} -} - -func (_c *MockTrappedServerContract_Response_Call) Run(run func(_a0 bacnetip.Args, _a1 bacnetip.KWArgs)) *MockTrappedServerContract_Response_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(bacnetip.Args), args[1].(bacnetip.KWArgs)) - }) - return _c -} - -func (_c *MockTrappedServerContract_Response_Call) Return(_a0 error) *MockTrappedServerContract_Response_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockTrappedServerContract_Response_Call) RunAndReturn(run func(bacnetip.Args, bacnetip.KWArgs) error) *MockTrappedServerContract_Response_Call { - _c.Call.Return(run) - return _c -} - -// NewMockTrappedServerContract creates a new instance of MockTrappedServerContract. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewMockTrappedServerContract(t interface { - mock.TestingT - Cleanup(func()) -}) *MockTrappedServerContract { - mock := &MockTrappedServerContract{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/plc4go/internal/bacnetip/tests/mock_TrappedServiceAccessPointRequirements_test.go b/plc4go/internal/bacnetip/tests/mock_TrappedServiceAccessPointRequirements_test.go deleted file mode 100644 index 5d6155adaad..00000000000 --- a/plc4go/internal/bacnetip/tests/mock_TrappedServiceAccessPointRequirements_test.go +++ /dev/null @@ -1,242 +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 - * - * https://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. - */ - -// Code generated by mockery v2.42.2. DO NOT EDIT. - -package tests - -import ( - bacnetip "github.com/apache/plc4x/plc4go/internal/bacnetip" - mock "github.com/stretchr/testify/mock" -) - -// MockTrappedServiceAccessPointRequirements is an autogenerated mock type for the TrappedServiceAccessPointRequirements type -type MockTrappedServiceAccessPointRequirements struct { - mock.Mock -} - -type MockTrappedServiceAccessPointRequirements_Expecter struct { - mock *mock.Mock -} - -func (_m *MockTrappedServiceAccessPointRequirements) EXPECT() *MockTrappedServiceAccessPointRequirements_Expecter { - return &MockTrappedServiceAccessPointRequirements_Expecter{mock: &_m.Mock} -} - -// SapConfirmation provides a mock function with given fields: args, kwargs -func (_m *MockTrappedServiceAccessPointRequirements) SapConfirmation(args bacnetip.Args, kwargs bacnetip.KWArgs) error { - ret := _m.Called(args, kwargs) - - if len(ret) == 0 { - panic("no return value specified for SapConfirmation") - } - - var r0 error - if rf, ok := ret.Get(0).(func(bacnetip.Args, bacnetip.KWArgs) error); ok { - r0 = rf(args, kwargs) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockTrappedServiceAccessPointRequirements_SapConfirmation_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SapConfirmation' -type MockTrappedServiceAccessPointRequirements_SapConfirmation_Call struct { - *mock.Call -} - -// SapConfirmation is a helper method to define mock.On call -// - args bacnetip.Args -// - kwargs bacnetip.KWArgs -func (_e *MockTrappedServiceAccessPointRequirements_Expecter) SapConfirmation(args interface{}, kwargs interface{}) *MockTrappedServiceAccessPointRequirements_SapConfirmation_Call { - return &MockTrappedServiceAccessPointRequirements_SapConfirmation_Call{Call: _e.mock.On("SapConfirmation", args, kwargs)} -} - -func (_c *MockTrappedServiceAccessPointRequirements_SapConfirmation_Call) Run(run func(args bacnetip.Args, kwargs bacnetip.KWArgs)) *MockTrappedServiceAccessPointRequirements_SapConfirmation_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(bacnetip.Args), args[1].(bacnetip.KWArgs)) - }) - return _c -} - -func (_c *MockTrappedServiceAccessPointRequirements_SapConfirmation_Call) Return(_a0 error) *MockTrappedServiceAccessPointRequirements_SapConfirmation_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockTrappedServiceAccessPointRequirements_SapConfirmation_Call) RunAndReturn(run func(bacnetip.Args, bacnetip.KWArgs) error) *MockTrappedServiceAccessPointRequirements_SapConfirmation_Call { - _c.Call.Return(run) - return _c -} - -// SapIndication provides a mock function with given fields: args, kwargs -func (_m *MockTrappedServiceAccessPointRequirements) SapIndication(args bacnetip.Args, kwargs bacnetip.KWArgs) error { - ret := _m.Called(args, kwargs) - - if len(ret) == 0 { - panic("no return value specified for SapIndication") - } - - var r0 error - if rf, ok := ret.Get(0).(func(bacnetip.Args, bacnetip.KWArgs) error); ok { - r0 = rf(args, kwargs) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockTrappedServiceAccessPointRequirements_SapIndication_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SapIndication' -type MockTrappedServiceAccessPointRequirements_SapIndication_Call struct { - *mock.Call -} - -// SapIndication is a helper method to define mock.On call -// - args bacnetip.Args -// - kwargs bacnetip.KWArgs -func (_e *MockTrappedServiceAccessPointRequirements_Expecter) SapIndication(args interface{}, kwargs interface{}) *MockTrappedServiceAccessPointRequirements_SapIndication_Call { - return &MockTrappedServiceAccessPointRequirements_SapIndication_Call{Call: _e.mock.On("SapIndication", args, kwargs)} -} - -func (_c *MockTrappedServiceAccessPointRequirements_SapIndication_Call) Run(run func(args bacnetip.Args, kwargs bacnetip.KWArgs)) *MockTrappedServiceAccessPointRequirements_SapIndication_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(bacnetip.Args), args[1].(bacnetip.KWArgs)) - }) - return _c -} - -func (_c *MockTrappedServiceAccessPointRequirements_SapIndication_Call) Return(_a0 error) *MockTrappedServiceAccessPointRequirements_SapIndication_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockTrappedServiceAccessPointRequirements_SapIndication_Call) RunAndReturn(run func(bacnetip.Args, bacnetip.KWArgs) error) *MockTrappedServiceAccessPointRequirements_SapIndication_Call { - _c.Call.Return(run) - return _c -} - -// SapRequest provides a mock function with given fields: args, kwargs -func (_m *MockTrappedServiceAccessPointRequirements) SapRequest(args bacnetip.Args, kwargs bacnetip.KWArgs) error { - ret := _m.Called(args, kwargs) - - if len(ret) == 0 { - panic("no return value specified for SapRequest") - } - - var r0 error - if rf, ok := ret.Get(0).(func(bacnetip.Args, bacnetip.KWArgs) error); ok { - r0 = rf(args, kwargs) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockTrappedServiceAccessPointRequirements_SapRequest_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SapRequest' -type MockTrappedServiceAccessPointRequirements_SapRequest_Call struct { - *mock.Call -} - -// SapRequest is a helper method to define mock.On call -// - args bacnetip.Args -// - kwargs bacnetip.KWArgs -func (_e *MockTrappedServiceAccessPointRequirements_Expecter) SapRequest(args interface{}, kwargs interface{}) *MockTrappedServiceAccessPointRequirements_SapRequest_Call { - return &MockTrappedServiceAccessPointRequirements_SapRequest_Call{Call: _e.mock.On("SapRequest", args, kwargs)} -} - -func (_c *MockTrappedServiceAccessPointRequirements_SapRequest_Call) Run(run func(args bacnetip.Args, kwargs bacnetip.KWArgs)) *MockTrappedServiceAccessPointRequirements_SapRequest_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(bacnetip.Args), args[1].(bacnetip.KWArgs)) - }) - return _c -} - -func (_c *MockTrappedServiceAccessPointRequirements_SapRequest_Call) Return(_a0 error) *MockTrappedServiceAccessPointRequirements_SapRequest_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockTrappedServiceAccessPointRequirements_SapRequest_Call) RunAndReturn(run func(bacnetip.Args, bacnetip.KWArgs) error) *MockTrappedServiceAccessPointRequirements_SapRequest_Call { - _c.Call.Return(run) - return _c -} - -// SapResponse provides a mock function with given fields: args, kwargs -func (_m *MockTrappedServiceAccessPointRequirements) SapResponse(args bacnetip.Args, kwargs bacnetip.KWArgs) error { - ret := _m.Called(args, kwargs) - - if len(ret) == 0 { - panic("no return value specified for SapResponse") - } - - var r0 error - if rf, ok := ret.Get(0).(func(bacnetip.Args, bacnetip.KWArgs) error); ok { - r0 = rf(args, kwargs) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockTrappedServiceAccessPointRequirements_SapResponse_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SapResponse' -type MockTrappedServiceAccessPointRequirements_SapResponse_Call struct { - *mock.Call -} - -// SapResponse is a helper method to define mock.On call -// - args bacnetip.Args -// - kwargs bacnetip.KWArgs -func (_e *MockTrappedServiceAccessPointRequirements_Expecter) SapResponse(args interface{}, kwargs interface{}) *MockTrappedServiceAccessPointRequirements_SapResponse_Call { - return &MockTrappedServiceAccessPointRequirements_SapResponse_Call{Call: _e.mock.On("SapResponse", args, kwargs)} -} - -func (_c *MockTrappedServiceAccessPointRequirements_SapResponse_Call) Run(run func(args bacnetip.Args, kwargs bacnetip.KWArgs)) *MockTrappedServiceAccessPointRequirements_SapResponse_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(bacnetip.Args), args[1].(bacnetip.KWArgs)) - }) - return _c -} - -func (_c *MockTrappedServiceAccessPointRequirements_SapResponse_Call) Return(_a0 error) *MockTrappedServiceAccessPointRequirements_SapResponse_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockTrappedServiceAccessPointRequirements_SapResponse_Call) RunAndReturn(run func(bacnetip.Args, bacnetip.KWArgs) error) *MockTrappedServiceAccessPointRequirements_SapResponse_Call { - _c.Call.Return(run) - return _c -} - -// NewMockTrappedServiceAccessPointRequirements creates a new instance of MockTrappedServiceAccessPointRequirements. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewMockTrappedServiceAccessPointRequirements(t interface { - mock.TestingT - Cleanup(func()) -}) *MockTrappedServiceAccessPointRequirements { - mock := &MockTrappedServiceAccessPointRequirements{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/plc4go/internal/bacnetip/tests/mock_TrapperRequirements_test.go b/plc4go/internal/bacnetip/tests/mock_TrapperRequirements_test.go deleted file mode 100644 index 5ac2904cbfc..00000000000 --- a/plc4go/internal/bacnetip/tests/mock_TrapperRequirements_test.go +++ /dev/null @@ -1,219 +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 - * - * https://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. - */ - -// Code generated by mockery v2.42.2. DO NOT EDIT. - -package tests - -import ( - bacnetip "github.com/apache/plc4x/plc4go/internal/bacnetip" - mock "github.com/stretchr/testify/mock" -) - -// MockTrapperRequirements is an autogenerated mock type for the TrapperRequirements type -type MockTrapperRequirements struct { - mock.Mock -} - -type MockTrapperRequirements_Expecter struct { - mock *mock.Mock -} - -func (_m *MockTrapperRequirements) EXPECT() *MockTrapperRequirements_Expecter { - return &MockTrapperRequirements_Expecter{mock: &_m.Mock} -} - -// AfterReceive provides a mock function with given fields: pdu -func (_m *MockTrapperRequirements) AfterReceive(pdu bacnetip.PDU) { - _m.Called(pdu) -} - -// MockTrapperRequirements_AfterReceive_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AfterReceive' -type MockTrapperRequirements_AfterReceive_Call struct { - *mock.Call -} - -// AfterReceive is a helper method to define mock.On call -// - pdu bacnetip.PDU -func (_e *MockTrapperRequirements_Expecter) AfterReceive(pdu interface{}) *MockTrapperRequirements_AfterReceive_Call { - return &MockTrapperRequirements_AfterReceive_Call{Call: _e.mock.On("AfterReceive", pdu)} -} - -func (_c *MockTrapperRequirements_AfterReceive_Call) Run(run func(pdu bacnetip.PDU)) *MockTrapperRequirements_AfterReceive_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(bacnetip.PDU)) - }) - return _c -} - -func (_c *MockTrapperRequirements_AfterReceive_Call) Return() *MockTrapperRequirements_AfterReceive_Call { - _c.Call.Return() - return _c -} - -func (_c *MockTrapperRequirements_AfterReceive_Call) RunAndReturn(run func(bacnetip.PDU)) *MockTrapperRequirements_AfterReceive_Call { - _c.Call.Return(run) - return _c -} - -// AfterSend provides a mock function with given fields: pdu -func (_m *MockTrapperRequirements) AfterSend(pdu bacnetip.PDU) { - _m.Called(pdu) -} - -// MockTrapperRequirements_AfterSend_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AfterSend' -type MockTrapperRequirements_AfterSend_Call struct { - *mock.Call -} - -// AfterSend is a helper method to define mock.On call -// - pdu bacnetip.PDU -func (_e *MockTrapperRequirements_Expecter) AfterSend(pdu interface{}) *MockTrapperRequirements_AfterSend_Call { - return &MockTrapperRequirements_AfterSend_Call{Call: _e.mock.On("AfterSend", pdu)} -} - -func (_c *MockTrapperRequirements_AfterSend_Call) Run(run func(pdu bacnetip.PDU)) *MockTrapperRequirements_AfterSend_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(bacnetip.PDU)) - }) - return _c -} - -func (_c *MockTrapperRequirements_AfterSend_Call) Return() *MockTrapperRequirements_AfterSend_Call { - _c.Call.Return() - return _c -} - -func (_c *MockTrapperRequirements_AfterSend_Call) RunAndReturn(run func(bacnetip.PDU)) *MockTrapperRequirements_AfterSend_Call { - _c.Call.Return(run) - return _c -} - -// BeforeReceive provides a mock function with given fields: pdu -func (_m *MockTrapperRequirements) BeforeReceive(pdu bacnetip.PDU) { - _m.Called(pdu) -} - -// MockTrapperRequirements_BeforeReceive_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BeforeReceive' -type MockTrapperRequirements_BeforeReceive_Call struct { - *mock.Call -} - -// BeforeReceive is a helper method to define mock.On call -// - pdu bacnetip.PDU -func (_e *MockTrapperRequirements_Expecter) BeforeReceive(pdu interface{}) *MockTrapperRequirements_BeforeReceive_Call { - return &MockTrapperRequirements_BeforeReceive_Call{Call: _e.mock.On("BeforeReceive", pdu)} -} - -func (_c *MockTrapperRequirements_BeforeReceive_Call) Run(run func(pdu bacnetip.PDU)) *MockTrapperRequirements_BeforeReceive_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(bacnetip.PDU)) - }) - return _c -} - -func (_c *MockTrapperRequirements_BeforeReceive_Call) Return() *MockTrapperRequirements_BeforeReceive_Call { - _c.Call.Return() - return _c -} - -func (_c *MockTrapperRequirements_BeforeReceive_Call) RunAndReturn(run func(bacnetip.PDU)) *MockTrapperRequirements_BeforeReceive_Call { - _c.Call.Return(run) - return _c -} - -// BeforeSend provides a mock function with given fields: pdu -func (_m *MockTrapperRequirements) BeforeSend(pdu bacnetip.PDU) { - _m.Called(pdu) -} - -// MockTrapperRequirements_BeforeSend_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BeforeSend' -type MockTrapperRequirements_BeforeSend_Call struct { - *mock.Call -} - -// BeforeSend is a helper method to define mock.On call -// - pdu bacnetip.PDU -func (_e *MockTrapperRequirements_Expecter) BeforeSend(pdu interface{}) *MockTrapperRequirements_BeforeSend_Call { - return &MockTrapperRequirements_BeforeSend_Call{Call: _e.mock.On("BeforeSend", pdu)} -} - -func (_c *MockTrapperRequirements_BeforeSend_Call) Run(run func(pdu bacnetip.PDU)) *MockTrapperRequirements_BeforeSend_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(bacnetip.PDU)) - }) - return _c -} - -func (_c *MockTrapperRequirements_BeforeSend_Call) Return() *MockTrapperRequirements_BeforeSend_Call { - _c.Call.Return() - return _c -} - -func (_c *MockTrapperRequirements_BeforeSend_Call) RunAndReturn(run func(bacnetip.PDU)) *MockTrapperRequirements_BeforeSend_Call { - _c.Call.Return(run) - return _c -} - -// UnexpectedReceive provides a mock function with given fields: pdu -func (_m *MockTrapperRequirements) UnexpectedReceive(pdu bacnetip.PDU) { - _m.Called(pdu) -} - -// MockTrapperRequirements_UnexpectedReceive_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UnexpectedReceive' -type MockTrapperRequirements_UnexpectedReceive_Call struct { - *mock.Call -} - -// UnexpectedReceive is a helper method to define mock.On call -// - pdu bacnetip.PDU -func (_e *MockTrapperRequirements_Expecter) UnexpectedReceive(pdu interface{}) *MockTrapperRequirements_UnexpectedReceive_Call { - return &MockTrapperRequirements_UnexpectedReceive_Call{Call: _e.mock.On("UnexpectedReceive", pdu)} -} - -func (_c *MockTrapperRequirements_UnexpectedReceive_Call) Run(run func(pdu bacnetip.PDU)) *MockTrapperRequirements_UnexpectedReceive_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(bacnetip.PDU)) - }) - return _c -} - -func (_c *MockTrapperRequirements_UnexpectedReceive_Call) Return() *MockTrapperRequirements_UnexpectedReceive_Call { - _c.Call.Return() - return _c -} - -func (_c *MockTrapperRequirements_UnexpectedReceive_Call) RunAndReturn(run func(bacnetip.PDU)) *MockTrapperRequirements_UnexpectedReceive_Call { - _c.Call.Return(run) - return _c -} - -// NewMockTrapperRequirements creates a new instance of MockTrapperRequirements. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewMockTrapperRequirements(t interface { - mock.TestingT - Cleanup(func()) -}) *MockTrapperRequirements { - mock := &MockTrapperRequirements{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/plc4go/internal/bacnetip/tests/test_constructed_data/mock_SequenceEqualityRequirements_test.go b/plc4go/internal/bacnetip/tests/test_constructed_data/mock_SequenceEqualityRequirements_test.go deleted file mode 100644 index 1d9a949b65d..00000000000 --- a/plc4go/internal/bacnetip/tests/test_constructed_data/mock_SequenceEqualityRequirements_test.go +++ /dev/null @@ -1,101 +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 - * - * https://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. - */ - -// Code generated by mockery v2.42.2. DO NOT EDIT. - -package test_constructed_data - -import ( - bacnetip "github.com/apache/plc4x/plc4go/internal/bacnetip" - mock "github.com/stretchr/testify/mock" -) - -// MockSequenceEqualityRequirements is an autogenerated mock type for the SequenceEqualityRequirements type -type MockSequenceEqualityRequirements struct { - mock.Mock -} - -type MockSequenceEqualityRequirements_Expecter struct { - mock *mock.Mock -} - -func (_m *MockSequenceEqualityRequirements) EXPECT() *MockSequenceEqualityRequirements_Expecter { - return &MockSequenceEqualityRequirements_Expecter{mock: &_m.Mock} -} - -// GetSequenceElements provides a mock function with given fields: -func (_m *MockSequenceEqualityRequirements) GetSequenceElements() []bacnetip.Element { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetSequenceElements") - } - - var r0 []bacnetip.Element - if rf, ok := ret.Get(0).(func() []bacnetip.Element); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]bacnetip.Element) - } - } - - return r0 -} - -// MockSequenceEqualityRequirements_GetSequenceElements_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetSequenceElements' -type MockSequenceEqualityRequirements_GetSequenceElements_Call struct { - *mock.Call -} - -// GetSequenceElements is a helper method to define mock.On call -func (_e *MockSequenceEqualityRequirements_Expecter) GetSequenceElements() *MockSequenceEqualityRequirements_GetSequenceElements_Call { - return &MockSequenceEqualityRequirements_GetSequenceElements_Call{Call: _e.mock.On("GetSequenceElements")} -} - -func (_c *MockSequenceEqualityRequirements_GetSequenceElements_Call) Run(run func()) *MockSequenceEqualityRequirements_GetSequenceElements_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockSequenceEqualityRequirements_GetSequenceElements_Call) Return(_a0 []bacnetip.Element) *MockSequenceEqualityRequirements_GetSequenceElements_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockSequenceEqualityRequirements_GetSequenceElements_Call) RunAndReturn(run func() []bacnetip.Element) *MockSequenceEqualityRequirements_GetSequenceElements_Call { - _c.Call.Return(run) - return _c -} - -// NewMockSequenceEqualityRequirements creates a new instance of MockSequenceEqualityRequirements. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewMockSequenceEqualityRequirements(t interface { - mock.TestingT - Cleanup(func()) -}) *MockSequenceEqualityRequirements { - mock := &MockSequenceEqualityRequirements{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/plc4go/internal/bacnetip/tests/test_service/mock_ApplicationNetworkRequirements_test.go b/plc4go/internal/bacnetip/tests/test_service/mock_ApplicationNetworkRequirements_test.go deleted file mode 100644 index ed59222c092..00000000000 --- a/plc4go/internal/bacnetip/tests/test_service/mock_ApplicationNetworkRequirements_test.go +++ /dev/null @@ -1,148 +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 - * - * https://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. - */ - -// Code generated by mockery v2.42.2. DO NOT EDIT. - -package test_service - -import ( - bacnetip "github.com/apache/plc4x/plc4go/internal/bacnetip" - mock "github.com/stretchr/testify/mock" -) - -// MockApplicationNetworkRequirements is an autogenerated mock type for the ApplicationNetworkRequirements type -type MockApplicationNetworkRequirements struct { - mock.Mock -} - -type MockApplicationNetworkRequirements_Expecter struct { - mock *mock.Mock -} - -func (_m *MockApplicationNetworkRequirements) EXPECT() *MockApplicationNetworkRequirements_Expecter { - return &MockApplicationNetworkRequirements_Expecter{mock: &_m.Mock} -} - -// Confirmation provides a mock function with given fields: args, kwargs -func (_m *MockApplicationNetworkRequirements) Confirmation(args bacnetip.Args, kwargs bacnetip.KWArgs) error { - ret := _m.Called(args, kwargs) - - if len(ret) == 0 { - panic("no return value specified for Confirmation") - } - - var r0 error - if rf, ok := ret.Get(0).(func(bacnetip.Args, bacnetip.KWArgs) error); ok { - r0 = rf(args, kwargs) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockApplicationNetworkRequirements_Confirmation_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Confirmation' -type MockApplicationNetworkRequirements_Confirmation_Call struct { - *mock.Call -} - -// Confirmation is a helper method to define mock.On call -// - args bacnetip.Args -// - kwargs bacnetip.KWArgs -func (_e *MockApplicationNetworkRequirements_Expecter) Confirmation(args interface{}, kwargs interface{}) *MockApplicationNetworkRequirements_Confirmation_Call { - return &MockApplicationNetworkRequirements_Confirmation_Call{Call: _e.mock.On("Confirmation", args, kwargs)} -} - -func (_c *MockApplicationNetworkRequirements_Confirmation_Call) Run(run func(args bacnetip.Args, kwargs bacnetip.KWArgs)) *MockApplicationNetworkRequirements_Confirmation_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(bacnetip.Args), args[1].(bacnetip.KWArgs)) - }) - return _c -} - -func (_c *MockApplicationNetworkRequirements_Confirmation_Call) Return(_a0 error) *MockApplicationNetworkRequirements_Confirmation_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockApplicationNetworkRequirements_Confirmation_Call) RunAndReturn(run func(bacnetip.Args, bacnetip.KWArgs) error) *MockApplicationNetworkRequirements_Confirmation_Call { - _c.Call.Return(run) - return _c -} - -// Indication provides a mock function with given fields: args, kwargs -func (_m *MockApplicationNetworkRequirements) Indication(args bacnetip.Args, kwargs bacnetip.KWArgs) error { - ret := _m.Called(args, kwargs) - - if len(ret) == 0 { - panic("no return value specified for Indication") - } - - var r0 error - if rf, ok := ret.Get(0).(func(bacnetip.Args, bacnetip.KWArgs) error); ok { - r0 = rf(args, kwargs) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockApplicationNetworkRequirements_Indication_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Indication' -type MockApplicationNetworkRequirements_Indication_Call struct { - *mock.Call -} - -// Indication is a helper method to define mock.On call -// - args bacnetip.Args -// - kwargs bacnetip.KWArgs -func (_e *MockApplicationNetworkRequirements_Expecter) Indication(args interface{}, kwargs interface{}) *MockApplicationNetworkRequirements_Indication_Call { - return &MockApplicationNetworkRequirements_Indication_Call{Call: _e.mock.On("Indication", args, kwargs)} -} - -func (_c *MockApplicationNetworkRequirements_Indication_Call) Run(run func(args bacnetip.Args, kwargs bacnetip.KWArgs)) *MockApplicationNetworkRequirements_Indication_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(bacnetip.Args), args[1].(bacnetip.KWArgs)) - }) - return _c -} - -func (_c *MockApplicationNetworkRequirements_Indication_Call) Return(_a0 error) *MockApplicationNetworkRequirements_Indication_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockApplicationNetworkRequirements_Indication_Call) RunAndReturn(run func(bacnetip.Args, bacnetip.KWArgs) error) *MockApplicationNetworkRequirements_Indication_Call { - _c.Call.Return(run) - return _c -} - -// NewMockApplicationNetworkRequirements creates a new instance of MockApplicationNetworkRequirements. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewMockApplicationNetworkRequirements(t interface { - mock.TestingT - Cleanup(func()) -}) *MockApplicationNetworkRequirements { - mock := &MockApplicationNetworkRequirements{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/plc4go/internal/bacnetip/tests/test_service/mock_ApplicationStateMachineRequirements_test.go b/plc4go/internal/bacnetip/tests/test_service/mock_ApplicationStateMachineRequirements_test.go deleted file mode 100644 index ad3f25a304d..00000000000 --- a/plc4go/internal/bacnetip/tests/test_service/mock_ApplicationStateMachineRequirements_test.go +++ /dev/null @@ -1,148 +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 - * - * https://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. - */ - -// Code generated by mockery v2.42.2. DO NOT EDIT. - -package test_service - -import ( - bacnetip "github.com/apache/plc4x/plc4go/internal/bacnetip" - mock "github.com/stretchr/testify/mock" -) - -// MockApplicationStateMachineRequirements is an autogenerated mock type for the ApplicationStateMachineRequirements type -type MockApplicationStateMachineRequirements struct { - mock.Mock -} - -type MockApplicationStateMachineRequirements_Expecter struct { - mock *mock.Mock -} - -func (_m *MockApplicationStateMachineRequirements) EXPECT() *MockApplicationStateMachineRequirements_Expecter { - return &MockApplicationStateMachineRequirements_Expecter{mock: &_m.Mock} -} - -// Confirmation provides a mock function with given fields: args, kwargs -func (_m *MockApplicationStateMachineRequirements) Confirmation(args bacnetip.Args, kwargs bacnetip.KWArgs) error { - ret := _m.Called(args, kwargs) - - if len(ret) == 0 { - panic("no return value specified for Confirmation") - } - - var r0 error - if rf, ok := ret.Get(0).(func(bacnetip.Args, bacnetip.KWArgs) error); ok { - r0 = rf(args, kwargs) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockApplicationStateMachineRequirements_Confirmation_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Confirmation' -type MockApplicationStateMachineRequirements_Confirmation_Call struct { - *mock.Call -} - -// Confirmation is a helper method to define mock.On call -// - args bacnetip.Args -// - kwargs bacnetip.KWArgs -func (_e *MockApplicationStateMachineRequirements_Expecter) Confirmation(args interface{}, kwargs interface{}) *MockApplicationStateMachineRequirements_Confirmation_Call { - return &MockApplicationStateMachineRequirements_Confirmation_Call{Call: _e.mock.On("Confirmation", args, kwargs)} -} - -func (_c *MockApplicationStateMachineRequirements_Confirmation_Call) Run(run func(args bacnetip.Args, kwargs bacnetip.KWArgs)) *MockApplicationStateMachineRequirements_Confirmation_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(bacnetip.Args), args[1].(bacnetip.KWArgs)) - }) - return _c -} - -func (_c *MockApplicationStateMachineRequirements_Confirmation_Call) Return(_a0 error) *MockApplicationStateMachineRequirements_Confirmation_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockApplicationStateMachineRequirements_Confirmation_Call) RunAndReturn(run func(bacnetip.Args, bacnetip.KWArgs) error) *MockApplicationStateMachineRequirements_Confirmation_Call { - _c.Call.Return(run) - return _c -} - -// Indication provides a mock function with given fields: args, kwargs -func (_m *MockApplicationStateMachineRequirements) Indication(args bacnetip.Args, kwargs bacnetip.KWArgs) error { - ret := _m.Called(args, kwargs) - - if len(ret) == 0 { - panic("no return value specified for Indication") - } - - var r0 error - if rf, ok := ret.Get(0).(func(bacnetip.Args, bacnetip.KWArgs) error); ok { - r0 = rf(args, kwargs) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockApplicationStateMachineRequirements_Indication_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Indication' -type MockApplicationStateMachineRequirements_Indication_Call struct { - *mock.Call -} - -// Indication is a helper method to define mock.On call -// - args bacnetip.Args -// - kwargs bacnetip.KWArgs -func (_e *MockApplicationStateMachineRequirements_Expecter) Indication(args interface{}, kwargs interface{}) *MockApplicationStateMachineRequirements_Indication_Call { - return &MockApplicationStateMachineRequirements_Indication_Call{Call: _e.mock.On("Indication", args, kwargs)} -} - -func (_c *MockApplicationStateMachineRequirements_Indication_Call) Run(run func(args bacnetip.Args, kwargs bacnetip.KWArgs)) *MockApplicationStateMachineRequirements_Indication_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(bacnetip.Args), args[1].(bacnetip.KWArgs)) - }) - return _c -} - -func (_c *MockApplicationStateMachineRequirements_Indication_Call) Return(_a0 error) *MockApplicationStateMachineRequirements_Indication_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockApplicationStateMachineRequirements_Indication_Call) RunAndReturn(run func(bacnetip.Args, bacnetip.KWArgs) error) *MockApplicationStateMachineRequirements_Indication_Call { - _c.Call.Return(run) - return _c -} - -// NewMockApplicationStateMachineRequirements creates a new instance of MockApplicationStateMachineRequirements. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewMockApplicationStateMachineRequirements(t interface { - mock.TestingT - Cleanup(func()) -}) *MockApplicationStateMachineRequirements { - mock := &MockApplicationStateMachineRequirements{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/plc4go/internal/bacnetip/tests/test_service/mock_COVTestClientServicesRequirements_test.go b/plc4go/internal/bacnetip/tests/test_service/mock_COVTestClientServicesRequirements_test.go deleted file mode 100644 index 794720e2d29..00000000000 --- a/plc4go/internal/bacnetip/tests/test_service/mock_COVTestClientServicesRequirements_test.go +++ /dev/null @@ -1,51 +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 - * - * https://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. - */ - -// Code generated by mockery v2.42.2. DO NOT EDIT. - -package test_service - -import mock "github.com/stretchr/testify/mock" - -// MockCOVTestClientServicesRequirements is an autogenerated mock type for the COVTestClientServicesRequirements type -type MockCOVTestClientServicesRequirements struct { - mock.Mock -} - -type MockCOVTestClientServicesRequirements_Expecter struct { - mock *mock.Mock -} - -func (_m *MockCOVTestClientServicesRequirements) EXPECT() *MockCOVTestClientServicesRequirements_Expecter { - return &MockCOVTestClientServicesRequirements_Expecter{mock: &_m.Mock} -} - -// NewMockCOVTestClientServicesRequirements creates a new instance of MockCOVTestClientServicesRequirements. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewMockCOVTestClientServicesRequirements(t interface { - mock.TestingT - Cleanup(func()) -}) *MockCOVTestClientServicesRequirements { - mock := &MockCOVTestClientServicesRequirements{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -}