You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
42 lines
1.1 KiB
42 lines
1.1 KiB
4 months ago
|
# Copyright 2015 The Chromium OS Authors. All rights reserved.
|
||
|
# Use of this source code is governed by a BSD-style license that can be
|
||
|
# found in the LICENSE file.
|
||
|
|
||
|
"""An adapter to remotely access the usb facade on DUT."""
|
||
|
|
||
|
|
||
|
class USBFacadeRemoteAdapter(object):
|
||
|
"""USBFacadeRemoteAdapter is an adapter to remotely control DUT USB.
|
||
|
|
||
|
The Autotest host object representing the remote DUT, passed to this
|
||
|
class on initialization, can be accessed from its _client property.
|
||
|
|
||
|
"""
|
||
|
def __init__(self, remote_facade_proxy):
|
||
|
"""Construct an AudioFacadeRemoteAdapter.
|
||
|
|
||
|
@param remote_facade_proxy: RemoteFacadeProxy object.
|
||
|
|
||
|
"""
|
||
|
self._proxy = remote_facade_proxy
|
||
|
|
||
|
|
||
|
@property
|
||
|
def _usb_proxy(self):
|
||
|
"""Gets the proxy to DUT USB facade.
|
||
|
|
||
|
@return XML RPC proxy to DUT USB facade.
|
||
|
|
||
|
"""
|
||
|
return self._proxy.usb
|
||
|
|
||
|
|
||
|
def plug(self):
|
||
|
"""Plugs the USB device into the host."""
|
||
|
self._usb_proxy.plug()
|
||
|
|
||
|
|
||
|
def unplug(self):
|
||
|
"""Unplugs the USB device from the host."""
|
||
|
self._usb_proxy.unplug()
|