Hi all,

I am proud and happy to announce I just finished the next milestone of my 
project on porting PLC4X to C.

It was quite a marathon. I guess if you simply think about an API that is quite 
easy to port to a language like C, even if it does sort of feel strange every 
now and then.
However with mspec we have this concept of discriminated types which in 
object-oriented languages is handled by types and subtypes.
C however doesn’t know this concept, so I had to find ways to port all of these 
concepts (as far as we needed them) to C using only what’s available in C.
This required quite a lot of refactoring. But the good thing is: this 
refactoring had an impact on the existing Java drivers and I think the changes 
to the “discriminators” was a huge leap forward.

Next on my plan is to implement the logic needed to build real drivers. Right 
now the SPI module in PLC4C is pretty empty. It does already have all the means 
to load drivers and transports, but things like the ReadBuffer and WriteBuffer 
are empty skeletons also don’t we have any form of base classes like we have in 
the Java world that allow us to implement drivers as simple as possible. This 
will be my challenge for the next few weeks. I do hope that I won’t have 
another 3-4 week delay, as I did with the code-generation.

So much for the update :-)

Chris

Reply via email to