Agilent Technologies 8714ET Switch User Manual


 
6-40 LAN Interface Supplement
Controlling the Analyzer via the LAN
Controlling the Analyzer with a Java™ Applet
CloseSocket(i);
}
}
// Return the status of the socket, open or close.
public boolean SockOpen(int s)
{
return sockOpen[s];
}
//************* Socket I/O routines.
//*** I/O routines for SCPI socket
// Write an ASCII string with carriage return to SCPI socket
public void ScpiWriteLine(String command)
{
if ( SockOpen(SCPI) ) {
sockOut[SCPI].println(command);
sockOut[SCPI].flush();
}
}
// Read an ASCII string, terminated with carriage return
// from SCPI socket
public String ScpiReadLine()
{
try {
if ( SockOpen(SCPI) ) {
return sockIn[SCPI].readLine();
}
}
catch (IOException e) {
System.out.println("Scpi Read Line Error "+e.getMessage());
}