EasyManua.ls Logo

Dalsa Genie HM640 - Accessing the Genie User Buffer

Dalsa Genie HM640
141 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
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; serverIndex++)
{
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;
}

Table of Contents

Related product manuals