|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object charly.client.ChGpibSrq
This class represents a device or a channel of a device on the
GPIB-bus. Before calling the methods of an instance of this class
a ChTask
with the appropriate resources (the GPIB bus,
or the single GPIB-device) has to
be started.
setTask(ChTask)
Nested Class Summary | |
(package private) class |
ChGpibSrq.ChCheckSrqTaskListener
|
Field Summary | |
protected ChGpibSrq.ChCheckSrqTaskListener |
checkSrqTaskListener
|
protected ChConnect |
conn
|
(package private) int |
dvcAddr
|
protected ChGpibDevice |
gpibDvc
|
protected java.util.LinkedList |
gpibListeners
elems are of type ChGpibListener . |
protected ChGpibClientRepresentation |
representation
|
static java.lang.String |
srqSuffix
|
protected ChTask |
task
|
Constructor Summary | |
ChGpibSrq(ChConnect conn,
int dvcAddr)
Konstruktor |
Method Summary | |
void |
addGpibListener(ChGpibListener l)
adds a ChGpibListener for SRQ-Events. |
void |
checkSrq()
causes the server to check the device on srq and to send an event to the ChGpibListener. |
void |
fireSRQEvent(int dvcAddr)
notifies each GpibListener and calls checkSrq() , if
there are GpibListeners left. |
ChConnect |
getConnection()
Implementations should return the connection to the server where the resource can be found. |
java.lang.String |
getResourceName()
returns the resource name, e.g. |
ChTask |
getTask()
|
void |
listenForSrq()
waits until a SRQ on this device occured. |
void |
removeGpibListener(ChGpibListener l)
If no listeners are left, the server is notified that it needn't check the SRQ any more. |
void |
setTask(ChTask task)
This method must be called to be able to use the other methods. |
static void |
showException(java.lang.Exception e)
prints the stack trace of the exception to system.out. |
void |
uncheckSrq()
This method should be used to inform the server that he does not have to check the device on SRQ. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
int dvcAddr
public static final java.lang.String srqSuffix
protected ChGpibDevice gpibDvc
protected ChConnect conn
protected ChTask task
protected ChGpibSrq.ChCheckSrqTaskListener checkSrqTaskListener
protected ChGpibClientRepresentation representation
protected java.util.LinkedList gpibListeners
ChGpibListener
.
Constructor Detail |
public ChGpibSrq(ChConnect conn, int dvcAddr) throws ChNestedException
conn
- - the server to connect to; on this server,
charlyServer
must have been starteddvcAddr
- - the number of the device on the GPIB bus (0-31)
ChNestedException
- - Nested exception can be
RemoteException,
MalformedURLException,
NotBoundExceptionMethod Detail |
public java.lang.String getResourceName()
getResourceName
in interface ChResource
srqSuffix
public ChConnect getConnection()
ChResource
getConnection
in interface ChResource
public void setTask(ChTask task)
setTask
in interface ChResource
ChTask.addResource(ChResource)
,
checkSrq()
public ChTask getTask()
public void fireSRQEvent(int dvcAddr) throws java.rmi.RemoteException, ChAccessDeniedException
checkSrq()
, if
there are GpibListeners left.
fireSRQEvent
in interface ChGpibClientIntern
java.rmi.RemoteException
ChAccessDeniedException
public void addGpibListener(ChGpibListener l) throws ChNestedException, ChTaskNotStartedException, ChAccessDeniedException
checkSrq()
, if task is
started.
ChNestedException
- - nested exception can be
RemoteException
ChTaskNotStartedException
ChAccessDeniedException
public void removeGpibListener(ChGpibListener l) throws ChNestedException, ChTaskNotStartedException, ChAccessDeniedException
ChNestedException
- - nested exception can be
RemoteException
ChTaskNotStartedException
ChAccessDeniedException
uncheckSrq()
public void checkSrq() throws java.rmi.RemoteException, ChTaskNotStartedException, ChAccessDeniedException
getResourceName()
has to be reserved.
java.rmi.RemoteException
ChTaskNotStartedException
ChAccessDeniedException
addGpibListener(ChGpibListener)
,
uncheckSrq()
public void listenForSrq() throws ChNestedException, ChTaskNotStartedException, ChAccessDeniedException
checkSrq()
.
ChNestedException
- - nested exception can be
InterruptedException
ChTaskNotStartedException
ChAccessDeniedException
public void uncheckSrq() throws java.rmi.RemoteException, ChTaskNotStartedException, ChAccessDeniedException
checkSrq()
an SRQ on the
device occurred.
The device resource getResourceName()
has to be reserved
before calling this method.
java.rmi.RemoteException
ChTaskNotStartedException
ChAccessDeniedException
public static void showException(java.lang.Exception e)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |