org.lsst.ccs.drivers.dscud
Class Dscud

java.lang.Object
  extended by org.lsst.ccs.drivers.dscud.Dscud

public class Dscud
extends java.lang.Object

\file Dscud.java Java interface to the DSC universal driver routines \author Owen Saxton


Field Summary
static byte ADCS_MAX_CHANNELS
           
static byte BIPOLAR
           
static byte COUNTER_0
           
static byte COUNTER_1
           
static byte DACS_MAX_CHANNELS
           
static int DE_ALREADY_PAUSED
           
static int DE_ALTERNATE_IN_PROGRESS
           
static int DE_BAD_WINDRVR_BOARD_INIT
           
static int DE_BOARD_BUSY
           
static int DE_BOARD_LIMIT_REACHED
           
static int DE_BUFFER_ROLLOVER
           
static int DE_DSCUDH_INVALID
           
static int DE_HW_FAILURE
           
static int DE_HW_NOT_SUPPORTED
           
static int DE_INVALID_BOARD
           
static int DE_INVALID_ERROR_CODE
           
static int DE_INVALID_FUNC
           
static int DE_INVALID_PARM
           
static int DE_INVALID_WINDRVR_HANDLE
           
static int DE_INVALID_WINDRVR_KP
           
static int DE_INVALID_WINDRVR_VERSION
           
static int DE_NONE
           
static int DE_NONE_IN_PROGRESS
           
static int DE_OPERATION_TIMED_OUT
           
static int DE_OVERFLOW
           
static int DE_SW_FAILURE
           
static int DE_SW_NOT_SUPPORTED
           
static int DE_THREAD_FAILURE
           
static byte DIFFERENTIAL
           
static byte DSC_ATHENA
          Various constants
static byte DSC_ATHENAII
          Various constants
static byte DSC_CPT
          Various constants
static byte DSC_DIO82C55
          Various constants
static byte DSC_DMM
          Various constants
static byte DSC_DMM16
          Various constants
static byte DSC_DMM16AT
          Various constants
static byte DSC_DMM32
          Various constants
static byte DSC_DMM32AT
          Various constants
static byte DSC_DMM32DX
          Various constants
static byte DSC_DMM32DXAT
          Various constants
static byte DSC_DMM32X
          Various constants
static byte DSC_DMM32XAT
          Various constants
static byte DSC_DMM48
          Various constants
static byte DSC_DMM48AT
          Various constants
static byte DSC_DMMAT
          Various constants
static byte DSC_DRVR
          Various constants
static byte DSC_ELEKTRA
          Various constants
static byte DSC_EMM8
          Various constants
static byte DSC_EMMDIO
          Various constants
static byte DSC_EMMOPTO
          Various constants
static byte DSC_GMM
          Various constants
static byte DSC_GPIO11_9513
          Various constants
static byte DSC_GPIO11_DIO
          Various constants
static byte DSC_GPIO21
          Various constants
static byte DSC_HELIOS
          Various constants
static byte DSC_HERCEBX
          Various constants
static byte DSC_IR104
          Various constants
static byte DSC_METIS
          Various constants
static byte DSC_MRC
          Various constants
static byte DSC_NEPTUNE
          Various constants
static byte DSC_OMM
          Various constants
static byte DSC_OMMDIO
          Various constants
static byte DSC_OPMM
          Various constants
static byte DSC_PMM
          Various constants
static byte DSC_PROM
          Various constants
static byte DSC_PSD
          Various constants
static byte DSC_QMM
          Various constants
static byte DSC_RAW
          Various constants
static byte DSC_RMM
          Various constants
static byte DSC_RMM1612
          Various constants
static byte DSC_RMM416
          Various constants
static byte DSC_SMM
          Various constants
static byte DSC_TEST
          Various constants
static byte DSC_TMM
          Various constants
static byte DSC_ZMM
          Various constants
static byte FRQ_100KHZ
           
static byte FRQ_10MHZ
           
static byte FRQ_1MHZ
           
static byte GAIN_1
           
static byte GAIN_10
           
static byte GAIN_100
           
static byte GAIN_1000
           
static byte GAIN_2
           
static byte GAIN_4
           
static byte GAIN_8
           
static byte INT_TYPE_AD
           
static byte INT_TYPE_COUNTER
           
