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/04/07 15:38:34 UTC
[plc4x] branch develop updated: plc4go: fix endianness for ads
MessageCodec.go
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 2850b43 plc4go: fix endianness for ads MessageCodec.go
2850b43 is described below
commit 2850b43316461d389f623d8f57e825afdfef16a0
Author: Sebastian Rühl <sr...@apache.org>
AuthorDate: Wed Apr 7 17:38:18 2021 +0200
plc4go: fix endianness for ads MessageCodec.go
---
plc4go/internal/plc4go/ads/MessageCodec.go | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/plc4go/internal/plc4go/ads/MessageCodec.go b/plc4go/internal/plc4go/ads/MessageCodec.go
index cb6c716..9634d4f 100644
--- a/plc4go/internal/plc4go/ads/MessageCodec.go
+++ b/plc4go/internal/plc4go/ads/MessageCodec.go
@@ -44,7 +44,7 @@ func (m *MessageCodec) Send(message interface{}) error {
// Cast the message to the correct type of struct
tcpPaket := model.CastAmsTCPPacket(message)
// Serialize the request
- wb := utils.NewWriteBuffer()
+ wb := utils.NewLittleEndianWriteBuffer()
err := tcpPaket.Serialize(*wb)
if err != nil {
return errors.Wrap(err, "error serializing request")
@@ -81,7 +81,7 @@ func (m *MessageCodec) Receive() (interface{}, error) {
// TODO: Possibly clean up ...
return nil, nil
}
- rb := utils.NewReadBuffer(data)
+ rb := utils.NewLittleEndianReadBuffer(data)
tcpPacket, err := model.AmsTCPPacketParse(rb)
if err != nil {
log.Warn().Err(err).Msg("error parsing")