Today I released the latest version of OpenDAX. Version 0.5 includes the last major feature that I am going to add to the Server/Library for a while. This is Event Notification. Event Notification allows for event driven programming to be incorporated into modules. Some of the types of events that can be attached to Tags are Write, Change, Set, Deadband etc.
The module can constantly poll for events with dax_event-poll() or can block and wait on events with dax_event_select(). The select method includes a timeout so that it doesn't block forever. There is also a way for the module to retrieve the file descriptor that the library is using to receive these events and add this to a select() or poll() call itself. This would be useful if the module had other file descriptors that it needed to watch. The module could then call dax_event_dispatch() to call the event.
The feature is very new and has not been thoroughly tested but it seems to work. More test cases will need to be written. The API should be pretty stable at this point so I wanted to go ahead and release the code so that module development can start using the new API. Very near term work involves adding this feature to the existing core modules, Modbus, daxlua and daxc, as well as updating the documentation to include this API.