public interface IMonitor
extends java.io.Serializable
This is the java interface of monitoring all hardware values. It will watch all corresponding values whichever this interface will get from the hardware by pulling it. An asynchronous link will return all values in pretend time. On the other hand a synchronous link will return all values only once. This interface is for asynchronous links only.
Modifier and Type | Method and Description |
---|---|
void |
attach()
Attache a monitor to an asynchronous TINE link.
|
void |
calculate()
Will calculate the result from its current value list.
|
void |
calculate(IEData data_)
This method will calculate the delivered data component and set
internally their values.
|
IEDeviceGroup |
fetchDeviceName(int nLinkIndex_)
Returns the current device name enumeration of the give link index.
|
de.desy.tine.client.TLink |
fetchLink(int nLinkIndex_)
Will fetch the current link index that correspond to the link.
|
de.desy.tine.types.TCompoundDataObject[] |
getData()
Returns the data of the initialized device group directly from the
TINE protocol.
|
IEDeviceGroup |
getDeviceGroup()
Returns the current device group enumeration which is used to created
the monitor.
|
void |
showError(int linkStatus_,
IEData data_)
Sets the error vehicle (both, on the GUI device or on the console).
|
IEDeviceGroup getDeviceGroup()
IEDeviceGroup fetchDeviceName(int nLinkIndex_)
nLinkIndex_
- Is the link index value from the attach
method
of the class de.desy.tine.client.TLink
.IllegalArgumentException
is thrown.de.desy.tine.client.TLink fetchLink(int nLinkIndex_) throws TineException
null
value is returned. Will look
in the internal hash table. In this associated table it will fetch the
link and link index and return the stored value of the key-value pair.nLinkIndex_
- Is the link index value from the attach
method
of the class de.desy.tine.client.TLink
.TLink
instance.TineException
- A TINE exception is thrown if the current link
does not exist.void attach() throws TineException
TineException
- A TINE exception is thrown if an error occurred
during getting information or developing of information from TINE.de.desy.tine.types.TCompoundDataObject[] getData()
Returns the data of the initialized device group directly from the TINE protocol. The returned information can also be invalid if you call it a few milliseconds after creating this instance; it is better to wait for up to 100 milliseconds before executing this method.
Currently I return here a Collection
element with the generic
type of TCompoundDataObject
. It is a composite type of primitive
data which TINE supports.
void calculate() throws TineException
Will calculate the result from its current value list. This is only responsible for a valid result if all links are opened first.
Moreover it will throw a runtime exception if the argument of the subject
is not set. The subject is part of the observer design pattern. It uses
this to inform all observers which are stored in the subject.
There exist two class method in the class AMonitor
which will set
and get the subject. See at link AMonitor.setSubject(IDeviceSubject)
and AMonitor.getSubject()
TineException
- A TINE exception is thrown if an error occurred
during getting information or developing of information from TINE.void calculate(IEData data_) throws TineException
This method will calculate the delivered data component and set
internally their values. These values can therefore be read by the
IMonitor.fetchResult(IEDeviceGroup)
or direct from the TINE
data type parameter via IMonitor.fetchData(IEDeviceGroup)
.
data_
- Is the enumeration interface of the data component.TineException
- Returns a TineException if an error
occurred.void showError(int linkStatus_, IEData data_)
Sets the error vehicle (both, on the GUI device or on the console). Over given is the link status from the TINE call-back function (includes the error code) and the data component.
linkStatus_
- Is the link status from the TINE call-back method.data_
- Is the enumeration interface to which the error belongs.14-September-2016 18:23 Deutsches Elektronen-Synchrotron DESY in der Helmholtz-Gemeinschaft