CreateEventCategory
Top  Previous  Next

Description

Creates the a GenICam category under which event-related features will be grouped.

[C++]
int
 CreateEventCategory (const char* name);


Parameters
[C/C++]
 
[in] const char* name  
Name of the event category to be created. Should not be NULL or empty.  
 

Return Values


S_OK  
Success  
E_FAIL  
Failure  
E_NOINTERFACE  
Parent category does not exist  
 

Example


The following line of code creates an event category with the standard SFNC name "EventControl".

m_pCamera->CreateEventCategory ("EventControl");  
 
As a result, the following code will be added to the XML file:
 
<Category Name="ChunkDataControl" NameSpace="Standard">
      <pFeature>EventSelector</pFeature>
      <pFeature>EventNotification</pFeature>
</Category>

Remarks


This method automates the process of adding GenICam compliant events to the virtual camera. Per GenICam standard, camera events are represented by sub-categories and features grouped under a common category which should also contain the EventSelector and EventNotification features. In the example above a single call to CreateEventCategory creates the EventControl category and adds EventSelector and EventNotification features to it.

To add actual events to the event category, use CreateEvent.

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.