Skip to content
Snippets Groups Projects
Commit e925a59c authored by Gwenaelle ABEILLE's avatar Gwenaelle ABEILLE
Browse files

release

parent f8086df0
No related branches found
No related tags found
No related merge requests found
......@@ -90,6 +90,7 @@ package SnapExtractor;
import org.omg.CORBA.SystemException;
import org.omg.CORBA.UserException;
import org.tango.utils.DevFailedUtils;
import fr.esrf.Tango.AttrDataFormat;
import fr.esrf.Tango.AttrWriteType;
......@@ -712,14 +713,17 @@ public class SnapExtractor extends DeviceImpl
String realName = currentExtract.getAttribute_complete_name();
// Object val = currentExtract.getValue();
try {
String[] names = this.addAttribute(currentExtract);
String read_name = names[0];
String write_name = names[1];
argout[j] = realName;
argout[j + 1] = read_name;
argout[j + 2] = write_name;
} catch (DevFailed e) {
DevFailedUtils.printDevFailed(e);
System.err.println("cannot add attr " + realName);
}
j += 3;
}
......@@ -733,14 +737,13 @@ public class SnapExtractor extends DeviceImpl
* @throws DevFailed
*/
private String[] addAttribute(SnapAttributeExtract currentExtract) throws DevFailed {
try {
if (currentExtract.getValue() == null) {
String message = "Null value for attribute |" + currentExtract.getAttribute_complete_name() + "|";
this.trace(message, Warnable.LOG_LEVEL_WARN);
return getErrorNames(currentExtract);
}
IConverter converter = ConverterFactory.getCurrentImpl();
IConverter converter = ConverterFactory.getImpl(ConverterFactory.DEFAULT);
DbData dbData = converter.convert(currentExtract);
if (dbData == null) {
String message = "Null DbData for attribute |" + currentExtract.getAttribute_complete_name()
......@@ -754,12 +757,6 @@ public class SnapExtractor extends DeviceImpl
this.createDynamicAttribute(dbData, names);
return names;
} catch (Throwable t) {
// Tools.printIfDevFailed ( t );
String message = "Exception for attribute |" + currentExtract.getAttribute_complete_name() + "|";
this.trace(message, t, Warnable.LOG_LEVEL_WARN);
return getErrorNames(currentExtract);
}
}
private String[] getErrorNames(SnapAttributeExtract currentExtract) {
......@@ -787,7 +784,9 @@ public class SnapExtractor extends DeviceImpl
|| currentExtract.getWritable() == AttrWriteType._READ_WRITE;
// Build new Attribute's name
IDynamicAttributeNamer dynamicAttributeNamer = DynamicAttributeNamerFactory.getCurrentImpl();
IDynamicAttributeNamer dynamicAttributeNamer = DynamicAttributeNamerFactory
.getImpl(DynamicAttributeNamerFactory.DEFAULT);
boolean firstIsRead = currentExtract.getWritable() != AttrWriteType._WRITE;
random_name_1 = dynamicAttributeNamer.getName(currentExtract, id, firstIsRead);
// id++;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment