| Modifier and Type | Class and Description |
|---|---|
static interface |
RegClient.Impl
Inner interface to support choosing the hardware.
|
| Modifier and Type | Field and Description |
|---|---|
static int |
HDW_TYPE_DAQ
Data fields.
|
static int |
HDW_TYPE_DAQ0
Data fields.
|
static int |
HDW_TYPE_DAQ1
Data fields.
|
static int |
HDW_TYPE_DAQ2
Data fields.
|
static int |
HDW_TYPE_DAQ4
Data fields.
|
static int |
HDW_TYPE_PCI
Data fields.
|
static int |
HDW_TYPE_PCI0
Data fields.
|
static int |
HDW_TYPE_PCI1
Data fields.
|
| Constructor and Description |
|---|
RegClient()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkOpen()
Checks that connection is open.
|
void |
close()
Closes a connection.
|
protected void |
finalize()
Finalizer.
|
void |
open(int id)
Opens a DAQ1 connection.
|
void |
open(int hdw,
int id,
String part)
Opens a connection.
|
void |
open(int id,
String part)
Opens a DAQ1/2/4 connection using the specified partition.
|
int |
read(int address)
Reads from a register.
|
void |
read(int address,
int[] values)
Reads from a set of registers.
|
void |
read(int address,
int[] values,
int offset,
int count)
Reads from a set of registers.
|
long |
readLong(int address)
Reads a register pair as a long value.
|
void |
reset(int type)
Resets the hardware.
|
void |
setClientFactory(ClientFactory clientFactory)
Can be used to override the default clientFactory, for example to
substitute a clientFactory which simulates real clients.
|
int |
update(int address,
int mask,
int value)
Updates a register.
|
void |
write(int address,
int value)
Writes to a register.
|
void |
write(int address,
int[] values)
Writes to a set of registers.
|
void |
write(int address,
int[] values,
int offset,
int count)
Writes to a set of registers.
|
void |
writeLong(int address,
long value)
Writes a long value to a register pair.
|
public static final int HDW_TYPE_DAQ0
public static final int HDW_TYPE_DAQ1
public static final int HDW_TYPE_DAQ2
public static final int HDW_TYPE_PCI
public static final int HDW_TYPE_PCI0
public static final int HDW_TYPE_PCI1
public static final int HDW_TYPE_DAQ4
public static final int HDW_TYPE_DAQ
public void setClientFactory(ClientFactory clientFactory)
clientFactory - protected void finalize()
throws Throwable
public void open(int id)
throws REBException
id - The ID of the REB to connect toREBExceptionpublic void open(int id,
String part)
throws REBException
id - The ID of the REB to connect topart - The name of the partitionREBExceptionpublic void open(int hdw,
int id,
String part)
throws REBException
hdw - The hardware type to use (DAQ0, DAQ1, DAQ2, DAQ4, DAQ, PCI0 or PCI1)id - The ID of the REB to connect topart - The name of the partition or interface to use.REBExceptionpublic void close()
throws REBException
REBExceptionprotected void checkOpen()
throws REBException
REBExceptionpublic int read(int address)
throws REBException
address - The address of the register to readREBExceptionpublic void read(int address,
int[] values,
int offset,
int count)
throws REBException
address - The address of the first register to readvalues - An array to receive the register valuesoffset - The offset to the array element where the first value is to be putcount - The number of registers to readREBExceptionpublic void read(int address,
int[] values)
throws REBException
address - The address of the first register to readvalues - An array to receive the register values. The size
of the array determines how many registers to read.REBExceptionpublic void write(int address,
int value)
throws REBException
address - The address of the register to writevalue - The value to write to the registerREBExceptionpublic void write(int address,
int[] values,
int offset,
int count)
throws REBException
address - The address of the first register to writevalues - An array containing the values to writeoffset - The offset to the array element containing the first value to writecount - The number of registers to writeREBExceptionpublic void write(int address,
int[] values)
throws REBException
address - The address of the first register to writevalues - An array containing the values to write. The size of
array is the number of registers to write.REBExceptionpublic int update(int address,
int mask,
int value)
throws REBException
address - The address of the register to updatemask - A mask in which set bits indicate which bits of
value are to be writtenvalue - The value to write to the registerREBExceptionpublic long readLong(int address)
throws REBException
address - The address of the first register to readREBExceptionpublic void writeLong(int address,
long value)
throws REBException
address - The address of the first register to writevalue - The value to write, as a little-endian pairREBExceptionpublic void reset(int type)
throws REBException
type - The type of reset to performREBExceptionCopyright © 2019 LSST. All rights reserved.