I think that I finally have the compound data types working in the server and the library. At least all the test cases that I have been able to dream up are working.
This has been a long road. It's been about a year since I broke the code to add the CDT's. Along the way I have made other changes to the system as well. I completely changed the way the testing module works. It was getting quite cumbersome. Now each test is a separate Lua script. Each of these scripts is called from a master script by way of a run_test() function. That function calls each script with a protected call so that the error code can be trapped. If the script completes then the test passes. If the script raises an error then the test fails. The number of tests is tracked and the number of pass/fails is reported at the end. It works much cleaner now. Tests should be much easier to add too.
I also split the modbus module into the module part and a Modbus library. To be accurate, I am still splitting that. I don't know why I did this. I just couldn't help myself. It was one of those things where I could see a better way to do things and just had to do it. I still need to finish this up and get it back to working the way that it did when I started taking all this apart to add compound data types.
I also made a few changes to the daxc module. Not major ones I just added the ability to read tags that are of compound data types. I need to refine this some more, but at least a single point can be read and written. I also added a 'db' command that will show the raw data that is returned when any tag is entered. I also added the ability to list the compound data type's members. Most of the daxc module is built around debugging at this point but I would like to get it to a point where it would be useful in an actual system. It can be used in shell scripts now so it is pretty powerful but there is a lot of refinement left to do.
One of the testing functions uses a pretty elaborate set of functions for reading and writing data to the server. Basically it is a Dax <-> Lua converter. It seems to work pretty well and I am going to copy those functions into the daxlua logic module.
Once I get the Modbus module and the daxlua module done I think I'll release a 0.4 version. Once I get that out I need to get it working on some stuff at home. If I don't get that front gate automated, my wife is going to make me sleep in the barn. I'll have to write some kind of user interface as part of this and hopefully that will showcase any major drawbacks that I have in the API
For the 0.5 release I plan to change the library to allow multiple connections. Right now there is some global data that limits the number of server connections to one. I need to make it a bit more object oriented so that a module can connect to more than one server, or make multiple connections to the same server. This should be pretty easy but it will break every library call in every module. It's something that I need to to before I get too many modules written.
The goal at this point is to stabilize the API. I know that I'm not finished with features that I want to add to the API but I want to get it to a point where I'm not changing the existing interface.
From there I need to add data change events, finish the Modbus module to include all the protocols (RTU, ASCII, TCP / Master, Slave). I also, need to get the module starting / stopping stuff refined. it works but there could be issues with start-up order and such. I need to work on the Module Developers Guide and I may create a 'skel' module that would serve as a starting point for module development. I'm also kicking around the idea of designing some USB I/O circuits. I'd like to design them in the spirit of the Arduino. I like the idea of open source hardware and I think that it has made the Arduino the best in it's class. I'd like to do the same thing with some I/O. An automation project like OpenDAX isn't worth much if you don't have any I/O to actually control things.
I also want to see if I can get OpenDAX to run on a BeagleBoard. The combination of a BeagleBoard running OpenDAX and some inexpensive USB I/O could have some pretty incredible implications.