Agilent 81250 String Interface Library
Programming Interfaces
Agilent 81250 Parallel Bit Error Ratio Tester, Programming Reference, March 2006
23
Error Handling
All functions in this library return an error code.
• A return value of 0 always means that the function call succeeded.
• A negative number indicates a server error. Use the function
GetErrStr_HP81200
with the error code as an argument to get a
human-readable error string.
• A positive number indicates that the command execution failed. In
this case, query the error queue corresponding to the last
command. That means, if the last command started with
:dvt:
, send
the command
:dvt:syst:err?
until the error queue is empty. If this
does not locate the problem, send
:<Handle>:syst:err?
using the
handle of your system.
Connect_HP81200
C Syntax
int HP81200_CDECL Connect_HP81200(const char *ServerName)
VB Syntax
VB_CONNECT_HP81200(ByVal ServerName As String) As Long
Description
Connects to an Agilent 81250 server. This must be the first call when
using the Agilent 81250 string interface library.
Parameters
ServerName
The machine name or IP address of the machine to
which you want to connect. If left empty (NULL pointer or empty
string), the local host is connected.
In general
ServerName
has the structure
[<host>[<sep><port>]]
•
<host>
is the hostname in text (mypc.bbn.hp) or IP notation
(15.100.10.20). The default is 127.0.0.1 (“localhost”).
•
<sep>
is a separator; this can be a null byte, space, comma,
semicolon, colon, tab, or return. For clarity, a semicolon is used as
separator in the examples.
•
<port>
is the port number as decimal string. The hard-coded default
for port is 2203 or the contents of the environment variable
DVTDSRPORT, if this is set.
Examples
Examples of the server name are:
•
""
: all defaults, resolves to “127.0.0.1; 2203” (assuming environment
variable DVTDSRPORT is not set)
•
"localhost"
: resolves to “localhost; 2203” (assuming environment
variable DVTDSRPORT is not set)
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com