# UniTAP.dev.ports.modules.pdc.pdc_controls

class PdcControlsBase:

Class `PdcControlsBase` allows controlling some PDC commands:

- Send PR Swap `send_pr_swap`.
- Send DR Swap `send_dr_swap`.
- Send FR Swap `send_fr_swap`.
- Send VCONN Swap `send_vconn_swap`.
- Change cable control orientation `orientation`.
- Attach/DeAttach `attach`.
- Enable/Disable auto negotiate power contract `enable_auto_negotiate_power_contract`.
- Enable/Disable communication capable as PD Sink `communication_capable_as_pd_sink`.
- Enable/Disable communication capable as PD Source `communication_capable_as_pd_source`.

PdcControlsBase(pdc_io: UniTAP.dev.ports.modules.pdc.pdc_io.PDCPortIO)
def send_pr_swap(self):

Send Power Role swap. It will be necessary to manually check that the changes have been made.

def send_dr_swap(self):

Send Dual Role swap. It will be necessary to manually check that the changes have been made.

def send_fr_swap(self):

Send Fast Role swap. It will be necessary to manually check that the changes have been made.

def send_vconn_swap(self):

Send VCONN Role swap. It will be necessary to manually check that the changes have been made.

orientation: Optional[UniTAP.dev.ports.modules.pdc.pdc_types.CableControlOrientation]

Change cable control orientation.

###### Arguments:

- orientation (`CableControlOrientation`)

def enable_auto_negotiate_power_contract(self, enable: bool):

Enable/Disable auto negotiate power contract.

###### Arguments:

- enable (`bool`)

def communication_capable_as_pd_sink(self, capable: bool):

Enable/Disable communication capable as PD Sink.

###### Arguments:

- capable (`bool`)

def communication_capable_as_pd_source(self, capable: bool):

Enable/Disable communication capable as PD Source.

###### Arguments:

- capable (`bool`)

class PdcControls340(PdcControlsBase):

Class `PdcControls340` inherited from class `PdcControlsBase`. Class `PdcControls340` allows controlling additional commands. Also has all the `PdcControlsBase` functionality.

- Reconnect device `reconnect`.
- Reset device `reset`.
- Set ET cable different pairs `et_cable_diff_pairs`.

PdcControls340(pdc_io: UniTAP.dev.ports.modules.pdc.pdc_io.PDCPortIO)
def reset(self):

Reset device.

def attach(self, attach: bool):

Attach/DeAttach device.

def reconnect(self):

Reconnect device.

###### Returns:

> result of reconnection, type `bool`.

def et_cable_diff_pairs( self, differential_pair: UniTAP.dev.ports.modules.pdc.pdc_types.DifferentialPair ):

Set ET cable different pairs.

###### Arguments:

- differential_pair (`DifferentialPair`)

##### Inherited Members

PdcControlsBase
  send_pr_swap
  send_dr_swap
  send_fr_swap
  send_vconn_swap
  orientation
  enable_auto_negotiate_power_contract
  communication_capable_as_pd_sink
  communication_capable_as_pd_source

class PdcControls424(PdcControlsBase):

Class `PdcControls424` inherited from class `PdcControlsBase`. Class `PdcControls424` allows controlling additional commands. Also has all the `PdcControlsBase` functionality.

- Reconnect device `reconnect`.
- Reset device `reset`.

PdcControls424(pdc_io: UniTAP.dev.ports.modules.pdc.pdc_io.PDCPortIO)
def reset(self):

Reset device.

def reconnect(self) -> bool:

Reconnect device.

###### Returns:

> result of reconnection, type `bool`.

##### Inherited Members

PdcControlsBase
  send_pr_swap
  send_dr_swap
  send_fr_swap
  send_vconn_swap
  orientation
  enable_auto_negotiate_power_contract
  communication_capable_as_pd_sink
  communication_capable_as_pd_source

class PdcControls500(PdcControlsBase):

Class `PdcControls500` inherited from class `PdcControlsBase`. Class `PdcControls500` allows controlling additional commands. Also has all the `PdcControlsBase` functionality.

- Reconnect device `reconnect`.
- Enable/Disable internal resistance 10 Ohm `enable_internal_load_10_ohm`.

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

Reconnect device.

###### Returns:

> result of reconnection, type `bool`.

def attach(self, attach: bool):

Attach/DeAttach device.

def enable_internal_load_10_ohm(self, enable: bool):

Enable/Disable internal resistance 10 Ohm.

###### Arguments:

- enable (`bool`)

##### Inherited Members

PdcControlsBase
  send_pr_swap
  send_dr_swap
  send_fr_swap
  send_vconn_swap
  orientation
  enable_auto_negotiate_power_contract
  communication_capable_as_pd_sink
  communication_capable_as_pd_source