You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@plc4x.apache.org by sr...@apache.org on 2021/11/30 17:22:43 UTC
[plc4x] 01/03: feat(plc4go/boxwriter): write strings directly and omit hex values
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
commit b7bf197604677f62d84219ab043c0d914e61a063
Author: Sebastian Rühl <sr...@apache.org>
AuthorDate: Tue Nov 30 15:21:08 2021 +0100
feat(plc4go/boxwriter): write strings directly and omit hex values
---
plc4go/internal/plc4go/spi/utils/WriteBufferBoxBased.go | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/plc4go/internal/plc4go/spi/utils/WriteBufferBoxBased.go b/plc4go/internal/plc4go/spi/utils/WriteBufferBoxBased.go
index caac591..ac1343b 100644
--- a/plc4go/internal/plc4go/spi/utils/WriteBufferBoxBased.go
+++ b/plc4go/internal/plc4go/spi/utils/WriteBufferBoxBased.go
@@ -177,9 +177,9 @@ func (b *boxedWriteBuffer) WriteBigFloat(logicalName string, bitLength uint8, va
return nil
}
-func (b *boxedWriteBuffer) WriteString(logicalName string, bitLength uint32, _ string, value string, writerArgs ...WithWriterArgs) error {
+func (b *boxedWriteBuffer) WriteString(logicalName string, _ uint32, _ string, value string, writerArgs ...WithWriterArgs) error {
additionalStringRepresentation := b.extractAdditionalStringRepresentation(upcastWriterArgs(writerArgs...)...)
- b.PushBack(BoxString(logicalName, fmt.Sprintf("%#0*x %s%s", bitLength/4, value, value, additionalStringRepresentation), 0))
+ b.PushBack(BoxString(logicalName, fmt.Sprintf("%s%s", value, additionalStringRepresentation), 0))
return nil
}