static byte INT_TYPE_DA
           
static byte INT_TYPE_DIOIN
           
static byte INT_TYPE_DIOREAD
           
static byte INT_TYPE_DIOWRITE
           
static byte INT_TYPE_OPTO
           
static byte INT_TYPE_USER
           
static byte RANGE_10
           
static byte RANGE_5
           
static short REG_0
           
static short REG_1
           
static short REG_10
           
static short REG_11
           
static short REG_12
           
static short REG_13
           
static short REG_14
           
static short REG_15
           
static short REG_2
           
static short REG_3
           
static short REG_4
           
static short REG_5
           
static short REG_6
           
static short REG_7
           
static short REG_8
           
static short REG_9
           
static byte SCAN_INTERVAL_10
           
static byte SCAN_INTERVAL_15
           
static byte SCAN_INTERVAL_20
           
static byte SCAN_INTERVAL_4
           
static byte SCAN_INTERVAL_5
           
static byte SCAN_INTERVAL_9
           
static byte SINGLE_ENDED
           
static byte UNIPOLAR
           
static byte USER_INT_AFTER
           
static byte USER_INT_CANCEL
           
static byte USER_INT_INSTEAD
           
static byte USER_INT_SOURCE_EXTERNAL
           
static byte USER_INT_SOURCE_INTERNAL
           
 
Constructor Summary
Dscud()
          Main constructor
 
Method Summary
 void adAutoCal(byte range, byte bootRange)
          Calibarate one ADC range or all of them
 void adCalVerify(byte range, float[] offsetError, float[] gainError)
          Verify an ADC calibration
 double adCodeToVoltage(byte polarity, byte gain, byte range, short code)
          Convert an ADC value to a voltage
 short adSample()
          Read the next ADC sample
 double adSampleAvg(int count)
          Read and average values from successive ADC samples
 void adSampleInt(int nConv, byte lowChan, byte highChan, float rate, byte clkSrc, short fifoDepth, int thresh, short[] values)
          Read ADC values in sample mode using interrupts
 void adScan(byte lowChan, byte highChan, short[] values)
          Read a range of ADC values in scan mode
 void adScanAvg(byte lowChan, byte highChan, double[] averages, int count)
          Read and average a range of ADC values in scan mode
 void adScanInt(int nConv, byte lowChan, byte highChan, float rate, byte clkSrc, short fifoDepth, int thresh, short[] values)
          Read ADC values in scan mode using interrupts
 void adSetChannel(byte lowChan, byte highChan)
          Set ADC sample channel range
 void adSetSettings(byte channel, byte gain, byte range, byte polarity, boolean loadCal, byte scanIntvl, byte diff)
          Set ADC parameters
 void cancelOp()
          Cancel all interrupt activity
 void cancelOpType(int int_type)
          Cancel one type of interrupt activity
 void counterDirectSet(byte code, int value, byte ctr)
          Perform an operation on a counter directly
 int counterRead(byte ctr)
          Read the value of a counter
 void counterSetRate(float hertz)
          Set the rate for all counters
 void counterSetRateSingle(float hertz, byte ctr)
          Set the rate for counter This routine uses the current frequency set for the counter to determine the value to be loaded into the counter.
 void daAutoCal(byte range)
          Calibarate one DAC range
 void daCalVerify(byte range, float[] offsetError, float[] gainError)
          Verify a DAC calibration
 double daCodeToVoltage(byte polarity, byte gain, float range, int code)
          Convert a DAC value to a voltage
 void daConvert(byte channel, int code)
          Write a value to a DAC
 void daConvertScan(int[] chanEnab, int[] codes)
          Write an array of values to a set of DACs
 void daSetPolarity(byte polarity)
          Set the DAC polarity
 void daSetSettings(byte polarity, boolean loadCal, float range, byte gain, boolean simUpdate, boolean polEnab, boolean urSet, byte urChan)
          Set the DAC parameters
 void dioClearBit(byte port, byte bit)
          Clear a bit in a digital I/O port
 byte dioInputBit(byte port, byte bit)
          Read a bit from a digital I/O port
 byte dioInputByte(byte port)
          Read a byte from a digital I/O port
 short dioInputWord(byte port)
          Read a short integer from a digital I/O port
 void dioOutputBit(byte port, byte bit, byte digital_value)
          Write a bit to a digital I/O port
 void dioOutputByte(byte port, byte digital_value)
          Write a byte to a digital I/O port
 void dioOutputWord(byte port, short digital_value)
          Write a short integer to a digital I/O port
 void dioSetBit(byte port, byte bit)
          Set a bit in a digital I/O port
 void dioSetConfig(byte[] config_bytes)
          Configure the digital I/O ports
 void freeBoard()
          Free a board
