Skip to content

Commit

Permalink
feat(plc4go): expose read/write buffer via new interfaces
Browse files Browse the repository at this point in the history
  • Loading branch information
sruehl committed May 23, 2022
1 parent 7e0ccdb commit badd0da
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions plc4go/utils/exposedUtils.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}

0 comments on commit badd0da

Please sign in to comment.