86
Operational Reference
Genie Color 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 Color C640
Страница 90: ...88 Operational Reference Genie Color Series GigE Vision Camera...
Страница 94: ...92 Network Overview Tools Genie Color Series GigE Vision Camera...
Страница 101: ...Genie Color Series GigE Vision Camera Technical Specifications 99 Genie 3D View with Right angle C mount and CS mount...
Страница 118: ...116 Technical Specifications Genie Color Series GigE Vision Camera EC FCC Declaration of Conformity...
Страница 130: ...128 Glossary of Terms Genie Color Series GigE Vision Camera...