code: public synchronized void addAttribute(final AttributeImpl attribute) throws DevFailed {
          // add attribute only if it doesn't exists
          AttributeImpl result = null;
          for (final AttributeImpl attr : attributeList) {
              if (attr.getName().equalsIgnoreCase(attribute.getName())) {
                  result = attribute;
                  break;
              }
          }
          if (result == null) {
              attributeList.add(attribute);
              // set default polling configuration
              if (attrPollRingDepth.containsKey(attribute.getName().toLowerCase(Locale.ENGLISH))) {
                  attribute.setPollRingDepth(attrPollRingDepth.get(attribute.getName().toLowerCase(Locale.ENGLISH)));
              } else {
                  attribute.setPollRingDepth(pollRingDepth);
              }
          }
      }
docs: Add an attribute to the device
  
  @param attribute
  @throws DevFailed