
Operation,
Remote Operation
1-2-5
RGS-2000NG TCAS Test Set Operation Manual
139187 / Rev. 500
Page 238
Subject to Export Control. See Cover Page for details.
September 2021
return RGS_status;
}
//=============================================================================
// Function: Log session into wait list
// Purpose: This function adds the session to the open list
//=============================================================================
ViStatus RGS_sessionInfoOpen (ViSession instHandle, ViRsrc resourceName)
{
int index;
// Check to see if the session handle already exists
for (index = 0; index < MAX_SESSIONS; index++)
{
if (sessionInfo[index].session == instHandle)
break;
}
if (index < MAX_SESSIONS)
return RGS_ERROR_SESSION_ALREADY_EXITS;
// Check to see if there is room to open another session handle
for (index = 0; index < MAX_SESSIONS; index++)
{
if (sessionInfo[index].session == 0)
{
strcpy (sessionInfo[index].resourceName, resourceName) ;
sessionInfo[index].session = instHandle;
sessionInfo[index].curWaitTime = WAITTIME0_02;
sessionInfo[index].startTime = Timer();
return VI_SUCCESS;
}
}
// Return error
return RGS_ERROR_TOO_MANY_SESSIONS;
}
//=============================================================================
// Function: Remove session from wait list
// Purpose: This function removes the session from the open list
//=============================================================================
ViStatus RGS_sessionInfoClose (ViSession instHandle)
{
int index;
Example Program (cont)