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 SelectCls:
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("select", core, parent)
[docs]
def set(self, signal_n: enums.SignalSource, differential=repcap.Differential.Default) -> None:
"""
``DIFFerential<*>:NSIGnal[:SELect]`` \n
Snippet: ``driver.differential.nsignal.select.set(signal_n = enums.SignalSource.AJ1, differential = repcap.Differential.Default)`` \n
Select the analog input channel of the positive and negative signal. Using the same input channel for both differential
signals is not possible.
:param signal_n: C1W1 | C2W1 | C3W1 | C4W1
:param differential: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Differential')
"""
param = Conversions.enum_scalar_to_str(signal_n, enums.SignalSource)
differential_cmd_val = self._cmd_group.get_repcap_cmd_value(differential, repcap.Differential)
self._core.io.write_with_opc(f'DIFFerential{differential_cmd_val}:NSIGnal:SELect {param}')
# noinspection PyTypeChecker
[docs]
def get(self, differential=repcap.Differential.Default) -> enums.SignalSource:
"""
``DIFFerential<*>:NSIGnal[:SELect]`` \n
Snippet: ``value: enums.SignalSource = driver.differential.nsignal.select.get(differential = repcap.Differential.Default)`` \n
Select the analog input channel of the positive and negative signal. Using the same input channel for both differential
signals is not possible.
:param differential: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Differential')
"""
differential_cmd_val = self._cmd_group.get_repcap_cmd_value(differential, repcap.Differential)
response = self._core.io.query_str_with_opc(f'DIFFerential{differential_cmd_val}:NSIGnal:SELect?')
return Conversions.str_to_scalar_enum(response, enums.SignalSource)