Top  Previous  Next


Creates a GenICam event sub-category with related features, registers and ports.

 CreateEvent (unsigned int msgId, const char* name, const char* parentCategory, 
 evTimestamp, bool evChannelId, bool evFrameId);

[in] unsigned int msgID  
Integer value specifying the numerical ID of the event.  
[in] const char* name  
Name of the event to be created. Should not be NULL or empty.  
[in] const char* parentCategory  
Parent category under which the event sub-category will be created. The category must be created by a prior call to CreateEventCategory.  

[in] bool evTimestamp  
If TRUE, the event will contain the Timestamp feature.  

[in] bool evChannelID  
If TRUE, the event will contain the ChannelID feature.  

[in] bool evFrameID  
If TRUE, the event will contain the FrameID feature.  

Return Values

Parent category does not exist  


The following line of code creates the "AcquisitionTrigger" event sub-category in the "EventControl" category and adds related features, registers and ports.

m_pCamera->CreateEventCategory ("EventControl");  
m_pCamera->CreateEvent (0x8e94, "AcquisitionTrigger", "EventControl", True, False, False);  
As a result, the following code will be added to the XML file:
      <Enumeration Name="EventSelector" NameSpace="Standard">
<EnumEntry Name="AcquisitionTrigger">
<Category Name="EventAcquisitionTriggerData" NameSpace="Standard">  
<IntReg Name="regEventAcquisitionTrigger">  
<IntReg Name="regEventAcquisitionTriggerTimestamp">  
<Port Name="EventAcquisitionTriggerPort">  


This method automates the process of adding GenICam compliant events to the virtual camera. Per GenICam standard, for each event there should be a sub-category grouping all data members related to the particular event. In the example above a single call to CreateEvent creates the EventAcquisitionTriggerData sub-category, adds EventAcquisitionTrigger and EventAcquisitionTriggerTimestamp features to it, maps them to available registers and ports and adds a corresponding entry into the EventSelector feature..

Calls to CreateEvent should be preceded by a call to CreateEventCategory. To add additional data fields to the event, use CreateEventFeature.

Note that this method does not handle the event generation, but only adds event-related members to the camera's XML file. To send events to the network, use SendEvent, SendEvents, SendEventData.

The camera must be in the disconnected state in order for this method to work.