Closed RenanGarcia closed 6 years ago
I will look into that, thanks.
I'm still studying the library, but it seems that the problem was in fromRequest method ReadDiscreteInputsResponseBody and ReadCoilsResponseBody. I solved the problem by creating functions that we can use in other parts of the lib. See if it's a good solution: #185
Hi, I found the following problem with reading the coils with the server code. Notice that the buffer values did not change during the execution of the tests, as my application's logs show in connection event. As you can see, the server is returning unexpected values in some situations:
In request 1 and 2, the response values are the same, even with requests for different reference addresses
In request 3 and 4, when the number of bits is less than the allocated, the response values are wrong, regardless of the reference number indicated in the request
Request 1: F1, Reference number: 0, Bit Count: 8
logs
Request 2: F1, Reference number: 1, Bit Count: 7
logs
Request 3: F1, Reference number: 0, Bit Count: 4
logs
Request 4: F1, Reference number: 1, Bit Count: 4
logs