Hi all,

As end of last week I finally got the NLNet paperwork finished, I used the 
rainy weekend to start working on the API for my planned new buffer system.

So currently we have everything needed to build drivers in one big and fat SPI 
module. I am planning on splitting things up into individual packages, so you 
only need to include the pats that you need (Even if you’re using our 
code-generation framework and don’t want to build PLC4X drivers).

This way we draw clean lines between the different parts. Admittedly in our 
current SPI without IntelliJs code navigation I would quite often be lost.

With this we have cleaner separation of concerns, we can more easily test 
things. (Testing is also something … I added a 80% line coverage to my 
definition of done for most of the NLNet sponsored steps).

So, regarding the buffers: The probably most notable changes are:

  *
We only have BufferException instead of ParseException/SerializeException as it 
didn’t really bing any benefit and some times I remember being a bit lost to 
which was the right one (like when defining Static helper methods).
  *
When going down in the hierarchy, we simply have pushContext and popContext (I 
was always confused with the previous „pullContext“ and „closeContext“ for 
ReadBuffers (Had to look it up, because I couldn’t remember it and I always had 
to look it up). The „context“ is gaining a lot more weight in the SPI3.
  *
Another thing I updated:The „byte“ input and output is what I guess we can all 
consider the „primary“ format for which the entire buffer-api exists. All other 
formats serve the primary format. So, I moved the „logicalName“ into the 
options as I was sometimes confused/annoyed by having to define names for stuff 
used internally.

Initially I was thinking of adjusting the names and value ranges of the 
read/write methods to the mspec nomenclature, but after first experiments, I 
think what we initially had was a lot less confusing.

I’ve set the PR to draft … so happy to receive and integrate feedback. The next 
thing on my list will be to start working on the byte-based buffers for reading 
and writing.

Chris


Reply via email to