public class Scpi
extends org.lsst.ccs.drivers.ascii.Ascii
org.lsst.ccs.drivers.ascii.Ascii.DataBits, org.lsst.ccs.drivers.ascii.Ascii.FlowCtrl, org.lsst.ccs.drivers.ascii.Ascii.Option, org.lsst.ccs.drivers.ascii.Ascii.Parity, org.lsst.ccs.drivers.ascii.Ascii.StopBits, org.lsst.ccs.drivers.ascii.Ascii.Terminator| Modifier and Type | Field and Description |
|---|---|
static int |
CHECK_CONTAINS
Identification check type - contains string
|
static int |
CHECK_ENDS_WITH
Identification check type - ends with string
|
static int |
CHECK_EQUALS
Identification check type - equals string
|
static int |
CHECK_MATCHES
Identification check type - matches regular expression
|
static int |
CHECK_STARTS_WITH
Identification check type - starts with string
|
static int |
ESR_ANY_ERROR
Event status register bit mask - any error
|
static int |
ESR_COMMAND_ERROR
Event status register bit mask - command error
|
static int |
ESR_DEVICE_ERROR
Event status register bit mask - device dependent error
|
static int |
ESR_EXECUTION_ERROR
Event status register bit mask - execution error
|
static int |
ESR_QUERY_ERROR
Event status register bit mask - query error
|
static int |
IDENT_FW_VERSION
Identification field index - firmware version
|
static int |
IDENT_MANUFACTURER
Identification field index - manufacturer
|
static int |
IDENT_MODEL_NAME
Identification field index - model name
|
static int |
IDENT_SERIAL_NUMBER
Identification field index - serial number
|
static int |
SB_ERROR_QUEUE
Status byte bit mask - error queue not empty
|
static int |
SB_EVENT_STATUS
Status byte bit mask - event status byte summary
|
static int |
SB_MASTER_STATUS
Status byte bit mask - master status summary
|
static int |
SB_MESSAGE_AVAILABLE
Status byte bit mask - message available
|
static int |
SB_OPERATION_STATUS
Status byte bit mask - operation status summary
|
static int |
SB_QUESTIONABLE_STATUS
Status byte bit mask - questionable status summary
|
| Constructor and Description |
|---|
Scpi() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkError()
Checks for command error.
|
void |
checkIdentification(String manufact,
int manCheck,
String model,
int modCheck)
Checks the identification.
|
void |
clearStatus()
Clears all status reporting structures.
|
void |
enableOperationComplete()
Enables operation complete reporting.
|
String |
getError()
Gets the first item from the error queue.
|
int |
getEventStatus()
Gets the event status register value.
|
int |
getEventStatusEnable()
Gets the event status enable register value.
|
String[] |
getIdentification()
Gets the device identification strings.
|
int |
getOperationComplete()
Gets the operation complete state.
|
int |
getServiceRequestEnable()
Gets the service request enable register value.
|
int |
getStatusByte()
Gets the status byte value.
|
String |
makeChannelList(int chan)
Makes a channel list string from a channel number.
|
String |
makeChannelList(int[] chan)
Makes a channel list string from an array of channels.
|
double |
readDouble(String command)
Reads a double with SCPI error checking after writing a command.
|
double[] |
readDoubleArray(String command)
Reads a double array with SCPI error checking after writing a command.
|
float |
readFloat(String command)
Reads a float with SCPI error checking after writing a command.
|
float[] |
readFloatArray(String command)
Reads a float array with SCPI error checking after writing a command.
|
int |
readInteger(String command)
Reads an integer with SCPI error checking after writing a command.
|
int[] |
readIntegerArray(String command)
Reads an integer array with SCPI error checking after writing a command.
|
String |
readString(String command)
Reads a string with SCPI error checking after writing a command.
|
String[] |
readStringArray(String command)
Reads a string array with SCPI error checking after writing a command.
|
void |
reset()
Resets to power-on state.
|
int |
runSelfTest()
Executes internal self-test.
|
void |
setEventStatusEnable(int value)
Sets the event status enable register.
|
void |
setServiceRequestEnable(int value)
Sets the service request enable register.
|
boolean |
testIdentification(String manufact,
int manCheck,
String model,
int modCheck)
Tests the identification.
|
void |
waitCompletion()
Waits for previous command completion.
|
void |
writeCommand(String command)
Writes a command with SCPI error checking.
|
close, closeSilent, flush, isOpen, makeDataCharacteristics, open, open, open, openFtdi, openFtdi, openFtdi, openNet, openNet, openSerial, openSerial, openSerial, read, read, readBytes, readBytes, setCommandTerm, setDefaultParm, setOptions, setResponseTerm, setTerminator, setTimeout, setTimeout, write, writeBytes, writeBytespublic static final int IDENT_MANUFACTURER
public static final int IDENT_MODEL_NAME
public static final int IDENT_SERIAL_NUMBER
public static final int IDENT_FW_VERSION
public static final int CHECK_EQUALS
public static final int CHECK_STARTS_WITH
public static final int CHECK_ENDS_WITH
public static final int CHECK_CONTAINS
public static final int CHECK_MATCHES
public static final int ESR_QUERY_ERROR
public static final int ESR_DEVICE_ERROR
public static final int ESR_EXECUTION_ERROR
public static final int ESR_COMMAND_ERROR
public static final int ESR_ANY_ERROR
public static final int SB_ERROR_QUEUE
public static final int SB_QUESTIONABLE_STATUS
public static final int SB_MESSAGE_AVAILABLE
public static final int SB_EVENT_STATUS
public static final int SB_MASTER_STATUS
public static final int SB_OPERATION_STATUS
public void writeCommand(String command) throws org.lsst.ccs.drivers.commons.DriverException
command - The command to write, excluding terminatororg.lsst.ccs.drivers.commons.DriverExceptionpublic String readString(String command) throws org.lsst.ccs.drivers.commons.DriverException
command - The command to write, excluding terminatororg.lsst.ccs.drivers.commons.DriverExceptionpublic String[] readStringArray(String command) throws org.lsst.ccs.drivers.commons.DriverException
command - The command to write, excluding terminatororg.lsst.ccs.drivers.commons.DriverExceptionpublic int readInteger(String command) throws org.lsst.ccs.drivers.commons.DriverException
command - The command to write, excluding terminatororg.lsst.ccs.drivers.commons.DriverExceptionpublic int[] readIntegerArray(String command) throws org.lsst.ccs.drivers.commons.DriverException
command - The command to write, excluding terminatororg.lsst.ccs.drivers.commons.DriverExceptionpublic double readDouble(String command) throws org.lsst.ccs.drivers.commons.DriverException
command - The command to write, excluding terminatororg.lsst.ccs.drivers.commons.DriverExceptionpublic double[] readDoubleArray(String command) throws org.lsst.ccs.drivers.commons.DriverException
command - The command to write, excluding terminatororg.lsst.ccs.drivers.commons.DriverExceptionpublic float readFloat(String command) throws org.lsst.ccs.drivers.commons.DriverException
command - The command to write, excluding terminatororg.lsst.ccs.drivers.commons.DriverExceptionpublic float[] readFloatArray(String command) throws org.lsst.ccs.drivers.commons.DriverException
command - The command to write, excluding terminatororg.lsst.ccs.drivers.commons.DriverExceptionpublic boolean testIdentification(String manufact, int manCheck, String model, int modCheck) throws org.lsst.ccs.drivers.commons.DriverException
manufact - The manufacturer to check for, or null if not checking.manCheck - The type of check to make for the manufacturer.model - The model to check for, or null if not checking.modCheck - The type of check to make for the model.org.lsst.ccs.drivers.commons.DriverExceptionpublic void checkIdentification(String manufact, int manCheck, String model, int modCheck) throws org.lsst.ccs.drivers.commons.DriverException
manufact - The manufacturer to check for, or null if not checking.manCheck - The type of check to make for the manufacturer.model - The model to check for, or null if not checking.modCheck - The type of check to make for the model.org.lsst.ccs.drivers.commons.DriverExceptionpublic void clearStatus()
throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverExceptionpublic void setEventStatusEnable(int value)
throws org.lsst.ccs.drivers.commons.DriverException
value - The value to setorg.lsst.ccs.drivers.commons.DriverExceptionpublic int getEventStatusEnable()
throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverExceptionpublic int getEventStatus()
throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverExceptionpublic String[] getIdentification() throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverExceptionpublic void enableOperationComplete()
throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverExceptionpublic int getOperationComplete()
throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverExceptionpublic void reset()
throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverExceptionpublic void setServiceRequestEnable(int value)
throws org.lsst.ccs.drivers.commons.DriverException
value - The value to setorg.lsst.ccs.drivers.commons.DriverExceptionpublic int getServiceRequestEnable()
throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverExceptionpublic int getStatusByte()
throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverExceptionpublic int runSelfTest()
throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverExceptionpublic void waitCompletion()
throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverExceptionpublic String getError() throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverExceptionpublic String makeChannelList(int chan)
chan - The channel numberpublic String makeChannelList(int[] chan)
chan - The array of channel numbersprotected void checkError()
throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverExceptionCopyright © 2018 LSST. All rights reserved.