UsbConfigurationDescriptor 类

定义

从 USB 配置描述符的前 9 个字节派生信息。 该信息包括配置处于活动状态时设备的电源功能,以及该配置中包含的接口数。 有关配置描述符的说明,请参阅第 9.6.3 节通用串行总线规范。 有关描述符字段的信息,请参阅:

  • 通用串行总线 3.0 规范中的表 9.15
  • 通用串行总线规范 2.0 版 (表 9.10)
public ref class UsbConfigurationDescriptor sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
class UsbConfigurationDescriptor final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
public sealed class UsbConfigurationDescriptor
Public NotInheritable Class UsbConfigurationDescriptor
继承
Object Platform::Object IInspectable UsbConfigurationDescriptor
属性

Windows 要求

设备系列
Windows 10 (在 10.0.10240.0 中引入)
API contract
Windows.Foundation.UniversalApiContract (在 v1.0 中引入)

注解

USB 设备以 USB 配置的形式公开其功能。 UsbConfigurationDescriptor 类表示的配置描述符中描述了 USB 配置。 有关描述符的信息,请参阅 USB 配置描述符

属性

ConfigurationValue

获取 USB 配置描述符的 bConfigurationValue 字段。 该值是标识配置的数字。

MaxPowerMilliamps

获取 USB 配置描述符的 bMaxPower 字段。 该值指示当设备为总线供电时,设备可以从总线中抽取的最大功率 ((以毫安为单位)。) 。

RemoteWakeup

获取 USB 配置描述符中 bmAttributes 字段的 D5 位值。 该值指示设备是否可以发送恢复信号,以将自身或主机系统从低功耗状态唤醒。

SelfPowered

获取 USB 配置中 bmAttributes 字段的 D6 位。 此值指示设备是从本地电源还是从总线供电。

方法

Parse(UsbDescriptor)

分析指定的 USB 描述符并返回 USB 配置描述符的字段。

TryParse(UsbDescriptor, UsbConfigurationDescriptor)

检索 UsbDescriptor 对象中包含的 UsbConfigurationDescriptor 对象中的 USB 配置描述符的前 9 个字节。

适用于

另请参阅