EventDataMessage
Top  Previous  Next

Description

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


Syntax


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


[C/C++]
HRESULT Fire_EventDataMessage(SHORT Camera);


Data Types
[VB]

eventID: Long  
blockID: Long  
data:   Variant (Array)  
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.  
data  
Pointer to SAFEARRAY of bytes contating the data encapsulated in the message.  
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 A as Variant,  
                                     ByVal timestamp as double, ByVal channelIndex as long)  
LabelEventID.Caption=eventID  
LabelBlockID.Caption=blockID  
LabelA0.Caption=A(0)  
LabelA0.Caption=A(1)  
LabelA0.Caption=A(2)  
LabelA0.Caption=A(3)  
LabelTimestamp.Caption=timestamp  
End Sub  
 
 
Remarks

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

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