Examples of DbDatum


Examples of fr.esrf.TangoApi.DbDatum

    }

    private DbDatum makeDbDatum() {
        final String[] splitted = makeStringArray(m_value.getText());
        DbDatum datum = null;
        if (splitted.length == 1) {
            datum = new DbDatum(propertyName, splitted[0]);
        }
        else {
            datum = new DbDatum(propertyName, splitted);
        }

        return datum;
    }
View Full Code Here

Examples of fr.esrf.TangoApi.DbDatum

            ok = JOptionPane.showConfirmDialog(this, textAskConfirmation, titleAskConfirmation,
                    JOptionPane.YES_NO_OPTION);
        }

        if (ok == JOptionPane.YES_OPTION) {
            m_data = new DbDatum(propertyName, m_value.getText().trim());
            updateValue();
        }
        else {
            setValue();
        }
View Full Code Here

Examples of fr.esrf.TangoApi.DbDatum

        return result;
    }
    public List<String> getActuators() {
        List<String> result = new ArrayList<String>();
        try {
            DbDatum property = proxy.get_property("MotorList");
            String[] actuators = property.extractStringArray();
            for (int i = 0; i < actuators.length; i++) {
                String actuator = actuators[i];
                result.add(StringUtils.substringBefore(actuator, ","));
            }
        } catch (DevFailed ex) {
View Full Code Here

Examples of fr.esrf.TangoApi.DbDatum

          else if (bean.getDeviceTypeName().equals(MCABean.RONTEC_DEVICE)) {
                                if (aValue.equals("NaN") || bValue.equals("NaN")) {
                                    throw new Exception();
                                }

                                DbDatum datum = device.get_property("EnergyCoeff0");
                                datum.insert(aValue);
                                device.put_property(datum);

                                DbDatum datum1 = device.get_property("EnergyCoeff1");
                                datum1.insert(bValue);
                                device.put_property(datum1);
                            }
                        }

                    }
View Full Code Here

Examples of fr.esrf.TangoApi.DbDatum

            if ("Publisher".equals(deviceTypeName) || "FacadeDevice".equals(deviceTypeName)) {
                // "FacadeDevice" and "Publisher" are used for tests. Maybe someone wants to
                // simulate an MCA device to test the application. Let's check it.
                String deviceType = deviceTypeName;
                try {
                    DbDatum property = device.get_property("DeviceType");
                    deviceTypeName = property.extractString();
                }
                catch (DevFailed df) {
                    // Simply ignore this case: The test device is not configured for this
                    // application.
                    deviceTypeName = deviceType;
View Full Code Here

Examples of fr.esrf.TangoApi.DbDatum

                            }
                            nexusFileNameMap.put(scanServerName.toLowerCase(), nexusFileName);
                            String dataRecorderDeviceName = DEFAULT_RECORDER;
                            Database database = TangoDeviceHelper.getDatabase();
                            if (database != null) {
                                DbDatum dbDatum = database.get_device_property(scanServerName, DATA_RECORDER);
                                if (dbDatum != null) {
                                    dataRecorderDeviceName = dbDatum.extractString();
                                }

                                if (TangoDeviceHelper.isDeviceRunning(dataRecorderDeviceName)) {
                                    DeviceProxy dataRecorderProxy = TangoDeviceHelper
                                    .getDeviceProxy(dataRecorderDeviceName);
View Full Code Here

Examples of fr.esrf.TangoApi.DbDatum

        String tempTechModel = null;
        String property = "";
        try {
            Database database = TangoDeviceHelper.getDatabase();
            property = AUTH_DEVICE;
            DbDatum dbDatum = database.get_device_property(getModel(), property);
            tempAuthModel = dbDatum.extractString();

            property = TECH_DEVICE;
            dbDatum = database.get_device_property(getModel(), property);
            tempTechModel = dbDatum.extractString();

            if ((tempAuthModel != null) && (!tempAuthModel.trim().isEmpty())
                    && (!ObjectUtils.sameObject(getAuthModel(), tempAuthModel))) {
                authModel = tempAuthModel;
            }
View Full Code Here

Examples of fr.esrf.TangoApi.DbDatum

    }

    public ISuggestions getDevicesSuggestions(String scanServerName) throws SalsaDeviceException {
        try {
            Database m_database = new Database();
            DbDatum m_dataActuators = m_database.get_device_property(scanServerName,
                    "ActuatorsFile");
            String[] actuatorsFile = m_dataActuators.extractStringArray();

            DbDatum m_dataSensors = m_database.get_device_property(scanServerName, "SensorsFile");
            String[] sensorsFile = m_dataSensors.extractStringArray();

            DbDatum m_dataTimebases = m_database.get_device_property(scanServerName,
                    "TimebasesFile");
            String[] timebasesFile = m_dataTimebases.extractStringArray();

            ISuggestions suggestions = new SuggestionsImpl();
            suggestions.setActuatorSuggestionList(parseSuggestions(scanServerName, "ActuatorsFile",
                    actuatorsFile));
            suggestions.setSensorSuggestionList(parseSuggestions(scanServerName, "SensorsFile",
View Full Code Here

Examples of fr.esrf.TangoApi.DbDatum

                    if (database == null) {
                        database = new Database();
                    }
                    if (database != null) {
                        DbDatum dbDatum = database.get_device_property(context.getScanServerName(),
                                "DataRecorder");
                        if (dbDatum != null) {
                            dataRecorderDeviceName = dbDatum.extractString();
                        }

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

Examples of fr.esrf.TangoApi.DbDatum

            return suggestions;
        }
        if (m_database != null) {
            // get ActuatorsFile property
            try {
                DbDatum m_dataActuators = m_database.get_device_property(scanServerName, "ActuatorsFile");
                String[] actuatorsFile = m_dataActuators.extractStringArray();
                if (actuatorsFile != null && actuatorsFile.length > 0) {
                    suggestions.setActuatorSuggestionList(parseSuggestions(scanServerName, "ActuatorsFile",
                            actuatorsFile));
                }
            } catch (DevFailed e) {
                System.out.println(DevFailedUtils.toString(e));
            }

            // get SensorsFile property
            try {
                DbDatum m_dataSensors = m_database.get_device_property(scanServerName, "SensorsFile");
                String[] sensorsFile = m_dataSensors.extractStringArray();
                if (sensorsFile != null && sensorsFile.length > 0) {
                    suggestions.setSensorSuggestionList(parseSuggestions(scanServerName, "SensorsFile", sensorsFile));
                }
            } catch (DevFailed e) {
                System.out.println(DevFailedUtils.toString(e));
            }

            // get TimebasesFile property
            try {
                DbDatum m_dataTimebases = m_database.get_device_property(scanServerName, "TimebasesFile");
                String[] timebasesFile = m_dataTimebases.extractStringArray();
                if (timebasesFile != null && timebasesFile.length > 0) {
                    suggestions.setTimebaseSuggestionList(parseSuggestions(scanServerName, "TimebasesFile",
                            timebasesFile));
                }
            } catch (DevFailed e) {
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.