Package fr.soleil.comete.dao.tangodao

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


        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

    private void registerKeys() {
        if (scanServerDeviceName == null) {
            return;
        }
        TangoKey runNameKey = new TangoKey();
        runNameKey.registerAttribute(scanServerDeviceName, CurrentScanDataModel.RUN_NAME);
        runName.addKey(CurrentScanDataModel.TANGO_FACTORY_CLASS, runNameKey);

    }
View Full Code Here

     *
     * @param attributeShortName the attribute short name (without device name)
     * @return The expected {@link TangoKey}
     */
    public TangoKey generateAttributeKey(String attributeShortName) {
        TangoKey key = new TangoKey();
        key.registerAttribute(getModel(), attributeShortName);
        return key;
    }
View Full Code Here

     *
     * @param attributeShortName the attribute short name (without device name)
     * @return The expected {@link TangoKey}
     */
    public TangoKey generateWriteAttributeKey(String attributeShortName) {
        TangoKey key = new TangoKey();
        key.registerWriteAttribute(getModel(), attributeShortName);
        return key;
    }
View Full Code Here

     * @param completeNames The attributes complete names (example:
     *            "tango/tangotest/1/short_scalar_ro")
     * @return The expected {@link TangoKey}
     */
    public TangoKey generateMultiAttributeKey(String... completeNames) {
        TangoKey key = new TangoKey();
        key.registerMultiEntity(completeNames);
        return key;
    }
View Full Code Here

     * @param xCompleteNames The complete names of the attributes in X
     * @param yCompleteNames The complete names of the attributes in Y
     * @return The expected {@link TangoKey}
     */
    public TangoKey generateDualAttributeKey(String[] xCompleteNames, String[] yCompleteNames) {
        TangoKey key = new TangoKey();
        key.registerDualAttributes(xCompleteNames, yCompleteNames);
        return key;
    }
View Full Code Here

     * @param propertyType the property
     * @return The expected {@link TangoKey}
     */
    public TangoKey generateAttributePropertyKey(String attributeShortName,
            AttributePropertyType propertyType) {
        TangoKey key = new TangoKey();
        key.registerAttributeProperty(getModel(), attributeShortName, propertyType);
        return key;
    }
View Full Code Here

     *
     * @param commandShortName the command short name (without device name)
     * @return The expected {@link TangoKey}
     */
    public TangoKey generateCommandKey(String commandShortName) {
        TangoKey key = new TangoKey();
        key.registerCommand(getModel(), commandShortName);
        return key;
    }
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.