Version: $Id: package.html 34860 2010-04-07 10:44:20Z walla $
The monitor interfaces allows to control and calculate the information which
the application gets from another middle layer serber or the CDI hardware server.
The hardware server stores the information only for 1000 msecs and then tries to
read new values. The old ones are lost except you write them to a database or file.
The main interface in this package is IMonitor which holds all methods
needed to monitor an asynchronous TINE or DOOCS link.
Attention: I have created the abstract class of ACDIDevices.
The application can get an instance of this class by the singleton method of getInstance
from the special method in the project. Because of
the protection of this method I need a derivate one outside of this library. Lets
say there exits a project and you have a class X which derivates
ACDIDevices. In the class X you must create a
X.getInstance() method which calls the protected from the class
ACDIDevices. As a parameter you overgive the tine context and
server name and a map of ALL (see below for this) currently known
application device elements. Each of this element should have a
corresponding CDI device element with exactly the same name. More information
is not needed. So, you are able to call different getter methods to fetch
information about metadata of the current created special project.
Currently you will define different enumeration class which inherits the
interface of IEViewComponent in your current project. With the word
all I mean that you creat a map (for example as a static and final instance
in your constant class file (ie CPiaRF.java)) of all of these enumerations and
put them all into ONE map; it is public and static final:
public enum EXxx implements IEViewComponent {
AAA (...),
BBB (...);
...
}
public enum EYyy implements IEViewComponent {
CCC (...),
DDD (...);
...
}
public final class Project extends MstApp {
public static final Map<..., IEViewComponent> MAP_APP_DEVICES = ...
static {
// ADD THE FIRST ENUMERATION ...
for(IEViewComponent element: EXxx.values())
MAP_APP_DEVICES.put(..., element);
// ... AND THE SECOND ONE:
for(IEViewComponent element: EYyy.values())
MAP_APP_DEVICES.put(..., element);
}
...
}
Sorting of the CDI device numbers
Their exists one argument (which is by the way a boolean type) in the method of
ILinkData.getRangeNumbers(IEDeviceGroup,ICDIDevice,boolean)
which lets the user the decision if he wants to return a string value of the
CDI device numbers in a sorted or unsorted way. A CDI device number is an
element of the positive natural numbers without zero.
If this argument is set to {@code true} then all data elements are
converted to their CDI number, each number filled in the string value, separated
by commas, without any sorting, for example #3,#2,#6,#4,#5,#1.
If this argument is set to {@code false}, then at first the list of device
numbers is sorted, and looked if their exists a difference between a number pair
which is greater then 1. Then all numbers will be returned as a sorted list of
device numbers, each separated with a comma, for example #1,#2,#5,#6.
If not it returns a range of the device numbers from the first to the last one,
separated both with a hyphen, for example #1 - #6.
For a description of the method you should also have a look at it
ILinkData.getRangeNumbers(IEDeviceGroup,ICDIDevice,boolean).
CHANGES
- 24.10.06: Created this package.
- 24.10.06: Moved from the project P3Temperaturen from the
package de.desy.mst.petra.instruments.temperaturen.monitor the
interface IMonitor.
- 24.10.06: Moved the interface IMonitorName to here.
- 27.10.06: Created the interface IError which holds an
error message for the end user and returns its values.
- 27.10.06: Moved the interface IError to a new created package
called ...error.
- 08.11.06: Changed the monitor name to be a property name (
from IMonitorName to IPropertyName). This is
strongly recommended for storing different properties in a ring buffer.
- 08.11.06: Created new monitor name interface. It holds the monitor
names in the concrete classes in several projects. This name distinguishes
from the interface IPropertyName that it will also get more then only
one property in it.
- 22.11.06: Removed the interface IPropertyName from this
package to ...common.
- 24.11.06: Created the new interface called ILinkData.
- 14.12.06: Changed the package name from de.desy.mst.petra.instuments.common...
to de.desy.mst.libaccelerator.
- 15.12.06: Realized an enumeration of EAccess and the abstract
class of AAbstractMonitor. The first inherits the interface of
IAccess and the class of the interface IMonitor.
- 20.03.07: Created the new class CDIDevices.
- 20.04.07: Created the new enumeration ETineProperty.
- 25.04.07: Created a new call back method. It is called
CbAccelerator. This is called by each asynchronous TINE link which
currently calls the IMonitor.calculate() method.
- 27.04.07: Renamed the interface from IMonitorNames to
IEMonitorName.
- 27.04.07: Create a new call back method called CbAcceleratorSingle.
- 04.05.07: Moved the enumeration interface of IEViewComponent
to this package and renamed it to IEDataComponent. Also renamed was
the abstract class of CDIDevices to ACDIDevices.
- 14.05.07: Renamed the class of CbAccelerator to
CbAcceleratorMulti.
- 20.06.07: Added new abstract class called ALinkData. This
will be used in future releases.
- 24.08.07: Renamed the file from AAbstractMonitor to
AMonitor.
- 24.08.07: Added the new interface of the CDI device called
ICDIDevice. This allows now to name the method and its arguments and
the real class is encapsulated behind them and can not be access directly.
- 27.08.07: Moved this package from ...accelerator.data to
...accelerator.model.
- 14.11.07: Moved the class DataExchange from the project
PIACommon to this package.
- 12.02.08: Renamed the call back functions to a better name. One is
now called CbAccelerator (before it was called CbAccelratorMulti)
and CbAcceleratorGroup (before it was called CbAcceleratorSingle).
The first one is for doing only one call back functionality at a time and the
second is for doing a group of call back functions.
- 10.03.08: Created new TINE error extension enumeration which carries
the error code and its message.
- 04.03.09: Created new TINE monitor for getting the values from a TINE
tagged structure type. It is called IMonitorStruct and is realized only
for testing purposes. Remember that this class reflects a single TINE link instead
of a TINE link group.
- 06.03.09: Created new TINE monitor for getting the values from a TINE
tagged structure type. It is called IMonitorStructGroup and is realized only
for testing purposes. Remember that this class reflects a TINE link group instead
of a single TINE link.
TODO