Package fr.esrf.TangoApi

Examples of fr.esrf.TangoApi.DeviceProxy.read_attribute()


                    String scanserver = context.getScanServerName();
                    if ((config == null) && TangoDeviceHelper.isDeviceRunning(scanserver)) {
                        DeviceProxy deviceProxy = TangoDeviceHelper.getDeviceProxy(scanserver);
                        if (deviceProxy != null) {
                            try {
                                DeviceAttribute attribute = deviceProxy
                                .read_attribute(CurrentScanDataModel.RUN_NAME);
                                logScan = attribute.extractString();
                            }
                            catch (DevFailed e) {
                            }
View Full Code Here


                        // For the moment runStartDate format = yyyy-MMM-dd HH:mm:ss
                        DeviceProxy deviceProxy = TangoDeviceHelper.getDeviceProxy(scanserver);
                        if (deviceProxy != null) {
                            try {
                                DeviceAttribute attribute = deviceProxy
                                .read_attribute(CurrentScanDataModel.RUN_START_DATE);
                                String runStartDate = attribute.extractString();
                                // System.out.println("runStartDate=" + runStartDate);
                                if ((runStartDate != null) && !runStartDate.isEmpty()) {
                                    int index = runStartDate.indexOf(" ");
View Full Code Here

        if (scanServerProxy != null) {
            if (isScanResultReady()) {
                try {
                    // Type
                    actionName = "read_attribute(\"" + CurrentScanDataModel.SCAN_TYPE + "\")";
                    DeviceAttribute scanTypeAttribute = scanServerProxy.read_attribute(CurrentScanDataModel.SCAN_TYPE);
                    int scanType = scanTypeAttribute.extractLong();
                    // 0 -> time scan
                    // 1 -> scan 1d
                    // 2 -> scan 2d
                    switch (scanType) {
View Full Code Here

            if (sensor != null) {
                // We need the sensor position.
                String sensorName = sensor.getName();
                if (sensorName != null && !sensorName.trim().equals("")) {
                    String[] sensorsNamesArray = scanServerProxy.read_attribute("sensors")
                            .extractStringArray();
                    int sensorPosition;
                    for (sensorPosition = 0; sensorPosition < sensorsNamesArray.length; ++sensorPosition) {
                        if (sensorName.equals(sensorsNamesArray[sensorPosition])) {
                            break;
View Full Code Here

            if (sensor != null) {
                // We need the sensor position.
                String sensorName = sensor.getName();
                if (sensorName != null && !sensorName.trim().equals("")) {
                    String[] sensorsNamesArray = scanServerProxy.read_attribute("sensors")
                            .extractStringArray();
                    int sensorPosition;
                    for (sensorPosition = 0; sensorPosition < sensorsNamesArray.length; ++sensorPosition) {
                        if (sensorName.equals(sensorsNamesArray[sensorPosition])) {
                            break;
View Full Code Here

            if (actuator != null) {
                // We need the actuator position.
                String actuatorName = actuator.getName();
                if (actuatorName != null && !actuatorName.trim().equals("")) {
                    String[] actuatorsNamesArray = scanServerProxy.read_attribute("actuators")
                            .extractStringArray();
                    int actuatorPosition;
                    for (actuatorPosition = 0; actuatorPosition < actuatorsNamesArray.length; ++actuatorPosition) {
                        if (actuatorName.equals(actuatorsNamesArray[actuatorPosition])) {
                            break;
View Full Code Here

            if (actuator != null) {
                // We need the actuator position.
                String actuatorName = actuator.getName();
                if (actuatorName != null && !actuatorName.trim().equals("")) {
                    String[] actuatorsNamesArray = scanServerProxy.read_attribute("actuators")
                            .extractStringArray();
                    int actuatorPosition;
                    for (actuatorPosition = 0; actuatorPosition < actuatorsNamesArray.length; ++actuatorPosition) {
                        if (actuatorName.equals(actuatorsNamesArray[actuatorPosition])) {
                            break;
View Full Code Here

            if (isScanResultReady()) {

                int pointIndex;
                try {
                    // Type
                    DeviceAttribute scanTypeAttribute = scanServerProxy.read_attribute("scanType");
                    int scanType = scanTypeAttribute.extractLong();
                    if (scanType != 1 && scanType != 0) {
                        return null;
                    }
View Full Code Here

                    scanResult.setScanServer(scanServerName);

                    scanResult.setResultType(IScanResult.ResultType.RESULT_1D);

                    // Name.
                    DeviceAttribute runNameAttribute = scanServerProxy.read_attribute("runName");
                    String runName = runNameAttribute.extractString();
                    scanResult.setRunName(runName);

                    // Time
                    double[] timesArray = scanServerProxy.read_attribute("sensorsTimeStamps")
View Full Code Here

                    DeviceAttribute runNameAttribute = scanServerProxy.read_attribute("runName");
                    String runName = runNameAttribute.extractString();
                    scanResult.setRunName(runName);

                    // Time
                    double[] timesArray = scanServerProxy.read_attribute("sensorsTimeStamps")
                            .extractDoubleArray();
                    List<IScanPoint> scanPointsList = new ArrayList<IScanPoint>(timesArray.length);
                    IScanPoint scanPoint;
                    for (double time : timesArray) {
                        scanPoint = new ScanPointImpl();
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.