The device associated with this event.

		For device added/removed events this is the device added or removed.
		For all other device events, this is the device that generated the
		event.

		Returns:
			~libinput.define.Device: Device object.
497118
def device(self):
		

		hdevice = self._libinput.libinput_event_get_device(self._hevent)
		return Device(hdevice, self._libinput)
88318
def get_device(self, rid):
        
        headers = {
                'User-Agent': self.user_agent(),
                'Content-Type': self.content_type()
        }
        headers.update(self.headers())

        url = self.portals_url()+'/devices/'+rid
        # print("URL: {0}".format(url))

        r = requests.get(   url,
                            headers=headers,
                            auth=self.auth())
    
        if HTTP_STATUS.OK == r.status_code:
            # fix the 'meta' to be dictionary instead of string
            device_obj = r.json()
            # device_obj['info']['description']['meta'] = \
                    # json.loads(device_obj['info']['description']['meta'])
            return device_obj
        else:
            print("get_device: Something went wrong: <{0}>: {1}".format(
                        r.status_code, r.reason))
            r.raise_for_status()
450688
def getDevice(self, **kwargs): 
        
        filterchain = self.get(**kwargs)
        
        if not filterchain:
            return None
        
        # get filterchain init parameters that are compatible with RTSPCameraDevice input parameters
        pars = filterchain.getParDic(DataModel.RTSPCameraDevice.parameter_defs) 
        # .. and instantiate an RTSPCameraDevice with those parameters
        device = DataModel.RTSPCameraDevice(**pars)
        
        print(self.pre, "getDevice :", pars, device)
        
        return device
1086533
def get_device_event(self, device_event_id):
        
        api = self._get_api(device_directory.DefaultApi)
        return DeviceEvent(api.device_log_retrieve(device_event_id))
1207795
def create_device(device_args):
    
    device = AlarmDecoder(USBDevice.find(device_args))
    device.on_message += handle_message
    device.open()

    return device
1294350
def get_device_info(self, bigip):
        '''
        '''

        coll = bigip.tm.cm.devices.get_collection()
        device = [device for device in coll if device.selfDevice == 'true']
        assert len(device) == 1
        return device[0]
562269
def devices(self):
        
        if self._devices is None:
            self._devices = DeviceList(self._version, fleet_sid=self._solution['sid'], )
        return self._devices
135356
def clearDevice(self):
        
        print(self.pre, "clearDevice")
        if not self.device:
            return
        
        self.filterchain.delViewPort(self.viewport)
        
        self.filterchain = None
        self.device = None
        
        self.video.update()
71219
async def detach(self, device, force=False):
        
        device = self._find_device(device)
        if not self.is_handleable(device):
            self._log.warn(_('not detaching {0}: unhandled device', device))
            return False
        drive = device.root
        if not drive.is_detachable:
            self._log.warn(_('not detaching {0}: drive not detachable', drive))
            return False
        if force:
            await self.auto_remove(drive, force=True)
        self._log.debug(_('detaching {0}', device))
        await drive.detach()
        self._log.info(_('detached {0}', device))
        return True
1233375
def get_device(self, device_id):
        
        api = self._get_api(device_directory.DefaultApi)
        return Device(api.device_retrieve(device_id))
775767
def extract_new(cls) -> DevicesTypeUnbound:
        
        devices = cls.get_handlerclass()(*_selection[cls])
        _selection[cls].clear()
        return devices
401090
def devices(self):
        
        devices = None
        with self.socket.Connect():
            devices = self._command("host:devices")

        return parse_device_list(devices)
215305
function() {
            return fritz.getDevice(thermostat).then(function(device) {
              console.log("[" + thermostat + "] " + device.name);
            });       
          }
1227282
def list_devices():
    
    output = {}
    for device_id, device in devices.items():
        output[device_id] = {
            'host': device.host,
            'state': device.state
        }
    return jsonify(devices=output)
1023996
def IsDevice(self):
    
    if self._stat_object is None:
      self._stat_object = self._GetStat()
    if self._stat_object is not None:
      self.entry_type = self._stat_object.type
    return self.entry_type == definitions.FILE_ENTRY_TYPE_DEVICE
1216292
def on(self, dev_id):
        
        path = 'device/on'
        payload = {'id': dev_id}
        return self.rachio.put(path, payload)
1129368
def devices(self):
        ''''''
        out = self.raw_cmd("devices").communicate()[0].decode("utf-8")
        match = "List of devices attached"
        index = out.find(match)
        if index < 0:
            raise EnvironmentError("adb is not working.")
        return dict([s.split("\t") for s in out[index + len(match):].strip().splitlines() if s.strip()])