Agilent Technologies E4406A VSA Programming Examples, Using Java Programming Over Socket LAN

Models: E4406A VSA

1 406
Download 406 pages 63.49 Kb
Page 172
Image 172
Manual background

 

Programming Examples

 

 

Using Java Programming Over Socket LAN

 

Panel

p;

 

// Initialize the applets

 

public void init() {

 

SetupSockets();

 

SetupPanels();

 

// Set up font type for both panels

 

Font font = new Font("TimesRoman", Font.BOLD,14);

 

scpiResponse.setFont(font);

 

scpiCommand.setFont(font);

 

scpiResponse.appendText("SCPI Demo Program: Response messages\n");

 

scpiResponse.appendText("--------------------------------------------

\n");

}

 

 

//This routine is called whenever the applet is actived public void start() {

//Open the sockets if not already opened sck.OpenSockets();

//Start a response thread StartResponseThread(true);

}

//This routine is called whenever the applet is out of scope

//i.e. minize browser

public void stop() {

//Close all local sockets sck.CloseSockets();

//Kill the response thread StartResponseThread(false);

}

//Action for sending out scpi commands

//This routine is called whenever a command is received from the

//SCPI command panel.

172

Chapter 3

Page 172
Image 172
Agilent Technologies E4406A VSA manual Programming Examples, Using Java Programming Over Socket LAN