I have a plugin that runs remotely and will run and then terminate throughout the day, sometimes only minutes apart (by design).
In the InitIO sub, I have the following:
In HS2, I called RegisterEventCB once with the three requested events ORed together. Could not make this work, but calling RegisterEventCB three separate times does seem to work. Is this the way it is working for others, and is this correct? Seems to work ok for me, just unexpected.
Now, my real problem is that there is no way that I have uncovered to unregister for these events. I have not been able to determine a way to terminate execution of my plugin without the HsEvents sub being called after I have shut down the plugin, resulting in a bad object reference.
I disconnect both client and clientcallback objects, wait for their connection status to become disconnected, and after that, my HsEvents routine gets called still (at least, that what seems to be happening).
While this results in an error in the log, that I guess I could ignore, the larger problem is that when the plugin is started again, the RegisterEvendCB calls don't always result in HsEvent calls. All of this is somewhat random. Sometimes works fine, other times not.
Any thoughts would be appreciated.
tenholde
In the InitIO sub, I have the following:
Code:
'' '' Register for HS Events '' callback.RegisterEventCB(Enums.HSEvent.VALUE_CHANGE, IFACE_NAME, "") callback.RegisterEventCB(Enums.HSEvent.LOG, IFACE_NAME, "") callback.RegisterEventCB(Enums.HSEvent.STRING_CHANGE, IFACE_NAME, "")
Now, my real problem is that there is no way that I have uncovered to unregister for these events. I have not been able to determine a way to terminate execution of my plugin without the HsEvents sub being called after I have shut down the plugin, resulting in a bad object reference.
I disconnect both client and clientcallback objects, wait for their connection status to become disconnected, and after that, my HsEvents routine gets called still (at least, that what seems to be happening).
While this results in an error in the log, that I guess I could ignore, the larger problem is that when the plugin is started again, the RegisterEvendCB calls don't always result in HsEvent calls. All of this is somewhat random. Sometimes works fine, other times not.
Any thoughts would be appreciated.
tenholde
Comment