| 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_DAQ0
Data fields.
|
static int |
HDW_TYPE_DAQ1
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 connection using the default network interface.
|
void |
open(int hdw,
int id,
String ifc)
Opens a connection.
|
void |
open(int id,
String ifc)
Opens a connection using the specified network interface.
|
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 |
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_PCI
public static final int HDW_TYPE_PCI0
public static final int HDW_TYPE_PCI1
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 ifc)
throws REBException
id - The ID of the REB to connect toifc - The name of the network interface to use. If null or
empty, the default interface is used.REBExceptionpublic void open(int hdw,
int id,
String ifc)
throws REBException
hdw - The hardware type to use (DAQ0, DAQ1 or PCI)id - The ID of the REB to connect toifc - The name of the network interface to use. If null or
empty, the default interface is used.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 pairREBExceptionCopyright © 2016 LSST. All rights reserved.