UniTAP.dev.ports.modules.pdc.pdc_power_source
class
PowerSource:
Class PowerSource contains information about PDO's on Source side.
- Get PDO count
pdo_count, typeint. - Set and get PDO list,
set_pdo_list,get_pdo_list, typelistwithPdo. - Set and get PDO by index,
set_pdo_by_index,get_pdo_by_index, typePdo. - Send Source PDO's,
send_pdo. - Save information about PDO's to file,
save_pdo. - Load information about PDO's from file,
load_pdo.
def
get_pdo_list( self, read_from_device: bool = False) -> List[UniTAP.dev.ports.modules.pdc.pdo.Pdo]:
Returns current pdo list.
Arguments:
- read_from_device (
bool)
Returns:
object of
listtype withPdo.
def
get_pdo_by_index(self, index: int, read_from_device: bool = False):
Returns current pdo by index.
Arguments:
- index (
int) - read_from_device (
bool)
Returns:
object of
Pdotype.
def
set_pdo_by_index(self, pdo_object, index: int):
Set new Pdo by index.
Arguments:
- pdo_object ('Pdo')
- index (
int)