ottlukas opened a new issue, #580:
URL: https://github.com/apache/plc4x/issues/580

   For some reason the response of the PLC seems not to be in *LITTLE_ENDIAN* 
format.
   Therefore, the Byte to Integer conversion in [1] results in a negative 
number.
    
   The issue occurs during the *symbolHandle* creation process in [2].
    
   I had a look at the ADS specification [3] and the response should be in 
*LITTLE_ENDIAN* format, but for some reason it is not.
    
   As suggested by [~cdutz] we should create an option to override the 
endianness in the connection-string.
    
   [1] 
[https://github.com/apache/plc4x/blob/develop/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/api/util/UnsignedIntLEByteValue.java#L39](https://github.com/apache/plc4x/blob/develop/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/api/util/UnsignedIntLEByteValue.java#L39)
   [2] 
[https://github.com/apache/plc4x/blob/develop/plc4j/drivers/ads/src/main/java/org/apache/plc4x/java/ads/connection/AdsAbstractPlcConnection.java#L187](https://github.com/apache/plc4x/blob/develop/plc4j/drivers/ads/src/main/java/org/apache/plc4x/java/ads/connection/AdsAbstractPlcConnection.java#L187)
   [3] 
[https://infosys.beckhoff.com/index.php?content=../content/1031/tcplclibutilities/html/TcPlcLibUtilities_AddOn_ByteOrder.htm&id=](https://infosys.beckhoff.com/index.php?content=../content/1031/tcplclibutilities/html/TcPlcLibUtilities_AddOn_ByteOrder.htm&id=)
    
   
   Imported from Jira 
[PLC4X-133](https://issues.apache.org/jira/browse/PLC4X-133). Original Jira may 
contain additional context.
   Reported by: millecker.


-- 
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]

Reply via email to