Hi all, taking this over here as it’s no longer a topic for the dev list.
As a little context: I am currently working on defining the industry protocols for the Apache PLC4X in a way that I can have my protocol implementations generated in the future, because at the moment they are hand-coded in Java but we are working hard on C++ versions too. Now manually keeping all the implementations in-sync is a challenging task, so I am currently trying to define the protocols in a language-independent way and have the implementations generated in the future. DFDL was the ideal match for defining the message formats. After quite some trial-and-error and a lot of help by you guys, I managed to cover that base to 100%. Thanks a lot for that. I’m pretty impressed with how easy it now is to define these message formats and even have them tested. However for my use-case this was sort of 60% of what I needed as I still have to manually code the flow in which messages are sent and received and how the general interaction with the remote devices looks like. In general I was looking for some sort of way to (ideally in XML) define a universal state-machine. I stumbled over SCXML [1] pretty soon … a W3C standard for defining state-machines (Originating from attempts to standardize the communication in call-centers). While looking for example documents then I stumbled over the SCXML implementation which is part of the Apache Commons project [2]. Right now I’m digging deeper into this, but I think it should be possible to extend this with custom events, so I could mix the SCXML state-machine definitions with DFDL message representations (similar to the ones in TDML) … Maybe it’s still required to extend DFDL to support reading and writing some external state/context, but I think using both SCXML and DFDL together should take me most of the way to a completely configurable driver. Just wanted to share these findings. Chris [1] https://www.w3.org/TR/scxml/ [2] https://commons.apache.org/proper/commons-scxml/
