be.ac.ulb.gpib
Class WindowsGPIBDriver

java.lang.Object
  |
  +--be.ac.ulb.gpib.WindowsGPIBDriver
All Implemented Interfaces:
GPIBDriver

public final class WindowsGPIBDriver
extends java.lang.Object
implements GPIBDriver

A GPIB driver based on NI (www.ni.com) API.


Constructor Summary
WindowsGPIBDriver()
           
 
Method Summary
 void clearDevice(int _descr)
          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 device and returns a descriptor integer that can be used internally later
 java.lang.String sendCommand(java.lang.String command, int address)
          sends a valid GPIB command to the device.
 void writeCommand(java.lang.String command, int address)
          sends a valid GPIB command to the device.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WindowsGPIBDriver

public WindowsGPIBDriver()
Method Detail

initialize

public void initialize()
Description copied from interface: GPIBDriver
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.

Specified by:
initialize in interface GPIBDriver

getDevice

public be.ac.ulb.gpib.GPIBDevice getDevice(int address)
Description copied from interface: GPIBDriver
returns a GPIB device using its GPIB address. See IEEE488 and IEEE488.2 specifications

Specified by:
getDevice in interface GPIBDriver
Parameters:
address - the GPIB address (from 0 to 31)

clearDevice

public void clearDevice(int _descr)
                 throws java.io.IOException
Description copied from interface: GPIBDriver
Clears a specific device

Specified by:
clearDevice in interface GPIBDriver
Parameters:
_descr - 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 device and returns a descriptor integer that can be used internally later

Specified by:
openDevice in interface GPIBDriver
Parameters:
_address - the GPIB address of the device.
java.io.IOException

sendCommand

public java.lang.String sendCommand(java.lang.String command,
                                    int address)
                             throws java.io.IOException
Description copied from interface: GPIBDriver
sends a valid GPIB command to the device.

Specified by:
sendCommand in interface GPIBDriver
Returns:
a String representing device's answer to the command
java.io.IOException

writeCommand

public void writeCommand(java.lang.String command,
                         int address)
                  throws java.io.IOException
Description copied from interface: GPIBDriver
sends a valid GPIB command to the device.

Specified by:
writeCommand in interface GPIBDriver
java.io.IOException