Specifications
178 Chapter 16
ESA/PSA Programming Examples
Using C to Make a Power Suite ACPR Measurement on a cdmaOne Signal
ESA/PSA Programming Examples
viQueryf(viPSA,"%s\n", "%#t","READ:ACP?;*wai" , &iNum , cResult);
/*Remove the "," from the ASCII data for analyzing data*/
cToken = strtok(cResult,",");
/*Save data to an ASCII to a file, by removing the "," token*/
fDataFile=fopen("C:\\ACPR.txt","w");
fprintf(fDataFile,"ACPR.exe Output\nAgilent Technologies 2001\n\n");
fprintf(fDataFile,"Please read Programer’s Reference for an\n");
fprintf(fDataFile,"explanation of returned results.\n\n");
while (cToken != NULL)
{
lCount++;
value = atof(cToken);
fprintf(fDataFile,"\tReturn value[%d] = %lf\n",lCount,value);
cToken =strtok(NULL,",");
}
fprintf(fDataFile,"\nTotal number of return points of ACPR measurement :[%d]
\n\n",lCount);
fclose(fDataFile);
/*print message to the standard output*/
printf("The The ACPR Measurement Result was saved to C:\\ACPR.txt file\n\n");
/* Close session */
viClose (viPSA);
viClose (defaultRM);
}