Random Thoughts

I had a few ideas last night for features that I think would be nice to add to OpenDAX. I need to write them down so I don't forget. As always comments, additions, complaints etc are welcome.

I need a way to retrieve meta data from the modules. It'd be simple enough to have each module create a tag for all the data that it'll produce but that just takes up space. I may build a module-to-module messaging system and a generic function pair so that modules could set and retrieve status information from each other. What got me thinking of this is that I have my modbus module running at home talking over a wireless link to my gate that is 1,500 feet away and I can't really tell what is going on with that port. I need to be able to query the module and see the status from my Lua script that is going to handle all of that.

daxlua needs some retentive variables that would be static between script runs. From the Lua perspective the script is running new each time. This would have to be done in C somewhere. I think I can load the script, attach dummy C functions to it with the same name as the dax interface functions but that do nothing. Then run the script, find the global variables in the script, check them against the OpenDAX tag list and treat those as DAX tags then the rest (or some with a certain tagname structure) as retentive globals. Then reassign the C functions to the script and run as normal. This seems awful complicated. Maybe I'll just create a couple of functions that can be run from the init script to register globals, and automatic dax tags. That would be simpler.

I think I might like to have some kind of aliasing mechanism in OpenDAX. The core would treat aliases just like tags. There is more to it than that for instance do I allow the alias to have a different data type than the tartget data? Do I implement this in the library on a per module basis, in the core or both? Forget it and let the modules handle aliasing? Before I get too carried away I need to get the user defined data types implemented. I may also implement a tagname indexing system. Currently the taglist is ordered by tagbase handle. It may make sense to add an index that is sorted by tagname. This could include aliases too.

These are just some ideas that I had. I don't know if I'll implement any of them, or how to implement them if I do. I'm just brainstorming.