Skip navigation links

Package de.desy.mst.libs.accelerator.model

Version: $Id: package.html 34860 2010-04-07 10:44:20Z walla $

See: Description

Package de.desy.mst.libs.accelerator.model Description

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 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 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

TODO

Skip navigation links

14-September-2016 18:23 Deutsches Elektronen-Synchrotron DESY in der Helmholtz-Gemeinschaft