I continue to learn a lot working on this program. I am sure that there are some really experienced programmers out there that have looked at my code and thought that a real rookie is writing it. I guess I am a rookie. I have written a lot of C code in my day, but it was mostly small programs and embedded stuff. This is the largest single software project that I have ever worked on. I am starting to realize that I have some scalability problems.
I have tied way too much of the interface of the library and modules to the internal workings of opendax. I really should have recognized what I was doing to myself when I had to start including opendax.h (which is the public header for the libdax library) in parts of the core program. I think the only real big problem that I have created for myself is the dax_tag structure. I had to put the dax_tag structure in opendax.h because I used it in some of the libdax interface functions (big mistake). I still haven't figured out the best way to dig myself out of this hole. I think it's going to cause me a lot of grief in the modules that I have already written.
If anyone can look at the code and offer some suggestions, please feel free. I am really stuck here. I think I need to bite the bullet and redefine the interface and let the chips fall where they may. I'm sure that I'll have a lot of code to fix in the four modules that I have working at this point. I think that's what I'll have to do. I really want this program to work well and these kinds of interface issues will make it a nightmare to maintain in the future.
I guess the goal at this point is to get the library into a condition that would make it binary compatible with the modules. I don't want to have to recompile every module out there every time an implementation detail changes. I know this is computer science 101 but in my defense I only took one computer science class and it wasn't 101.
I would also like the library to be independent of the implementation details of opendax. This will only be partially possible because of the way that messages are sent back and forth in the message queue. The binary data that the core sends to the module (through the library routines) must be known by the library and by the opendax daemon. I guess this isn't as big of a problem as maintaining binary compatibility of the library for the modules. Hopefully someday there will be dozens or hundreds of modules written for opendax and I'd hate to have to recompile every one of them because I changed a structure inside the library.
I have a lot of work to do.