<pre>
String representation of the physical device that this device maps to.
</pre>

<code>optional string physical_device_desc = 7;</code>
436147
public java.lang.String getPhysicalDeviceDesc() {
    java.lang.Object ref = physicalDeviceDesc_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      physicalDeviceDesc_ = s;
      return s;
    }
  }
894233
public String name() {
	Util.out4.println("DeviceImpl.name() arrived");

	//
	// Record attribute request in black box
	//

	blackbox.insert_attr(Attr_Name);

	//
	// Return data to caller
	//

	Util.out4.println("Leaving DeviceImpl.name()");
	return device_name;
    }
338955
public static String stringFor(int n)
    {
        switch (n)
        {
            case cudaLimitStackSize: return "cudaLimitStackSize";
            case cudaLimitPrintfFifoSize: return "cudaLimitPrintfFifoSize";
            case cudaLimitMallocHeapSize: return "cudaLimitMallocHeapSize";
            case cudaLimitDevRuntimeSyncDepth: return "cudaLimitDevRuntimeSyncDepth";
            case cudaLimitDevRuntimePendingLaunchCount: return "cudaLimitDevRuntimePendingLaunchCount";
            case cudaLimitMaxL2FetchGranularity: return "cudaLimitMaxL2FetchGranularity";
        }
        return "INVALID cudaLimit: "+n;
    }
545355
public static String getString(String name) {
        Resources res = Resources.getSystem();
        int id = res.getIdentifier(name, TYPE_STRING, NATIVE_PACKAGE);
        return id == 0 ? null : res.getString(id);
    }
420877
public java.lang.String getDevice() {
    java.lang.Object ref = device_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      device_ = s;
      return s;
    }
  }
380111
public java.lang.String getVmId() {
    java.lang.Object ref = vmId_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      vmId_ = s;
      return s;
    }
  }
93545
private static boolean validDeviceMode(String deviceMode) {
        Map<String, Boolean> validModes = new HashMap<>(3);
        validModes.put("r", true);
        validModes.put("w", true);
        validModes.put("m", true);

        if (isEmpty(deviceMode)) {
            return false;
        }

        for (char ch : deviceMode.toCharArray()) {
            final String mode = String.valueOf(ch);
            if (isNotTrue(validModes.get(mode))) {
                return false; // wrong mode
            }
            validModes.put(mode, false);
        }

        return true;
    }
584782
@Override
    String[] get_device_name_list(final boolean fwd) {
	synchronized (this) {
	    int i = 0;
	    final String[] dl = new String[get_size_i(fwd)];
	    final Iterator it = elements.iterator();
	    while (it.hasNext()) {
		final GroupElement e = (GroupElement) it.next();
		if (e instanceof GroupDeviceElement || fwd) {
		    final String[] sub_dl = e.get_device_name_list(fwd);
		    for (int j = 0; j < sub_dl.length; j++, i++) {
			dl[i] = sub_dl[j];
		    }
		}
	    }
	    return dl;
	}
    }
481285
public String asString() {
    StringBuffer buf = new StringBuffer();
    buf.append(" PID: [ ").append(this.id).append(" ]");;
    buf.append(" CID: [ ").append(this.clientId).append(" ]");;
    buf.append(" DES: [ ").append(this.desVersion).append(" ]");;
    buf.append(" SCIDS: [ " );
    for (String scid : serviceContractIDs) {
      buf.append(scid).append(" ");
    }
    buf.append("]");
    buf.append(" SIIDS: [ " );
    for (String siid : serviceInstanceIDs) {
      buf.append(siid).append(" ");
    }
    buf.append("]");
    buf.append(" RESPOND_TO: [ " );
    for (RespondToURL rt : respondToURLs) {
      buf.append(rt.label).append(", ").append(rt.url).append(" ");
    }
    buf.append("]");
    buf.append(" PAYLOAD_TYPE: [ ").append(respondToPayloadType).append(" ]");
    
    return buf.toString();
  }
227824
def hardware_version(self):
        """"""

        hardware_string = self.hardware_string

        if not isinstance(hardware_string, bytes):
            hardware_string = self.hardware_string.encode('utf-8')

        if len(hardware_string) > 10:
            self._logger.warn("Truncating hardware string that was longer than 10 bytes: %s", self.hardware_string)

        if len(hardware_string) < 10:
            hardware_string += b'\0'*(10 - len(hardware_string))

        return [hardware_string]
484080
private static String getDeviceSerialNumber() {
        // We're using the Reflection API because Build.SERIAL is only available
        // since API Level 9 (Gingerbread, Android 2.3).
        try {
            return (String) Build.class.getField("SERIAL").get(null);
        } catch (Exception ignored) {
            return null;
        }
    }
