be.ac.ulb.gpib
Class GPIBDevice

java.lang.Object
  |
  +--be.ac.ulb.gpib.GPIBDevice

public class GPIBDevice
extends java.lang.Object

A GPIB (IEEE488.1 and IEEE488.2) device


Field Summary
protected  int address
           
protected  int descriptor
           
protected  be.ac.ulb.gpib.GPIBDriver driver
           
protected  java.lang.String model
           
protected  java.lang.String stepping
           
protected  java.lang.String vendor
           
protected  java.lang.String version
           
 
Constructor Summary
GPIBDevice(int _address, be.ac.ulb.gpib.GPIBDriver _driver)
           
 
Method Summary
 void clear()
          Clears the device by sending it the CLEAR signal.
 java.lang.String getModel()
           
 java.lang.String getStepping()
           
 int getTimeout()
           
 java.lang.String getVendor()
           
 java.lang.String getVersion()
           
 void open()
          opens the device and sets the descriptor of the device
 java.lang.String sendCommand(java.lang.String command)
          Sends a GPIB command that can be understand by the device.
 void setFullName(java.lang.String _vendor, java.lang.String _model, java.lang.String _stepping, java.lang.String _version, java.lang.String _name)
           
 void setTimeout(int millis)
           
 java.lang.String toString()
           
 void writeCommand(java.lang.String command)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

address

protected int address

driver

protected be.ac.ulb.gpib.GPIBDriver driver

vendor

protected java.lang.String vendor

stepping

protected java.lang.String stepping

version

protected java.lang.String version

model

protected java.lang.String model

descriptor

protected int descriptor
Constructor Detail

GPIBDevice

public GPIBDevice(int _address,
                  be.ac.ulb.gpib.GPIBDriver _driver)
Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

clear

public void clear()
           throws java.io.IOException
Clears the device by sending it the CLEAR signal.

java.io.IOException

open

public void open()
          throws java.io.IOException
opens the device and sets the descriptor of the device

java.io.IOException

getTimeout

public int getTimeout()

setTimeout

public void setTimeout(int millis)
                throws java.io.IOException
java.io.IOException

sendCommand

public java.lang.String sendCommand(java.lang.String command)
                             throws java.io.IOException
Sends a GPIB command that can be understand by the device. Refer your manual for valid commands that can be used with your device.

Returns:
the answer string sent by the device. It returns an empty string if no return was available.
java.io.IOException

writeCommand

public void writeCommand(java.lang.String command)
                  throws java.io.IOException
java.io.IOException

setFullName

public void setFullName(java.lang.String _vendor,
                        java.lang.String _model,
                        java.lang.String _stepping,
                        java.lang.String _version,
                        java.lang.String _name)

getStepping

public java.lang.String getStepping()

getVendor

public java.lang.String getVendor()

getModel

public java.lang.String getModel()

getVersion

public java.lang.String getVersion()