UsbConfigurationDescriptor UsbConfigurationDescriptor UsbConfigurationDescriptor Class

Definition

Derives information from the first 9 bytes of a USB configuration descriptor. The information includes the power capabilities of the device when the configuration is active and the number of interfaces included in that configuration. For an explanation of a configuration descriptor, Section 9.6.3 Universal Serial Bus Specification. For information about descriptor fields, see:

  • Table 9.15 in the Universal Serial Bus 3.0 Specification
  • Table 9.10 in the Universal Serial Bus Specification (version 2.0)
public sealed class UsbConfigurationDescriptor : IUsbConfigurationDescriptorpublic sealed class UsbConfigurationDescriptor : IUsbConfigurationDescriptorPublic NotInheritable Class UsbConfigurationDescriptor Implements IUsbConfigurationDescriptor
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Remarks

A USB device exposes its capabilities in the form of a USB configuration. A USB configuration is described in a configuration descriptor that the UsbConfigurationDescriptor class represents. For information about the descriptor, see USB configuration descriptors.

Properties

ConfigurationValue ConfigurationValue ConfigurationValue

Gets the bConfigurationValue field of a USB configuration descriptor. The value is the number that identifies the configuration.

public byte ConfigurationValue { get; }public byte ConfigurationValue { get; }Public ReadOnly Property ConfigurationValue As byte
Value
byte byte byte

The number that identifies the configuration.

Attributes

MaxPowerMilliamps MaxPowerMilliamps MaxPowerMilliamps

Gets the bMaxPower field of a USB configuration descriptor. The value indicates the maximum power (in milliamp units) that the device can draw from the bus, when the device is bus-powered.

public uint MaxPowerMilliamps { get; }public uint MaxPowerMilliamps { get; }Public ReadOnly Property MaxPowerMilliamps As uint
Value
uint uint uint

The maximum power (in milliamp units) that the device can draw from the bus.

Attributes

RemoteWakeup RemoteWakeup RemoteWakeup

Gets the D5 bit value of the bmAttributes field in the USB configuration descriptor. The value indicates whether the device can send a resume signal to wake up itself or the host system from a low power state.

public bool RemoteWakeup { get; }public bool RemoteWakeup { get; }Public ReadOnly Property RemoteWakeup As bool
Value
bool bool bool

True, if the device supports remote wakeup; otherwise false.

Attributes

SelfPowered SelfPowered SelfPowered

Gets the D6 bit of the bmAttributes field in the USB configuration. This value indicates whether the device is drawing power from a local source or the bus.

public bool SelfPowered { get; }public bool SelfPowered { get; }Public ReadOnly Property SelfPowered As bool
Value
bool bool bool

True, if the device is drawing power from a local source; false indicates that the device is only drawing power from the bus.

Attributes

Remarks

If SelfPowered is true, the device is drawing power from a local source, and also some power from the bus. Get the MaxPowerMilliamps property value to determine the amount of power the device is drawing from the bus.

Methods

Parse(UsbDescriptor) Parse(UsbDescriptor) Parse(UsbDescriptor)

Parses the specified USB descriptor and returns fields of a USB configuration descriptor.

public static UsbConfigurationDescriptor Parse(UsbDescriptor descriptor)public static UsbConfigurationDescriptor Parse(UsbDescriptor descriptor)Public Static Function Parse(descriptor As UsbDescriptor) As UsbConfigurationDescriptor
Parameters
descriptor
UsbDescriptor UsbDescriptor UsbDescriptor

A UsbDescriptor object that contains first 9 bytes of the USB configuration descriptor.

Returns

A UsbConfigurationDescriptor object that contains fields of a USB configuration descriptor.

Attributes

TryParse(UsbDescriptor, UsbConfigurationDescriptor) TryParse(UsbDescriptor, UsbConfigurationDescriptor) TryParse(UsbDescriptor, UsbConfigurationDescriptor)

Retrieves the first 9 bytes of a USB configuration descriptor in a UsbConfigurationDescriptor object that is contained in a UsbDescriptor object.

public static bool TryParse(UsbDescriptor descriptor, UsbConfigurationDescriptor parsed)public static bool TryParse(UsbDescriptor descriptor, UsbConfigurationDescriptor parsed)Public Static Function TryParse(descriptor As UsbDescriptor, parsed As UsbConfigurationDescriptor) As bool
Parameters
descriptor
UsbDescriptor UsbDescriptor UsbDescriptor

The UsbDescriptor object to parse.

Returns
bool bool bool

True, if a UsbConfigurationDescriptor object was found in the specified UsbDescriptor object. Otherwise, false.

Attributes

See Also