:rtype: list of WinkDevice
340284
def get_devices_from_response_dict(response_dict, device_type):
    
    items = response_dict.get('data')

    devices = []

    api_interface = WinkApiInterface()
    check_list = isinstance(device_type, (list,))

    for item in items:
        if (check_list and get_object_type(item) in device_type) or \
                (not check_list and get_object_type(item) == device_type):
            _devices = build_device(item, api_interface)
            for device in _devices:
                devices.append(device)

    return devices
600465
def list_signals(self):
        
        print("Signal list")
        print("***********\n")
        for key, signal in self.app.signals.signals.items():
            print("%s (%s)\n  %s\n" % (signal.name, signal.plugin.name, signal.description))
886202
def _find_devices(serial=None):
    
    ret = []

    if pyusb1:
        for d in usb.core.find(idVendor=0x1915, idProduct=0x7777, find_all=1,
                               backend=pyusb_backend):
            if serial is not None and serial == d.serial_number:
                return d
            ret.append(d)
    else:
        busses = usb.busses()
        for bus in busses:
            for device in bus.devices:
                if device.idVendor == CRADIO_VID:
                    if device.idProduct == CRADIO_PID:
                        if serial == device.serial_number:
                            return device
                        ret += [device, ]

    return ret
296345
def trusted_devices(self):
        
        request = self.session.get(
            '%s/listDevices' % self._setup_endpoint,
            params=self.params
        )
        return request.json().get('devices')
979030
def _build_gadgets(self, gadget_tree_root):
        
        node_list = self._build_gadgets_rec(gadget_tree_root)

        return [RawGadget(n) for n in node_list]
909957
def get_xid_devices():
    
    devices = []
    scanner = XidScanner()
    for i in range(scanner.device_count()):
        com = scanner.device_at_index(i)
        com.open()
        device = XidDevice(com)
        devices.append(device)
    return devices
733782
def get_connected_devices():
        
        all_daplinks = []
        all_interfaces = _get_interfaces()
        for interface in all_interfaces:
            try:
                new_daplink = DAPAccessCMSISDAP(None, interface=interface)
                all_daplinks.append(new_daplink)
            except DAPAccessIntf.TransferError:
                logger = logging.getLogger(__name__)
                logger.error('Failed to get unique id', exc_info=session.Session.get_current().log_tracebacks)
        return all_daplinks
1331600
def get_wifi_list(self, startno, callback=None):
        '''
        
        '''
        params = {'startNo': startno}
        return self.execute_command('getWifiList', params, callback=callback)
1242141
def devices(opts=[]):
    
    adb_full_cmd = [v.ADB_COMMAND_PREFIX, v.ADB_COMMAND_DEVICES, _convert_opts(opts)]
    return _exec_command(adb_full_cmd)
1168135
def enumerate(cls):
        
        devices = {}
        for d in hid.enumerate(0, 0):
            vendor_id = d['vendor_id']
            product_id = d['product_id']
            serial_number = d['serial_number']
            interface_number = d['interface_number']
            path = d['path']

            # HIDAPI on Mac cannot detect correct HID interfaces, so device with
            # DebugLink doesn't work on Mac...
            if devices.get(serial_number) != None and devices[serial_number][0] == path:
                raise Exception("Two devices with the same path and S/N found. This is Mac, right? :-/")

            if (vendor_id, product_id) in DEVICE_IDS:
                devices.setdefault(serial_number, [None, None, None])
                if is_normal_link(d):
                    devices[serial_number][0] = path
                elif is_debug_link(d):
                    devices[serial_number][1] = path
                else:
                    raise Exception("Unknown USB interface number: %d" % interface_number)

        # List of two-tuples (path_normal, path_debuglink)
        return list(devices.values())
215847
async def get_devices(self, covers_only: bool = True) -> list:
        """"""
        from .device import MyQDevice

        _LOGGER.debug('Retrieving list of devices')
        devices_resp = await self._request('get', DEVICE_LIST_ENDPOINT)
        # print(json.dumps(devices_resp, indent=4))

        device_list = []
        if devices_resp is None:
            return device_list

        for device in devices_resp['Devices']:
            if not covers_only or \
               device['MyQDeviceTypeName'] in SUPPORTED_DEVICE_TYPE_NAMES:

                self._devices.append({
                    'device_id': device['MyQDeviceId'],
                    'device_info': device
                })
                myq_device = MyQDevice(
                    self._devices[-1], self._brand, self)
                device_list.append(myq_device)

        # Store current device states.
        self._store_device_states(devices_resp.get('Devices', []))

        _LOGGER.debug('List of devices retrieved')
        return device_list
868404
def scan_for_devices(timeout: float) -> List[Tuple[str, str]]:
        """"""
        from bluepy.btle import Scanner

        scanner = Scanner()
        result = []
        for device in scanner.scan(timeout):
            result.append((device.addr, device.getValueText(9)))
        return result
81691
def refresh_devices(self):
        ''''''
        try:
            response = self.api.get("/api/v2/devices", {'properties':'all'})
            for device_data in response['DeviceList']:
                self.devices.append(Device(device_data, self))
        except APIError as e:
            print("API error: ")
            for key,value in e.data.iteritems:
                print(str(key) + ": " + str(value))
959830
def devices
      emulators = start_emulators
      sleep 10
      devices = `adb devices`.split("\n").select { |x| x.include? "\tdevice" }.map.each_with_index { |d, i| {avd: emulators[i], platform: 'android', name: 'android', udid: d.split("\t")[0], wdaPort: 8100 + i, thread: i + 1} }
      devices = devices.map { |x| x.merge(get_android_device_data(x[:udid])) }

      ENV['DEVICES'] = JSON.generate(devices)
      devices
    end
978329
def get_device_name_list():
    """"""
    dev_names = ctypes.create_string_buffer(1024)
    pydaq.DAQmxGetSysDevNames(dev_names, len(dev_names))
    return dev_names.value.split(', ')
1148805
def devices
      devices = []
      simulator_information.each_with_index do |data, i|
        devices.push(name: @simulators[i][0, @simulators[i].index('(') - 1], platform: 'ios', os: data[0], udid: data[1],
                     wdaPort: 8100 + i + ENV['THREADS'].to_i, thread: i + 1)
      end
      ENV['DEVICES'] = JSON.generate(devices)
      devices
    end
59380
def list_adb_devices_by_usb_id():
    
    out = adb.AdbProxy().devices(['-l'])
    clean_lines = new_str(out, 'utf-8').strip().split('\n')
    results = []
    for line in clean_lines:
        tokens = line.strip().split()
        if len(tokens) > 2 and tokens[1] == 'device':
            results.append(tokens[2])
    return results