289376
public static HardwareDescription extractFromSystem() {
		int numberOfCPUCores = Runtime.getRuntime().availableProcessors();

		long sizeOfPhysicalMemory = getSizeOfPhysicalMemory();
		if (sizeOfPhysicalMemory < 0) {
			sizeOfPhysicalMemory = 1;
		}

		long sizeOfFreeMemory = getSizeOfFreeMemory();

		return new HardwareDescription(numberOfCPUCores, sizeOfPhysicalMemory, sizeOfFreeMemory);
	}
720852
def device_product_str(self, indent):
        
        s = "Vendor: {}\n".format(self.vendor)
        s += indent + "Product: {}\n".format((self.product and product_map[self.product]) or "Unknown")
        s += indent + "Version: {}\n".format(self.version)
        return s
636847
public static String getDeviceID() {
        return Settings.Secure.getString(QuickUtils.getContext().getContentResolver(), Settings.Secure.ANDROID_ID);
    }
1114433
def _get_key_value(string):
    """"""
    # Normally all properties look like this:
    #   Unique Identifier: 600508B1001CE4ACF473EE9C826230FF
    #   Disk Name: /dev/sda
    #   Mount Points: None
    key = ''
    value = ''
    try:
        key, value = string.split(': ')
    except ValueError:
        # This handles the case when the property of a logical drive
        # returned is as follows. Here we cannot split by ':' because
        # the disk id has colon in it. So if this is about disk,
        # then strip it accordingly.
        #   Mirror Group 0: physicaldrive 6I:1:5
        string = string.lstrip(' ')
        if string.startswith('physicaldrive'):
            fields = string.split(' ')
            # Include fields[1] to key to avoid duplicate pairs
            # with the same 'physicaldrive' key
            key = fields[0] + " " + fields[1]
            value = fields[1]
        else:
            # TODO(rameshg87): Check if this ever occurs.
            return string.strip(' '), None

    return key.strip(' '), value.strip(' ')
572855
public static String[] extractToStringArray(final DeviceData deviceDataArgout) throws DevFailed {
	final Object[] values = CommandHelper.extractArray(deviceDataArgout);
	if (values == null) {
	    Except.throw_exception("TANGO_WRONG_DATA_ERROR", "output is empty ",
		    "CommandHelper.extractToStringArray(deviceDataArgin)");
	}
	final String[] argout = new String[values.length];

	if (values.length > 0) {
	    if (values[0] instanceof Short) {
		for (int i = 0; i < values.length; i++) {
		    argout[i] = ((Short) values[i]).toString();
		}
	    } else if (values[0] instanceof String) {
		for (int i = 0; i < values.length; i++) {
		    argout[i] = (String) values[i];
		}

	    } else if (values[0] instanceof Integer) {
		for (int i = 0; i < values.length; i++) {
		    argout[i] = ((Integer) values[i]).toString();
		}
	    } else if (values[0] instanceof Long) {
		for (int i = 0; i < values.length; i++) {
		    argout[i] = ((Long) values[i]).toString();
		}
	    } else if (values[0] instanceof Float) {
		for (int i = 0; i < values.length; i++) {
		    argout[i] = ((Float) values[i]).toString();
		}
	    } else if (values[0] instanceof Boolean) {
		for (int i = 0; i < values.length; i++) {
		    argout[i] = ((Boolean) values[i]).toString();
		}
	    } else if (values[0] instanceof Double) {
		for (int i = 0; i < values.length; i++) {
		    argout[i] = ((Double) values[i]).toString();
		}
	    } else if (values[0] instanceof Byte) {
		for (int i = 0; i < values.length; i++) {
		    argout[i] = ((Byte) values[i]).toString();
		}
	    } else if (values[0] instanceof DevState) {
		for (int i = 0; i < values.length; i++) {
		    argout[i] = StateUtilities.getNameForState((DevState) values[0]);
		}
	    } else {
		Except.throw_exception("TANGO_WRONG_DATA_ERROR", "output type "
			+ values[0].getClass() + " not supported",
			"CommandHelper.extractToStringArray(Object value,deviceDataArgin)");
	    }
	}
	return argout;
    }
361059
public static String getfullNameForDevice(final String deviceName) throws DevFailed {
        if (deviceName == null) {
            throw DevFailedUtils.newDevFailed("cannot retrieve device name", "device name is empty");
        }
        String result;
        final String[] fields = deviceName.split("/");
        final Database db = ApiUtil.get_db_obj();
        if (deviceName.contains(DBASE_NO)) {
            result = deviceName;
        } else if (fields.length == 1) {
            result = db.get_device_from_alias(fields[0]);
        } else {
            result = deviceName;
        }
        return result;
    }