static byte getBoardMacro(java.lang.String boardtype)
          Get a board's type given its name (static)
static java.lang.String getErrorString(int error_code)
          Get the string corresponding to an error code (static)
static int getLastError(java.lang.String[] errstr)
          Get information about the last error (static)
static int getTime()
          Get the current time (static)
 void initBoard(byte type, short baseAddr, byte intLevel)
          Initialize a board, short version
 void initBoard(byte type, short baseAddr, byte intLevel, byte clkFrq0, byte clkFrq1, byte clkSel1)
          Initialize a board
static byte inp(int address)
          Read a byte from I/O space (static)
static int inpl(int address)
          Read an integer from I/O space (static)
static short inpw(int address)
          Read a short integer from I/O space (static)
static void inpws(int address, short[] buffer, short n)
          Read a short integer repeatedly from I/O space FIFO (static)
static void outp(int address, byte value)
          Write a byte to I/O space (static)
static void outpl(int address, int value)
          Write an integer to I/O space (static)
static void outpw(int address, short value)
          Write a short integer to I/O space (static)
static void outpws(int address, short[] buffer, short n)
          Write a short integer array to I/O space FIFO (static)
 void pauseOp()
          Pause all interrupt activity
 void pciInitBoard(byte type, byte pciSlot)
          Initialize a board on the PCI bus
static int peek(int address, int width)
          Get the value at a given mamory address (static)
 byte registerRead(short address)
          Read the value of a board register
 void registerWrite(short address, byte data)
          Write a value to a board register
 void resumeOp()
          Resume all interrupt activity
static void setSystemPriority(int priority)
          Set the execution priority (static)
static void sleep(int ms)
          Pause execution for a time (static)
 int userInt(byte intSrc, byte counter, byte clkSrc, float rate, java.lang.Object cbObj, java.lang.String cbMeth)
          Start user interrupt processing on counter or digital interrupt (default version)
 int userInt(byte intSrc, byte counter, byte clkSrc, float rate, java.lang.Object cbObj, java.lang.String cbMeth, boolean useDsc)
          Start user interrupt processing on counter or digital I/O interrupt
 short voltageToAdCode(byte polarity, byte gain, byte range, double voltage)
          Convert a voltage to an ADC value
 int voltageToDaCode(byte polarity, byte gain, float range, double voltage)
          Convert a voltage to a DAC value
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DSC_DMM16

public static final byte DSC_DMM16
Various constants

See Also:
Constant Field Values

DSC_RMM

public static final byte DSC_RMM
Various constants

See Also:
Constant Field Values

DSC_TMM

public static final byte DSC_TMM
Various constants

See Also:
Constant Field Values

DSC_OPMM

public static final byte DSC_OPMM
Various constants

See Also:
Constant Field Values

DSC_DMM

public static final byte DSC_DMM
Various constants

See Also:
Constant Field Values

DSC_SMM

public static final byte DSC_SMM
Various constants

See Also:
Constant Field Values

DSC_GMM

public static final byte DSC_GMM
Various constants

See Also:
Constant Field Values

DSC_QMM

public static final byte DSC_QMM
Various constants

See Also:
Constant Field Values

DSC_ZMM

public static final byte DSC_ZMM
Various constants

See Also:
Constant Field Values

DSC_PMM

public static final byte DSC_PMM
Various constants

See Also:
Constant Field Values

DSC_OMM

public static final byte DSC_OMM
Various constants

See Also:
Constant Field Values

DSC_RMM416

public static final byte DSC_RMM416
Various constants

See Also:
Constant Field Values

DSC_DMM32

public static final byte DSC_DMM32
Various constants

See Also:
Constant Field Values

DSC_DMM32AT

public static final byte DSC_DMM32AT
Various constants

See Also:
Constant Field Values

DSC_EMMDIO

public static final byte DSC_EMMDIO
Various constants

