Hi all,

well I think I have a first usable version of the PDU Fragmentation finished. 
Now I introduced a S7MessageProcessor interface in the  
org.apache.plc4x.java.s7.netty.strategies package. I currently have two 
implementations:

-          SingleAddressPerMessageS7MessageProcessor: Simple version that 
splits up every item into a separate message (Doesn’t split up Arrays) … this 
was the first strategy implemented to test the queue feature

-          DefaultS7MessageProcessor: Default version splitting up messages so 
the maximum number of items is contained in one message. For write operations 
it not only splits up each item into a sub-message, but also arrays. This is 
due to the fact that S7 devices only seem to accept single-values when writing.

There is still a lot of optimization that can be done here:

  *   Sorting items for a perfect match in request and response sizes (Combine 
elements with big request part and small response part with ones the other way 
around to maximize request and response sizes)
  *   Splitting up arrays to sub-arrays (To allow reading larger memory areas 
than would fit in one PDU)
  *   Replacing multiple small items with one bigger one to improve request and 
response size.

The really cool thing is the queueing feature, which not only allows respecting 
the S7 Max AMQ Caller limit, but can also be used by other protocols to queue 
messages and wait for acknowledgement and eventually resend not acknowledged 
messages (by setting the size of unconfirmed messages to 1). I will start a 
document in which I document the changes needed for this, so it helps 
developers in other drivers.

Right now it seems to be working nicely with big read operations, I still have 
to test it with multiple writes.

Chris

Reply via email to