TriggerOuts & Events Handlers



I have been looking through the API docs and it mentions a function called AddEventHandler but this function does not appear to exist in the DLL, further more the documentation does not explain how to use this function even if it did exist.

Does anyone know how I can use this ?
Is there going to be some updated documentation for the DLL ?

The sample in Counters.cpp which is using the lib does not follow the API documentation either !


Well, it’s not really a recommended way to communicate with the API. You’ve caught an anomaly.

It is there to support the FrontPanel Application. FrontPanel allows you to add arbitrary buttons, LEDs, etc to a display. To support that in the code realm, we decided to make the API deliver events to these added items rather than having some other method keep track of what is there and iterate through the changes. The event-driven model made for a cleaner FrontPanel application.

Counters really should be rewritten for the “standard” model. It turns out that this standard model is easier to deal with in most cases and easier to understand.

To answer your question – these methods are considered unsupported and undocumented. They won’t appear in the DLL – it’s too difficult to deal with callbacks in a way that makes sense here. We will fix Counters for the next release.