Package fr.esrf.TangoApi

Examples of fr.esrf.TangoApi.DeviceData


    }


    private void switchStateOnDevice(final int stateValue, final DeviceProxy proxy) throws DevFailed {
        // change value on device and check bean is updated
        final DeviceData data = new DeviceData();
        data.insert(stateValue);
        proxy.command_inout("switchState", data);
        Sleeper.SECONDS.sleep(1);
    }
View Full Code Here


    public List<Sample> getSamples() {
        List<Sample> result = new ArrayList<Sample>();
        try {

            DeviceData argout = proxy.command_inout("ShowCurrentPositions");
            if (argout != null) {
                // --------------------------------------------------------------------
                // Grab every sample configuration into an Array
                String[] samplesConfigurations = argout.extractStringArray();

                // For each configuration, let's decode the Sample
                for (int i = 0; i < samplesConfigurations.length; i++) {
                    String sampleConfiguration = samplesConfigurations[i];
View Full Code Here

    // check correctly start
    assertThat(widget.isEnabled()).isTrue();
    assertThat(getText(widget)).isEqualTo(commandName);

    // change state to fault
    final DeviceData data = new DeviceData();
    data.insert(8);
    m_deviceProxy.command_inout("switchState", data);

    // check msg error is correct
    tth.click(getButton(widget));
    Sleeper.SECONDS.sleep(1);
View Full Code Here

    private void fillForbiddenDevicesList() throws SourceDeviceException {
        try {
            Database database = new Database();

            for (String className : FORBIDDEN_CLASSES) {
                DeviceData deviceData = new DeviceData();

                deviceData.insert(className);
                database.set_timeout_millis(1000);

                String[] classDevices = database.get_device_exported_for_class(className);

                for (String device : classDevices) {
View Full Code Here

            if (forbiddenDevicesList.isEmpty() && withoutForbiddenDevices) {
                fillForbiddenDevicesList();
            }

            Database database = new Database();
            DeviceData deviceData = new DeviceData();

            deviceData.insert(JOKER);
            database.set_timeout_millis(10000);
            if (onlyExportedDevices) {
                deviceArray = database.get_device_exported(JOKER);
            } else {
                deviceArray = database.get_device_list(JOKER);
View Full Code Here

        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

    public String[] getRecorderConfigList(){
        String[] result = null;
        DeviceProxy proxy = TangoDeviceHelper.getDeviceProxy(modelForListConfig);
        if (proxy != null) {
            try {
                DeviceData deviceData = proxy.command_inout(DataRecorderModel.GET_CONFIG_LIST_CMD);
                result = deviceData.extractStringArray();
            }
            catch (DevFailed exception) {
                DataRecorderMessageManager.notifyExecuteCommandErrorDetected(modelForListConfig, DataRecorderModel.GET_CONFIG_LIST_CMD, exception);
            }
        }
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) {
                DataRecorderMessageManager.notifyExecuteCommandErrorDetected(model, DataRecorderModel.GET_SCRIPTS_INFO_CMD, e);

                result = null;
View Full Code Here

    private void fillForbiddenDevicesList() throws SourceDeviceException {
        try {
            Database database = new Database();

            for (String className : FORBIDDEN_CLASSES) {
                DeviceData deviceData = new DeviceData();

                deviceData.insert(className);
                database.set_timeout_millis(1000);

                String[] classDevices = database.get_device_exported_for_class(className);

                for (String device : classDevices) {
View Full Code Here

        Database database;

        try {
            database = new Database();
            DeviceData deviceData = new DeviceData();

            deviceData.insert(JOKER);
            database.set_timeout_millis(10000);
            if (onlyExportedDevices) {
                deviceArray = database.get_device_exported(JOKER);
            } else {
                deviceArray = database.get_device_list(JOKER);
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.