You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@plc4x.apache.org by sr...@apache.org on 2022/05/23 12:37:20 UTC

[plc4x] branch develop updated: feat(plc4go): expose read/write buffer via new interfaces

This is an automated email from the ASF dual-hosted git repository.

sruehl pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/plc4x.git


The following commit(s) were added to refs/heads/develop by this push:
     new badd0daa76 feat(plc4go): expose read/write buffer via new interfaces
badd0daa76 is described below

commit badd0daa7663bdc838ea2d30a8de6d0b5d237ca9
Author: Sebastian Rühl <sr...@apache.org>
AuthorDate: Mon May 23 14:37:14 2022 +0200

    feat(plc4go): expose read/write buffer via new interfaces
---
 plc4go/utils/exposedUtils.go | 18 ++++++++++++++----
 1 file changed, 14 insertions(+), 4 deletions(-)

diff --git a/plc4go/utils/exposedUtils.go b/plc4go/utils/exposedUtils.go
index 01b8582fc4..00288fc0a0 100644
--- a/plc4go/utils/exposedUtils.go
+++ b/plc4go/utils/exposedUtils.go
@@ -23,22 +23,32 @@ import (
 	"github.com/apache/plc4x/plc4go/internal/spi/utils"
 )
 
+// ReadBufferByteBased is a byte based read buffer
+type ReadBufferByteBased interface {
+	utils.ReadBufferByteBased
+}
+
 // NewReadBufferByteBased creates a byte based read buffer
-func NewReadBufferByteBased(data []byte) utils.ReadBufferByteBased {
+func NewReadBufferByteBased(data []byte) ReadBufferByteBased {
 	return utils.NewReadBufferByteBased(data)
 }
 
 // NewLittleEndianReadBufferByteBased creates a little endian byte based read buffer
-func NewLittleEndianReadBufferByteBased(data []byte) utils.ReadBufferByteBased {
+func NewLittleEndianReadBufferByteBased(data []byte) ReadBufferByteBased {
 	return utils.NewLittleEndianReadBufferByteBased(data)
 }
 
+// WriteBufferByteBased is a byte based write buffer
+type WriteBufferByteBased interface {
+	utils.WriteBufferByteBased
+}
+
 // NewWriteBufferByteBased creates a byte based write buffer
-func NewWriteBufferByteBased() utils.WriteBufferByteBased {
+func NewWriteBufferByteBased() WriteBufferByteBased {
 	return utils.NewWriteBufferByteBased()
 }
 
 // NewLittleEndianWriteBufferByteBased creates a little endian byte write read buffer
-func NewLittleEndianWriteBufferByteBased() utils.WriteBufferByteBased {
+func NewLittleEndianWriteBufferByteBased() WriteBufferByteBased {
 	return utils.NewLittleEndianWriteBufferByteBased()
 }