public class TestSrp extends Object
| Modifier and Type | Class and Description |
|---|---|
protected class |
TestSrp.ConsThread
Inner class for detecting console input while reading continuously.
|
protected static class |
TestSrp.OnOff
Data fields
|
| Modifier and Type | Field and Description |
|---|---|
protected TestSrp.ConsThread |
consThread |
protected Srp |
srp |
| Constructor and Description |
|---|
TestSrp()
Constructor.
|
TestSrp(Srp srp)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
connect(int node)
Connects to a device.
|
void |
connect(int node,
int port)
Connects to a device.
|
void |
connectIp(String ipAddr)
Connects to a device.
|
void |
connectIp(String ipAddr,
int port)
Connects to a device.
|
String |
contRead(int addr,
int count)
Continuously reads registers.
|
void |
disconnect()
Disconnects from the device.
|
protected static String |
formatHex(int addr,
int[] data)
Formats, in hexadecimal, array of register values.
|
protected static String |
formatRate(long start,
int count)
Formats continuous test rates.
|
String |
read(int addr)
Reads a register.
|
String |
read(int addr,
int count)
Reads registers.
|
void |
setDebug(TestSrp.OnOff state)
Sets the debug state.
|
void |
setSrpVersion(int version)
Sets the SRP version
|
Srp.BoardType |
showBoardType()
Shows the board type.
|
String |
showBuildStamp()
Shows the build stamp.
|
void |
update(int addr,
int mask,
int value)
Updates a register.
|
void |
write(int addr,
int... value)
Writes registers.
|
protected final Srp srp
protected final TestSrp.ConsThread consThread
public TestSrp()
public TestSrp(Srp srp)
srp - Srp object@Command(description="Set the SRP version")
public void setSrpVersion(@Argument(description="Version number")
int version)
version - The version to set@Command(description="Set the debug state")
public void setDebug(@Argument(description="The state (on or off)")
TestSrp.OnOff state)
state - The debug state to set, ON or OFF@Command(description="Open connection to device")
public void connectIp(@Argument(description="IP address")
String ipAddr,
@Argument(description="Port number")
int port)
throws org.lsst.ccs.drivers.commons.DriverException
ipAddr - The IP addressport - The port numberorg.lsst.ccs.drivers.commons.DriverException@Command(description="Open connection to device")
public void connectIp(@Argument(description="IP address")
String ipAddr)
throws org.lsst.ccs.drivers.commons.DriverException
ipAddr - The IP addressorg.lsst.ccs.drivers.commons.DriverException@Command(description="Open connection to device")
public void connect(@Argument(description="Node number")
int node,
@Argument(description="Port number")
int port)
throws org.lsst.ccs.drivers.commons.DriverException
node - The node numberport - The port numberorg.lsst.ccs.drivers.commons.DriverException@Command(description="Open connection to device")
public void connect(@Argument(description="Node number")
int node)
throws org.lsst.ccs.drivers.commons.DriverException
node - The node numberorg.lsst.ccs.drivers.commons.DriverException@Command(description="Close connection to device")
public void disconnect()
throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverException@Command(description="Show the board type") public Srp.BoardType showBoardType() throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverException@Command(description="Show the build stamp") public String showBuildStamp() throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverException@Command(description="Read a register") public String read(@Argument(description="Register address") int addr) throws org.lsst.ccs.drivers.commons.DriverException
addr - The register addressorg.lsst.ccs.drivers.commons.DriverException@Command(description="Reads registers") public String read(@Argument(description="Register address") int addr, @Argument(description="Register count") int count) throws org.lsst.ccs.drivers.commons.DriverException
addr - The first register addresscount - The number of registers to readorg.lsst.ccs.drivers.commons.DriverException@Command(description="Write a register")
public void write(@Argument(description="Register address")
int addr,
@Argument(description="Register values")
int... value)
throws org.lsst.ccs.drivers.commons.DriverException
addr - The first register addressvalue - The values to writeorg.lsst.ccs.drivers.commons.DriverException@Command(description="Update a register")
public void update(@Argument(description="Register address")
int addr,
@Argument(description="Mask of bits to change")
int mask,
@Argument(description="Register value")
int value)
throws org.lsst.ccs.drivers.commons.DriverException
addr - The register addressmask - The mask of bits to changevalue - The value to writeorg.lsst.ccs.drivers.commons.DriverException@Command(description="Continuously read a set of registers") public String contRead(@Argument(description="First register address") int addr, @Argument(description="Number of registers") int count) throws org.lsst.ccs.drivers.commons.DriverException
addr - The first register addresscount - The number of registers to readorg.lsst.ccs.drivers.commons.DriverExceptionprotected static String formatHex(int addr, int[] data)
addr - The address of the first data worddata - Array of data wordsprotected static String formatRate(long start, int count)
start - The start timecount - The number of operationsCopyright © 2020 LSST. All rights reserved.