charly.server.devices
Interface ChGpibDevice

All Superinterfaces:
ChDevice, java.rmi.Remote
All Known Implementing Classes:
ChGpibDeviceImpl

public interface ChGpibDevice
extends ChDevice, java.rmi.Remote

The methods of this interface are usually called by ChGpibClient or ChGpibUnit.


Field Summary
static java.lang.String NAME
          name is "GPIB"
 
Method Summary
 void checkSrq(java.lang.String taskID, int dvcAddr, ChClientGpib clientGpib)
          This method asks the server to notify the specified client, when an SRQ on the specified device occured.
 byte[] enter(java.lang.String taskID, int dvcAddr)
          receives from a given device on the gpib-bus.
 byte[] enter(java.lang.String taskID, int dvcAddr, java.lang.String suffix)
          receives from a given device on the gpib-bus.
 void initialize(java.lang.String taskID, int addr, int level)
          usually does not need to be called.
 int isGpibBoardPresent()
          tests if gpibboard is present.
 int isListenerPresent(java.lang.String taskID, int dvcAddr)
          tests if listener with specified address is present.
 int isListenerPresent(java.lang.String taskID, int dvcAddr, java.lang.String suffix)
          tests if listener with specified address is present.
 int ppoll(java.lang.String taskID)
          This function will be replaced by an event-listener-model.
 byte[] rarray(java.lang.String taskID)
          receives binary and non-binary data from the gpib-bus.
 byte[] rarray(java.lang.String taskID, int dvcAddr)
          receives binary and non-binary data from a device of the gpib-bus.
 byte[] rarray(java.lang.String taskID, int dvcAddr, java.lang.String suffix)
          receives binary and non-binary data from a device of the gpib-bus.
 byte[] receive(java.lang.String taskID)
          receives non-binary data from the gpib-bus.
 byte[] receive(java.lang.String taskID, int dvcAddr)
          receives non-binary data from a device of the gpib-bus.
 byte[] receive(java.lang.String taskID, int dvcAddr, java.lang.String suffix)
          receives non-binary data from a device of the gpib-bus.
 void send(java.lang.String taskID, int dvcAddr, byte[] data, int length)
          sends a specified string to a given device on the gpib-bus.
 void send(java.lang.String taskID, int dvcAddr, java.lang.String suffix, byte[] data, int length)
          sends a specified string to a given device on the gpib-bus.
 byte[] sendAndEnter(java.lang.String taskID, int dvcAddr, java.lang.String suffix, byte[] data, int length)
          sends a specified string to a device on the gpib-bus and enters the result from this device.
 void setTimeOut(java.lang.String taskID, int msec)
          sets timeout-time of the GPIB-Bus in msec.
 int spoll(java.lang.String taskID, int dvcAddr)
          This function will be replaced by an event-listener-model.
 int srq(java.lang.String taskID)
          This function will be replaced by an event-listener-model.
 void tarray(java.lang.String taskID, byte[] data, int length, byte eoi)
          sends data to the gpib-bus.
 void tarray(java.lang.String taskID, int dvcAddr, byte[] data, int length, byte eoi)
          sends data to a given device of the gpib-bus.
 void tarray(java.lang.String taskID, int dvcAddr, java.lang.String suffix, byte[] data, int length, byte eoi)
          sends data to a given device of the gpib-bus.
 void transmit(java.lang.String taskID, byte[] data, int length)
          sends data to the gpib-bus.
 void uncheckSrq(java.lang.String taskID, int dvcAddr, ChClientGpib clientGpib)
          This method tells the server to stop notifying the specified client, when an SRQ on the specified device occured.
 
Methods inherited from interface charly.server.devices.ChDevice
getName, setRsrcMgr
 

Field Detail

NAME

public static final java.lang.String NAME
name is "GPIB"

See Also:
ChDevice.getName(), Constant Field Values
Method Detail

initialize

public void initialize(java.lang.String taskID,
                       int addr,
                       int level)
                throws java.rmi.RemoteException,
                       ChTaskNotStartedException,
                       ChAccessDeniedException
