Package fr.esrf.TangoApi

Examples of fr.esrf.TangoApi.Database


        }
    }

    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",
View Full Code Here


                String dataRecorderDeviceName = "storage/recorder/datarecorder.1";
                // Read the property of DataRecorder = //storage/recorder/datarecorder.1/
                try {

                    if (database == null) {
                        database = new Database();
                    }
                    if (database != null) {
                        DbDatum dbDatum = database.get_device_property(context.getScanServerName(),
                                "DataRecorder");
                        if (dbDatum != null) {
View Full Code Here

            return;
       
        try
        {
            String deviceList = "";
            Database database = new Database();
            String[] deviceArray = database.get_device_exported_for_class(deviceClassName);
            for (int i = 0 ; i < deviceArray.length ; i++)
                deviceList = deviceList + "," + deviceArray[i];
           
            //setDeviceList(deviceList);
        }
View Full Code Here

        setTangoHost(host + ":" + port);
        if(!tangoHost.equals(""))
        {
            try
            {
                new Database(tangoHost,port);
            }
            catch (DevFailed e) {
                e.printStackTrace();
            }
            setText(tangoHost);
View Full Code Here

    }

    // Get the values of properties don t throw a error if not exist !!
    public ISuggestions getDevicesSuggestions(String scanServerName) throws SalsaDeviceException {
        ISuggestions suggestions = new SuggestionsImpl();
        Database m_database = null;
        try {
            m_database = new Database();
        }
        catch (DevFailed e) {
            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) {
            }

            // 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) {
            }

            // 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));
View Full Code Here

        final Thread tmpThread = new Thread() {
            @Override
            public void run() {
                try {
                    final StringBuilder attributeList = new StringBuilder();
                    final Database database = new Database();
                    final String[] deviceArray = database
                            .get_device_exported_for_class(deviceClassName);
                    for (final String element : deviceArray) {
                        // System.out.println("deviceArray["+i+"]=" + deviceArray[i]);
                        attributeList.append(element).append("/").append(attributeName).append(",");
                    }
View Full Code Here

    }

    // Get the values of properties don t throw a error if not exist !!
    public ISuggestions getDevicesSuggestions(String scanServerName) throws SalsaDeviceException {
        ISuggestions suggestions = new SuggestionsImpl();
        Database m_database = null;
        try {
            m_database = new Database();
        }
        catch (DevFailed e) {
            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));
View Full Code Here

        String[] configList = null;
        if (getDevicePreferences() != null) {
            String scanServer = getDevicePreferences().getScanServer();
            // Read the property of DataRecorder = //storage/recorder/datarecorder.1/
            String dataRecorderDeviceName = "storage/recorder/datarecorder.1";
            Database database = TangoDeviceHelper.getDatabase();
            if (database != null) {
                try {
                    DbDatum dbDatum = database.get_device_property(scanServer, "DataRecorder");
                    if (dbDatum != null) {
                        dataRecorderDeviceName = dbDatum.extractString();
                    }

                    if (dataRecorderDeviceName != null && !dataRecorderDeviceName.isEmpty()) {
View Full Code Here

    }

    // Get the values of properties don t throw a error if not exist !!
    public ISuggestions getDevicesSuggestions(String scanServerName) throws SalsaDeviceException {
        ISuggestions suggestions = new SuggestionsImpl();
        Database m_database = null;
        try {
            m_database = new Database();
        }
        catch (DevFailed e) {
            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) {
            }

            // 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) {
            }

            // 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));
View Full Code Here

        if (getDevicePreferences() != null) {
            String scanServer = getDevicePreferences().getScanServer();
            // Read the property of DataRecorder =
            // //storage/recorder/datarecorder.1/
            String dataRecorderDeviceName = "storage/recorder/datarecorder.1";
            Database database = TangoDeviceHelper.getDatabase();
            if ((database != null) && (scanServer != null) && !scanServer.isEmpty()) {
                try {
                    DbDatum dbDatum = database.get_device_property(scanServer, "DataRecorder");
                    if (dbDatum != null) {
                        dataRecorderDeviceName = dbDatum.extractString();
                    }

                    if ((dataRecorderDeviceName != null) && !dataRecorderDeviceName.isEmpty()) {
View Full Code Here

TOP

Related Classes of fr.esrf.TangoApi.Database

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.