charly.client
Class ChRobClient

java.lang.Object
  extended bycharly.client.ChRobClient
All Implemented Interfaces:
ChResource

public class ChRobClient
extends java.lang.Object
implements ChResource

This class gives access to a ROB3 connected to the server. For an example of how to use it refer to ChSimpleRob


Field Summary
protected  ChConnect conn
           
protected  ChRobDevice robDvc
          points to the ChRobDevice on the server.
protected  ChTask task
          This is the task which reserves the device ROB on the server.
 
Constructor Summary
ChRobClient(ChConnect conn)
          Konstruktor
 
Method Summary
 int[] getAxes()
           
 int getAxisPos(int axisNr)
           
 ChConnect getConnection()
          Implementations should return the connection to the server where the resource can be found.
 java.lang.String getResourceName()
          returns the name to be allocated on a server for a specified GPIB-device.
 ChTask getTask()
           
 void setAxes(int[] pos)
          Setzt Position aller sechs Achsen
 void setAxisPos(int axisNr, int pos)
          Setzt Position der Achse axisNr
 void setTask(ChTask task)
          This method must be called to be able to use the setAxis...
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

robDvc

protected ChRobDevice robDvc
points to the ChRobDevice on the server.


task

protected ChTask task
This is the task which reserves the device ROB on the server.


conn

protected ChConnect conn
Constructor Detail

ChRobClient

public ChRobClient(ChConnect conn)
            throws java.rmi.RemoteException,
                   java.net.MalformedURLException,
                   java.rmi.NotBoundException
Konstruktor

Parameters:
conn - - the server address.
Method Detail

getConnection

public ChConnect getConnection()
Description copied from interface: ChResource
Implementations should return the connection to the server where the resource can be found.

Specified by:
getConnection in interface ChResource

setTask

public void setTask(ChTask task)
This method must be called to be able to use the setAxis...-methods. The task must be started before calling these methods.

Specified by:
setTask in interface ChResource

getTask

public ChTask getTask()

getResourceName

public java.lang.String getResourceName()
returns the name to be allocated on a server for a specified GPIB-device.

Example:

   ChTask task=new ChTask("ATask");
   task.addRsrc(conn,robClient.getRsrcName());
 

Specified by:
getResourceName in interface ChResource
Returns:
ChRobDevice.NAME

setAxisPos

public void setAxisPos(int axisNr,
                       int pos)
                throws ChRobDeviceException,
                       java.rmi.RemoteException,
                       ChTaskNotStartedException,
                       ChAccessDeniedException
Setzt Position der Achse axisNr

Parameters:
axisNr - Achsennummer (0-5)
pos - Neue Position (0-255)
Throws:
ChRobDeviceException
java.rmi.RemoteException
ChTaskNotStartedException
ChAccessDeniedException

getAxisPos

public int getAxisPos(int axisNr)
               throws java.rmi.RemoteException,
                      ChRobDeviceException
Parameters:
axisNr - - Achsennummer (0-5)
Returns:
Achsenposition (0-255)
Throws:
java.rmi.RemoteException
ChRobDeviceException

setAxes

public void setAxes(int[] pos)
             throws java.rmi.RemoteException,
                    ChTaskNotStartedException,
                    ChAccessDeniedException,
                    ChRobDeviceException
Setzt Position aller sechs Achsen

Parameters:
pos - Neue Positionen: Array mit sechs Elementen mit Werten zwischen 0 und 255
Throws:
java.rmi.RemoteException
ChTaskNotStartedException
ChAccessDeniedException
ChRobDeviceException

getAxes

public int[] getAxes()
              throws java.rmi.RemoteException,
                     ChTaskNotStartedException,
                     ChAccessDeniedException,
                     ChRobDeviceException
Returns:
Positionen - Array mit sechs Elementen mit Werten zwischen 0 und 255 - oder null bei Misserfolg bspw. bei Timeout????!!!!
Throws:
java.rmi.RemoteException
ChTaskNotStartedException
ChAccessDeniedException
ChRobDeviceException