usually does not need to be called. The Gpib-bus is initialized by default by ChGpib. The resource "GPIB" must be reserved to call this method.

Parameters:
taskID - is the string returned by ChRsrcManager.startTask( ChClientTask, String, java.util.Set)
addr - the device-nr, the present GPIB-Board should have as GPIB-address (0-32)
level - 0 means the GPIB-board is controller of the GPIB-bus
Throws:
java.rmi.RemoteException
ChTaskNotStartedException
ChAccessDeniedException

send

public void send(java.lang.String taskID,
                 int dvcAddr,
                 java.lang.String suffix,
                 byte[] data,
                 int length)
          throws java.rmi.RemoteException,
                 ChTaskNotStartedException,
                 ChAccessDeniedException,
                 ChGpibTimeOutException,
                 ChGpibStateException
sends a specified string to a given device on the gpib-bus.

Parameters:
taskID - is the string returned by ChRsrcManager.startTask( ChClientTask, String, java.util.Set)
dvcAddr - the device-nr of the receiving device on the gpib-bus (0-32)
suffix - - e.g. "CHANNEL2"; can be null
data - the bytes to be sent
length - amount of bytes to be sent
Throws:
java.rmi.RemoteException
ChTaskNotStartedException
ChAccessDeniedException
ChGpibTimeOutException
ChGpibStateException

send

public void send(java.lang.String taskID,
                 int dvcAddr,
                 byte[] data,
                 int length)
          throws java.rmi.RemoteException,
                 ChTaskNotStartedException,
                 ChAccessDeniedException,
                 ChGpibTimeOutException,
                 ChGpibStateException
sends a specified string to a given device on the gpib-bus.

Parameters:
taskID - is the string returned by ChRsrcManager.startTask( ChClientTask, String, java.util.Set)
dvcAddr - the device-nr of the receiving device on the gpib-bus (0-32)
data - the bytes to be sent
length - amount of bytes to be sent
Throws:
java.rmi.RemoteException
ChTaskNotStartedException
ChAccessDeniedException
ChGpibTimeOutException
ChGpibStateException

sendAndEnter

public byte[] sendAndEnter(java.lang.String taskID,
                           int dvcAddr,
                           java.lang.String suffix,
                           byte[] data,
                           int length)
                    throws java.rmi.RemoteException,
                           ChTaskNotStartedException,
                           ChAccessDeniedException,
                           ChGpibTimeOutException,
                           ChGpibStateException
sends a specified string to a device on the gpib-bus and enters the result from this device. It is a combination of send(String, int, String, byte[], int) and enter(String, int, String).

Parameters:
taskID - is the string returned by ChRsrcManager.startTask( ChClientTask, String, java.util.Set)
dvcAddr - the device-nr of the receiving device on the gpib-bus (0-32)
suffix - - e.g. "CHANNEL2"; can be null
data - the bytes to be sent
length - amount of bytes to be sent
Throws:
java.rmi.RemoteException
ChTaskNotStartedException
ChAccessDeniedException
ChGpibTimeOutException
ChGpibStateException

enter

public byte[] enter(java.lang.String taskID,
                    int dvcAddr,
                    java.lang.String suffix)
             throws java.rmi.RemoteException,
                    ChTaskNotStartedException,
                    ChAccessDeniedException,
                    ChGpibTimeOutException,
                    ChGpibStateException
receives from a given device on the gpib-bus.

Parameters:
taskID - is the string returned by ChRsrcManager.startTask( ChClientTask, String, java.util.Set)
dvcAddr - the device-nr of the receiving device on the gpib-bus (0-32)
suffix - - e.g. "CHANNEL2"; can be null
Throws:
java.rmi.RemoteException
ChTaskNotStartedException
ChAccessDeniedException
ChGpibTimeOutException
ChGpibStateException
Since:
Charly V0.3.6

enter

public byte[] enter(java.lang.String taskID,
                    int dvcAddr)
             throws java.rmi.RemoteException,
                    ChTaskNotStartedException,
                    ChAccessDeniedException,
                    ChGpibTimeOutException,
                    ChGpibStateException
