Class DspCommand2

java.lang.Object
  |
  +--DspCommand2

public class DspCommand2
extends java.lang.Object


Field Summary
static boolean abort
           
private  int arg_and_board_dest
           
private  int memory_type
           
 
Constructor Summary
DspCommand2()
          Default Constructor.
 
Method Summary
 void arg(int arg_number, int arg_value)
          Set one of the five PCI DSP argument registers to the specified value.
 void binning(int binning_rows, int binning_columns)
          Binning method.
 int cmdr(int command)
          Send a manual command to the PCI DSP.
 void dimensions(int array_rows, int array_columns)
          Dimensions method.
static void flush_reply_buffer()
          Flush PCI board reply buffer.
 int get_hctr()
          Get the current HCTR value.
 double get_temperature()
          Get temperature method.
 int hcvr(int command)
          Send a command to the PCI DSP via the vector register.
 void hcvr(int command, int expected_reply)
          Send a command to the PCI DSP via the vector register.
 void idle(boolean mode)
          Idle method.
 void load_application(int app_number)
          Load application method.
 int read_expose_time()
          Read exposure time method.
 int read_image(int byte_count, int exposure_time, int mem_fd)
          Read image (RDI) method.
 int read_memory(int address)
          Read Memory (RDM) method.
 void set_board_destination(int number_of_args, int board_destination)
          This method supplies the PCI board DSP with two pieces of information: 1) the number of arguments supplied with the next command to be issued, 2) the board destination (PCI, Timing or Utility).
 int set_exposure_time(int exposure_time)
          Used to set the exposure time to a new value.
 void set_gain(int gain, int speed)
          Gain method.
 void set_hctr(int value)
          Set the HCTR to a new value.
 void set_temperature(double temperature)
          Set temperature method.
 void set_type(int type)
          This method sets the DSP memory type for the board specified by the set_board_destination() method.
 int test_data_link(int data)
          Test Data Link (TDL) method.
 int write_memory(int address, int data)
          Write Memory (WRM) method.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

arg_and_board_dest

private int arg_and_board_dest

memory_type

private int memory_type

abort

public static boolean abort
Constructor Detail

DspCommand2

public DspCommand2()
Default Constructor.
Method Detail

set_board_destination

public void set_board_destination(int number_of_args,
                                  int board_destination)
                           throws ReplyValueException,
                                  java.lang.Exception
This method supplies the PCI board DSP with two pieces of information: 1) the number of arguments supplied with the next command to be issued, 2) the board destination (PCI, Timing or Utility).
Parameters:
number_of_args - The number of arguments supplied with the next command to be issued.
board_destination - The board destination (PCI, Timing or Utility).
Throws:
ReplyValueException - If the value returned by the specified board does not equals the ascii sequence "DON" Exception Thrown if an ioctl error occurs. Note: The exceptions are re-thrown because the debug messages would not be printed in the correct locations amoung the normal message otherwise.

set_type

public void set_type(int type)
This method sets the DSP memory type for the board specified by the set_board_destination() method. The memory spaces are: D, P, R, X, Y.
Parameters:
type - One of the following DSP memory types: D, P, R, X, Y.

set_hctr

public void set_hctr(int value)
              throws java.lang.Exception
Set the HCTR to a new value.
Parameters:
value - The value to be set.
Returns:
None.
Throws:
java.lang.Exception - Thrown if an ioctl error occurs. Note: The exceptions are re-thrown because the debug messages would not be printed in the correct locations amoung the normal message otherwise.
See Also:
Exception

get_hctr

public int get_hctr()
             throws java.lang.Exception
Get the current HCTR value.
Returns:
The current value of the HCTR.
Throws:
java.lang.Exception - Thrown if an ioctl error occurs. Note: The exceptions are re-thrown because the debug messages would not be printed in the correct locations amoung the normal message otherwise.
See Also:
Exception

hcvr

public void hcvr(int command,
                 int expected_reply)
          throws ReplyValueException,
                 java.lang.Exception
Send a command to the PCI DSP via the vector register. The reply returned from the PCI DSP is checked against the specified expected reply value.
Parameters:
command - The command to be sent to the PCI DSP.
Returns:
None.
Throws:
ReplyValueException - If the value returned by the specified board does not equals the ascii sequence "DON" Exception Thrown if an ioctl error occurs. Note: The exceptions are re-thrown because the debug messages would not be printed in the correct locations amoung the normal message otherwise.
See Also:
ReplyValueException

hcvr

public int hcvr(int command)
         throws ReplyValueException,
                java.lang.Exception
