EventMessage
Top  Previous  Next

Description

This event is fired each time an asynchronous event arrives from the camera on the message channel.


Syntax


[VB]
Private Sub objActiveUSB_EventMessage(ByVal eventID as long, ByVal blockID as long, ByVal timestamp as double, 
                                        ByVal channelIndex as long)


[C/C++]
HRESULT Fire_CameraPlugged(long eventId, long blockId, double timestamp, long channelIndex);


Data Types
[VB]

eventID: long  
blockID: long  
timestamp: double  
channelIndex: long  


Parameters
[C/C++]

eventID  
The 16-bit even identifier.  
blockID  
The 16-bit identifier of the data block associated with the event. 0 if there is no data block association.  
timestamp  
The timestamp representing the time at which the event was fired by the camera.  
channelIndex  
The index of the stream channel associated with the event.  
 

Return Values


S_OK  
Success  
E_FAIL  
Failure.  


Example


This VB example intercepts message events and displays the information associated with each event:

Private Sub Form_Load()  
ActiveUSB1.SetFeatureString("EventNotification","On")  
ActiveUSB1.Acquire = True  
End Sub  
 
Private Sub ActiveUSB1_EventMessage(ByVal eventID as long, ByVal blockID as long, ByVal timestamp as double, ByVal channelIndex as long)  
LabelEventID.Caption=eventID  
LabelBlockID.Caption=blockID  
LabelTimestamp.Caption=timestamp  
End Sub  
 
 
Remarks

The EventMessage events are generated only for the EVENT type messages. For the EVENTDATA messages ActiveUSB will fire EventDataMessage events.

If several events are encapsulated into one USB3 Vision message, the EventMessage event will fire several times.

For more information on the USB3 Vision messaging refer to "USB3 Vision Camera Interface Standard For Machine Vision" published by the Automated Imaging Association.