the Linea GigE from TDalsa is able to send GigE Vision Events.
As soon one of the event parameters i activated there is also an “EventInfo” which outputs the last timestamp value where the specific event occured.
If I remember correctly we have two ways to register on this event with . Either we register directly on the GigE Vision event or we register a callback which e.g. listen on changes of the node “Cust::EventLine5PulseStartTimestamp”.
Do we have some code snippets which explain how to achieve both ways and which would be the best choice?
I will reply in two steps. In this post I describe the prefered way (GenApi). Use this if the camera supports it.
As per your example I assume you got the Cust::EventLine5PulseStartTimestamp node via the camera’s device node map (NMHGetNodeMap and then NMGetNode). First we need the call back function that is called every time the node changes (in this case when a new GEV Event arrived):
Then you can call this code to register this callback :
NODE hLine5PulseStartTimestamp = /* get Cust::EventLine5PulseStartTimestamp node handle as described */;
NODECALLBACK unregisterToken = NULL;
cvbres_t result = NRegisterUpdate(hLine5PulseStartTimestamp, &Line5PulseStart, NULL, unregisterToken);
if(result < 0)
; // error handling
Instead of the NULL in the register function, you can also give it a pointer to something that brings you back to your context (e.g. a class’ this pointer).
The hLine5PulseStartTimestampNODE object stores the Line5PulseStart callback function. If you release the hLine5PulseStartTimestamp via ReleaseObject, the also the callback is gone. Thus keep the hLine5PulseStartTimestamp object alive as long as you need the callback.
Why is this preferred?
The GenICam Standard Features Naming Convention only standardizes the names, not the numeric values. Thus the vendors are free to change the numeric event IDs as they see fit. This normaly only happens between vendors or device series, but we have also see them change due to firmware updates. Names are safer because of the standard.
So, this is how you can get the event id via INotify. I find this a) more complicated and b) it is transport technology dependent. Thus if you have a U3V device, the pBuffer interpretation is different.