Agilent Technologies 81250 System Programming Manual And Scpi Reference page 366

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

Advertisement

Main.cpp Application Code
Agilent 81250 Parallel Bit Error Ratio Tester, Programming Reference, March 2006
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com
// destroy handle
sprintf(aCmd, ":dvt:inst:hand:dest %s", itsHandle);
b = Call(aCmd);
if (!b) return b;
// clear remembered handle
strcpy(itsHandle, "");
}
if (itsConnected)
{
int ret;
ret = Disconnect_HP81200();
if (ret != 0)
{
WriteErrorLog(ret);
return false;
}
}
return true;
}
// Call 81200, handle is automatically supplied by the class.
// Errors are logged to the logfile.
// In case of an error, false is returned.
// Results from the call are ignored.
bool HP81200::Call(const char* theCmd)
{
int ret;
char aCmd[1024];
int aResultLen;
if (strcmp(GetHandle(theCmd), "dvt") == 0)
// already valid command with handle dvt, just use it...
sprintf(aCmd, "%s", theCmd);
else if (theCmd[0] == ':')
// command for local handle
sprintf(aCmd, ":%s%s", itsHandle, theCmd);
else
// command for local handle
sprintf(aCmd, ":%s:%s", itsHandle, theCmd);
aResultLen = sizeof(itsResultBuffer);
ret = Call_HP81200(aCmd, itsResultBuffer, &aResultLen);
if (ret != 0)
{
WriteErrorLog(ret, theCmd);
return false;
}
Example Code
365

Advertisement

Table of Contents
loading

Table of Contents