receives from a given device on the gpib-bus.

Parameters:
taskID - is the string returned by ChRsrcManager.startTask( ChClientTask, String, java.util.Set)
dvcAddr - the device-nr of the receiving device on the gpib-bus (0-32)
Throws:
java.rmi.RemoteException
ChTaskNotStartedException
ChAccessDeniedException
ChGpibTimeOutException
ChGpibStateException

checkSrq

public void checkSrq(java.lang.String taskID,
                     int dvcAddr,
                     ChClientGpib clientGpib)
              throws java.rmi.RemoteException,
                     ChTaskNotStartedException,
                     ChAccessDeniedException
This method asks the server to notify the specified client, when an SRQ on the specified device occured.

Throws:
java.rmi.RemoteException
ChTaskNotStartedException
ChAccessDeniedException

uncheckSrq

public void uncheckSrq(java.lang.String taskID,
                       int dvcAddr,
                       ChClientGpib clientGpib)
                throws java.rmi.RemoteException,
                       ChTaskNotStartedException,
                       ChAccessDeniedException
This method tells the server to stop notifying the specified client, when an SRQ on the specified device occured.

Throws:
java.rmi.RemoteException
ChTaskNotStartedException
ChAccessDeniedException

spoll

public int spoll(java.lang.String taskID,
                 int dvcAddr)
          throws java.rmi.RemoteException,
                 ChTaskNotStartedException,
                 ChAccessDeniedException,
                 ChGpibTimeOutException,
                 ChGpibStateException
This function will be replaced by an event-listener-model.

Parameters:
taskID - is the string returned by ChRsrcManager.startTask( ChClientTask, String, java.util.Set)
dvcAddr - the device-nr of the receiving device on the gpib-bus (0-32)
Throws:
java.rmi.RemoteException
ChTaskNotStartedException
ChAccessDeniedException
ChGpibTimeOutException
ChGpibStateException
See Also:
srq(String)

ppoll

public int ppoll(java.lang.String taskID)
          throws java.rmi.RemoteException,
                 ChTaskNotStartedException,
                 ChAccessDeniedException
This function will be replaced by an event-listener-model.

Parameters:
taskID - is the string returned by ChRsrcManager.startTask( ChClientTask, String, java.util.Set)
Throws:
java.rmi.RemoteException
ChTaskNotStartedException
ChAccessDeniedException
See Also:
srq(String)

receive

public byte[] receive(java.lang.String taskID)
               throws java.rmi.RemoteException,
                      ChTaskNotStartedException,
                      ChAccessDeniedException,
                      ChGpibTimeOutException,
                      ChGpibStateException
receives non-binary data from the gpib-bus.

Parameters:
taskID - is the string returned by ChRsrcManager.startTask( ChClientTask, String, java.util.Set)
Throws:
java.rmi.RemoteException
ChTaskNotStartedException
ChAccessDeniedException
ChGpibTimeOutException
ChGpibStateException

receive

public byte[] receive(java.lang.String taskID,
                      int dvcAddr,
                      java.lang.String suffix)
               throws java.rmi.RemoteException,
                      ChTaskNotStartedException,
                      ChAccessDeniedException,
                      ChGpibTimeOutException,
                      ChGpibStateException
receives non-binary data from a device of the gpib-bus.

Parameters:
taskID - is the string returned by ChRsrcManager.startTask( ChClientTask, String, java.util.Set)
dvcAddr - the device-nr of the receiving device on the gpib-bus (0-32)
suffix - - e.g. "CHANNEL2"; can be null
Throws:
java.rmi.RemoteException
ChTaskNotStartedException
ChAccessDeniedException
ChGpibTimeOutException
ChGpibStateException
Since:
Charly V0.3.6

receive

public byte[] receive(java.lang.String taskID,
                      int dvcAddr)
               throws java.rmi.RemoteException,
                      ChTaskNotStartedException,
                      ChAccessDeniedException,
                      ChGpibTimeOutException,
                      ChGpibStateException
receives non-binary data from a device of the gpib-bus.

