public class TestScpi extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
TestScpi.ConnType |
| Constructor and Description |
|---|
TestScpi() |
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Clears saved status.
|
void |
close()
Closes connection to a device.
|
void |
enableOpc()
Enables operation complete reporting.
|
void |
open(TestScpi.ConnType type,
String ident,
int param)
Opens connection to a device.
|
String |
read()
Reads a response.
|
String |
read(String command)
Writes a command and reads the response.
|
double |
readDouble(String command)
Writes a command with error checking and reads the double response.
|
float |
readFloat(String command)
Writes a command with error checking and reads the float response.
|
int |
readInteger(String command)
Writes a command with error checking and reads the integer response.
|
String |
readString(String command)
Writes a command with error checking and reads the string response.
|
void |
reset()
Resets to power-on state.
|
int |
selfTest()
Runs the self test.
|
void |
setEse(int value)
Sets the event status enable register.
|
void |
setSre(int value)
Sets the service request enable register.
|
void |
setTerm(String term)
Sets the command terminator.
|
String |
showError()
Displays the first error item.
|
String |
showEse()
Displays the event status enable register.
|
String |
showEsr()
Displays the event status register.
|
String |
showIdentification()
Displays SCPI device identification.
|
int |
showOpc()
Displays the operation complete state.
|
String |
showSre()
Displays the service request enable register.
|
String |
showStatus()
Displays the status byte.
|
void |
timeout(double time)
Sets the response timeout.
|
void |
waitComp()
Waits for command completion.
|
void |
write(String command)
Writes a command.
|
void |
writeCommand(String command)
Writes a command with error checking.
|
protected Scpi scpi
@Command(name="open",
description="Open connection to device")
public void open(@Argument(name="type",description="Connection type: net, serial or ftdi")
TestScpi.ConnType type,
@Argument(name="ident",description="Device identifier")
String ident,
@Argument(name="param",description="Device parameter")
int param)
throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverException@Command(name="close",
description="Close connection to device")
public void close()
throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverException@Command(name="write",
description="Write command to device")
public void write(@Argument(name="command",description="Command to write")
String command)
throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverException@Command(name="read",
description="Read response from device")
public String read()
throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverException@Command(name="read",
description="Write command and read response")
public String read(@Argument(name="command",description="Command to write")
String command)
throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverException@Command(name="writecommand",
description="Write command")
public void writeCommand(@Argument(name="command",description="Command to write")
String command)
throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverException@Command(name="readstring",
description="Write command and read string response")
public String readString(@Argument(name="command",description="Command to write")
String command)
throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverException@Command(name="readinteger",
description="Write command and read integer response")
public int readInteger(@Argument(name="command",description="Command to write")
String command)
throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverException@Command(name="readdouble",
description="Write command and read double response")
public double readDouble(@Argument(name="command",description="Command to write")
String command)
throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverException@Command(name="readfloat",
description="Write command and read float response")
public float readFloat(@Argument(name="command",description="Command to write")
String command)
throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverException@Command(name="timeout",
description="Set read response timeout")
public void timeout(@Argument(name="time",description="Timeout value (sec)")
double time)
throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverException@Command(name="setterm",
description="Set command terminator")
public void setTerm(@Argument(name="term",description="Terminator string")
String term)
throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverException@Command(name="clear",
description="Clear saved status")
public void clear()
throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverException@Command(name="reset",
description="Reset to power-on state")
public void reset()
throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverException@Command(name="enableopc",
description="Enable operation complete reporting")
public void enableOpc()
throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverException@Command(name="setese",
description="Set event status enable register")
public void setEse(@Argument(name="value",description="Value to set")
int value)
throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverException@Command(name="setsre",
description="Set service request enable register")
public void setSre(@Argument(name="value",description="Value to set")
int value)
throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverException@Command(name="wait",
description="Wait for previous command completion")
public void waitComp()
throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverException@Command(name="showesr",
description="Display the event status register")
public String showEsr()
throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverException@Command(name="showese",
description="Display the event status enable register")
public String showEse()
throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverException@Command(name="showopc",
description="Display the operation complete state")
public int showOpc()
throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverException@Command(name="showsre",
description="Display the service request enable register")
public String showSre()
throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverException@Command(name="showstatus",
description="Display the status byte")
public String showStatus()
throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverException@Command(name="selftest",
description="Run the self test")
public int selfTest()
throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverException@Command(name="showerror",
description="Display the first error item")
public String showError()
throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverException@Command(name="showident",
description="Show SCPI device identification")
public String showIdentification()
throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverExceptionCopyright © 2014 LSST. All Rights Reserved.