Agilent Technologies 81250 System Programming Manual And Scpi Reference page 355

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

Advertisement

Example Code
354
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com
// extract handle part of a command string (private method)
const char* HP81200::GetHandle(const char* theCmd)
{
if (theCmd == 0)
return itsHandle;
else if ((theCmd[0] == ':') &&
(tolower(theCmd[1]) == 'd') &&
(tolower(theCmd[2]) == 'v') &&
(tolower(theCmd[3]) == 't'))
// already valid command vor dvt-handle
return "dvt";
else if ((tolower(theCmd[0]) == 'd') &&
(tolower(theCmd[1]) == 'v') &&
(tolower(theCmd[2]) == 't'))
// already valid command vor dvt-handle
return "dvt";
else if (theCmd[0] == ':')
return itsHandle;
else
return itsHandle;
}
// write to error log file (private method)
void HP81200::WriteErrorLog(int theRet, const char* theCmd)
{
if (itsErrorFile != 0)
{
char aErrorStr[1024];
int aErrorLen = sizeof(aErrorStr);
// write header for the error
if (theCmd != 0)
fprintf(itsErrorFile, "Error for cmd <%s>\n", theCmd);
if (theRet < 0)
{
// get and print error message corresponding
// to the return value
GetErrStr_HP81200(theRet, aErrorStr, &aErrorLen);
fprintf(itsErrorFile, "\t%s\n", aErrorStr);
}
else
{
// get and print error message from the error queue
char aResultBuffer[1024];
int aResultLen;
char aCmd[128];
sprintf(aCmd, ":%s:syst:err?", GetHandle(theCmd));
for (;;)
{
Agilent 81250 Parallel Bit Error Ratio Tester, Programming Reference, March 2006
Lib.cpp Interface Class Library Code

Advertisement

Table of Contents
loading

Table of Contents