CreateCategory
Top  Previous  Next

Description

Creates a GenICam category with the specified name.

[C++]
int
 CreateCategory (const char* name, const char* parentCategory);


Parameters
[C/C++]
 
[in] const char* name  
Name of the category to be created. Should not be NULL or empty.  
 
[in] const char* parentCategory  
Parent category under which the category or sub-category will be created. To create a sub-category in the root category, use "Root" for this argument.  


Return Values


S_OK  
Success  
E_FAIL  
Failure  
E_NOINTERFACE  
Parent category does not exist  
 

Example


This fragment of code instantiates a camera object, creates an integer and enumerated features and sets up their attributes :

static CGevCamera* m_pCamera;  
m_pCamera = createCamera();  
 
m_pCamera->CreateFeature(FEATURE_TYPE_INTEGER, "TestFeatureInt", "Root", FEATURE_ACCESS_RW);  
m_pCamera->SetFeatureRange("TestFeatureInt", 0, 1000, 1);  
 
m_pCamera->CreateFeature(FEATURE_TYPE_ENUMERATION, "TestFeatureEnum", "Root", FEATURE_ACCESS_RW);  
m_pCamera->setEnumEntry("TestEnumFeature", "First item", 1);  
m_pCamera->setEnumEntry("TestFeatureEnum", "Second item", 2);  
m_pCamera->setEnumEntry("TestFeatureEnum", "Third item", 3);  


Remarks


Use this method to assign features to your virtual camera object. The assigned features will be exposed to GigE Vision client applications allowing them to remotely control parameters of the virtual camera.

A creation of a feature should be followed by setting up its attributes. See for more details.

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