See Also:
Constant Field Values

DSC_RMM1612

public static final byte DSC_RMM1612
Various constants

See Also:
Constant Field Values

DSC_DMMAT

public static final byte DSC_DMMAT
Various constants

See Also:
Constant Field Values

DSC_DMM16AT

public static final byte DSC_DMM16AT
Various constants

See Also:
Constant Field Values

DSC_IR104

public static final byte DSC_IR104
Various constants

See Also:
Constant Field Values

DSC_EMM8

public static final byte DSC_EMM8
Various constants

See Also:
Constant Field Values

DSC_PROM

public static final byte DSC_PROM
Various constants

See Also:
Constant Field Values

DSC_HERCEBX

public static final byte DSC_HERCEBX
Various constants

See Also:
Constant Field Values

DSC_CPT

public static final byte DSC_CPT
Various constants

See Also:
Constant Field Values

DSC_DMM48

public static final byte DSC_DMM48
Various constants

See Also:
Constant Field Values

DSC_DMM48AT

public static final byte DSC_DMM48AT
Various constants

See Also:
Constant Field Values

DSC_OMMDIO

public static final byte DSC_OMMDIO
Various constants

See Also:
Constant Field Values

DSC_DIO82C55

public static final byte DSC_DIO82C55
Various constants

See Also:
Constant Field Values

DSC_MRC

public static final byte DSC_MRC
Various constants

See Also:
Constant Field Values

DSC_EMMOPTO

public static final byte DSC_EMMOPTO
Various constants

See Also:
Constant Field Values

DSC_ATHENA

public static final byte DSC_ATHENA
Various constants

See Also:
Constant Field Values

DSC_METIS

public static final byte DSC_METIS
Various constants

See Also:
Constant Field Values

DSC_DMM32X

public static final byte DSC_DMM32X
Various constants

See Also:
Constant Field Values

DSC_DMM32XAT

public static final byte DSC_DMM32XAT
Various constants

See Also:
Constant Field Values

DSC_ELEKTRA

public static final byte DSC_ELEKTRA
Various constants

See Also:
Constant Field Values

DSC_GPIO11_9513

public static final byte DSC_GPIO11_9513
Various constants

See Also:
Constant Field Values

DSC_GPIO11_DIO

public static final byte DSC_GPIO11_DIO
Various constants

See Also:
Constant Field Values

DSC_GPIO21

public static final byte DSC_GPIO21
Various constants

See Also:
Constant Field Values

DSC_PSD

public static final byte DSC_PSD
Various constants

See Also:
Constant Field Values

DSC_ATHENAII

public static final byte DSC_ATHENAII
Various constants

See Also:
Constant Field Values

DSC_DMM32DX

public static final byte DSC_DMM32DX
Various constants

See Also:
Constant Field Values

DSC_DMM32DXAT

public static final byte DSC_DMM32DXAT
Various constants

See Also:
Constant Field Values

DSC_HELIOS

public static final byte DSC_HELIOS
Various constants

See Also:
Constant Field Values

DSC_NEPTUNE

public static final byte DSC_NEPTUNE
Various constants

See Also:
Constant Field Values

DSC_TEST

public static final byte DSC_TEST
Various constants

See Also:
Constant Field Values

DSC_RAW

public static final byte DSC_RAW
Various constants

See Also:
Constant Field Values

DSC_DRVR

public static final byte DSC_DRVR
Various constants

See Also:
Constant Field Values

DE_NONE

public static final int DE_NONE
See Also:
Constant Field Values

DE_HW_FAILURE

public static final int DE_HW_FAILURE
See Also:
Constant Field Values

DE_SW_FAILURE

public static final int DE_SW_FAILURE
See Also:
Constant Field Values

DE_HW_NOT_SUPPORTED

public static final int DE_HW_NOT_SUPPORTED
See Also:
Constant Field Values

DE_SW_NOT_SUPPORTED

public static final int DE_SW_NOT_SUPPORTED
See Also:
Constant Field Values

DE_INVALID_PARM

public static final int DE_INVALID_PARM
See Also:
Constant Field Values

DE_ALTERNATE_IN_PROGRESS

public static final int DE_ALTERNATE_IN_PROGRESS
See Also:
Constant Field Values

DE_NONE_IN_PROGRESS

