SendEventData
Top  Previous  Next

Description

Sends the specified data event message to the network.

[C++]
int
 SendEventData(unsigned short eventId, const char* data, unsigned int size, 
        unsigned
 short channel = 0xFFFF, bool requireAck = true);

Parameters
[C/C++]
 
[in] unsigned short eventID  
Integer value specifying the numerical ID of the event.  
 
[in] const char* data  
Pointer to the block of memory containing data fields of the event.  
 
[in] unsigned int size  
Integer value specifying the size of the data block in bytes. Must not exceed 540.  
 
[in] unsigned int channel  
Integer value specifying the index of the streaming channel associated with the event. Default value of 0xFFFF specifies that no streaming channel is involved.  

[in] bool requireAck  
If TRUE, the virtual camera will wait for the acknowledge reply from the GigE Vision client.  


Return Values

S_OK  
Success  
E_FAIL  
Failure  


Example


This fragment code generates a data event containing the current timestamp and sends it over the network:

__int64 time;  
time=m_pCamera->GetTimer();  
SendDataEvent(0x8E94, (char*) time, 8);  


Remarks

This method generates a standard EVENTDATA message per GigE Vision specifications. It is typically associated with a certain action of the virtual camera of which a GigE Vision client should be notified. The event will contain a timestamp indicating the exact time at which the event was generated. Depending on the Timer Mode, the timestamp will be reported either in the astronomical time or time elapsed from the start of the virtual camera application.

The channelIndex parameter should be used only if your virtual camera supports multiple streaming channels. For a regular GigE Vision transfer this parameter should remain in its default zero value.

If you want to associate your data event message with GenICam event features and data members, you should call CreateEventCategory, CreateEvent and CreateEventFeature prior to calling SendEventData.

Note that this method generates an EVENTDATA message as opposed to EVENT message generated by SendEvent.