Class PciTimUtilCommand

java.lang.Object
  |
  +--SwingWorker
        |
        +--PciTimUtilCommand

public class PciTimUtilCommand
extends SwingWorker


Field Summary
private  int address
           
private  int board
           
private  int command
           
private  int data
           
private  DspCommand2 dsp_cmd
           
private  DspDialog parent
           
private  int type
           
 
Fields inherited from class SwingWorker
abort, thread, value
 
Constructor Summary
PciTimUtilCommand(DspDialog parent)
          Class constructor.
 
Method Summary
 java.lang.Object construct()
          This method initiates the download.
 void finished()
          This method sets the "Apply" button back to "Apply".
private  java.lang.Object send_command()
          This method sends all the setup information to the PCI interface board.
 void set_address(java.lang.String addr_string)
          This method sets the address of the memory location on the specified board.
 void set_board(int new_board)
          This method sets the board to send the command too.
 void set_command(int new_command)
          This method sets the command to be sent to the specified board.
 void set_data(java.lang.String data_string)
          This method sets the data to be sent to the specified board.
 void set_type(int new_type)
          This method sets the memory type to be written too on the specified board.
 void stop()
          This method aborts the current thread.
 
Methods inherited from class SwingWorker
alive, get, interrupt, thread_it
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

parent

private DspDialog parent

dsp_cmd

private DspCommand2 dsp_cmd

address

private int address

data

private int data

board

private int board

command

private int command

type

private int type
Constructor Detail

PciTimUtilCommand

public PciTimUtilCommand(DspDialog parent)
Class constructor.
Method Detail

construct

public java.lang.Object construct()
This method initiates the download. It is automatically called by the SwingWorker class constructor.
Overrides:
construct in class SwingWorker
See Also:
SwingWorker

finished

public void finished()
This method sets the "Apply" button back to "Apply". This method is automatically called by the SwingWorker class.
Overrides:
finished in class SwingWorker
See Also:
SwingWorker

stop

public void stop()
This method aborts the current thread. This method overides the one in Swingworker.java.
Overrides:
stop in class SwingWorker
See Also:
SwingWorker

set_address

public void set_address(java.lang.String addr_string)
                 throws java.lang.NumberFormatException
This method sets the address of the memory location on the specified board. Only the lower 24 bits of the input string are parsed, all others are ignored. This is because the DSP only takes 24 bit data.
Parameters:
address - The address of the memory location.
Throws:
java.lang.NumberFormatException - Thrown if the command textfield is left blank by the user or if an invalid character is supplied by the user.

set_data

public void set_data(java.lang.String data_string)
              throws java.lang.NumberFormatException
This method sets the data to be sent to the specified board. Only the lower 24 bits of the input string are parsed, all others are ignored. This is because the DSP only takes 24 bit data.
Parameters:
data - The data to send.
Throws:
java.lang.NumberFormatException - Thrown if the command textfield is left blank by the user or if an invalid character is supplied by the user.

set_board

public void set_board(int new_board)
This method sets the board to send the command too.
Parameters:
board - The board to send the command too.

set_type

public void set_type(int new_type)
This method sets the memory type to be written too on the specified board.
Parameters:
type - The memory type.

set_command

public void set_command(int new_command)
This method sets the command to be sent to the specified board.
Parameters:
command - The command to send.

send_command

private java.lang.Object send_command()
This method sends all the setup information to the PCI interface board.