Instruction manual
0 and specify the X/Y dimension of each image buffer allocated by the user.
Then el_NewMemBuffer does not allocate image memory it uses the supplied image buffers. The size of
the current acquisition window is adapted to the supplied SizeX/SizeY values to make the image data fit
into the supplied memory buffers.
FrameCount specifies the number of buffers in a sequence. If FrameCount is 0/1 only a single buffer is
used for image acquisition.
Pitch specifies the offset between the start locations of two following lines in an image. Pitch must supply
the value (horizontal X dimension) used to allocate the image memory buffer. With user defined image
buffers the Pitch is fixed to the specified value, e.g. a call to el_SetAcqWindow will not change the Pitch.
The image buffer pointers supplied with MemStart are returned by el_InitHW for compatibility reasons.
Identification of Image Memory Buffers:
If new memory buffers should be created by el_NewMemBuffer or if new user defined memory buffers are
passed to el_NewMemBuffer the pointer used as parameter 'BuffNo' has to point to a long value initialised
with 0. Then a new buffer or sequence is added and the identifier of the new buffer is placed in *BuffNo. If
the pointer used for'BuffNo" points not to a 0 value the value is interpreted as a buffer handle and the
function tries to switch to the specified buffer sequence. In this case no new buffer sequence is created.
For a discussion of sequences used as swing buffers see Sequences
CAVEATS: When the function is called a new buffer or sequence is created depending on the parameters
of the function. Single buffers and sequences can be freed by the function el_FreeMemBuffer .
User defined image memory
To use user defined image memory together with el_NewMemBuffer() some conditions have to
mentioned:
If image memory is allocated with malloc() or with user specific allocation routines (on HiPerCam1
0x20000) the start address of each image buffer passed to el_NewMemBuffer must be page aligned
otherwise el_NewMemBuffer will return with error.
Windows only:
To request page aligned memory, please use one of the following methods:
The function VirtualAlloc() reserves or commits a region of memory in the virtual address space of your
application. Memory allocated with VirtualAlloc() can not be exported to other applications.
To use memory mapped files as shared memory for multiple applications use the functions
CreateFileMapping() and MapViewOfFiles(). For detailed information please refer to the function
description within the Windows SDK. Allocating Image Memory
SEE ALSO: el_InitHW
5.2.24. el_OpenHW
long
el_OpenHW ( long BoardSelect, long Mode );
Basic setup of selected video hardware - no initialization of video frontend. el_OpenHW returns an unique
board ID for each video hardware. The board ID returned by this function will be needed for all
subsequent calls of the library to access the corresponding video hardware.
PARAMETERS:
70