UsbControlRequestType
UsbControlRequestType
UsbControlRequestType
UsbControlRequestType
Class
Definition
Provides information about the USB control transfer, the type of control request, whether the data is sent from or to the host, and the recipient of the request in the device.
public : sealed class UsbControlRequestType : IUsbControlRequestTypepublic sealed class UsbControlRequestType : IUsbControlRequestTypePublic NotInheritable Class UsbControlRequestType Implements IUsbControlRequestType// You can use this class in JavaScript.
- Attributes
| Device family |
Windows 10 (introduced v10.0.10240.0)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v1)
|
Constructors
UsbControlRequestType() UsbControlRequestType() UsbControlRequestType() UsbControlRequestType()
Creates a UsbControlRequestType object.
public : UsbControlRequestType()public UsbControlRequestType()Public Sub New()// You can use this method in JavaScript.
Properties
AsByte AsByte AsByte AsByte
Gets or sets the bmRequestType value as a byte.
public : byte AsByte { get; set; }public byte AsByte { get; set; }Public ReadWrite Property AsByte As byte// You can use this property in JavaScript.
- Value
- byte byte byte byte
The entire bmRequestType value in a byte.
Remarks
If the hardware specification for the device defines the bmRequestType field value to be sent as a byte, you can use the AsByte property. Otherwise, you must individually get or set bmRequestType values, such as direction, type, and recipient by using ControlTransferType, Direction, and Recipient properties, respectively.
ControlTransferType ControlTransferType ControlTransferType ControlTransferType
Gets or sets the type of USB control transfer: standard, class, or vendor.
public : UsbControlTransferType ControlTransferType { get; set; }public UsbControlTransferType ControlTransferType { get; set; }Public ReadWrite Property ControlTransferType As UsbControlTransferType// You can use this property in JavaScript.
The type of USB control transfer: standard, class, or vendor.
Direction Direction Direction Direction
Gets or sets the direction of the USB control transfer.
public : UsbTransferDirection Direction { get; set; }public UsbTransferDirection Direction { get; set; }Public ReadWrite Property Direction As UsbTransferDirection// You can use this property in JavaScript.
The direction of the USB control transfer.
Recipient Recipient Recipient Recipient
Gets or sets the recipient of the USB control transfer.
public : UsbControlRecipient Recipient { get; set; }public UsbControlRecipient Recipient { get; set; }Public ReadWrite Property Recipient As UsbControlRecipient// You can use this property in JavaScript.
The recipient of the USB control transfer.
Remarks
If the recipient is the first interface of the active configuration (DefaultInterface ), SendControlInTransferAsync and SendControlOutTransferAsync methods overwrite the low byte of UsbSetupPacket.Index with the interface number of the default interface.