Package fr.esrf.TangoApi

Examples of fr.esrf.TangoApi.DeviceData


        String[] split = this.deviceCommand.split("/");
        if (split.length >= 2) {
            String commandName = split[split.length - 1];

            String deviceName = this.deviceCommand.substring(0, this.deviceCommand.length() - commandName.length() - 1);
            DeviceData result;

            try {
                DeviceProxy proxy = getDeviceProxy(deviceName);

                result = proxy.command_inout(commandName);
            } catch (DevFailed e) {
                throw new SourceDeviceException(DevFailedUtils.toString(e));
            }
            String[] sourceArray = result.extractStringArray();
            sourceList = Arrays.asList(sourceArray);
        }

        return sourceList;
    }
View Full Code Here


        DeviceProxy proxy = TangoDeviceHelper.getDeviceProxy(getModel());
        if (proxy != null) {
            String executedCommand = "";
            try {
                executedCommand = GET_POST_RECORDING_CMD;
                DeviceData data = proxy.command_inout(executedCommand);
                postRecordingCommand = data.extractString();
                setPostRecordingValues();

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

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

        if ((tabScripts != null) && (proxy != null)) {

            for (String script : tabScripts) {
                String[] tabParameters = null;
                try {
                    DeviceData parameter = new DeviceData();
                    parameter.insert(getScriptName(script));
                    DeviceData data = proxy.command_inout(GET_SCRIPTS_INFO_CMD, parameter);
                    tabParameters = data.extractStringArray();
                } catch (DevFailed exception) {
                    StringBuilder errorMessage = new StringBuilder();
                    errorMessage.append("Error when executing command " + getModel() + "/" + GET_SCRIPTS_INFO_CMD
                            + "/n");
                    errorMessage.append(DevFailedUtils.toString(exception) + "/n");
View Full Code Here

    private void manageRecorderConfigurationSaving(String value, String commandName) {
        DeviceProxy proxy = TangoDeviceHelper.getDeviceProxy(getModel());
        if (proxy != null) {
            try {
                DeviceData argin = new DeviceData();
                argin.insert(value);
                proxy.command_inout(commandName, argin);
            } catch (DevFailed exception) {
                StringBuilder errorMessage = new StringBuilder();
                errorMessage.append("Error when executing command " + getModel() + "/" + commandName + "/n");
                errorMessage.append(DevFailedUtils.toString(exception) + "/n");
View Full Code Here

    public String[] getRecorderConfigList() {
        String[] result = null;
        DeviceProxy proxy = TangoDeviceHelper.getDeviceProxy(getModel());
        if (proxy != null) {
            try {
                DeviceData deviceData = proxy.command_inout(GET_CONFIG_LIST_CMD);
                result = deviceData.extractStringArray();
            } catch (DevFailed exception) {
                StringBuilder errorMessage = new StringBuilder();
                errorMessage.append("Error when executing command " + getModel() + "/" + GET_CONFIG_LIST_CMD + "/n");
                errorMessage.append(DevFailedUtils.toString(exception) + "/n");
                new Exception(errorMessage.toString()).printStackTrace();
View Full Code Here

    public void loadRecorderConfig(String configName) {
        DeviceProxy proxy = TangoDeviceHelper.getDeviceProxy(getModel());
        if (proxy != null) {
            try {
                DeviceData argin = new DeviceData();
                argin.insert(configName);
                proxy.command_inout(LOAD_CONFIG_CMD, argin);
            } catch (DevFailed exception) {
                StringBuilder errorMessage = new StringBuilder();
                errorMessage.append("Error when executing command " + getModel() + "/" + LOAD_CONFIG_CMD + "/n");
                errorMessage.append(DevFailedUtils.toString(exception) + "/n");
View Full Code Here

     */
    private String[] executeCommandInOutShort(short arg) {
        String[] result = null;
        try {
            DeviceProxy proxy = new DeviceProxy(getModel());
            DeviceData argin = new DeviceData();
            argin.insert(arg);
            DeviceData cmdResult = proxy.command_inout(GET_PATH_SYMBOLS_CMD, argin);
            result = cmdResult.extractStringArray();
        } catch (DevFailed devFailed) {
            StringBuilder errorMessage = new StringBuilder();
            errorMessage.append("Error when executing command " + getModel() + "/" + GET_PATH_SYMBOLS_CMD + "/n");
            errorMessage.append(DevFailedUtils.toString(devFailed) + "/n");
            new Exception(errorMessage.toString()).printStackTrace();
View Full Code Here

        if(!deviceName.equalsIgnoreCase(""))
        {
            try
            {
                DeviceProxy tmpDeviceProxy = new DeviceProxy(deviceName);
                DeviceData deviceData = tmpDeviceProxy.command_inout(valuesCommandName);
                String [] lensModeList = deviceData.extractStringArray();
                setValueList(lensModeList);
            }
            catch (DevFailed e)
            {
            }
View Full Code Here

            TechnicalDataMessageManager.notifyNewMessageDetected("MONITORED - go for new fashion monitored attributes",
                    false);
            DeviceProxy deviceProxy = TangoDeviceHelper.getDeviceProxy(archivingDevicePath);
            if (deviceProxy != null) {
                try {
                    DeviceData argout = deviceProxy.command_inout("GetCurrentArchivedAtt");
                    String[] archivedAttributesList = argout.extractStringArray();
                    if (archivedAttributesList != null) {
                        for (String attribute : archivedAttributesList) {
                            TechnicalDataMessageManager.notifyNewMessageDetected("\t" + attribute, false);
                            attributesList.add(attribute);
                        }
View Full Code Here

        @Override
        public void run() {
            DeviceProxy proxy = TangoDeviceHelper.getDeviceProxy(m_strDeviceRecorder);
            if (proxy != null) {
                try {
                    DeviceData argin = new DeviceData();
                    argin.insert(m_strDevice);
                    DeviceData argout = proxy.command_inout("IsTangoDeviceRecordable", argin);
                    m_iRecordable = argout.extractShort();
                } catch (DevFailed exception) {
                    TechnicalDataMessageManager.notifyExecuteCommandErrorDetected(m_strDevice, "IsTangoDeviceRecordable", m_strDevice,exception,true);
                }
            }
        }
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.