Al_getdataoffsetlist – Measurement Computing ADLIB WIN User Manual
Page 113

Chapter 34 Data Offsets
25-3
25.2 AL_GetDataOffsetList
Prototype
C\C++
ERRNUM
AL_GetDataOffsetList(LHLD
lhld, LPDATAOFFSETLIST
lpDataOffsetlist);
Visual Basic for Windows
Function
AL_GetDataOffsetList(ByVal
lhld As Long, lpDataOffsetlist As
DATAOFFSETLIST) As Long
LHLD lhld
handle of the LDSD
LPCHANLIST lpchanlist
destination address of the user channel list structure
The AL_GetDataOffsetList function retrieves to the current LDSD DataOffsetlist settings. The
DataOffsetlisting is comprised of a channel number and DATAOFFSET type. The DATAOFFSET list
may contain Channel/DataOffset settings that are not currently set in the channel listing itself. The
DataOffset ID setting in the array can be obtained from the capability file.
Parameter
Description
lhld
Identifies the instance of the logical device subsystem.
lpchanlist Specifies a 32 bit far pointer to a DATAOFFSET information structure. This
structure
has
been
predefined in the ADLIB include file and is defined as
follows:
typedef struct tagDATAOFFSETLIST
{
long
lType; /* 0 = Not Defined */
/* 1 = Use string list */
/* 2 = Use array of ints */
char
achDataOffsetList[MAX_DATAOFFSET_STRLEN];
long
lNumElements;
long
alDataOffsetList[MAX_DATAOFFSET_LIST_ARRAYLEN];
}DATAOFFSET
typedef DATAOFFSET FAR * LPDATAOFFSETLIST;
Returns:
On success ERRNUM is set to 1 and the lpDataOffsetlist structure is filled with the device's DataOffsetlist
settings, otherwise ERRNUM contains the last error code that occurred during the call and the
lpDataOffsetlist structure may contain invalid information.
Related Functions:
AL_SetDataOffsetList
AL_SetDataOffsetGlobal
Examples:
•
string
“0(BIP),1(UNI),2(BIP),3(BIP),4(BIP),5(BIP),6(UNI),7(UNI)”
•
array
{0,1800, 1,1801, 2, 1800, 3, 1800, 4, 1800, 5, 1800, 6, 1801, 7, 1801};