plc4x-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christofer Dutz <christofer.d...@c-ware.de>
Subject Re: decodeData in Plc4xS7Protocol
Date Thu, 28 Dec 2017 12:49:39 GMT
Hi Justin,

as I wrote to you on slack (briging it back to the list)

While I was trying to get the feature of multiple read items in one request working, I was
having trouble. With the original implementation, I got error codes from the S7 PLC complaining
about format errors. I did manage to find some WireShark captures with multiple items and
could see that in between individual items there was a zero-byte that WireShark also didn’t
seem to decode. So, I added an empty Byte and things started working. As I wasn’t quite
sure about it I wanted to talk to Ted Dunning (The guy who implemented the WireShark component)
to get some more info on this. And it definitely needs some documenting and fine tuning in
the code. 

Chris





Am 28.12.17, 01:55 schrieb "Justin Mclean" <justin@classsoftware.com>:

    Hi,
    
    Looking at decodeData in Plc4XS7Protocol I’m not sure that it would work in that the
for loop is increasing “i" but “i" is also modified in the body of the loop by the size
of the datatype. Seems by a casual glance that each datatype is one byte too large?
    
    Also any reason why all the methods are private? Makes it a little harder to unit test.
What the preferred way of writing unit test for something list this?
    
    Thanks,
    Justin

Mime
View raw message