Show device model.
6285
def get_device_model(self) -> str:
        ''''''
        output, _ = self._execute(
            '-s', self.device_sn, 'shell', 'getprop', 'ro.product.model')
        return output.strip()
258794
def device_status(self):
        """"""
        return {
            'active': self.device['active'],
            'offline': self.device['offline'],
            'last_update': self.last_update,
            'battery_level': self.battery_level,
        }
1219988
def show(self, resolve_mac=True):
        """"""

        print("%s  %s  %s  %s" % ("INDEX".ljust(5), "IFACE".ljust(35), "IP".ljust(15), "MAC"))
        for iface_name in sorted(self.data.keys()):
            dev = self.data[iface_name]
            mac = dev.mac
            if resolve_mac and iface_name != LOOPBACK_NAME:
                mac = conf.manufdb._resolve_MAC(mac)
            print("%s  %s  %s  %s" % (str(dev.win_index).ljust(5), str(dev.name).ljust(35), str(dev.ip).ljust(15), mac)     )
1095224
def print_devices():
    

    def device_verbose_info(device: InputDevice) -> {}:
        """
        Gather and format as much info as possible about the supplied InputDevice. Used mostly for debugging at this point.

        :param device:
            An InputDevice to examine
        :return:
            A dict containing as much information as possible about the input device.
        """

        def axis_name(axis_code):
            try:
                return ecodes.ABS[axis_code]
            except KeyError:
                return 'EXTENDED_CODE_{}'.format(axis_code)

        def rel_axis_name(axis_code):
            try:
                return ecodes.REL[axis_code]
            except KeyError:
                return 'EXTENDED_CODE_{}'.format(axis_code)

        axes = None
        if has_abs_axes(device):
            axes = {
                axis_name(axis_code): {'code': axis_code, 'min': axis_info.min, 'max': axis_info.max,
                                       'fuzz': axis_info.fuzz,
                                       'flat': axis_info.flat, 'res': axis_info.resolution} for
                axis_code, axis_info in device.capabilities().get(3)}

        rel_axes = None
        if has_rel_axes(device):
            print(device.capabilities().get(2))
            rel_axes = {
                rel_axis_name(axis_code): {'code': axis_code} for
                axis_code in device.capabilities().get(2)}

        buttons = None
        if has_buttons(device):
            buttons = {code: names for (names, code) in
                       dict(util.resolve_ecodes_dict({1: device.capabilities().get(1)})).get(('EV_KEY', 1))}

        return {'fn': device.fn, 'path': device.path, 'name': device.name, 'phys': device.phys, 'uniq': device.uniq,
                'vendor': device.info.vendor, 'product': device.info.product, 'version': device.info.version,
                'bus': device.info.bustype, 'axes': axes, 'rel_axes': rel_axes, 'buttons': buttons,
                'unique_name': unique_name(device)}

    def has_abs_axes(device):
        return device.capabilities().get(3) is not None

    def has_rel_axes(device):
        return device.capabilities().get(2) is not None

    def has_buttons(device):
        return device.capabilities().get(1) is not None

    _check_import()
    for d in [InputDevice(fn) for fn in list_devices()]:
        if has_abs_axes(d) or has_rel_axes(d):
            pp = pprint.PrettyPrinter(indent=2, width=100)
            pp.pprint(device_verbose_info(d))
707125
def newDevices(self, interface_id, dev_descriptions):
        """"""
        LOG.debug("RPCFunctions.newDevices: interface_id = %s, dev_descriptions = %s" % (
            interface_id, str(dev_descriptions)))
        remote = interface_id.split('-')[-1]
        if remote not in self._devices_raw:
            self._devices_raw[remote] = []
        if remote not in self._devices_raw_dict:
            self._devices_raw_dict[remote] = {}
        for d in dev_descriptions:
            self._devices_raw[remote].append(d)
            self._devices_raw_dict[remote][d['ADDRESS']] = d
        self.saveDevices(remote)
        self.createDeviceObjects(interface_id)
        if self.systemcallback:
            self.systemcallback('newDevices', interface_id, dev_descriptions)
        return True