public static final int DE_NONE_IN_PROGRESS
See Also:
Constant Field Values

DE_BUFFER_ROLLOVER

public static final int DE_BUFFER_ROLLOVER
See Also:
Constant Field Values

DE_INVALID_ERROR_CODE

public static final int DE_INVALID_ERROR_CODE
See Also:
Constant Field Values

DE_ALREADY_PAUSED

public static final int DE_ALREADY_PAUSED
See Also:
Constant Field Values

DE_OVERFLOW

public static final int DE_OVERFLOW
See Also:
Constant Field Values

DE_INVALID_FUNC

public static final int DE_INVALID_FUNC
See Also:
Constant Field Values

DE_DSCUDH_INVALID

public static final int DE_DSCUDH_INVALID
See Also:
Constant Field Values

DE_INVALID_BOARD

public static final int DE_INVALID_BOARD
See Also:
Constant Field Values

DE_BOARD_LIMIT_REACHED

public static final int DE_BOARD_LIMIT_REACHED
See Also:
Constant Field Values

DE_BOARD_BUSY

public static final int DE_BOARD_BUSY
See Also:
Constant Field Values

DE_INVALID_WINDRVR_HANDLE

public static final int DE_INVALID_WINDRVR_HANDLE
See Also:
Constant Field Values

DE_INVALID_WINDRVR_VERSION

public static final int DE_INVALID_WINDRVR_VERSION
See Also:
Constant Field Values

DE_BAD_WINDRVR_BOARD_INIT

public static final int DE_BAD_WINDRVR_BOARD_INIT
See Also:
Constant Field Values

DE_OPERATION_TIMED_OUT

public static final int DE_OPERATION_TIMED_OUT
See Also:
Constant Field Values

DE_INVALID_WINDRVR_KP

public static final int DE_INVALID_WINDRVR_KP
See Also:
Constant Field Values

DE_THREAD_FAILURE

public static final int DE_THREAD_FAILURE
See Also:
Constant Field Values

ADCS_MAX_CHANNELS

public static final byte ADCS_MAX_CHANNELS
See Also:
Constant Field Values

DACS_MAX_CHANNELS

public static final byte DACS_MAX_CHANNELS
See Also:
Constant Field Values

RANGE_5

public static final byte RANGE_5
See Also:
Constant Field Values

RANGE_10

public static final byte RANGE_10
See Also:
Constant Field Values

BIPOLAR

public static final byte BIPOLAR
See Also:
Constant Field Values

UNIPOLAR

public static final byte UNIPOLAR
See Also:
Constant Field Values

GAIN_1

public static final byte GAIN_1
See Also:
Constant Field Values

GAIN_2

public static final byte GAIN_2
See Also:
Constant Field Values

GAIN_4

public static final byte GAIN_4
See Also:
Constant Field Values

GAIN_8

public static final byte GAIN_8
See Also:
Constant Field Values

GAIN_10

public static final byte GAIN_10
See Also:
Constant Field Values

GAIN_100

public static final byte GAIN_100
See Also:
Constant Field Values

GAIN_1000

public static final byte GAIN_1000
See Also:
Constant Field Values

SCAN_INTERVAL_4

public static final byte SCAN_INTERVAL_4
See Also:
Constant Field Values

SCAN_INTERVAL_5

public static final byte SCAN_INTERVAL_5
See Also:
Constant Field Values

SCAN_INTERVAL_9

public static final byte SCAN_INTERVAL_9
See Also:
Constant Field Values

SCAN_INTERVAL_10

public static final byte SCAN_INTERVAL_10
See Also:
Constant Field Values

SCAN_INTERVAL_15

public static final byte SCAN_INTERVAL_15
See Also:
Constant Field Values

SCAN_INTERVAL_20

public static final byte SCAN_INTERVAL_20
See Also:
Constant Field Values

SINGLE_ENDED

public static final byte SINGLE_ENDED
See Also:
Constant Field Values

DIFFERENTIAL

public static final byte DIFFERENTIAL
See Also:
Constant Field Values

COUNTER_0

public static final byte COUNTER_0
See Also:
Constant Field Values

COUNTER_1

public static final byte COUNTER_1
See Also:
Constant Field Values

FRQ_100KHZ

public static final byte FRQ_100KHZ
See Also:
Constant Field Values

