USBPM_CONNECTOR_STATE structure (usbpmapi.h)

Describes the state of a connector. This structure is used in the UsbPm_RetrieveConnectorState call. The client driver must initialize this structure by calling USBPM_CONNECTOR_STATE_INIT.

Syntax

typedef struct _USBPM_CONNECTOR_STATE {
  USBPM_CONNECTOR             ConnectorHandle;
  ULONG                       ChangeToken;
  BOOLEAN                     Attached;
  ULONG                       AttachCount;
  USBC_PARTNER                Partner;
  USBC_CURRENT                CurrentAdvertisement;
  USBC_PD_CONN_STATE          PdConnState;
  USBC_PD_REQUEST_DATA_OBJECT Rdo;
  USBC_DATA_ROLE              DataRole;
  USBC_POWER_ROLE             PowerRole;
  UINT8                       SourceCapsCount;
  USBC_PD_POWER_DATA_OBJECT   SourceCaps[USBPM_MAX_CAPS_COUNT];
  UINT8                       SinkCapsCount;
  USBC_PD_POWER_DATA_OBJECT   SinkCaps[USBPM_MAX_CAPS_COUNT];
  UINT8                       PartnerSourceCapsCount;
  USBC_PD_POWER_DATA_OBJECT   PartnerSourceCaps[USBPM_MAX_CAPS_COUNT];
  ULONG                       PdAlternateModesEnteredCount;
} USBPM_CONNECTOR_STATE, *PUSBPM_CONNECTOR_STATE;

Members

ConnectorHandle

A handle to this connector.

ChangeToken

The change token number of this state. This value is changed for every connector state change.

Attached

Indicates whether this connector is attached.

AttachCount

Indicates the number of attached events that have occurred on this connector. If client driver sees the transition from one “Attached” state to another “Attached” state but with different “AttachCount”, it indicates two attaches and with two different port partners.

Partner

The type of the port partner, defined in the USBC_PARTNER enumeration.

CurrentAdvertisement

The amount of Type-C current advertised.

PdConnState

Indicates the PD contract state over the connection on this connector.

Rdo

The PD Request Data Object that has sent to the port partner of this connector. See USBC_PD_REQUEST_DATA_OBJECT.

DataRole

Indicates the USB Type-C data role of the connector, defined in the USBC_DATA_ROLE enumeration.

PowerRole

Indicates the USB Type-C power role of the connector, defined in the USBC_POWER_ROLE enumeration.

SourceCapsCount

The number of power data objects in the source caps array.

SourceCaps[USBPM_MAX_CAPS_COUNT]

The source capabilities of the connector. See USBC_PD_POWER_DATA_OBJECT.

SinkCapsCount

The number of power data objects in the corresponding array.

SinkCaps[USBPM_MAX_CAPS_COUNT]

The sink capability of the connector. See USBC_PD_POWER_DATA_OBJECT.

PartnerSourceCapsCount

The number of power data objects in the corresponding array.

PartnerSourceCaps[USBPM_MAX_CAPS_COUNT]

The source capabilities of the port partner in the corresponding array. See USBC_PD_POWER_DATA_OBJECT.

PdAlternateModesEnteredCount

The number of alternate modes entered.

Requirements

Requirement Value
Minimum supported client Windows 10, version 1809
Minimum KMDF version 1.27
Minimum UMDF version 2.27
Header usbpmapi.h