Package fr.soleil.tango.clientapi

Examples of fr.soleil.tango.clientapi.TangoAttribute.extract()


            tangoAttribute = m_tangoAttribute.get(attributeName);
        }

        if (tangoAttribute != null) {
            try {
                return tangoAttribute.extract(String.class);
            }
            catch (DevFailed e) {
                return null;
            }
        }
View Full Code Here


            tangoAttribute = m_tangoAttribute.get(attributeName);
        }

        if (tangoAttribute != null) {
            try {
                return tangoAttribute.extract(Double.class);
            }
            catch (DevFailed e) {
                return Double.NaN;
            }
        }
View Full Code Here

    public static Double getData(IDevice device) throws SalsaDeviceException {
        Double data;
        TangoAttribute attribute = getTangoAttribute(device);
        if (attribute != null) {
            try {
                data = attribute.extract(Double.class);

            }
            catch (DevFailed e) {
                e.printStackTrace();
                SalsaDeviceException salsaDeviceException = new SalsaDeviceException(
View Full Code Here

                    + attributeName);
            if (tangoAttribute != null) {
                int format = TangoAttributeHelper.getAttributeType(scanServerDeviceName,
                        attributeName);
                if (format == TangoConstHelper.SCALAR_TYPE) {
                    return tangoAttribute.extract(double.class);
                }
                else if (format == TangoConstHelper.IMAGE_TYPE
                        || format == TangoConstHelper.ARRAY_TYPE) {
                    double[] values = (double[]) tangoAttribute.extractArray(double.class);
                    if (values != null && index < values.length) {
View Full Code Here

                    + attributeName);
            if (tangoAttribute != null) {
                int format = TangoAttributeHelper.getAttributeType(scanServerDeviceName,
                        attributeName);
                if (format == TangoConstHelper.SCALAR_TYPE) {
                    return tangoAttribute.extract(double.class);
                }
                else if (format == TangoConstHelper.IMAGE_TYPE
                        || format == TangoConstHelper.ARRAY_TYPE) {
                    double[] values = (double[]) tangoAttribute.extractArray(double.class);
                    if (values != null && index < values.length) {
View Full Code Here

        }
        // BUG 19414
        // return AttributeManager.readDoubleAttribute(device.getName());
        try {
            TangoAttribute tangoAttribute = new TangoAttribute(device.getName());
            return tangoAttribute.extract(Double.class);
        }
        catch (Exception e) {
            // e.printStackTrace();
            SalsaDeviceException salsaDeviceException = new SalsaDeviceException(
                    "Error while trying to read the TangORB attribute value for the device "
View Full Code Here

            return null;
        }

        try {
            TangoAttribute tangoAttribute = new TangoAttribute(attributeName);
            return tangoAttribute.extract(String.class);
        }
        catch (DevFailed e) {
        }

        // TangoAttribute tangoAttribute = null;
View Full Code Here

            return Double.NaN;
        }

        try {
            TangoAttribute tangoAttribute = new TangoAttribute(attributeName);
            return tangoAttribute.extract(Double.class);
        }
        catch (DevFailed e) {

        }
        // TangoAttribute tangoAttribute = null;
View Full Code Here

    public static Double getData(IDevice device) throws SalsaDeviceException {
        Double result = Double.NaN;
        try {
            TangoAttribute tangoAttribute = getTangoAttribute(device);
            if (tangoAttribute != null) {
                result = tangoAttribute.extract(Double.class);
            }
        }
        catch (DevFailed devFailed) {
            String errorMessage = "Error while trying to read " + device + " " + DevFailedUtils.toString(devFailed);
            LOGGER.error(errorMessage);
View Full Code Here

                            }

                            if (dataRecorderDeviceName != null && !dataRecorderDeviceName.isEmpty()) {
                                TangoAttribute tangoAttribute = new TangoAttribute(
                                        dataRecorderDeviceName + "/targetDirectory");
                                String targetDirectory = tangoAttribute.extract(String.class);
                                tangoAttribute = new TangoAttribute(dataRecorderDeviceName
                                        + "/fileName");
                                String fileName = tangoAttribute.extract(String.class);
                                tangoAttribute = new TangoAttribute(dataRecorderDeviceName
                                        + "/nxEntryName");
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.