from ....Internal.Core import Core
from ....Internal.CommandsGroup import CommandsGroup
from ....Internal import Conversions
from .... import enums
from .... import repcap
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class LoadCls:
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("load", core, parent)
[docs]
def set(self, load: enums.WgenOutputLoad, wgenerator=repcap.Wgenerator.Default) -> None:
"""
``WGENerator<*>:OUTPut[:LOAD]`` \n
Snippet: ``driver.wgenerator.output.load.set(load = enums.WgenOutputLoad.FIFTy, wgenerator = repcap.Wgenerator.Default)`` \n
Sets the load of the DUT at its connection.
:param load: HIZ: high input impedance
:param wgenerator: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Wgenerator')
"""
param = Conversions.enum_scalar_to_str(load, enums.WgenOutputLoad)
wgenerator_cmd_val = self._cmd_group.get_repcap_cmd_value(wgenerator, repcap.Wgenerator)
self._core.io.write(f'WGENerator{wgenerator_cmd_val}:OUTPut:LOAD {param}')
# noinspection PyTypeChecker
[docs]
def get(self, wgenerator=repcap.Wgenerator.Default) -> enums.WgenOutputLoad:
"""
``WGENerator<*>:OUTPut[:LOAD]`` \n
Snippet: ``value: enums.WgenOutputLoad = driver.wgenerator.output.load.get(wgenerator = repcap.Wgenerator.Default)`` \n
Sets the load of the DUT at its connection.
:param wgenerator: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Wgenerator')
:return: load: HIZ: high input impedance
"""
wgenerator_cmd_val = self._cmd_group.get_repcap_cmd_value(wgenerator, repcap.Wgenerator)
response = self._core.io.query_str(f'WGENerator{wgenerator_cmd_val}:OUTPut:LOAD?')
return Conversions.str_to_scalar_enum(response, enums.WgenOutputLoad)