andvasp commented on code in PR #2673:
URL: https://github.com/apache/plc4x/pull/2673#discussion_r3731015711
##########
plc4j/drivers/eip/src/main/java/org/apache/plc4x/java/eip/base/EipTcpConnection.java:
##########
@@ -767,12 +765,7 @@ private static byte[] toAnsi(String tag) throws
BufferException {
segments.add(newSegment);
lengthBytes += newSegment.getLengthInBytes();
}
- WriteBufferByteBased buffer = new WriteBufferByteBased(new
byte[lengthBytes],
- WithByteBasedOption.WithByteOrder("LITTLE_ENDIAN"),
- WithOption.WithUnsignedIntegerEncoding("unsigned-binary"),
- WithOption.WithSignedIntegerEncoding("twos-complement"),
- WithOption.WithFloatEncoding("IEEE754"),
Review Comment:
> I'm a bit surprized this would work ... if I look in mspec, the type
PathSegment doesn't define the different encodings. So they should be null if
you remove them all. It should require setting the unsigned integer and the
string encodings. Also would you be changing the endianess from little-endian
to big-endian.
Now that you mentioned the point about byte order, I am surprised too why it
was working because it looks like it is mixing the byte order. Let me summarise
my scenario:
- I did not change the configuration of the byte order. So I am using big
endian.
- I can read the value of most of the tags.
- There are some tags that I cannot, even on same device (addressing this
issue later) but I did not check them after the modification of this PR.
- I did not have the opportunity to test the write value but I can and I
plan to do.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]