Software
C/C++ Driver Interface
(c) Spectrum GmbH
29
Function SpcSetData (Windows)
Under Linux the additional parameter nBytesPerSample must be used for this function. For all boards with 8 bit resolution the parameter is
„1“, for all boards with 12, 14 or 16 bit resolution this parameter has to be „2“. Under Linux the value „hDrv“ must contain the handle that
was given back by the open function of that specific board. Under Linux the return value is not an error code but the number of bytes that
has been written.
Function SpcSetData (Linux)
Function SpcGetData
Reads data from the board from a specific memory channel. The board must first be initialized. The value „nr“ contains the index of the board
that you want to access, the „ch“ parameter contains the memory channel. „start“ and „len“ define the position of data to be read. „data“
is a pointer to the array that should hold the data. The function will return an error value in case of malfunction.
This function is only available on acquisition or i/o boards. The function is not available on generator boards.
Function SpcGetData
Under Linux the additional parameter nBytesPerSample must be used for this function. For all boards with 8 bit resolution the parameter is
„1“, for all boards with 12, 14 or 16 bit resolution this parameter has to be „2“, when reading timestamps this parameter has to be „8“.
Under Linux the value „hDrv“ must contain the handle that was given back by the open function of that specific board. Under Linux the return
value is not an error code but is the number of bytes that has been read.
Function SpcGetData (Linux)
int16 SpcSetData (int16 nr, int16 ch, int32 start, int32 len, dataptr data);
int32 SpcSetData (int hDrv, int32 lCh, int32 lStart, int32 lLen, int16 nBytesPerSample, dataptr pvData)
int16 SpcGetData (int16 nr, int16 ch, int32 start, int32 len, dataptr data);
int32 SpcGetData (int hDrv, int32 lCh, int32 lStart, int32 lLen, int16 nBytesPerSample, dataptr pvData)