code: public AttributeValue read_attribute_value(final DeviceProxy deviceProxy, final String attname)
  	    throws DevFailed {
          checkIfTango(deviceProxy, "read_attribute_value");
  
          build_connection(deviceProxy);
  
          AttributeValue[] attrval;
          if (deviceProxy.getAttnames_array() == null) {
              deviceProxy.setAttnames_array(new String[1]);
          }
          deviceProxy.getAttnames_array()[0] = attname;
          try {
              if (deviceProxy.device_2 != null) {
              attrval = deviceProxy.device_2.read_attributes_2(deviceProxy.getAttnames_array(),
                  deviceProxy.dev_src);
              } else {
              attrval = deviceProxy.device.read_attributes(deviceProxy.getAttnames_array());
              }
              return attrval[0];
          } catch (final DevFailed e) {
              Except.throw_connection_failed(e, "TangoApi_CANNOT_READ_ATTRIBUTE",
                  "Cannot read attribute:   " + attname, deviceProxy.getFull_class_name()
                      + ".read_attribute()");
              return null;
          } catch (final Exception e) {
              ApiUtilDAODefaultImpl.removePendingRepliesOfDevice(deviceProxy);
              throw_dev_failed(deviceProxy, e, "device.read_attributes()", false);
              return null;
          }
      }
docs: ==========================================================================