627724
def show(self):
        """"""
        resp = ws.ws2811_render(self._leds)
        if resp != 0:
            str_resp = ws.ws2811_get_return_t_str(resp)
            raise RuntimeError('ws2811_render failed with code {0} ({1})'.format(resp, str_resp))
412873
def MobileDeviceProvisioningProfile(self, data=None, subset=None):
        """"""
        return self.factory.get_object(
            jssobjects.MobileDeviceProvisioningProfile, data, subset)
702165
def show(self):
        
        if self.isHidden():
            QWidget.show(self)
            self._qpart.updateViewport()
56944
async def info(self):
        """
        {'MasterCapability': 9, 'TransportPort': 3975}
        """
        act = self.service.action("X_GetDeviceInfo")
        res = await act.async_call()
        return res
72439
def initDeviceScan(self):
        """"""
        self.__isIphone = self.detectIphoneOrIpod()
        self.__isAndroidPhone = self.detectAndroidPhone()
        self.__isTierTablet = self.detectTierTablet()
        self.__isTierIphone = self.detectTierIphone()
        self.__isTierRichCss = self.detectTierRichCss()
        self.__isTierGenericMobile = self.detectTierOtherPhones()
678599
def devices(self):
        
        data = self.query(MyPlexDevice.key)
        return [MyPlexDevice(self, elem) for elem in data]
1260681
def get_device_names_to_objects(devices):
    '''
    '''

    name_to_object = {}
    for device in devices:
        device_name = get_device_info(device).name
        name_to_object[device_name] = device
    return name_to_object
1170663
def view(media_or_io, options = {})
      @devices.map do |device|
        ok = device.view(media_or_io, options)
        [device, ok]
      end
    end
1244244
def list_devices(self):
        """"""
        if self.plm.devices:
            for addr in self.plm.devices:
                device = self.plm.devices[addr]
                if device.address.is_x10:
                    _LOGGING.info('Device: %s %s', device.address.human,
                                  device.description)
                else:
                    _LOGGING.info('Device: %s cat: 0x%02x subcat: 0x%02x '
                                  'desc: %s, model: %s',
                                  device.address.human, device.cat,
                                  device.subcat, device.description,
                                  device.model)
        else:
            _LOGGING.info('No devices found')
            if not self.plm.transport:
                _LOGGING.info('IM connection has not been made.')
                _LOGGING.info('Use `connect [device]` to open the connection')
947482
def device_information(name, identifier):
    """"""
    # pylint: disable=no-member
    message = create(protobuf.DEVICE_INFO_MESSAGE)
    info = message.inner()
    info.uniqueIdentifier = identifier
    info.name = name
    info.localizedModelName = 'iPhone'
    info.systemBuildVersion = '14G60'
    info.applicationBundleIdentifier = 'com.apple.TVRemote'
    info.applicationBundleVersion = '273.12'
    info.protocolVersion = 1
    info.lastSupportedMessageType = 58
    info.supportsExtendedMotion = True
    return message
591520
def model(self):
        
        # If device is in bootloader mode, get mode name from fastboot.
        if self.is_bootloader:
            out = self.fastboot.getvar('product').strip()
            # 'out' is never empty because of the 'total time' message fastboot
            # writes to stderr.
            lines = out.decode('utf-8').split('\n', 1)
            if lines:
                tokens = lines[0].split(' ')
                if len(tokens) > 1:
                    return tokens[1].lower()
            return None
        model = self.adb.getprop('ro.build.product').lower()
        if model == 'sprout':
            return model
        return self.adb.getprop('ro.product.name').lower()
921688
def has_device_info(self, key):
        """"""
        if _debug: DeviceInfoCache._debug("has_device_info %r", key)

        return key in self.cache