FRQ_1MHZ

public static final byte FRQ_1MHZ
See Also:
Constant Field Values

FRQ_10MHZ

public static final byte FRQ_10MHZ
See Also:
Constant Field Values

INT_TYPE_AD

public static final byte INT_TYPE_AD
See Also:
Constant Field Values

INT_TYPE_DA

public static final byte INT_TYPE_DA
See Also:
Constant Field Values

INT_TYPE_DIOIN

public static final byte INT_TYPE_DIOIN
See Also:
Constant Field Values

INT_TYPE_USER

public static final byte INT_TYPE_USER
See Also:
Constant Field Values

INT_TYPE_COUNTER

public static final byte INT_TYPE_COUNTER
See Also:
Constant Field Values

INT_TYPE_DIOREAD

public static final byte INT_TYPE_DIOREAD
See Also:
Constant Field Values

INT_TYPE_OPTO

public static final byte INT_TYPE_OPTO
See Also:
Constant Field Values

INT_TYPE_DIOWRITE

public static final byte INT_TYPE_DIOWRITE
See Also:
Constant Field Values

USER_INT_CANCEL

public static final byte USER_INT_CANCEL
See Also:
Constant Field Values

USER_INT_AFTER

public static final byte USER_INT_AFTER
See Also:
Constant Field Values

USER_INT_INSTEAD

public static final byte USER_INT_INSTEAD
See Also:
Constant Field Values

USER_INT_SOURCE_EXTERNAL

public static final byte USER_INT_SOURCE_EXTERNAL
See Also:
Constant Field Values

USER_INT_SOURCE_INTERNAL

public static final byte USER_INT_SOURCE_INTERNAL
See Also:
Constant Field Values

REG_0

public static final short REG_0
See Also:
Constant Field Values

REG_1

public static final short REG_1
See Also:
Constant Field Values

REG_2

public static final short REG_2
See Also:
Constant Field Values

REG_3

public static final short REG_3
See Also:
Constant Field Values

REG_4

public static final short REG_4
See Also:
Constant Field Values

REG_5

public static final short REG_5
See Also:
Constant Field Values

REG_6

public static final short REG_6
See Also:
Constant Field Values

REG_7

public static final short REG_7
See Also:
Constant Field Values

REG_8

public static final short REG_8
See Also:
Constant Field Values

REG_9

public static final short REG_9
See Also:
Constant Field Values

REG_10

public static final short REG_10
See Also:
Constant Field Values

REG_11

public static final short REG_11
See Also:
Constant Field Values

REG_12

public static final short REG_12
See Also:
Constant Field Values

REG_13

public static final short REG_13
See Also:
Constant Field Values

REG_14

public static final short REG_14
See Also:
Constant Field Values

REG_15

public static final short REG_15
See Also:
Constant Field Values
Constructor Detail

Dscud

public Dscud()
Main constructor

Method Detail

getLastError

public static int getLastError(java.lang.String[] errstr)
Get information about the last error (static)


getErrorString

public static java.lang.String getErrorString(int error_code)
Get the string corresponding to an error code (static)


inp

public static byte inp(int address)
                throws DscudException
Read a byte from I/O space (static)

Throws:
DscudException

inpw

public static short inpw(int address)
                  throws DscudException
Read a short integer from I/O space (static)

Throws:
DscudException

inpl

public static int inpl(int address)
                throws DscudException
Read an integer from I/O space (static)

Throws:
DscudException

inpws

public static void inpws(int address,
                         short[] buffer,
                         short n)
                  throws DscudException
Read a short integer repeatedly from I/O space FIFO (static)

Throws:
DscudException

outp

public static void outp(int address,
                        byte value)
                 throws DscudException
Write a byte to I/O space (static)

Throws:
DscudException

outpw

public static void outpw(int address,
                         short value)
                  throws DscudException
Write a short integer to I/O space (static)

Throws:
DscudException

outpl

public static void outpl(int address,
                         int value)
                  throws DscudException
Write an integer to I/O space (static)

Throws:
DscudException

outpws

public static void outpws(int address,
                          short[] buffer,
                          short n)
                   throws DscudException
Write a short integer array to I/O space FIFO (static)

Throws:
DscudException

sleep

public static void sleep(int ms)
                  throws DscudException
Pause execution for a time (static)