Send a command to the PCI DSP via the vector register. This version of the method returns a requested value or ERR. No expected reply value checking is done with this method.
Parameters:
command - The command to be sent to the PCI DSP.
Returns:
A requested value or ERR.
Throws:
ReplyValueException - If the value returned by the specified board does not equals the ascii sequence "DON" Exception Thrown if an ioctl error occurs. Note: The exceptions are re-thrown because the debug messages would not be printed in the correct locations amoung the normal message otherwise.
See Also:
ReplyValueException

arg

public void arg(int arg_number,
                int arg_value)
         throws ReplyValueException,
                java.lang.Exception
Set one of the five PCI DSP argument registers to the specified value.
Parameters:
arg_number - The argument register number.
arg_value - The value to which the specified argument register should be set.
Returns:
None.
Throws:
ReplyValueException - If the value returned by the specified board does not equals the ascii sequence "DON" Exception Thrown if an ioctl error occurs. Note: The exceptions are re-thrown because the debug messages would not be printed in the correct locations amoung the normal message otherwise.
See Also:
ReplyValueException

cmdr

public int cmdr(int command)
         throws ReplyValueException,
                java.lang.Exception
Send a manual command to the PCI DSP.
Parameters:
command - The command to be sent to the PCI DSP.
Returns:
The value returned by sending the command.
Throws:
ReplyValueException - If the value returned by the specified board is in error or times out. Exception Thrown if an ioctl error occurs. Note: The exceptions are re-thrown because the debug messages would not be printed in the correct locations amoung the normal message otherwise.
See Also:
ReplyValueException

test_data_link

public int test_data_link(int data)
                   throws ReplyValueException,
                          java.lang.Exception
Test Data Link (TDL) method. Used to test communications to the PCI, Timing, and Utility boards. A data value is sent to the board specified by the set_board_destination() method. The return value is is checked against the sent value.
Parameters:
data - Value to be sent to the specified board.
Returns:
Returns the ascii sequence "DON" if successful.
Throws:
ReplyValueException - If the value returned by the specified board does not equal data. Exception Thrown if an ioctl error occurs. Note: The exceptions are re-thrown because the debug messages would not be printed in the correct locations amoung the normal message otherwise.
See Also:
ReplyValueException

read_memory

public int read_memory(int address)
                throws ReplyValueException,
                       java.lang.Exception
Read Memory (RDM) method. Used to read a DSP memory location from one of the boards (PCI, Timing, or Utility).
Parameters:
address - Address (in hex) within DSP of the specified board.
Returns:
Returns the data value located at address.
Throws:
ReplyValueException - If the value returned by the specified board equals the ascii sequence "ERR". Exception Thrown if an ioctl error occurs. Note: The exceptions are re-thrown because the debug messages would not be printed in the correct locations amoung the normal message otherwise.
See Also:
ReplyValueException

write_memory

public int write_memory(int address,
                        int data)
                 throws ReplyValueException,
                        java.lang.Exception
Write Memory (WRM) method. Used to write to a DSP memory location on one of the boards (PCI, Timing, or Utility). Writes the specified data value located at address. The memory type is not a parameter because on successive writes you do not need to repeat the memory type.
Parameters:
address - Address (in hex) within DSP of the specified board.
data - Value to be written to the specified board.
Returns:
Returns ascii sequence "DON" if successfull.
Throws:
ReplyValueException - If the value returned by the specified board does not equals the ascii sequence "DON". Exception Thrown if an ioctl error occurs. Note: The exceptions are re-thrown because the debug messages would not be printed in the correct locations amoung the normal message otherwise.
See Also:
ReplyValueException

read_image

public int read_image(int byte_count,
                      int exposure_time,
                      int mem_fd)
               throws ReplyValueException,
                      java.lang.Exception
Read image (RDI) method. Used to readout an image from the controller into the user application.
Parameters:
byte_count. - The number of bytes to readout.
Returns:
Returns ascii sequence "DON" if successfull.
Throws:
ReplyValueException - If the value returned by the specified board does not equals the ascii sequence "DON". Exception Thrown if an ioctl error occurs. Note: The exceptions are re-thrown because the debug messages would not be printed in the correct locations amoung the normal message otherwise.
See Also:
ReplyValueException

dimensions

public void dimensions(int array_rows,
                       int array_columns)
                throws ReplyValueException,
                       java.lang.Exception
Dimensions method. Used to set the image dimensions.
Parameters:
ccd_rows - The number of image rows.
ccd_cols - The number of image columns.
Returns:
None
Throws:
ReplyValueException - If the value returned by the specified board does not equals the ascii sequence "DON". Exception Thrown if an ioctl error occurs. Note: The exceptions are re-thrown because the debug messages would not be printed in the correct locations amoung the normal message otherwise.
See Also:
ReplyValueException

