|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.lsst.ccs.drivers.dscud.Dscud
public class Dscud
\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 |
|---|
public static final byte DSC_DMM16
public static final byte DSC_RMM
public static final byte DSC_TMM
public static final byte DSC_OPMM
public static final byte DSC_DMM
public static final byte DSC_SMM
public static final byte DSC_GMM
public static final byte DSC_QMM
public static final byte DSC_ZMM
public static final byte DSC_PMM
public static final byte DSC_OMM
public static final byte DSC_RMM416
public static final byte DSC_DMM32
public static final byte DSC_DMM32AT
public static final byte DSC_EMMDIO
public static final byte DSC_RMM1612
public static final byte DSC_DMMAT
public static final byte DSC_DMM16AT
public static final byte DSC_IR104
public static final byte DSC_EMM8
public static final byte DSC_PROM
public static final byte DSC_HERCEBX
public static final byte DSC_CPT
public static final byte DSC_DMM48
public static final byte DSC_DMM48AT
public static final byte DSC_OMMDIO
public static final byte DSC_DIO82C55
public static final byte DSC_MRC
public static final byte DSC_EMMOPTO
public static final byte DSC_ATHENA
public static final byte DSC_METIS
public static final byte DSC_DMM32X
public static final byte DSC_DMM32XAT
public static final byte DSC_ELEKTRA
public static final byte DSC_GPIO11_9513
public static final byte DSC_GPIO11_DIO
public static final byte DSC_GPIO21
public static final byte DSC_PSD
public static final byte DSC_ATHENAII
public static final byte DSC_DMM32DX
public static final byte DSC_DMM32DXAT
public static final byte DSC_HELIOS
public static final byte DSC_NEPTUNE
public static final byte DSC_TEST
public static final byte DSC_RAW
public static final byte DSC_DRVR
public static final int DE_NONE
public static final int DE_HW_FAILURE
public static final int DE_SW_FAILURE
public static final int DE_HW_NOT_SUPPORTED
public static final int DE_SW_NOT_SUPPORTED
public static final int DE_INVALID_PARM
public static final int DE_ALTERNATE_IN_PROGRESS
public static final int DE_NONE_IN_PROGRESS
public static final int DE_BUFFER_ROLLOVER
public static final int DE_INVALID_ERROR_CODE
public static final int DE_ALREADY_PAUSED
public static final int DE_OVERFLOW
public static final int DE_INVALID_FUNC
public static final int DE_DSCUDH_INVALID
public static final int DE_INVALID_BOARD
public static final int DE_BOARD_LIMIT_REACHED
public static final int DE_BOARD_BUSY
public static final int DE_INVALID_WINDRVR_HANDLE
public static final int DE_INVALID_WINDRVR_VERSION
public static final int DE_BAD_WINDRVR_BOARD_INIT
public static final int DE_OPERATION_TIMED_OUT
public static final int DE_INVALID_WINDRVR_KP
public static final int DE_THREAD_FAILURE
public static final byte ADCS_MAX_CHANNELS
public static final byte DACS_MAX_CHANNELS
public static final byte RANGE_5
public static final byte RANGE_10
public static final byte BIPOLAR
public static final byte UNIPOLAR
public static final byte GAIN_1
public static final byte GAIN_2
public static final byte GAIN_4
public static final byte GAIN_8
public static final byte GAIN_10
public static final byte GAIN_100
public static final byte GAIN_1000
public static final byte SCAN_INTERVAL_4
public static final byte SCAN_INTERVAL_5
public static final byte SCAN_INTERVAL_9
public static final byte SCAN_INTERVAL_10
public static final byte SCAN_INTERVAL_15
public static final byte SCAN_INTERVAL_20
public static final byte SINGLE_ENDED
public static final byte DIFFERENTIAL
public static final byte COUNTER_0
public static final byte COUNTER_1
public static final byte FRQ_100KHZ
public static final byte FRQ_1MHZ
public static final byte FRQ_10MHZ
public static final byte INT_TYPE_AD
public static final byte INT_TYPE_DA
public static final byte INT_TYPE_DIOIN
public static final byte INT_TYPE_USER
public static final byte INT_TYPE_COUNTER
public static final byte INT_TYPE_DIOREAD
public static final byte INT_TYPE_OPTO
public static final byte INT_TYPE_DIOWRITE
public static final byte USER_INT_CANCEL
public static final byte USER_INT_AFTER
public static final byte USER_INT_INSTEAD
public static final byte USER_INT_SOURCE_EXTERNAL
public static final byte USER_INT_SOURCE_INTERNAL
public static final short REG_0
public static final short REG_1
public static final short REG_2
public static final short REG_3
public static final short REG_4
public static final short REG_5
public static final short REG_6
public static final short REG_7
public static final short REG_8
public static final short REG_9
public static final short REG_10
public static final short REG_11
public static final short REG_12
public static final short REG_13
public static final short REG_14
public static final short REG_15
| Constructor Detail |
|---|
public Dscud()
| Method Detail |
|---|
public static int getLastError(java.lang.String[] errstr)
public static java.lang.String getErrorString(int error_code)
public static byte inp(int address)
throws DscudException
DscudException
public static short inpw(int address)
throws DscudException
DscudException
public static int inpl(int address)
throws DscudException
DscudException
public static void inpws(int address,
short[] buffer,
short n)
throws DscudException
DscudException
public static void outp(int address,
byte value)
throws DscudException
DscudException
public static void outpw(int address,
short value)
throws DscudException
DscudException
public static void outpl(int address,
int value)
throws DscudException
DscudException
public static void outpws(int address,
short[] buffer,
short n)
throws DscudException
DscudException
public static void sleep(int ms)
throws DscudException
DscudException
public static int getTime()
throws DscudException
DscudException
public static byte getBoardMacro(java.lang.String boardtype)
throws DscudException
DscudException
public static void setSystemPriority(int priority)
throws DscudException
DscudException
public static int peek(int address,
int width)
public void initBoard(byte type,
short baseAddr,
byte intLevel,
byte clkFrq0,
byte clkFrq1,
byte clkSel1)
throws DscudException
DscudException
public void initBoard(byte type,
short baseAddr,
byte intLevel)
throws DscudException
DscudException
public void pciInitBoard(byte type,
byte pciSlot)
throws DscudException
DscudException
public void freeBoard()
throws DscudException
DscudException
public void adSetSettings(byte channel,
byte gain,
byte range,
byte polarity,
boolean loadCal,
byte scanIntvl,
byte diff)
throws DscudException
DscudException
public void adSetChannel(byte lowChan,
byte highChan)
throws DscudException
DscudException
public short adSample()
throws DscudException
DscudException
public double adSampleAvg(int count)
throws DscudException
DscudException
public void adSampleInt(int nConv,
byte lowChan,
byte highChan,
float rate,
byte clkSrc,
short fifoDepth,
int thresh,
short[] values)
throws DscudException
DscudException
public void adScan(byte lowChan,
byte highChan,
short[] values)
throws DscudException
DscudException
public void adScanAvg(byte lowChan,
byte highChan,
double[] averages,
int count)
throws DscudException
DscudException
public void adScanInt(int nConv,
byte lowChan,
byte highChan,
float rate,
byte clkSrc,
short fifoDepth,
int thresh,
short[] values)
throws DscudException
DscudException
public void adAutoCal(byte range,
byte bootRange)
throws DscudException
DscudException
public void adCalVerify(byte range,
float[] offsetError,
float[] gainError)
throws DscudException
DscudException
public double adCodeToVoltage(byte polarity,
byte gain,
byte range,
short code)
throws DscudException
DscudException
public short voltageToAdCode(byte polarity,
byte gain,
byte range,
double voltage)
throws DscudException
DscudException
public void daSetPolarity(byte polarity)
throws DscudException
DscudException
public void daSetSettings(byte polarity,
boolean loadCal,
float range,
byte gain,
boolean simUpdate,
boolean polEnab,
boolean urSet,
byte urChan)
throws DscudException
DscudException
public void daConvert(byte channel,
int code)
throws DscudException
DscudException
public void daConvertScan(int[] chanEnab,
int[] codes)
throws DscudException
DscudException
public void daAutoCal(byte range)
throws DscudException
DscudException
public void daCalVerify(byte range,
float[] offsetError,
float[] gainError)
throws DscudException
DscudException
public double daCodeToVoltage(byte polarity,
byte gain,
float range,
int code)
throws DscudException
DscudException
public int voltageToDaCode(byte polarity,
byte gain,
float range,
double voltage)
throws DscudException
DscudException
public void dioSetConfig(byte[] config_bytes)
throws DscudException
DscudException
public byte dioInputByte(byte port)
throws DscudException
DscudException
public short dioInputWord(byte port)
throws DscudException
DscudException
public void dioOutputByte(byte port,
byte digital_value)
throws DscudException
DscudException
public void dioOutputWord(byte port,
short digital_value)
throws DscudException
DscudException
public byte dioInputBit(byte port,
byte bit)
throws DscudException
DscudException
public void dioOutputBit(byte port,
byte bit,
byte digital_value)
throws DscudException
DscudException
public void dioSetBit(byte port,
byte bit)
throws DscudException
DscudException
public void dioClearBit(byte port,
byte bit)
throws DscudException
DscudException
public void counterSetRateSingle(float hertz,
byte ctr)
throws DscudException
DscudException
public void counterSetRate(float hertz)
throws DscudException
DscudException
public void counterDirectSet(byte code,
int value,
byte ctr)
throws DscudException
DscudException
public int counterRead(byte ctr)
throws DscudException
DscudException
public byte registerRead(short address)
throws DscudException
DscudException
public void registerWrite(short address,
byte data)
throws DscudException
DscudException
public void cancelOp()
throws DscudException
DscudException
public void cancelOpType(int int_type)
throws DscudException
DscudException
public void pauseOp()
throws DscudException
DscudException
public void resumeOp()
throws DscudException
DscudException
public int userInt(byte intSrc,
byte counter,
byte clkSrc,
float rate,
java.lang.Object cbObj,
java.lang.String cbMeth,
boolean useDsc)
throws DscudException
DscudException
public int userInt(byte intSrc,
byte counter,
byte clkSrc,
float rate,
java.lang.Object cbObj,
java.lang.String cbMeth)
throws DscudException
DscudException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||