be.ac.ulb.gpib
Interface GPIBDriver

All Known Implementing Classes:
WindowsGPIBDriver

public interface GPIBDriver

An abstract GPIB driver interface that any driver implementation should implement.


Method Summary
 void clearDevice(int _descriptor)
          Clears a specific device
 be.ac.ulb.gpib.GPIBDevice getDevice(int address)
          returns a GPIB device using its GPIB address.
 void initialize()
          initialize() will be called by the GPIBDeviceIdentifier's static initializer.
 int openDevice(int _address)
          Opens a GPIB device present at specific address.
 java.lang.String sendCommand(java.lang.String _message, int _address)
          sends a valid GPIB command to the device.
 void writeCommand(java.lang.String _message, int _address)
          sends a valid GPIB command to the device.
 

Method Detail

initialize

public void initialize()
initialize() will be called by the GPIBDeviceIdentifier's static initializer. The responsibility of this method is: 1) Ensure that that the hardware is present. 2) Load any required native libraries. 3) Register the port names with the CommPortIdentifier.


getDevice

public be.ac.ulb.gpib.GPIBDevice getDevice(int address)
returns a GPIB device using its GPIB address. See IEEE488 and IEEE488.2 specifications

Parameters:
address - the GPIB address (from 0 to 31)

sendCommand

public java.lang.String sendCommand(java.lang.String _message,
                                    int _address)
                             throws java.io.IOException
sends a valid GPIB command to the device.

Returns:
a String representing device's answer to the command
java.io.IOException

writeCommand

public void writeCommand(java.lang.String _message,
                         int _address)
                  throws java.io.IOException
sends a valid GPIB command to the device.

java.io.IOException

clearDevice

public void clearDevice(int _descriptor)
                 throws java.io.IOException
Clears a specific device

Parameters:
_descriptor - an unique integer referecing the device internally. It is not necessarely the GPIB address.
java.io.IOException

openDevice

public int openDevice(int _address)
               throws java.io.IOException
Opens a GPIB device present at specific address.

Parameters:
_address - the GPIB address of the device.
java.io.IOException