Class UsbInterface
Definition
- Assembly:
- Tizen.System.Usb.dll
A class to manage the USB interfaces.
public class UsbInterface
- Inheritance
-
objectUsbInterface
Properties
View SourceAlternateSetting
Sets an alternative setting. Use the index of a new alternative setting for a given interface.
Declaration
public int AlternateSetting { set; }
Property Value
Type | Description |
---|---|
int |
Exceptions
Type | Condition |
---|---|
System.NotSupportedException | The required feature is not supported. |
Endpoints
A dictionary for mapping the endpoint IDs to endpoint instances for a given interface.
Declaration
public IReadOnlyDictionary<int, UsbEndpoint> Endpoints { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyDictionary<TKey, TValue><int, UsbEndpoint> |
Exceptions
Type | Condition |
---|---|
System.NotSupportedException | The required feature is not supported. |
Id
Gets the number of a given interface.
Declaration
public int Id { get; }
Property Value
Type | Description |
---|---|
int |
Exceptions
Type | Condition |
---|---|
System.NotSupportedException | The required feature is not supported. |
InterfaceString
Gets the string describing an interface.
Declaration
public string InterfaceString { get; }
Property Value
Type | Description |
---|---|
string |
Exceptions
Type | Condition |
---|---|
System.NotSupportedException | The required feature is not supported. |
System.InvalidOperationException | Throws exception if the device is disconnected or not opened for operation. |
Methods
View SourceClaim(bool)
Claims the interface on a device. The interface must be claimed first to perform I/O operations.
Declaration
public void Claim(bool force)
Parameters
Type | Name | Description |
---|---|---|
bool | force | Set to |
Exceptions
Type | Condition |
---|---|
System.NotSupportedException | The required feature is not supported. |
System.InvalidOperationException | Throws an exception if device is disconnected or not opened for operation or another program or driver has claimed the interface. |
Release()
Releases the previously claimed interface.
Declaration
public void Release()
Exceptions
Type | Condition |
---|---|
System.NotSupportedException | The required feature is not supported. |
System.InvalidOperationException | Throws exception if the device is disconnected or not opened for operation. |
System.UnauthorizedAccessException | Throws exception if user has insufficient permission on the device. |