
90
Operational Reference
Genie HM-HC Series-GigE Vision Camera
Accessing the Genie User Buffer
Genie cameras have unallocated memory available to the user for random data storage. This user buffer is a feature
of type SapFeature::TypeBuffer. Any type of Sapera buffer is valid as long as the buffer size in bytes is less than 4k.
Access to this user buffer is by the same API as any Genie feature access. Sample code is provided below.
#include "SapClassBasic.h"
#include "stdio.h"
main()
{
int serverCount = SapManager::GetServerCount();
SapAcqDevice *pAcqDevice = NULL;
char serverName[CORSERVER_MAX_STRLEN];
UINT32 userBufferSize;
if (serverCount == 0)
{
printf("No device found!\n");
return FALSE;
}
for (int serverIndex = 0; serverIndex < serverCount; serv+)
{
if (SapManager::GetResourceCount(serverIndex, SapManager::ResourceAcqDevice) != 0)
{
SapManager::GetServerName(serverIndex, serverName, sizeof(serverName));
printf("Server Name: %s\n", serverName);
pAcqDevice = new SapAcqDevice(serverName, FALSE);
if
(!pAcqDevice->Create())
{
printf("Error during SapAcqDevice creation!\n");
return
FALSE;
}
break;
}
}
if(!pAcqDevice)
{
printf("No Genie found!\n");
return FALSE;
}
BOOL isUserBuffer = FALSE;
if( !pAcqDevice->IsFeatureAvailable("UserBuffer", &isUserBuffer))
{
printf("Error in IsFeatureAvailable( \"UserBuffer\" ) !\n");
return FALSE;
}
if(!isUserBuffer)
{
printf("No UserBuffer feature!\n");
return FALSE;
}
SapFeature feature(serverName);
if (!feature.Create())
{
printf("Error during feature creation!\n");
return FALSE;
}
if( !pAcqDevice->GetFeatureInfo("UserBuffer", &feature))
{
printf("Error during GetFeatureInfo(\"UserBuffer\")!\n");
return FALSE;
}
Содержание Genie HC1024
Страница 8: ...6 Contents Genie HM HC Series GigE Vision Camera ...
Страница 34: ...32 Installing the Genie Camera Genie HM HC Series GigE Vision Camera ...
Страница 94: ...92 Operational Reference Genie HM HC Series GigE Vision Camera ...
Страница 98: ...96 Network Overview Tools Genie HM HC Series GigE Vision Camera ...
Страница 104: ...102 Sapera CamExpert Guide Genie HM HC Series GigE Vision Camera ...
Страница 107: ...Genie HM HC Series GigE Vision Camera Technical Specifications 105 Genie 3D View with Right angle C mount and CS mount ...
Страница 126: ...124 Technical Specifications Genie HM HC Series GigE Vision Camera EC FCC Declaration of Conformity ...
Страница 138: ...136 Glossary of Terms Genie HM HC Series GigE Vision Camera ...