Parameters:
taskID - is the string returned by ChRsrcManager.startTask( ChClientTask, String, java.util.Set)
dvcAddr - the device-nr of the receiving device on the gpib-bus * * (0-32)
Throws:
java.rmi.RemoteException
ChTaskNotStartedException
ChAccessDeniedException
ChGpibTimeOutException
ChGpibStateException
Since:
Charly V0.3.0

transmit

public void transmit(java.lang.String taskID,
                     byte[] data,
                     int length)
              throws java.rmi.RemoteException,
                     ChTaskNotStartedException,
                     ChAccessDeniedException,
                     ChGpibTimeOutException,
                     ChGpibStateException
sends data to the gpib-bus.

Parameters:
taskID - is the string returned by ChRsrcManager.startTask( ChClientTask, String, java.util.Set)
data - the bytes to be sent
length - amount of bytes to be sent
Throws:
java.rmi.RemoteException
ChTaskNotStartedException
ChAccessDeniedException
ChGpibTimeOutException
ChGpibStateException

tarray

public void tarray(java.lang.String taskID,
                   byte[] data,
                   int length,
                   byte eoi)
            throws java.rmi.RemoteException,
                   ChTaskNotStartedException,
                   ChAccessDeniedException,
                   ChGpibTimeOutException,
                   ChGpibStateException
sends data to the gpib-bus.

Parameters:
taskID - is the string returned by ChRsrcManager.startTask( ChClientTask, String, java.util.Set)
data - the bytes to be sent
length - amount of bytes to be sent
eoi - EOI-Byte
Throws:
java.rmi.RemoteException
ChTaskNotStartedException
ChAccessDeniedException
ChGpibTimeOutException
ChGpibStateException

tarray

public void tarray(java.lang.String taskID,
                   int dvcAddr,
                   java.lang.String suffix,
                   byte[] data,
                   int length,
                   byte eoi)
            throws java.rmi.RemoteException,
                   ChTaskNotStartedException,
                   ChAccessDeniedException,
                   ChGpibTimeOutException,
                   ChGpibStateException
sends data to a given device of the gpib-bus. The data can be in binary form. The device resource ChGpibClient.getResourceName(int) has to be reserved before calling this method.

Parameters:
taskID - is the string returned by ChRsrcManager.startTask( ChClientTask, String, java.util.Set)
dvcAddr - the device-nr of the receiving device on the gpib-bus (0-32)
suffix - - e.g. "CHANNEL2"; can be null
data - the bytes to be sent
length - amount of bytes to be sent
eoi - EOI-Byte
Throws:
java.rmi.RemoteException
ChTaskNotStartedException
ChAccessDeniedException
ChGpibTimeOutException
ChGpibStateException
Since:
Charly V0.3.6

tarray

public void tarray(java.lang.String taskID,
                   int dvcAddr,
                   byte[] data,
                   int length,
                   byte eoi)
            throws java.rmi.RemoteException,
                   ChTaskNotStartedException,
                   ChAccessDeniedException,
                   ChGpibTimeOutException,
                   ChGpibStateException
sends data to a given device of the gpib-bus. The data can be in binary form. The device resource ChGpibClient.getResourceName(int) has to be reserved before calling this method.

Parameters:
taskID - is the string returned by ChRsrcManager.startTask( ChClientTask, String, java.util.Set)
dvcAddr - the device-nr of the receiving device on the gpib-bus (0-32)
data - the bytes to be sent
length - amount of bytes to be sent
eoi - EOI-Byte
Throws:
java.rmi.RemoteException
ChTaskNotStartedException
ChAccessDeniedException
ChGpibTimeOutException
ChGpibStateException
Since:
Charly V0.3.0

rarray

public byte[] rarray(java.lang.String taskID)
              throws java.rmi.RemoteException,
                     ChTaskNotStartedException,
                     ChAccessDeniedException,
                     ChGpibTimeOutException,
                     ChGpibStateException
receives binary and non-binary data from the gpib-bus.