Throws:
DscudException

getTime

public static int getTime()
                   throws DscudException
Get the current time (static)

Throws:
DscudException

getBoardMacro

public static byte getBoardMacro(java.lang.String boardtype)
                          throws DscudException
Get a board's type given its name (static)

Throws:
DscudException

setSystemPriority

public static void setSystemPriority(int priority)
                              throws DscudException
Set the execution priority (static)

Throws:
DscudException

peek

public static int peek(int address,
                       int width)
Get the value at a given mamory address (static)


initBoard

public void initBoard(byte type,
                      short baseAddr,
                      byte intLevel,
                      byte clkFrq0,
                      byte clkFrq1,
                      byte clkSel1)
               throws DscudException
Initialize a board

Throws:
DscudException

initBoard

public void initBoard(byte type,
                      short baseAddr,
                      byte intLevel)
               throws DscudException
Initialize a board, short version

Throws:
DscudException

pciInitBoard

public void pciInitBoard(byte type,
                         byte pciSlot)
                  throws DscudException
Initialize a board on the PCI bus

Throws:
DscudException

freeBoard

public void freeBoard()
               throws DscudException
Free a board

Throws:
DscudException

adSetSettings

public void adSetSettings(byte channel,
                          byte gain,
                          byte range,
                          byte polarity,
                          boolean loadCal,
                          byte scanIntvl,
                          byte diff)
                   throws DscudException
Set ADC parameters

Throws:
DscudException

adSetChannel

public void adSetChannel(byte lowChan,
                         byte highChan)
                  throws DscudException
Set ADC sample channel range

Throws:
DscudException

adSample

public short adSample()
               throws DscudException
Read the next ADC sample

Throws:
DscudException

adSampleAvg

public double adSampleAvg(int count)
                   throws DscudException
Read and average values from successive ADC samples

Throws:
DscudException

adSampleInt

public void adSampleInt(int nConv,
                        byte lowChan,
                        byte highChan,
                        float rate,
                        byte clkSrc,
                        short fifoDepth,
                        int thresh,
                        short[] values)
                 throws DscudException
Read ADC values in sample mode using interrupts

Throws:
DscudException

adScan

public void adScan(byte lowChan,
                   byte highChan,
                   short[] values)
            throws DscudException
Read a range of ADC values in scan mode

Throws:
DscudException

adScanAvg

public void adScanAvg(byte lowChan,
                      byte highChan,
                      double[] averages,
                      int count)
               throws DscudException
Read and average a range of ADC values in scan mode

Throws:
DscudException

adScanInt

public void adScanInt(int nConv,
                      byte lowChan,
                      byte highChan,
                      float rate,
                      byte clkSrc,
                      short fifoDepth,
                      int thresh,
                      short[] values)
               throws DscudException
Read ADC values in scan mode using interrupts

Throws:
DscudException

adAutoCal

public void adAutoCal(byte range,
                      byte bootRange)
               throws DscudException
Calibarate one ADC range or all of them

Throws:
DscudException

adCalVerify

public void adCalVerify(byte range,
                        float[] offsetError,
                        float[] gainError)
                 throws DscudException
Verify an ADC calibration

Throws:
DscudException

adCodeToVoltage

public double adCodeToVoltage(byte polarity,
                              byte gain,
                              byte range,
                              short code)
                       throws DscudException
Convert an ADC value to a voltage

Throws:
DscudException

voltageToAdCode

public short voltageToAdCode(byte polarity,
                             byte gain,
                             byte range,
                             double voltage)
                      throws DscudException
Convert a voltage to an ADC value

Throws:
DscudException

daSetPolarity

public void daSetPolarity(byte polarity)
                   throws DscudException
Set the DAC polarity

Throws:
DscudException

daSetSettings

public void daSetSettings(byte polarity,
                          boolean loadCal,
                          float range,
                          byte gain,
                          boolean simUpdate,
                          boolean polEnab,
                          boolean urSet,
                          byte urChan)
                   throws DscudException
Set the DAC parameters

Throws:
DscudException

daConvert

public void daConvert(byte channel,
                      int code)
               throws DscudException
Write a value to a DAC

Throws:
DscudException

daConvertScan

public void daConvertScan(int[] chanEnab,
                          int[] codes)
                   throws DscudException
Write an array of values to a set of DACs

