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())
{
Genie Monochrome Series-GigE Vision Camera
Operational Reference
•
97