Class UsbDevice

Definition

Namespace:
Tizen.System.Usb
Assembly:
Tizen.System.Usb.dll
API Level:
4

A class to manage the USB host devices. This class contains the operations for enumerating, opening, and closing devices.

C#
Copy
public class UsbDevice : IDisposable
Inheritance
UsbDevice
Implements
System.IDisposable

Properties

View Source

ActiveConfiguration

Active configuration for the device.

Declaration
C#
Copy
public UsbConfiguration ActiveConfiguration { get; }
Property Value
Type Description
UsbConfiguration
Exceptions
Type Condition
System.InvalidOperationException

Throws an exception if the device is disconnected.

API Level: 4
View Source

Address

Address of the device on the bus.

Declaration
C#
Copy
public int Address { get; }
Property Value
Type Description
System.Int32
API Level: 4
View Source

BusId

Number of the bus, this device is connected to.

Declaration
C#
Copy
public int BusId { get; }
Property Value
Type Description
System.Int32
Exceptions
Type Condition
UnauthorizedAccessException

Throws an exception if the user has insufficient permission on the device.

API Level: 4
View Source

Configurations

A dictionary for mapping the configuration IDs to configuration instances for this device.

Declaration
C#
Copy
public IReadOnlyDictionary<int, UsbConfiguration> Configurations { get; }
Property Value
Type Description
IReadOnlyDictionary<System.Int32, UsbConfiguration>
API Level: 4
View Source

ControlEndpoint

Controls an endpoint (endpoint 0).

Declaration
C#
Copy
public UsbControlEndpoint ControlEndpoint { get; }
Property Value
Type Description
UsbControlEndpoint
API Level: 4
View Source

DeviceInformation

Device information such as version, class, subclass, etc.

Declaration
C#
Copy
public UsbDeviceInformation DeviceInformation { get; }
Property Value
Type Description
UsbDeviceInformation
API Level: 4
View Source

IsOpened

Checks if the device is opened.

Declaration
C#
Copy
public bool IsOpened { get; }
Property Value
Type Description
Boolean
API Level: 4
View Source

Ports

List of the available port numbers from the device.

Declaration
C#
Copy
public IEnumerable<int> Ports { get; }
Property Value
Type Description
System.Collections.Generic.IEnumerable<System.Int32>
API Level: 4
View Source

Strings

String associated with the device.

Declaration
C#
Copy
public UsbDeviceStrings Strings { get; }
Property Value
Type Description
UsbDeviceStrings
API Level: 4

Methods

View Source

Close()

Closes the device for operations.

Declaration
C#
Copy
public void Close()
Exceptions
Type Condition
System.InvalidOperationException

Throws an exception if the device is not opened for an operation.

API Level: 4
View Source

Dispose()

Releases all the resources used by the ConnectionProfile. It should be called after it has finished using the object.

Declaration
C#
Copy
public void Dispose()
API Level: 4
View Source

Dispose(Boolean)

Releases all the resources used by the ConnectionProfile. It should be called after it has finished using the object.

Declaration
C#
Copy
protected virtual void Dispose(bool disposing)
Parameters
Type Name Description
Boolean disposing
API Level: 4
View Source

Finalize()

Finalizes an instance of the UsbDevice class.

Declaration
C#
Copy
protected void Finalize()
View Source

Open()

Opens the device, which allows performing operations on it.

Declaration
C#
Copy
public void Open()
Exceptions
Type Condition
OutOfMemoryException

Throws an exception in case of insufficient memory.

System.InvalidOperationException

Throws an exception if the device is disconnected.

UnauthorizedAccessException

Throws an exception if the user has insufficient permission on the device.

API Level: 4

Implements

System.IDisposable