Throws:
DscudException

daAutoCal

public void daAutoCal(byte range)
               throws DscudException
Calibarate one DAC range

Throws:
DscudException

daCalVerify

public void daCalVerify(byte range,
                        float[] offsetError,
                        float[] gainError)
                 throws DscudException
Verify a DAC calibration

Throws:
DscudException

daCodeToVoltage

public double daCodeToVoltage(byte polarity,
                              byte gain,
                              float range,
                              int code)
                       throws DscudException
Convert a DAC value to a voltage

Throws:
DscudException

voltageToDaCode

public int voltageToDaCode(byte polarity,
                           byte gain,
                           float range,
                           double voltage)
                    throws DscudException
Convert a voltage to a DAC value

Throws:
DscudException

dioSetConfig

public void dioSetConfig(byte[] config_bytes)
                  throws DscudException
Configure the digital I/O ports

Throws:
DscudException

dioInputByte

public byte dioInputByte(byte port)
                  throws DscudException
Read a byte from a digital I/O port

Throws:
DscudException

dioInputWord

public short dioInputWord(byte port)
                   throws DscudException
Read a short integer from a digital I/O port

Throws:
DscudException

dioOutputByte

public void dioOutputByte(byte port,
                          byte digital_value)
                   throws DscudException
Write a byte to a digital I/O port

Throws:
DscudException

dioOutputWord

public void dioOutputWord(byte port,
                          short digital_value)
                   throws DscudException
Write a short integer to a digital I/O port

Throws:
DscudException

dioInputBit

public byte dioInputBit(byte port,
                        byte bit)
                 throws DscudException
Read a bit from a digital I/O port

Throws:
DscudException

dioOutputBit

public void dioOutputBit(byte port,
                         byte bit,
                         byte digital_value)
                  throws DscudException
Write a bit to a digital I/O port

Throws:
DscudException

dioSetBit

public void dioSetBit(byte port,
                      byte bit)
               throws DscudException
Set a bit in a digital I/O port

Throws:
DscudException

dioClearBit

public void dioClearBit(byte port,
                        byte bit)
                 throws DscudException
Clear a bit in a digital I/O port

Throws:
DscudException

counterSetRateSingle

public void counterSetRateSingle(float hertz,
                                 byte ctr)
                          throws DscudException
Set the rate for counter This routine uses the current frequency set for the counter to determine the value to be loaded into the counter. No check is made on this value: only the appropriate number of low-order bytes is used.

Throws:
DscudException

counterSetRate

public void counterSetRate(float hertz)
                    throws DscudException
Set the rate for all counters

Throws:
DscudException

counterDirectSet

public void counterDirectSet(byte code,
                             int value,
                             byte ctr)
                      throws DscudException
Perform an operation on a counter directly

Throws:
DscudException

counterRead

public int counterRead(byte ctr)
                throws DscudException
Read the value of a counter

Throws:
DscudException

registerRead

public byte registerRead(short address)
                  throws DscudException
Read the value of a board register

Throws:
DscudException

registerWrite

public void registerWrite(short address,
                          byte data)
                   throws DscudException
Write a value to a board register

Throws:
DscudException

cancelOp

public void cancelOp()
              throws DscudException
Cancel all interrupt activity

Throws:
DscudException

cancelOpType

public void cancelOpType(int int_type)
                  throws DscudException
Cancel one type of interrupt activity

Throws:
DscudException

pauseOp

public void pauseOp()
             throws DscudException
Pause all interrupt activity

Throws:
DscudException

resumeOp

public void resumeOp()
              throws DscudException
Resume all interrupt activity

Throws:
DscudException

userInt

public int userInt(byte intSrc,
                   byte counter,
                   byte clkSrc,
                   float rate,
                   java.lang.Object cbObj,
                   java.lang.String cbMeth,
                   boolean useDsc)
            throws DscudException
Start user interrupt processing on counter or digital I/O interrupt

Throws:
DscudException

userInt

public int userInt(byte intSrc,
                   byte counter,
                   byte clkSrc,
                   float rate,
                   java.lang.Object cbObj,
                   java.lang.String cbMeth)
            throws DscudException
Start user interrupt processing on counter or digital interrupt (default version)

Throws:
DscudException


Copyright © 2012 LSST. All Rights Reserved.