Agilent Technologies 81250 System Programming Manual And Scpi Reference page 349

Parallel bit error ratio tester
Hide thumbs Also See for 81250:
Table of Contents

Advertisement

Example Code
348
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com
// Process each hex digit in trace
for (ViInt32 l = 0; l < lHexDigitsPerTrace; l++)
{
int nHexDigit;
ViInt32 lHexDigitIndex = l + (t*lHexDigitsPerTrace);
if ((*(lpszPattern+lHexDigitIndex) >= '0') &&
(*(lpszPattern+lHexDigitIndex) <= '9'))
nHexDigit = *(lpszPattern+lHexDigitIndex) - '0';
else if ((*(lpszPattern+lHexDigitIndex) >= 'A') &&
nHexDigit = *(lpszPattern+lHexDigitIndex) - 'A' +
10;
else
// Illegal digit - ignore
nHexDigit = 0;
// Process each bit (vector) in hex digit
for (int v = 3; v >= 0; v--)
{
if (((l*4) + (4-v)) > lLength)
// Ignore padding required for byte-alignment
// break;
if (nHexDigit / (1 << v))
{
// Bit is set
fprintf(fp, "1");
// Set bit has been treated => remove it
nHexDigit -= (1 << v);
}
else
// Bit is not set
fprintf(fp, "0");
}
}
fprintf(fp, "\n");
}
// Pattern buffer can now be discarded
free(lpszPattern);
}
Agilent 81250 Parallel Bit Error Ratio Tester, Programming Reference, March 2006
Main.cpp Application Code Using VXI Plug&Play
(*(lpszPattern+lHexDigitIndex) <= 'F'))

Advertisement

Table of Contents
loading

Table of Contents