Instruction manual
BoardSelect: board number
Mode: force basic setup yes/no
RETURN VALUE:
Board ID of board initialized successfully
-1 if ERROR. See el_GetErrorCode for details.
DESCRIPTION:
If the board specified with BoardSelect is not initialized yet, el_OpenHW() does the basic setup of the
video hardware and returns an unique board ID. If the board specified withBoardSelect is already
initialized, an error is returned.
To force a basic setup of the video hardware, if it is initialized or not, the parameter Mode must be set to
1. Mode = 1 must only be used when it is made sure that no other application is using the same video
hardware.
CAVEATS:
If a single board is used BoardSelect can be set to 0. With 0 the first board found on the bus is initialised.
If you use multiple boards in one PC the BoardSelect supplied must be higher than 0 and correspond to
the value set with the on-board hex switch of the grabber board. Otherwise you will get no board ID for
the grabber hardware. For example: If the hex switch on the board is set to '8' BoardSelect must be equal
'8' to get the board ID.
Errors may occure if an invalid BoardSelect parameter or a software revision incompatible with the
hardware revision is used. Other reasons are that ' el_OpenHW ' was called for the second time with
Mode = 0 or that two or more grabber boards have the same hex switch value.
SEE ALSO: el_CloseHW , el_GetNumOfBoards
EXAMPLE:
// Open the hardware
nBoardID = el_OpenHW( nHexSwitch, 0 );
if ( nBoardID < 0 ) {
ReportError( "el_OpenHW" );
return FALSE;
}
//
// Init context
//
char *pName = (szContextFile && szContextFile[0]) ? szContextFile : NULL;
int nRc = el_InitContext( nBoardID, pName );
if (0 != nRc) {
int nError = el_GetErrorCode();
return FALSE;
}
//
// Allocate Frame-Buffers
//
long nDummy = 0;
ppVideoMemory = el_InitHW( nBoardID, NULL, 0, 0, nSequenceLength, 0, &nDummy );
if ( !ppVideoMemory )
71