GtDio6xMultiSiteGetSiteList

Applies To

GX5296

Purpose

Returns an array with all the sites’ numbers.

Syntax

GtDio6xMultiSiteGetChannelList (nHandle, lSitelListArraySize, palSiteListArray, pnStatus)

Parameters

Name
Type
Comments
nHandle
SHORT
Session identifier:
Board handle is used when communicating with the hardware. The Board handle session identifier is returned by calling GtDio6xInitialize or GtDio6xSetupInitialization.
lSiteListArraySize  
LONG
Specifies the size of the palSiteListArray.
palSiteListArray
PLONG
Returns an array contains the sites numbers.
pnStatus
PSHORT
Returned status: 0 on success, negative value on failure.

Comments

The function returns an array with the sites’ numbers. The number of currently declared sites can be retrieved by calling GtDio6xMultiSiteGetSiteCount() API. User should call GtDio6xMultiSiteDeleteAllSites() API before setting any multi-site channels.

Site number can be 0 (GTDIO6X_MULTI_SITE_FIRST_SITE_NUM) to 31 (GTDIO6X_MULTI_SITE_MAX_SITE_NUM). Site number don’t need in sequential order as long as they are between 0-31.

Note: The GtDio6xMultiSiteXXX() APIs provides the functionality required for efficient multi-site testing. By enabling parallel testing of multiple Devices Under Test (DUTs) simultaneously.

Example

The following example sets 3 sites with a list of channels, and prints each site channel count, and site’s list of channels:

Note: see GtDio6xMultiSiteGetRealTimeCompareFailures() API for a complete example.

 

SHORT   nStatus;

LONG    l, lChannelCount;

LONG    lSiteCount, lChannel;

LONG    alSiteListArray[32];

 

// Fill Site #0 Channels Array: CH0-CH3

for (l = 0; l < 4; l++)

    alSiteChannels[l] = l;

// Set Site0 Channels list

GtDio6xMultiSiteSetChannelList(nHandle, 0, 4, alSiteChannels, &nStatus);

CheckStatus(nStatus);

 

// Fill Site #1 Channels Array: CH5-CH8

for (l = 0; l < 4; l++)

    alSiteChannels[l] = l + 5;

// Set Site #1 Channels list

GtDio6xMultiSiteSetChannelList(nHandle, 1, 4, alSiteChannels, &nStatus);

CheckStatus(nStatus);

 

// Fill Site #2 Channels Array: CH10-CH12

for (l = 0; l < 3; l++)

    alSiteChannels[l] = l + 10;

// Set Site #2 Channels list

GtDio6xMultiSiteSetChannelList(nHandle, 2, 4, alSiteChannels, &nStatus);

CheckStatus(nStatus);

 

GtDio6xMultiSiteGetSiteCount (nHandle, &lSiteCount, &nStatus);

CheckStatus(nStatus);

GtDio6xMultiSiteGetSiteList(nHandle, lSiteCount, alSiteListArray, &nStatus);

CheckStatus(nStatus);

for (l=0; l< lSiteCount; l++)

    printf("Site #%i\n\n", l, alSiteListArray[l]);

 

See Also

GtDio6xMultiSiteDeleteAllSites, GtDio6xMultiSiteGetRealTimeCompareFailures, GtDio6xMultiSiteGetSiteChannelCount, GtDio6xMultiSiteGetSiteCount, GtDio6xMultiSiteSetChannelList, GtDio6xMultiSiteSetSiteArray, GtDio6xMultiSiteWriteSystemMemoryToBoard,  GtDio6xMultiSiteWriteVectorMemoryToSystemMemory, GtDio6xGetErrorString