public class Equipment extends Logger implements EquipmentInterface
Native command documentation including error codes can be found in the NI-488.2M Software Reference Manual (also found here ) and in ugpib.h .
Modifier and Type | Field and Description |
---|---|
static int |
CONTROLLER_ID_NUMBER
option value for ask(int)   that returns the ID
number of the GPIB controller that this device is connected to. |
Constructor and Description |
---|
Equipment(java.lang.String name)
Default constructor, should be invoked by any class that extends
Equipment . |
Modifier and Type | Method and Description |
---|---|
int |
ask(int option)
Return information about the GPIB software configuration parameters.
|
void |
clear()
Clear internal or device functions of the device.
|
void |
command(java.lang.String command)
Send GPIB interface messages to the device.
|
java.lang.String |
getName()
Returns the name of the device, as it appears in ibconf.
|
void |
interactive()
For device bringup and command testing, takes commands from the terminal
and sends them to the device.
|
protected boolean |
isDisabled()
Whether or not this piece of equipment is disabled.
|
static void |
main(java.lang.String[] argv)
test program
|
java.lang.String |
read(int length)
Receive up to
length bytes from the device. |
float |
readFloat(int length) |
java.lang.String |
readLine()
Read 80 characters from device.
|
java.lang.String |
toString() |
void |
write(java.lang.String data)
send write message to receiver
|
isLogInits, isLogOthers, isLogSets, logInit, logOther, logSet, setAllLogging, setLogInits, setLogOthers, setLogSets
public static final int CONTROLLER_ID_NUMBER
option
value for ask(int)
  that returns the ID
number of the GPIB controller that this device is connected to.public java.lang.String getName()
public void write(java.lang.String data)
write
in interface EquipmentInterface
data
- data stringpublic java.lang.String read(int length)
length
bytes from the device.read
in interface EquipmentInterface
length
- length of the data to readpublic java.lang.String readLine()
readLine
in interface EquipmentInterface
public float readFloat(int length)
public int ask(int option)
option
values can be found in the ibconfig
and ibask constants section in ugpib.h . Currently
CONTROLLER_ID_NUMBER
is provided for convenience in
specifying option
.option
- constant identifying which configuration parameter to returnpublic void clear()
public void command(java.lang.String command)
command
- string containing characters to send over GPIBpublic void interactive()
protected boolean isDisabled()
public static void main(java.lang.String[] argv)