binning

public void binning(int binning_rows,
                    int binning_columns)
             throws ReplyValueException,
                    java.lang.Exception
Binning method. Used to set the image binning parameters.
Parameters:
binning_rows - The number of pixels to bin in the rows direction.
binning_cols - The number of pixels to bin in the columns direction.
Returns:
None
Throws:
ReplyValueException - If the value returned by the specified board does not equals the ascii sequence "DON". Exception Thrown if an ioctl error occurs. Note: The exceptions are re-thrown because the debug messages would not be printed in the correct locations amoung the normal message otherwise.
See Also:
ReplyValueException

read_expose_time

public int read_expose_time()
                     throws ReplyValueException,
                            java.lang.Exception
Read exposure time method. Used to read the current elapsed exposure time.
Returns:
Returns the current elapsed exposure time.
Throws:
ReplyValueException - If the value returned by the specified board equals the ascii sequence "ERR". Exception Thrown if an ioctl error occurs. Note: The exceptions are re-thrown because the debug messages would not be printed in the correct locations amoung the normal message otherwise.
See Also:
ReplyValueException

set_exposure_time

public int set_exposure_time(int exposure_time)
                      throws ReplyValueException,
                             java.lang.Exception
Used to set the exposure time to a new value.
Returns:
Returns the current elapsed exposure time.
Throws:
ReplyValueException - If the value returned by the specified board does not equal the ascii sequence "DON". Exception Thrown if an ioctl error occurs. Note: The exceptions are re-thrown because the debug messages would not be printed in the correct locations amoung the normal message otherwise.
See Also:
ReplyValueException

idle

public void idle(boolean mode)
          throws ReplyValueException,
                 java.lang.Exception
Idle method. Used to put the controller into an idle state or take the controller out of the idle state.
Parameters:
mode - True to put the controller into an idle state. False to take the controller out of the idle state.
Returns:
None.
Throws:
ReplyValueException - If the value returned by the specified board does not equals the ascii sequence "DON" Exception Thrown if an ioctl error occurs. Note: The exceptions are re-thrown because the debug messages would not be printed in the correct locations amoung the normal message otherwise.
See Also:
ReplyValueException

set_gain

public void set_gain(int gain,
                     int speed)
              throws ReplyValueException,
                     java.lang.Exception
Gain method. Used to set the controller readout gain and A/D conversion speed.
Parameters:
gain - The readout gain.
speed - The A/D conversion speed. Can be "fast" or "slow".
Returns:
None.
Throws:
ReplyValueException - If the value returned by the specified board does not equals the ascii sequence "DON" Exception Thrown if an ioctl error occurs. Note: The exceptions are re-thrown because the debug messages would not be printed in the correct locations amoung the normal message otherwise.
See Also:
ReplyValueException

load_application

public void load_application(int app_number)
                      throws ReplyValueException,
                             java.lang.Exception
Load application method. Used to load a timing or utility board application.
Parameters:
app_number - The number of the application to load.
Returns:
None.
Throws:
ReplyValueException - If the value returned by the specified board does not equals the ascii sequence "DON" Exception Thrown if an ioctl error occurs. Note: The exceptions are re-thrown because the debug messages would not be printed in the correct locations amoung the normal message otherwise.
See Also:
ReplyValueException

set_temperature

public void set_temperature(double temperature)
                     throws ReplyValueException,
                            java.lang.Exception
Set temperature method. Used to set the detectors target temperature.
Parameters:
temperature - The detector temperature (in Celcius).
Returns:
None.
Throws:
ReplyValueException - If the value returned by the specified board does not equals the ascii sequence "DON" Exception Thrown if an ioctl error occurs. Note: The exceptions are re-thrown because the debug messages would not be printed in the correct locations amoung the normal message otherwise.
See Also:
ReplyValueException

get_temperature

public double get_temperature()
                       throws ReplyValueException,
                              java.lang.Exception
Get temperature method. Used to obtain the current array temperature from the controller.
Returns:
Returns the current array temperature.
Throws:
ReplyValueException - If the value returned by the specified board does not equals the ascii sequence "DON" Exception Thrown if an ioctl error occurs. Note: The exceptions are re-thrown because the debug messages would not be printed in the correct locations amoung the normal message otherwise.
See Also:
ReplyValueException

flush_reply_buffer

public static void flush_reply_buffer()
                               throws java.lang.Exception
Flush PCI board reply buffer. This method flushes the PCI board reply buffer.
Returns:
None.
See Also:
Exception