C# 클래스 SharpAdbClient.AdbClient

Implements the IAdbClient interface, and allows you to interact with the adb server and devices that are connected to that adb server.

For example, to fetch a list of all devices that are currently connected to this PC, you can call the GetDevices method.

To run a command on a device, you can use the ExecuteRemoteCommand(string, DeviceData, IShellOutputReceiver, CancellationToken, int) method.

상속: IAdbClient
파일 보기 프로젝트 열기: ArduPilot/MissionPlanner 1 사용 예제들

공개 메소드들

메소드 설명
AdbClient ( EndPoint endPoint ) : SharpAdbClient.Exceptions

Initializes a new instance of the AdbClient class.

Connect ( DnsEndPoint endpoint ) : string
CreateAdbForwardRequest ( string address, int port ) : byte[]

Creates the adb forward request.

CreateForward ( DeviceData device, ForwardSpec local, ForwardSpec remote, bool allowRebind ) : void
CreateForward ( DeviceData device, string local, string remote, bool allowRebind ) : void
ExecuteRemoteCommand ( string command, DeviceData device, IShellOutputReceiver receiver, CancellationToken cancellationToken, int maxTimeToOutputResponse ) : void
FormAdbRequest ( string req ) : byte[]

Create an ASCII string preceded by four hex digits. The opening "####" is the length of the rest of the string, encoded as ASCII hex(case doesn't matter).

GetAdbVersion ( ) : int
GetDevices ( ) : List
KillAdb ( ) : void
ListForward ( DeviceData device ) : IEnumerable
Reboot ( string into, DeviceData device ) : void
RemoveAllForwards ( DeviceData device ) : void
RemoveForward ( DeviceData device, int localPort ) : void
RunLogService ( DeviceData device ) : IEnumerable
SetDevice ( IAdbSocket socket, DeviceData device ) : void

보호된 메소드들

메소드 설명
EnsureDevice ( DeviceData device ) : void

Throws an ArgumentNullException if the device parameter is , and a ArgumentOutOfRangeException if device does not have a valid serial number.

메소드 상세

AdbClient() 공개 메소드

Initializes a new instance of the AdbClient class.
public AdbClient ( EndPoint endPoint ) : SharpAdbClient.Exceptions
endPoint System.Net.EndPoint /// The at which the adb server is listening. ///
리턴 SharpAdbClient.Exceptions

Connect() 공개 메소드

public Connect ( DnsEndPoint endpoint ) : string
endpoint System.Net.DnsEndPoint
리턴 string

CreateAdbForwardRequest() 공개 정적인 메소드

Creates the adb forward request.
public static CreateAdbForwardRequest ( string address, int port ) : byte[]
address string The address.
port int The port.
리턴 byte[]

CreateForward() 공개 메소드

public CreateForward ( DeviceData device, ForwardSpec local, ForwardSpec remote, bool allowRebind ) : void
device DeviceData
local ForwardSpec
remote ForwardSpec
allowRebind bool
리턴 void

CreateForward() 공개 메소드

public CreateForward ( DeviceData device, string local, string remote, bool allowRebind ) : void
device DeviceData
local string
remote string
allowRebind bool
리턴 void

EnsureDevice() 보호된 메소드

Throws an ArgumentNullException if the device parameter is , and a ArgumentOutOfRangeException if device does not have a valid serial number.
protected EnsureDevice ( DeviceData device ) : void
device DeviceData /// A object to validate. ///
리턴 void

ExecuteRemoteCommand() 공개 메소드

public ExecuteRemoteCommand ( string command, DeviceData device, IShellOutputReceiver receiver, CancellationToken cancellationToken, int maxTimeToOutputResponse ) : void
command string
device DeviceData
receiver IShellOutputReceiver
cancellationToken System.Threading.CancellationToken
maxTimeToOutputResponse int
리턴 void

FormAdbRequest() 공개 정적인 메소드

Create an ASCII string preceded by four hex digits. The opening "####" is the length of the rest of the string, encoded as ASCII hex(case doesn't matter).
public static FormAdbRequest ( string req ) : byte[]
req string The request to form. ///
리턴 byte[]

GetAdbVersion() 공개 메소드

public GetAdbVersion ( ) : int
리턴 int

GetDevices() 공개 메소드

public GetDevices ( ) : List
리턴 List

KillAdb() 공개 메소드

public KillAdb ( ) : void
리턴 void

ListForward() 공개 메소드

public ListForward ( DeviceData device ) : IEnumerable
device DeviceData
리턴 IEnumerable

Reboot() 공개 메소드

public Reboot ( string into, DeviceData device ) : void
into string
device DeviceData
리턴 void

RemoveAllForwards() 공개 메소드

public RemoveAllForwards ( DeviceData device ) : void
device DeviceData
리턴 void

RemoveForward() 공개 메소드

public RemoveForward ( DeviceData device, int localPort ) : void
device DeviceData
localPort int
리턴 void

RunLogService() 공개 메소드

public RunLogService ( DeviceData device ) : IEnumerable
device DeviceData
리턴 IEnumerable

SetDevice() 공개 메소드

public SetDevice ( IAdbSocket socket, DeviceData device ) : void
socket IAdbSocket
device DeviceData
리턴 void