LibTiePie  0.4.3
Library for interfacing TiePie engineering instruments
 All Files Functions Typedefs Macros Groups Pages
Pointer array

Functions for making an array of pointers, useful for programming/scripting languages that can't handle pointers to pointers properly. More...

Functions

LibTiePiePointerArray_t HlpPointerArrayNew (uint32_t dwLength)
 Create a new pointer array.
 
void HlpPointerArrayDelete (LibTiePiePointerArray_t pArray)
 Delete an existing pointer array.
 
void HlpPointerArraySet (LibTiePiePointerArray_t pArray, uint32_t dwIndex, void *pPointer)
 Set a pointer in a pointer array.
 

Detailed Description

Functions for making an array of pointers, useful for programming/scripting languages that can't handle pointers to pointers properly.

Example (pseudocode):

buffers = empty list/array
pointerArray = HlpPointerArrayNew( channelCount )
for i = 0 to channelCount - 1
buffers[ i ] = allocate buffer/array
HlpPointerArraySet( pointerArray , i , pointer of buffers[ i ] )
end
ScpGetData( handle , pointerArray , channelCount , ... )
HlpPointerArrayDelete( pointerArray )
the data is now available in: buffers
See Also
ScpGetData
ScpGetDataRaw

Function Documentation

LibTiePiePointerArray_t HlpPointerArrayNew ( uint32_t  dwLength)

Create a new pointer array.

The pointer array is initialized with NULL pointers.

Parameters
dwLengthLength of the pointer array.
void HlpPointerArrayDelete ( LibTiePiePointerArray_t  pArray)

Delete an existing pointer array.

Parameters
pArrayPointer to array.
void HlpPointerArraySet ( LibTiePiePointerArray_t  pArray,
uint32_t  dwIndex,
void *  pPointer 
)

Set a pointer in a pointer array.

Parameters
pArrayPointer to array.
dwIndexArray index.
pPointerPointer value to set.