# UniTAP.dev.ports.modules.pdc.pdc_capabilities

class PcdCapsStatus:

Class `PcdCapsStatus` contains information about PDC capabilities.

- Get initial device role `initial_role`, type `PdcDeviceRole`.
- Get data device role `data_role`, type `PdcDeviceRole`.
- Get power device role `power_role`, type `PowerRole`.
- Get Cable Control Pull Up `cc_pull_up`, type `CCPullUp`.
- Get current behavior, DRP try mode `behavior`, type `DRPTryMode`.
- Get state of PR Swap `pr_swap`, type `bool`.
- Get state of DR Swap `dr_swap`, type `bool`.
- Get state of FR Swap `fr_swap`, type `bool`.
- Get state of VCONN Swap `vconn_swap`, type `bool`.
- Get state of Debug accessory `debug_accessory`, type `bool`.
- Get state of Audio accessory `audio_accessory`, type `bool`.

PcdCapsStatus(pdc_io: UniTAP.dev.ports.modules.pdc.pdc_io.PDCPortIO)
def initial_role(self) -> UniTAP.dev.ports.modules.pdc.pdc_types.PdcDeviceRole:

Returns current initial role.

###### Returns:

> object of `PdcDeviceRole` type

def data_role(self) -> UniTAP.dev.ports.modules.pdc.pdc_types.PdcDeviceRole:

Returns current data role.

###### Returns:

> object of `PdcDeviceRole` type

def power_role(self) -> UniTAP.dev.ports.modules.pdc.pdc_types.PowerRole:

Returns current power role.

###### Returns:

> object of `PowerRole` type

def cc_pull_up(self) -> UniTAP.dev.ports.modules.pdc.pdc_types.CCPullUp:

Returns current cable control pull up.

###### Returns:

> object of `CCPullUp` type

def behavior(self) -> UniTAP.dev.ports.modules.pdc.pdc_types.DRPTryMode:

Returns current behavior of DPR mode.

###### Returns:

> object of `DRPTryMode` type

def pr_swap(self) -> bool:

Returns current state of PR Swap.

###### Returns:

> object of `bool` type

def dr_swap(self) -> bool:

Returns current state of DR Swap.

###### Returns:

> object of `bool` type

def fr_swap(self) -> bool:

Returns current state of FR Swap.

###### Returns:

> object of `bool` type

def vconn_swap(self) -> bool:

Returns current state of VCONN Swap.

###### Returns:

> object of `bool` type

def debug_accessory(self) -> bool:

Returns current state of Debug accessory.

###### Returns:

> object of `bool` type

def audio_accessory(self) -> bool:

Returns current state of Audio accessory.

###### Returns:

> object of `bool` type

class PcdCapsStatus340(PcdCapsStatus):

Class `PcdCapsStatus340` inherited of class`PcdCapsStatus` allows working with PDC. Class `PcdCapsStatus340` has all the `PcdCapsStatus` functionality.

- Get state of USB 2.0 mode `usb20_mode`, type `bool`.
- Get state of UCd 3.0 mode `usb30_mode`, type `USB3Mode`.

PcdCapsStatus340(pdc_io: UniTAP.dev.ports.modules.pdc.pdc_io.PDCPortIO)
def usb20_mode(self) -> bool:

Returns current state of USB 2.0 mode.

###### Returns:

> object of `bool` type

def usb30_mode(self) -> UniTAP.dev.ports.modules.pdc.pdc_types.USB3Mode:

Returns current state of USB 3.0 mode.

###### Returns:

> object of `USB3Mode` type

##### Inherited Members

PcdCapsStatus
  initial_role
  data_role
  power_role
  cc_pull_up
  behavior
  pr_swap
  dr_swap
  fr_swap
  vconn_swap
  debug_accessory
  audio_accessory

class PdcCapabilities:

Class `PdcCapabilities` allows controlling PDC capabilities.

- Set device initial role `set_initial_role`.
- Enable/Disable PR Swap `enable_pr_swap`.
- Enable/Disable DR Swap `enable_dr_swap`.
- Enable/Disable FR Swap `enable_fr_swap`.
- Enable/Disable VCONN Swap `enable_vconn_swap`.
- Set CC Pull Up `cc_pull_up`.
- Set DPR try mode behavior `try_behavior`.
- Enable/Disable Debug accessory `enable_debug_accessory`.
- Enable/Disable Audio accessory `enable_audio_accessory`.

PdcCapabilities(pdc_io: UniTAP.dev.ports.modules.pdc.pdc_io.PDCPortIO)
status: PcdCapsStatus

Returns current PDC Capabilities status.

###### Returns:

> object of `PcdCapsStatus` type

def set_initial_role(self, role: UniTAP.dev.ports.modules.pdc.pdc_types.PdcDeviceRole ):

Set device initial role.

###### Arguments:

- role (`PdcDeviceRole`)

def enable_pr_swap(self, enable: bool):

Enable/Disable PR Swap.

###### Arguments:

- enable (`bool`)

def enable_dr_swap(self, enable: bool):

Enable/Disable DR Swap.

###### Arguments:

- enable (`bool`)

def enable_fr_swap(self, enable: bool):

Enable/Disable FR Swap.

###### Arguments:

- enable (`bool`)

def enable_vconn_swap(self, enable: bool):

Enable/Disable VCONN Swap.

###### Arguments:

- enable (`bool`)

def cc_pull_up(self, cc_pull_up: UniTAP.dev.ports.modules.pdc.pdc_types.CCPullUp ):

Set Cable Control Pull Up.

###### Arguments:

- cc_pull_up (`CCPullUp`)

def try_behavior(self, behavior: UniTAP.dev.ports.modules.pdc.pdc_types.DRPTryMode ):

Set DRP try mode behavior.

###### Arguments:

- behavior (`DRPTryMode`)

def enable_debug_accessory(self, enable: bool):

Enable/Disable Debug Accessory.

###### Arguments:

- enable (`bool`)

def enable_audio_accessory(self, enable: bool):

Enable/Disable Audio Accessory.

###### Arguments:

- enable (`bool`)

class PdcCapabilities340(PdcCapabilities):

Class `PdcCapabilities340` inherited of class`PdcCapabilities` allows working with PDC. Class `PdcCapabilities340` has all the `PdcCapabilities` functionality.

- Enable/Disable USB 2.0 bypass `usb_2_bypass_function`.
- Enable/Disable USB 3.0 bypass `usb_3_bypass_function`.

PdcCapabilities340(pdc_io: UniTAP.dev.ports.modules.pdc.pdc_io.PDCPortIO)
def usb_2_bypass_function(self, enable: bool):

Enable/Disable USB 2.0 bypass.

###### Arguments:

- enable (`bool`)

def usb_3_bypass_function(self, enable: bool):

Enable/Disable USB 3.0 bypass.

###### Arguments:

- enable (`bool`)

##### Inherited Members

PdcCapabilities
  status
  set_initial_role
  enable_pr_swap
  enable_dr_swap
  enable_fr_swap
  enable_vconn_swap
  cc_pull_up
  try_behavior
  enable_debug_accessory
  enable_audio_accessory