* @param scanServerName
* @return
* @throws SalsaDeviceException
*/
public IScanStatus getScanStatus(String scanServerName) throws SalsaDeviceException {
ScanStatusImpl result = new ScanStatusImpl();
DeviceProxy scanServerProxy = TangoDeviceHelper.getDeviceProxy(scanServerName, false);
if (scanServerProxy != null) {
try {
result.setState("" + CurrentScanDataModel.getState(scanServerName));
result.setStatus(CurrentScanDataModel.getStatus(scanServerName));
result.setRunStartDate(CurrentScanDataModel.readStringAttribute(scanServerName,
CurrentScanDataModel.RUN_START_DATE));
result.setScanEndDate(CurrentScanDataModel.readStringAttribute(scanServerName,
CurrentScanDataModel.SCAN_END_DATE));
result.setRunEndDate(CurrentScanDataModel.readStringAttribute(scanServerName,
CurrentScanDataModel.RUN_END_DATE));
result.setScanDuration(CurrentScanDataModel.readStringAttribute(scanServerName,
CurrentScanDataModel.SCAN_DURATION));
result.setRunDuration(CurrentScanDataModel.readStringAttribute(scanServerName,
CurrentScanDataModel.RUN_DURATION));
result.setScanRemainingTime(CurrentScanDataModel.readStringAttribute(scanServerName,
CurrentScanDataModel.SCAN_REMAINING_TIME));
result.setRunRemainingTime(CurrentScanDataModel.readStringAttribute(scanServerName,
CurrentScanDataModel.RUN_REMAINING_TIME));
result.setScanElapsed(CurrentScanDataModel.readStringAttribute(scanServerName,
CurrentScanDataModel.SCAN_ELAPSED));
result.setRunElapsed(CurrentScanDataModel.readStringAttribute(scanServerName,
CurrentScanDataModel.RUN_ELAPSED));
result.setRunCompletion(CurrentScanDataModel.readDoubleAttribute(scanServerName,
CurrentScanDataModel.RUN_COMPLETION));
result.setScanCompletion(CurrentScanDataModel.readDoubleAttribute(scanServerName,
CurrentScanDataModel.SCAN_COMPLETION));
result.setDeadTime(CurrentScanDataModel.readDoubleAttribute(scanServerName,
CurrentScanDataModel.DEAD_TIME));
result.setDeadTimePercentage(CurrentScanDataModel.readDoubleAttribute(scanServerName,
CurrentScanDataModel.DEAD_TIME_PERCENT));
result.setDeadTimePerPoint(CurrentScanDataModel.readDoubleAttribute(scanServerName,
CurrentScanDataModel.DEAD_TIME_PER_POINT));
} catch (Exception e) {
throw new SalsaDeviceException("Error : cannot read scan status informations : "
+ Except.str_exception(e), e);
}