GX5296
Returns the number of channels that are associated with the specified site number.
GtDio6xMultiSiteGetSiteChannelCount (nHandle, lSiteNumber, plChannelCount, pnStatus)
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. |
lSiteNumber |
LONG |
Site number can be 0 (GTDIO6X_MULTI_SITE_FIRST_SITE_NUM) to 31 (GTDIO6X_MULTI_SITE_MAX_SITE_NUM). |
lplChannelCount |
PLONG |
Returns the number of channels that are associated with the specified site number. |
pnStatus |
PSHORT |
Returned status: 0 on success, negative value on failure. |
The function returns the number of channels that are associated with the specified site number. This function is usefull when the user wants to retrieve a specific site’s channels least, where the plChannelCount is then passed to the GtDio6xMultiSiteGetChannelList() API to specify the size of the channels list array (see example below).
NOTE: The GtDio6xMultiSiteXXX() APIs provides the functionality required for efficient multi-site testing. By enabling parallel testing of multiple Devices Under Test (DUTs) simultaneously.
The following example sets 3 sites with a list of channels, and prints each site channel count:
Note: see GtDio6xMultiSiteGetRealTimeCompareFailures() API for a complete example.
SHORT nStatus;
LONG l, lChannelCount;
LONG alSiteChannels[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);
For (l=0; l<3; l++)
{ GtDio6xMultiSiteGetSiteChannelCount (nHandle, 0, &lChannelCount, &nStatus)
printf("Site %i, Channel Count Channel %i\n\n", l, lChannelCount);
}
GtDio6xMultiSiteDeleteAllSites, GtDio6xMultiSiteGetChannelList, GtDio6xMultiSiteGetRealTimeCompareFailures, GtDio6xMultiSiteGetSiteList, GtDio6xMultiSiteGetSiteCount, GtDio6xMultiSiteSetChannelList, GtDio6xMultiSiteSetSiteArray, GtDio6xMultiSiteWriteSystemMemoryToBoard , GtDio6xMultiSiteWriteVectorMemoryToSystemMemory, GtDio6xGetErrorString