
Chapter 3
163
Programming Examples
Using Java Programming Over Socket LAN
{
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());
}
return null;
}
// Read a byte from SCPI socket
public byte ScpiReadByte()
{
try {
if ( SockOpen(SCPI) ) {
return sockIn[SCPI].readByte();
}
}
catch (IOException e) {
System.out.println("Scpi Read Byte Error "+e.getMessage());
}
return 0;
}
}
Summary of Contents for E4406A VSA Series
Page 4: ...4 ...
Page 59: ...59 2 Programming Fundamentals ...
Page 124: ...124 Chapter2 Programming Fundamentals Using the LAN to Control the Analyzer ...
Page 125: ...125 3 Programming Examples ...
Page 164: ...164 Chapter3 Programming Examples Using Java Programming Over Socket LAN ...
Page 165: ...165 4 Programming Command Cross References ...
Page 379: ...379 6 Error Messages ...
Page 412: ...412 Chapter6 Error Messages Error Message Descriptions ...