code: public static Double extractToDouble(final DeviceData deviceDataArgout) throws DevFailed {
  	final Object value = CommandHelper.extract(deviceDataArgout);
  	Double argout = null;
  	if (value instanceof Short) {
  	    argout = Double.valueOf(((Short) value).doubleValue());
  	} else if (value instanceof String) {
  	    try {
  		argout = Double.valueOf((String) value);
  	    } catch (final Exception e) {
  		Except.throw_exception("TANGO_WRONG_DATA_ERROR", "output type " + value
  			+ " is not a numerical", "CommandHelper.extractToFloat(deviceDataArgin)");
  	    }
  	} else if (value instanceof Integer) {
  	    argout = Double.valueOf(((Integer) value).doubleValue());
  	} else if (value instanceof Long) {
  	    argout = Double.valueOf(((Long) value).doubleValue());
  	} else if (value instanceof Float) {
  	    argout = Double.valueOf(((Float) value).doubleValue());
  	} else if (value instanceof Boolean) {
  	    if (((Boolean) value).booleanValue()) {
  		argout = Double.valueOf(1);
  	    } else {
  		argout = Double.valueOf(0);
  	    }
  	} else if (value instanceof Double) {
  	    argout = (Double) value;
  	} else if (value instanceof DevState) {
  	    argout = Double.valueOf(Integer.valueOf(((DevState) value).value()).doubleValue());
  	} else {
  	    Except.throw_exception("TANGO_WRONG_DATA_ERROR", "output type " + value.getClass()
  		    + " not supported",
  		    "CommandHelper.extractToFloat(Object value,deviceDataArgin)");
  	}
  
  	return argout;
      }
docs: Convert the value according the type of DeviceData.
  
  @param deviceDataArgout
  the DeviceData attribute to read
  @return Double, the result in Double format
  @throws DevFailed