Package fr.soleil.comete.dao.tangodao

Examples of fr.soleil.comete.dao.tangodao.TangoKey


     *
     * @param propertyName the name of the device property
     * @return The expected {@link TangoKey}
     */
    public TangoKey generatePropertyKey(String propertyName) {
        TangoKey key = new TangoKey();
        key.registerDeviceProperty(getModel(), propertyName);
        return key;
    }
View Full Code Here


     * Generates the {@link TangoKey} that corresponds to the associated device
     *
     * @return The expected {@link TangoKey}
     */
    public TangoKey generateDeviceKey() {
        TangoKey key = new TangoKey();
        key.registerDeviceName(getModel());
        return key;
    }
View Full Code Here

        setWidgetModel(getStopCommandViewer(), generateCommandKey(this.deviceBundle
                .getString("UserMotorBean.command.stop")));

        if (!this.isSimpleMotorBeanGUI) {
            // - Define Position Command
            TangoKey defineCmd = generateCommandKey(this.deviceBundle
                    .getString("UserMotorBean.command.defineposition"));
            setWidgetModel(getDefinePositionViewer(), defineCmd);
        }

        // SetModel for StateViewer
View Full Code Here

        if (this.model.equals("")) {
            return;
        }

        double position = 0;
        TangoKey positionKey = generateWriteAttributeKey(this.deviceBundle
                .getString("UserMotorBean.attribut.position"));
        TangoDAOFactory factory = new TangoDAOFactory();
        AbstractDAO<Number> positionDAO = factory.createNumberDAO(positionKey);
        if (positionDAO != null && positionDAO.getData() != null) {
            position = positionDAO.getData().doubleValue();
View Full Code Here

        }

        if (this.isSimpleMotorBeanGUI) {

            double position = 0;
            TangoKey attrKey = generateAttributeKey(this.deviceBundle
                    .getString("UserMotorBean.attribut.position"));

            TangoDAOFactory DAOFactory = new TangoDAOFactory();
            AbstractDAO<Number> attrDAO = DAOFactory.createNumberDAO(attrKey);

            if (attrDAO != null && attrDAO.getData() != null) {
                position = attrDAO.getData().doubleValue();
            }

            double distance = Math.abs(this.targetValue - position);
            if (distance > 0.00001) {
                if (this.increment == 0) {
                    position = this.targetValue;
                }
                else if (this.targetValue != position) {
                    if (distance > this.increment) {
                        position += this.increment * Math.signum(this.targetValue - position);
                    }
                    else {
                        position = this.targetValue;
                    }
                }
            }

            this.attr.insert(position);

        }
        else {

            double position = 0;
            TangoKey positionKey = generateAttributeKey(this.deviceBundle
                    .getString("UserMotorBean.attribut.position"));

            TangoDAOFactory daoFactory = new TangoDAOFactory();
            AbstractDAO<Number> positionDAO = daoFactory.createNumberDAO(positionKey);

View Full Code Here

    protected void refreshGUI() {
        // nom et status du device
        setStatusModel();

        // construction des clefs
        TangoKey key = new TangoKey();
        String[] xTab = new String[] { getModel() + "/experimentalDataX",
                getModel() + "/experimentalDataX" };
        String[] yTab = new String[] { getModel() + "/experimentalDataY",
                getModel() + "/fittedDataY" };
        key.registerDualAttributes(xTab, yTab);

        // Clear all curve
        cleanWidget(getFittedData());
        setWidgetModel(getFittedData(), key);
        setWidgetModel(getNbDataViewer(), generateAttributeKey(DataFitterBean.NB_DATA_ATTRIBUTE));
View Full Code Here

            return;
        }

        Set<String> imageViewerKeys = imageViewerMap.keySet();
        Iterator<String> imageViewerIterator = imageViewerKeys.iterator();
        TangoKey imageKey = null;
        ImageViewer imageViewer = null;
        String key = null;
        while (imageViewerIterator.hasNext()) {
            key = imageViewerIterator.next();
            imageViewer = imageViewerMap.get(key);
            imageKey = new TangoKey();
            imageKey.registerAttribute(scanServerDeviceName, key);
            imageViewer.addKey(CurrentScanDataModel.TANGO_FACTORY_CLASS, imageKey);
        }
    }
View Full Code Here

        if (scanServerName == null || scanServerName.isEmpty()) {
            return null;
        }

        AbstractDAOFactory factory = DAOFactoryManager.getFactory(TANGO_FACTORY_CLASS);
        TangoKey tangoKey = new TangoKey();
        tangoKey.registerAttribute(scanServerName, "State");
        if (factory != null) {
            return factory.createStringDAO(tangoKey);
        }
        return null;
View Full Code Here

                || attributeName.isEmpty()) {
            return null;
        }

        AbstractDAOFactory factory = DAOFactoryManager.getFactory(TANGO_FACTORY_CLASS);
        TangoKey tangoKey = new TangoKey();
        tangoKey.registerAttribute(scanServerName, attributeName);
        return factory.createStringImageDAO(tangoKey);
    }
View Full Code Here

    private void initKey() {
        CurrentScanDataModel.getDeviceProxy(scanServerDeviceName);
        runName.removeKey(CurrentScanDataModel.TANGO_FACTORY_CLASS);
        runName.clearDAO();
        TangoKey tangoKey = new TangoKey();
        tangoKey.registerAttribute(scanServerDeviceName, CurrentScanDataModel.RUN_NAME);
        runName.addKey(CurrentScanDataModel.TANGO_FACTORY_CLASS, tangoKey);
        if (started) {
            runName.switchDAOFactory(CurrentScanDataModel.TANGO_FACTORY_CLASS);
        }
    }
View Full Code Here

TOP

Related Classes of fr.soleil.comete.dao.tangodao.TangoKey

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.