I thought I'd let you know what's going on, after some silence post the machinetalk merge.
Now that HAL is covered for remote operations, attention turns to the 'last frontier' ;) getting rid of NML in the task/interpreter/motion complex. The approach we chose is to use a 'shim layer' - a translation service mapping NML to protobuf/zeromq interactions so that development on the UI side can proceed in parallel with restructuring task.
That translation shim - currently called mkwrapper - technically is a demon talking to NML on the host side and protobuf/zmq on the client side. It is written in Python and will show up in the repo soonish; it is a temporary helper so we can define and stabilize the new API.
Also in the pipe is the way how preview is done - in the legacy code base, preview is generated by an RS274 interpreter resident in the UI, and bringing a ton of dependencies to the UI. Downstream preview graphics commands will be generated in the same place where task and interpreter run, and the UI is only responsible for interpreting and displaying those.
Alex is pretty far down the road with a Qt-based UI which handles both task/interpreter and preview type interactions based on the above ideas, but it's his turn to report the status on that.
I've been pondering for a while how to manage the rewrite of task/interpreter and some motion toplevel code. The approach Alex and myself settled for was internally fork task/interpreter/motion/iocontrol and go for a parallel development based on the new middleware. This means for the time being there will be NML-based variants, as well as protobuf/zeromq based variants in the repo, and the config files will determine which one is used. I think this gives us the freedom we need while rocking the boat as minimal as possible.
I'll shortly publish a spec for a modified embedding of interpreters (note plural) in task. This will address
https://github.com/machinekit/machinekit/issues/106 - the basic idea is to have multiple interpreters with canon layers as needed (for machine control, as well as preview generation), and activate those as needed.
A key upside is the fact that interpreters will now be their own threads - meaning a running interpreter is now free to interact with a UI in any shape or form - something plainly impossible due to the (sorry, botched) control flow in the legacy code base. Also, various absurd contortions in task to support readahead and MDI will just go away. Switchable interpreters will also pave the way for MDI-while paused, which will build upon the current jog-while-paused code in motion.
A precursor for this effort is a merge pending by Alex, which adds mkwrapper and new protobuf definitions. None of this should affect or concern running code.
- Michael
ps: hoping to get over my author's block for the Machinetalk documentation soon ;)