code: public DevState extractDevState() throws DevFailed {
  	manageExceptions("extractDevState");
  	if (isArray()) {
  	    // It is used for an attribute of DevState enum.
  	    final DevState[] array = extractDevStateArray();
  	    return array[0];
  	} else {
  	    // It is used for state attribute
  	    return DevStateHelper.extract(attrval.value);
  	}
      }
docs: ===========================================