Parameters:
taskID - is the string returned by ChRsrcManager.startTask( ChClientTask, String, java.util.Set)
Throws:
java.rmi.RemoteException
ChTaskNotStartedException
ChAccessDeniedException
ChGpibTimeOutException
ChGpibStateException

rarray

public byte[] rarray(java.lang.String taskID,
                     int dvcAddr,
                     java.lang.String suffix)
              throws java.rmi.RemoteException,
                     ChTaskNotStartedException,
                     ChAccessDeniedException,
                     ChGpibTimeOutException,
                     ChGpibStateException
receives binary and non-binary data from a device of the gpib-bus.

Parameters:
taskID - is the string returned by ChRsrcManager.startTask( ChClientTask, String, java.util.Set)
dvcAddr - the device-nr of the receiving device on the gpib-bus (0-32)
suffix - - e.g. "CHANNEL2"; can be null
Throws:
java.rmi.RemoteException
ChTaskNotStartedException
ChAccessDeniedException
ChGpibTimeOutException
ChGpibStateException
Since:
Charly V0.3.6

rarray

public byte[] rarray(java.lang.String taskID,
                     int dvcAddr)
              throws java.rmi.RemoteException,
                     ChTaskNotStartedException,
                     ChAccessDeniedException,
                     ChGpibTimeOutException,
                     ChGpibStateException
receives binary and non-binary data from a device of the gpib-bus.

Parameters:
taskID - is the string returned by ChRsrcManager.startTask( ChClientTask, String, java.util.Set)
dvcAddr - the device-nr of the receiving device on the gpib-bus (0-32)
Throws:
java.rmi.RemoteException
ChTaskNotStartedException
ChAccessDeniedException
ChGpibTimeOutException
ChGpibStateException
Since:
Charly V0.3.0

srq

public int srq(java.lang.String taskID)
        throws java.rmi.RemoteException,
               ChTaskNotStartedException,
               ChAccessDeniedException
This function will be replaced by an event-listener-model.

Parameters:
taskID - is the string returned by ChRsrcManager.startTask( ChClientTask, String, java.util.Set)
Returns:
status
Throws:
java.rmi.RemoteException
ChTaskNotStartedException
ChAccessDeniedException
See Also:
spoll(String, int), ppoll(String)

setTimeOut

public void setTimeOut(java.lang.String taskID,
                       int msec)
                throws java.rmi.RemoteException,
                       ChTaskNotStartedException,
                       ChAccessDeniedException
sets timeout-time of the GPIB-Bus in msec.

Parameters:
taskID - is the string returned by ChRsrcManager.startTask( ChClientTask, String, java.util.Set)
Throws:
java.rmi.RemoteException
ChTaskNotStartedException
ChAccessDeniedException

isListenerPresent

public int isListenerPresent(java.lang.String taskID,
                             int dvcAddr,
                             java.lang.String suffix)
                      throws java.rmi.RemoteException,
                             ChTaskNotStartedException,
                             ChAccessDeniedException
tests if listener with specified address is present.

Parameters:
taskID - is the string returned by ChRsrcManager.startTask( ChClientTask, String, java.util.Set)
dvcAddr - the device-nr of the checked device on the gpib-bus (0-32)
suffix - - e.g. "CHANNEL2"; can be null
Returns:
status ???
Throws:
java.rmi.RemoteException
ChTaskNotStartedException
ChAccessDeniedException

isListenerPresent

public int isListenerPresent(java.lang.String taskID,
                             int dvcAddr)
                      throws java.rmi.RemoteException,
                             ChTaskNotStartedException,
                             ChAccessDeniedException
tests if listener with specified address is present.

Parameters:
taskID - is the string returned by ChRsrcManager.startTask( ChClientTask, String, java.util.Set)
dvcAddr - the device-nr of the checked device on the gpib-bus (0-32)
Returns:
status ???
Throws:
java.rmi.RemoteException
ChTaskNotStartedException
ChAccessDeniedException

isGpibBoardPresent

public int isGpibBoardPresent()
                       throws java.rmi.RemoteException
tests if gpibboard is present.

Returns:
status.
Throws:
java.rmi.RemoteException