Package fr.esrf.TangoApi

Examples of fr.esrf.TangoApi.DeviceData


                    String strPassword = new String(m_pfPassword.getPassword());
                    boolean bLogged = false;
                    DeviceProxy proxy = TangoDeviceHelper.getDeviceProxy(m_strAuthPath);
                    if (proxy != null) {
                        try {
                            DeviceData argin = new DeviceData();
                            argin.insert(strPassword);
                            proxy.command_inout("Logon", argin);
                            bLogged = true;
                        } catch (DevFailed exception) {
                            exception.printStackTrace();
                        }
View Full Code Here


                        boolean bEndMethod = false;
                        DeviceProxy proxy = TangoDeviceHelper.getDeviceProxy(m_strAuthPath);
                        if (proxy != null) {
                            try {
                                DeviceData argin = new DeviceData();
                                argin.insert(strPassword);
                                proxy.command_inout("changePassword", argin);
                                bEndMethod = true;
                            } catch (DevFailed exception) {
                                exception.printStackTrace();
                            }
View Full Code Here

    public void initializeCbProjects() {
        String[] tabProjects = null;
        DeviceProxy proxy = TangoDeviceHelper.getDeviceProxy(pathAuthServer);
        if (proxy != null) {
            try {
                DeviceData deviceData = proxy.command_inout("getCurrentProjects");
                tabProjects = deviceData.extractStringArray();
            } catch (DevFailed exception) {
                exception.printStackTrace();
            }
        }
        if (null != tabProjects) {
View Full Code Here

                    String strInput = strLogin + "/" + strPassword + "@" + strProject;
                    // call tango comand to generate a key
                    DeviceProxy proxy = TangoDeviceHelper.getDeviceProxy(pathAuthServer);
                    if (proxy != null) {
                        try {
                            DeviceData argin = new DeviceData();
                            argin.insert(strInput);
                            proxy.command_inout("GenerateKey", argin);
                        } catch (DevFailed exception) {
                            exception.printStackTrace();
                            JOptionPane.showMessageDialog(getParentDialog(),
                                    "Authentification failed due to a wrong project name or password.",
View Full Code Here

        String strArgout = null;
        DeviceProxy proxy = TangoDeviceHelper.getDeviceProxy(pathAuthServer);
        if (proxy != null) {
            try {
                // execute methode Login
                DeviceData data = new DeviceData();
                // argIn ( Login + Project + Password)
                String argInLogin = m_tfLogin.getText();
                String argInProject = m_cbProject.getSelectedItem().toString();
                String argInPassword = new String(m_pfPassword.getPassword());
                data.insert(argInLogin + argInProject + argInPassword);
                // send a write command to the device
                DeviceData argout = proxy.command_inout("Login", data);
                strArgout = argout.extractString();
            } catch (DevFailed exception) {
                exception.printStackTrace();
            }
        }
        return strArgout;
View Full Code Here

    private void fillExpression() {
        if (attributeName != null) {
            try {
                DeviceProxy proxy = TangoDeviceHelper.getDeviceProxy(model);
                if (proxy != null) {
                    DeviceData deviceDataIn = new DeviceData();
                    deviceDataIn.insert(attributeName);
                    DeviceData deviceDataOut = proxy.command_inout("GetExpression", deviceDataIn);
                    String[] values = deviceDataOut.extractStringArray();
                    if (values != null) {
                        String expression = "";
                        for (String element : values) {
                            expression = expression + element + "\n";
                        }
View Full Code Here

                                        "The field Project Code must be not empty");
                            } else {
                                DeviceProxy proxy = TangoDeviceHelper.getDeviceProxy(m_strAuthPath);
                                if (proxy != null) {
                                    try {
                                        DeviceData argin = new DeviceData();
                                        argin.insert(getArgin());
                                        proxy.command_inout("GenerateEmergencyKeyEx", argin);
                                        bEndMethod = true;
                                    } catch (DevFailed exception) {
                                        exception.printStackTrace();
                                    }
View Full Code Here

        String[] lensModeList = { "lens1", "lens2", "lens3" };
        DeviceProxy tmpDeviceProxy = null;
        try {
            tmpDeviceProxy = new DeviceProxy(model);
            DeviceData dd = tmpDeviceProxy.command_inout("GetLensModeList");
            lensModeList = dd.extractStringArray();
        }
        catch (DevFailed e) {
            e.printStackTrace();
        }
        lensModeCombo.setValueList((Object[]) lensModeList);
        attributeKey = generateAttributeKey("lensMode");
        setWidgetModel(lensModeCombo, stringBox, attributeKey);

        String[] passModeList = { "pass1", "pass2", "pass3" };
        if (tmpDeviceProxy != null) {
            try {
                DeviceData dd = tmpDeviceProxy.command_inout("GetpassModeList");
                passModeList = dd.extractStringArray();
            }
            catch (DevFailed e) {
                e.printStackTrace();
            }
        }
View Full Code Here

    private String[] getScriptInfo(String scriptName) {
        String[] result = null;
        DeviceProxy proxy = TangoDeviceHelper.getDeviceProxy(model);
        if (proxy != null && scriptName != null && !scriptName.equalsIgnoreCase("do nothing")) {
            try {
                DeviceData devDataIn = new DeviceData();
                devDataIn.insert(scriptName);
                DeviceData devDataOut = proxy.command_inout(DataRecorderModel.GET_SCRIPTS_INFO_CMD, devDataIn);
                if (devDataOut != null) {
                    result = devDataOut.extractStringArray();
                }
            } catch (DevFailed e) {
                result = null;
            }
        }
View Full Code Here

        // Command for post recording
        DeviceProxy proxy = TangoDeviceHelper.getDeviceProxy(getModel());
        if (proxy != null) {
            try {

                DeviceData data = proxy.command_inout(GET_POST_RECORDING_CMD);
                postRecordingCommand = data.extractString();
                setPostRecordingValues();

                data = proxy.command_inout(GET_DATA_MODEL_CMD);
                datamodels = data.extractStringArray();

                DeviceAttribute deviceAttribute = proxy.read_attribute(SCRIPTS_ATTR);
                tabScripts = deviceAttribute.extractStringArray();
            } catch (DevFailed exception) {
                exception.printStackTrace();
View Full Code Here

TOP

Related Classes of fr.esrf.TangoApi.DeviceData

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.