To associate a user supplied buffer with this request, you have to do the following:
Finally, if you press [ENTER], the image window will be destroyed and the device will be closed.
#include <apps/Common/exampleHelper_C.h>
#include <assert.h>
#include <limits.h>
#include <mvDeviceManager/Include/mvDeviceManager.h>
#include <stdio.h>
#include <stdlib.h>
#ifdef _WIN32
# include <conio.h>
# include <mvDisplay/Include/mvDisplayExtensions.h>
# include <mvDisplay/Include/mvDisplayWindow.h>
# include <process.h>
# include <windows.h>
# define USE_MV_DISPLAY_LIB
# define LIVE_LOOP_CALL __stdcall
#elif defined(linux) || defined(__linux) || defined(__linux__) || defined(__APPLE__)
# include <unistd.h>
# define LIVE_LOOP_CALL
# if defined(__x86_64__) || defined(__powerpc64__) || defined(__aarch64__)
typedef uint64_t UINT_PTR;
# elif defined(__i386__) || defined(__arm__) || defined(__powerpc__)
typedef uint32_t UINT_PTR;
# else
# error unsupported target platform
# endif
#else
# error unsupported target platform
#endif
#define BUF_SIZE (512)
static int s_boTerminated = 0;
typedef struct _UserSuppliedHeapBuffer
{
char* pBuf_;
char* pBufAligned_;
int bufSize_;
int alignment_;
void* pNext_;
void* pPrev_;
} UserSuppliedHeapBuffer;
typedef struct _Request
{
HOBJ hImageData_;
HOBJ hImageFooterSize_;
HOBJ hImageMemoryMode_;
HOBJ hImageSize_;
int nr_;
} Request;
typedef struct _CaptureParameter
{
HDRV hDrv;
#ifdef USE_MV_DISPLAY_LIB
HDISP hDisp;
TDisp* pDisp;
#endif
Request** ppRequests;
size_t requestCount;
UserSuppliedHeapBuffer* pFirstHeapBuffer;
HOBJ hRequestCount;
HOBJ hFramesPerSecond;
HOBJ hCaptureBufferAlignment;
HOBJ hRequestControl_Mode;
HOBJ hRequestControl_RequestToUse;
int boUserSuppliedMemoryUsed;
} CaptureParameter;
int isPowerOfTwo( int val );
UserSuppliedHeapBuffer* UserSuppliedHeapBuffer_Alloc( int bufSize, int alignment );
void UserSuppliedHeapBuffer_Free( UserSuppliedHeapBuffer* p );
void UserSuppliedHeapBuffer_Insert( UserSuppliedHeapBuffer* p, UserSuppliedHeapBuffer* pAfter );
void UserSuppliedHeapBuffer_Remove( UserSuppliedHeapBuffer* p );
Request* Request_Alloc( HDRV hDrv, int nr );
void Request_Free( Request* p );
int Request_IsValid( Request* p );
void checkCaptureBufferAddress( const Request* const pRequest, int boShouldContainUserSuppliedMemory, const UserSuppliedHeapBuffer* pFirstBuffer );
int createCaptureBuffers( CaptureParameter* pCaptureParameters, int bufferSize, int bufferAlignment );
void freeCaptureBuffers( CaptureParameter* pCaptureParameters );
void allocateRequests( CaptureParameter* captureParams );
void freeRequests( CaptureParameter* captureParams );
void captureLoop( CaptureParameter* pCaptureParams );
int isPowerOfTwo( int val )
{
return ( ( ( val & ( val - 1 ) ) == 0 ) && ( val > 0 ) );
}
UserSuppliedHeapBuffer* UserSuppliedHeapBuffer_Alloc( int bufSize, int alignment )
{
UserSuppliedHeapBuffer* p = ( UserSuppliedHeapBuffer* )calloc( 1, sizeof( UserSuppliedHeapBuffer ) );
if( p )
{
p->bufSize_ = bufSize;
p->alignment_ = alignment;
if( bufSize > 0 )
{
assert( isPowerOfTwo( alignment ) );
p->pBuf_ = ( char* )calloc( 1, bufSize + alignment );
#if defined(_MSC_VER) && (_MSC_VER < 1400)
p->pBufAligned_ = ( char* )( ( ( ( UINT_PTR )( p->pBuf_ ) + alignment - 1 ) & ( UINT_MAX - ( alignment - 1 ) ) ) );
#elif defined(_WIN32) && defined(__BORLANDC__)
p->pBufAligned_ = ( char* )( ( ( ( UINT_PTR )( p->pBuf_ ) + alignment - 1 ) & ( UINT_MAX - ( alignment - 1 ) ) ) );
#else
p->pBufAligned_ = ( char* )( ( ( ( UINT_PTR )( p->pBuf_ ) + alignment - 1 ) & ( SIZE_MAX - ( alignment - 1 ) ) ) );
#endif
}
else
{
p->pBuf_ = 0;
p->pBufAligned_ = 0;
}
p->pNext_ = 0;
p->pPrev_ = 0;
}
return p;
}
void UserSuppliedHeapBuffer_Free( UserSuppliedHeapBuffer* p )
{
if( p )
{
if( p->pBuf_ )
{
free( p->pBuf_ );
p->pBuf_ = 0;
}
free( p );
}
}
void UserSuppliedHeapBuffer_Insert( UserSuppliedHeapBuffer* p, UserSuppliedHeapBuffer* pAfter )
{
if( p )
{
if( pAfter )
{
p->pNext_ = pAfter->pNext_;
pAfter->pNext_ = p;
}
else
{
p->pNext_ = 0;
}
p->pPrev_ = pAfter;
}
}
void UserSuppliedHeapBuffer_Remove( UserSuppliedHeapBuffer* p )
{
if( p )
{
if( p->pNext_ )
{
( ( UserSuppliedHeapBuffer* )( p->pNext_ ) )->pPrev_ = p->pPrev_;
}
if( p->pPrev_ )
{
( ( UserSuppliedHeapBuffer* )( p->pPrev_ ) )->pNext_ = p->pNext_;
}
}
}
Request* Request_Alloc( HDRV hDrv, int nr )
{
Request* p = ( Request* )calloc( 1, sizeof( Request ) );
if( p )
{
p->hImageData_ = getRequestProp( hDrv, nr, "Data" );
p->hImageFooterSize_ = getRequestProp( hDrv, nr, "FooterSize" );
p->hImageMemoryMode_ = getRequestProp( hDrv, nr, "MemoryMode" );
p->hImageSize_ = getRequestProp( hDrv, nr, "Size" );
p->nr_ = nr;
}
return p;
}
void Request_Free( Request* p )
{
if( p )
{
free( p );
}
}
int Request_IsValid( Request* p )
{
( p->nr_ >= 0 ) )
{
return 1;
}
return 0;
}
void checkCaptureBufferAddress( const Request* const pRequest, int boShouldContainUserSuppliedMemory, const UserSuppliedHeapBuffer* pFirstBuffer )
{
void* pAddr = 0;
const UserSuppliedHeapBuffer* pBuffer = pFirstBuffer;
int cnt = 0;
if( boShouldContainUserSuppliedMemory && ( memoryMode !=
rimmUser ) )
{
printf( "ERROR: Request number %d is supposed to contain user supplied memory, but claims that it doesn't.\n", pRequest->nr_ );
return;
}
else if( !boShouldContainUserSuppliedMemory )
{
{
printf( "ERROR: Request number %d is supposed NOT to contain user supplied memory, but claims that it does.\n", pRequest->nr_ );
}
return;
}
pAddr = getPropP( pRequest->hImageData_, 0 );
pBuffer = pFirstBuffer;
while( pBuffer )
{
if( pAddr == pBuffer->pBufAligned_ )
{
return;
}
pBuffer = pBuffer->pNext_;
}
printf( "ERROR: A buffer has been returned, that doesn't match any of the buffers assigned as user memory in request number %d.\n", pRequest->nr_ );
printf( "Buffer got: %p.\n", pAddr );
printf( "Buffers allocated:\n" );
pBuffer = pFirstBuffer;
while( pBuffer )
{
printf( "[%d]: %p.\n", cnt, pBuffer->pBufAligned_ );
cnt = cnt + 1;
}
}
int createCaptureBuffers( CaptureParameter* pCaptureParameters, int bufferSize, int bufferAlignment )
{
size_t i = 0;
UserSuppliedHeapBuffer* pBuffer = 0;
freeCaptureBuffers( pCaptureParameters );
for( i = 0; i < pCaptureParameters->requestCount; i++ )
{
pBuffer = UserSuppliedHeapBuffer_Alloc( bufferSize, bufferAlignment );
if( pBuffer )
{
{
printf(
"An error occurred while setting request number %d in configuration mode: %s.\n", pCaptureParameters->ppRequests[i]->nr_,
DMR_ErrorCodeToString( functionResult ) );
freeCaptureBuffers( pCaptureParameters );
UserSuppliedHeapBuffer_Free( pBuffer );
return -1;
}
if( pCaptureParameters->pFirstHeapBuffer )
{
UserSuppliedHeapBuffer_Insert( pBuffer, pCaptureParameters->pFirstHeapBuffer );
}
else
{
pCaptureParameters->pFirstHeapBuffer = pBuffer;
}
setPropI( pCaptureParameters->ppRequests[i]->hImageMemoryMode_,
rimmUser, 0 );
setPropP( pCaptureParameters->ppRequests[i]->hImageData_, pBuffer->pBufAligned_, 0 );
setPropI( pCaptureParameters->ppRequests[i]->hImageSize_, pBuffer->bufSize_, 0 );
{
printf(
"An error occurred while unlocking request number %d: %s.\n", pCaptureParameters->ppRequests[i]->nr_,
DMR_ErrorCodeToString( functionResult ) );
freeCaptureBuffers( pCaptureParameters );
return -1;
}
}
}
return 0;
}
void freeCaptureBuffers( CaptureParameter* pCaptureParameters )
{
size_t i = 0;
UserSuppliedHeapBuffer* pBuffer = pCaptureParameters->pFirstHeapBuffer;
for( i = 0; i < pCaptureParameters->requestCount; i++ )
{
{
continue;
}
{
printf(
"An error occurred while setting request number %d in configuration mode: %s.\n", pCaptureParameters->ppRequests[i]->nr_,
DMR_ErrorCodeToString( functionResult ) );
continue;
}
setPropI( pCaptureParameters->ppRequests[i]->hImageMemoryMode_,
rimmAuto, 0 );
{
printf(
"An error occurred while unlocking request number %d: %s.\n", pCaptureParameters->ppRequests[i]->nr_,
DMR_ErrorCodeToString( functionResult ) );
}
}
while( pBuffer )
{
UserSuppliedHeapBuffer* p = pBuffer;
pBuffer = pBuffer->pNext_;
UserSuppliedHeapBuffer_Free( p );
}
pCaptureParameters->pFirstHeapBuffer = 0;
}
void allocateRequests( CaptureParameter* captureParams )
{
size_t i = 0;
freeRequests( captureParams );
captureParams->requestCount = ( size_t )getPropI( captureParams->hRequestCount, 0 );
captureParams->ppRequests = 0;
if( captureParams->requestCount > 0 )
{
captureParams->ppRequests = ( Request** )( calloc( captureParams->requestCount, sizeof( Request* ) ) );
if( captureParams->ppRequests == 0 )
{
captureParams->requestCount = 0;
return;
}
for( i = 0; i < captureParams->requestCount; i++ )
{
captureParams->ppRequests[i] = Request_Alloc( captureParams->hDrv, ( int )i );
if( captureParams->ppRequests == 0 )
{
captureParams->requestCount = 0;
return;
}
}
}
}
void freeRequests( CaptureParameter* captureParams )
{
size_t i = 0;
if( captureParams->requestCount <= 0 )
{
return;
}
for( i = 0; i < captureParams->requestCount; i++ )
{
Request_Free( captureParams->ppRequests[i] );
}
free( captureParams->ppRequests );
captureParams->ppRequests = 0;
captureParams->requestCount = 0;
}
unsigned int LIVE_LOOP_CALL liveLoop( void* pData )
{
HDRV hDrv;
int frameCount;
double fps;
int requestNr;
int lastRequestNr;
CaptureParameter* pCaptureParameter;
pCaptureParameter = ( ( CaptureParameter* )pData );
hDrv = pCaptureParameter->hDrv;
pIB = 0;
frameCount = 0;
fps = 0.0;
requestNr = -1;
lastRequestNr = -1;
{
printf(
"DMR_ImageRequestSingle: Unexpected error(code: %d(%s))\n", result,
DMR_ErrorCodeToString( result ) );
}
manuallyStartAcquisitionIfNeeded( hDrv );
while( !s_boTerminated )
{
const int timeout_ms = 500;
int overallTimeWaited_ms = 0;
{
{
frameCount = frameCount + 1;
if( ( frameCount % 100 ) == 0 )
{
OBJ_GetF( pCaptureParameter->hFramesPerSecond, &fps, 0 );
printf( "frames per second: %.5f.\n", fps );
}
{
#ifdef USE_MV_DISPLAY_LIB
#endif
checkCaptureBufferAddress( pCaptureParameter->ppRequests[requestNr], pCaptureParameter->boUserSuppliedMemoryUsed, pCaptureParameter->pFirstHeapBuffer );
}
else
{
}
}
else
{
printf(
"DMR_GetImageRequestResult: ERROR! Return value: %d, request result: %d.\n", result, ReqRes.
result );
}
if( lastRequestNr >= 0 )
{
}
lastRequestNr = requestNr;
}
else
{
overallTimeWaited_ms += timeout_ms;
printf(
"DMR_ImageRequestWaitFor failed(code: %d(%s)), meaning no buffer became ready after %d ms\n", result,
DMR_ErrorCodeToString( result ), overallTimeWaited_ms );
printf( "Please note that slow systems or interface technologies in combination with\n" );
printf( "high resolution sensors might need more time to transmit an image in %d ms.\n", timeout_ms );
printf( "If this is the case increase the timeout and rebuild this application or simply wait multiple times.\n" );
printf( "Once the camera is configured for triggered image acquisition and the timeout elapsed\n before the camera has been triggered this might happen as well.\n" );
}
#if defined(linux) || defined(__linux) || defined(__linux__) || defined(__APPLE__)
s_boTerminated = waitForInput( 0, STDOUT_FILENO ) == 0 ? 0 : 1;
#endif
}
manuallyStopAcquisitionIfNeeded( hDrv );
#ifdef USE_MV_DISPLAY_LIB
#endif
if( requestNr >= 0 )
{
}
{
}
return 0;
}
void captureLoop( CaptureParameter* pCaptureParams )
{
#ifdef _WIN32
HANDLE hThread = NULL;
unsigned int threadID = 0;
#endif
printf( "Press [ENTER] to end the continuous acquisition.\n" );
s_boTerminated = 0;
#ifdef _WIN32
hThread = ( HANDLE )_beginthreadex( 0, 0, liveLoop, ( LPVOID )( pCaptureParams ), 0, &threadID );
# ifdef __BORLANDC__
if( getch() == EOF )
{
printf( "Calling 'getch' did return EOF...\n" );
}
# else
if( _getch() == EOF )
{
printf( "Calling '_getch' did return EOF...\n" );
}
# endif
s_boTerminated = 1;
WaitForSingleObject( hThread, INFINITE );
CloseHandle( hThread );
#else
liveLoop( pCaptureParams );
#endif
}
int main( int argc, char* argv[] )
{
CaptureParameter captureParams;
unsigned int i = 0;
char* pStringBuffer = NULL;
UserSuppliedHeapBuffer* pUserSuppliedBuffer = 0;
int bufferSize = 0;
const int REQUEST_TO_USE = 2;
( void )argc;
( void )argv;
{
printf( "DMR_Init failed (code: %d)\n", result );
END_APPLICATION;
}
getDeviceFromUserInput( &hDevice, 0, 1 );
if( ( hPropFamily = getDeviceProp( hDevice,
"Family" ) ) ==
INVALID_ID )
{
printf( "Failed to obtain device family property for device %d.\n", i );
END_APPLICATION;
}
getStringValue( hPropFamily, &pStringBuffer, 0 );
free( pStringBuffer );
pStringBuffer = 0;
{
printf( "DMR_OpenDevice failed (code: %d)\n", result );
END_APPLICATION;
}
#ifdef USE_MV_DISPLAY_LIB
#endif
captureParams.hDrv = hDrv;
captureParams.pFirstHeapBuffer = 0;
captureParams.requestCount = 0;
captureParams.ppRequests = 0;
if( ( captureParams.hFramesPerSecond = getStatisticProp( hDrv,
"FramesPerSecond" ) ) ==
INVALID_ID )
{
printf( "Couldn't locate 'FramesPerSecond' property! Unable to continue!\n" );
END_APPLICATION;
}
if( ( captureParams.hRequestCount = getSystemSettingProp( hDrv,
"RequestCount" ) ) ==
INVALID_ID )
{
printf( "Couldn't locate 'RequestCount' property! Unable to continue!\n" );
END_APPLICATION;
}
if( ( captureParams.hCaptureBufferAlignment = getInfoProp( hDrv,
"CaptureBufferAlignment" ) ) ==
INVALID_ID )
{
printf( "Couldn't locate 'CaptureBufferAlignment' property! Unable to continue!\n" );
END_APPLICATION;
}
if( ( captureParams.hRequestControl_Mode = getRequestCtrlProp( hDrv,
"Base",
"Mode" ) ) ==
INVALID_ID )
{
printf( "Couldn't locate request controls 'Mode' property! Unable to continue!\n" );
END_APPLICATION;
}
if( ( captureParams.hRequestControl_RequestToUse = getRequestCtrlProp( hDrv,
"Base",
"RequestToUse" ) ) ==
INVALID_ID )
{
printf( "Couldn't locate request controls 'RequestToUse' property! Unable to continue!\n" );
END_APPLICATION;
}
allocateRequests( &captureParams );
if( captureParams.requestCount <= 0 )
{
printf( "Couldn't allocate requests! Unable to continue!\n" );
END_APPLICATION;
}
printf( "The device will try to capture continuously into memory automatically allocated be the device driver..\n" );
printf( "This is the default behaviour.\n" );
captureParams.boUserSuppliedMemoryUsed = 0;
captureLoop( &captureParams );
printf( "The device will now try to capture continuously into user supplied memory.\n" );
captureParams.boUserSuppliedMemoryUsed = 1;
setPropI( captureParams.hRequestControl_Mode,
ircmTrial, 0 );
{
{
bufferSize = getPropI( captureParams.ppRequests[requestNr]->hImageSize_, 0 ) + getPropI( captureParams.ppRequests[requestNr]->hImageFooterSize_, 0 );
setPropI( captureParams.hRequestControl_Mode,
ircmManual, 0 );
result = createCaptureBuffers( &captureParams, bufferSize, getPropI( captureParams.hCaptureBufferAlignment, 0 ) );
if( result != 0 )
{
printf(
"An error occurred while setting up the user supplied buffers(error code: %s).\n",
DMR_ErrorCodeToString( result ) );
freeRequests( &captureParams );
END_APPLICATION;
}
}
else
{
printf(
"Internal error(Request result: %08x! This should not happen an is a driver fault! Unable to continue.\n", ReqRes.
result );
freeRequests( &captureParams );
END_APPLICATION;
}
}
else
{
printf( "Internal error! This should not happen and is a driver fault! Unable to continue.\n" );
freeRequests( &captureParams );
END_APPLICATION;
}
captureLoop( &captureParams );
freeCaptureBuffers( &captureParams );
captureParams.boUserSuppliedMemoryUsed = 0;
printf( "The device will try to capture continuously into memory automatically allocated be the device driver again.\n" );
printf( "This is the default behaviour.\n" );
captureLoop( &captureParams );
printf( "Now the device will try to capture one frame into a specific user supplied buffer.\n" );
pUserSuppliedBuffer = UserSuppliedHeapBuffer_Alloc( bufferSize, getPropI( captureParams.hCaptureBufferAlignment, 0 ) );
if( getPropI( captureParams.hRequestCount, 0 ) <= REQUEST_TO_USE )
{
setPropI( captureParams.hRequestCount, REQUEST_TO_USE + 1, 0 );
allocateRequests( &captureParams );
if( captureParams.requestCount <= 0 )
{
printf( "Couldn't allocate requests! Unable to continue!\n" );
UserSuppliedHeapBuffer_Free( pUserSuppliedBuffer );
END_APPLICATION;
}
}
{
printf(
"An error occurred while setting request number %d in configuration mode: %s.\n", REQUEST_TO_USE,
DMR_ErrorCodeToString( result ) );
printf( "Press [ENTER] to end the continuous acquisition.\n" );
freeRequests( &captureParams );
freeCaptureBuffers( &captureParams );
UserSuppliedHeapBuffer_Free( pUserSuppliedBuffer );
END_APPLICATION;
}
if( captureParams.ppRequests[REQUEST_TO_USE] == 0 )
{
printf( "An error occurred when accessing the request to use" );
freeRequests( &captureParams );
freeCaptureBuffers( &captureParams );
UserSuppliedHeapBuffer_Free( pUserSuppliedBuffer );
END_APPLICATION;
}
setPropI( captureParams.ppRequests[REQUEST_TO_USE]->hImageMemoryMode_,
rimmUser, 0 );
setPropP( captureParams.ppRequests[REQUEST_TO_USE]->hImageData_, pUserSuppliedBuffer->pBufAligned_, 0 );
setPropI( captureParams.ppRequests[REQUEST_TO_USE]->hImageSize_, pUserSuppliedBuffer->bufSize_, 0 );
{
printf(
"An error occurred while unlocking request number %d: %s.\n", captureParams.ppRequests[REQUEST_TO_USE]->nr_,
DMR_ErrorCodeToString( result ) );
freeRequests( &captureParams );
freeCaptureBuffers( &captureParams );
UserSuppliedHeapBuffer_Free( pUserSuppliedBuffer );
END_APPLICATION;
}
setPropI( captureParams.hRequestControl_RequestToUse, REQUEST_TO_USE, 0 );
{
printf(
"An error occurred while requesting an image for request number %d: (%s).\n", REQUEST_TO_USE,
DMR_ErrorCodeToString( result ) );
printf( "Press [ENTER] to end the continuous acquisition.\n" );
freeRequests( &captureParams );
freeCaptureBuffers( &captureParams );
UserSuppliedHeapBuffer_Free( pUserSuppliedBuffer );
END_APPLICATION;
}
if( requestUsed != REQUEST_TO_USE )
{
printf( "ERROR! An acquisition into buffer %d was requested, but the driver did use %d for this acquisition.\n", REQUEST_TO_USE, requestUsed );
}
manuallyStartAcquisitionIfNeeded( hDrv );
manuallyStopAcquisitionIfNeeded( hDrv );
{
{
{
#ifdef USE_MV_DISPLAY_LIB
#else
printf(
"Frame captured into request number %d(%dx%d).\n", requestNr, pIB->
iWidth, pIB->
iHeight );
#endif
}
else
{
printf( "DMR_GetImageRequestBuffer: ERROR! Code %d\n", result );
}
}
else
{
printf(
"Acquisition into a specific buffer was not successful. Request result: 0x%08x.\n", ReqRes.
result );
}
}
else
{
printf(
"Waiting for a frame captured into a specific buffer failed: %s.\n",
DMR_ErrorCodeToString( result ) );
}
UserSuppliedHeapBuffer_Free( pUserSuppliedBuffer );
#ifdef USE_MV_DISPLAY_LIB
#endif
freeRequests( &captureParams );
freeCaptureBuffers( &captureParams );
END_APPLICATION;
}
int iHeight
The height of the image in pixel or lines.
Definition mvImageBuffer.h:98
int iWidth
The width of the image in pixel.
Definition mvImageBuffer.h:100
TRequestResult result
The result of this request.
Definition mvDeviceManager.h:224
TDMR_ERROR
Errors reported by the device manager.
Definition mvDriverBaseEnums.h:2601
TRequestImageMemoryMode
Defines valid image modes for request objects.
Definition mvDriverBaseEnums.h:4529
@ DEV_NO_FREE_REQUEST_AVAILABLE
The user requested a new image, but no free Request object is available to process this request.
Definition mvDriverBaseEnums.h:2713
@ rimmUser
User supplied memory mode.
Definition mvDriverBaseEnums.h:4547
@ rimmAuto
Automatic mode.
Definition mvDriverBaseEnums.h:4535
@ ircmManual
The standard mode for image requests.
Definition mvDriverBaseEnums.h:3883
@ ircmTrial
In this mode no 'real' image will be captured, but the whole processing chain will be traversed once.
Definition mvDriverBaseEnums.h:3899
Fully describes a captured image.
Definition mvImageBuffer.h:94
Contains status information about the capture process.
Definition mvDeviceManager.h:218
MVDMR_API TDMR_ERROR DMR_CALL DMR_ImageRequestReset(HDRV hDrv, int requestCtrl, int mode)
Deletes all requests currently queued for the specified request control.
Definition mvDeviceManager.cpp:2618
MVDMR_API TDMR_ERROR DMR_CALL DMR_Close(void)
Frees internal data structures and decreases the usage counter for this library.
Definition mvDeviceManager.cpp:1265
MVDMR_API TDMR_ERROR DMR_CALL DMR_ImageRequestUnlock(HDRV hDrv, int requestNr)
Unlocks the request for the driver again.
Definition mvDeviceManager.cpp:2727
MVDMR_API TDMR_ERROR DMR_CALL DMR_ReleaseImageRequestBufferDesc(ImageBuffer **ppBuffer)
frees the memory previously allocated for the specified ImageBuffer structure again.
Definition mvDeviceManager.cpp:4324
MVDMR_API TDMR_ERROR DMR_CALL DMR_CloseDevice(HDRV hDrv, HDEV hDev)
Closes a device.
Definition mvDeviceManager.cpp:1585
MVDMR_API TDMR_ERROR DMR_CALL DMR_Init(HDMR *pHDmr)
Initialises the library.
Definition mvDeviceManager.cpp:1137
MVDMR_API const char *DMR_CALL DMR_ErrorCodeToString(int errorCode)
Returns a string representation of a given error code.
Definition mvDeviceManager.cpp:5383
MVDMR_API TDMR_ERROR DMR_CALL DMR_OpenDevice(HDEV hDev, HDRV *pHDrv)
Initialises a device.
Definition mvDeviceManager.cpp:1516
void MV_DISPLAY_API_CALL mvDispWindowDestroy(HDISP hDisp)
Closes a display window and frees allocated memory.
Definition mvDisplayWindow.cpp:315
void MV_DISPLAY_API_CALL mvDispSetImageFromImageBuffer(TDisp *pDisp, const ImageBuffer *pBuf)
Sets the next image to display.
Definition mvDisplayExtensions.cpp:154
const int INVALID_ID
A constant to check for an invalid ID returned from the property handling module.
Definition mvPropHandlingDatatypes.h:62
MVDMR_API TPROPHANDLING_ERROR DMR_CALL OBJ_GetF(HOBJ hProp, double *pVal, int index)
Receives a property's value as a float value.
Definition ObjectHandling.cpp:2956