CreateChunkCategory
Top  Previous  Next

Description

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

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


Parameters
[C/C++]
 
[in] const char* name  
Name of the chunk data 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 a chunk category with the standard SFNC name "ChunkDataControl".

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

Remarks


This method is used in conjunction with CreateChunkFeature to automate the process of adding GenICam compliant chunk features to the virtual camera. Per GenICam standard, chunk data fields included in a frame buffer should be associated with features grouped under a common category which should also contain the ChunkSelector and ChunkEnable features. In the example above a single call to CreateChunkCategory creates the ChunkDataControl category and adds ChunkSelector and ChunkEnable features to it.

Note that this method does not handle inclusionsion of chunks into frame buffers, but only adds chunk-related members to the camera's XML file. To insert chunk data into a frame buffer, use AddChunkData.

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