from ....Internal.Core import Core
from ....Internal.CommandsGroup import CommandsGroup
from ....Internal import Conversions
from .... import repcap
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class StateCls:
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("state", core, parent)
[docs]
def set(self, state_signal_p: bool, differential=repcap.Differential.Default) -> None:
"""
``DIFFerential<*>:PSIGnal:STATe`` \n
Snippet: ``driver.differential.psignal.state.set(state_signal_p = False, differential = repcap.Differential.Default)`` \n
The commands enable the output waveforms if deembedding by software is active. In this case, all output waveforms can be
displayed at the same time, and each output is enabled separately.
:param state_signal_p: OFF | ON
:param differential: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Differential')
"""
param = Conversions.bool_to_str(state_signal_p)
differential_cmd_val = self._cmd_group.get_repcap_cmd_value(differential, repcap.Differential)
self._core.io.write_with_opc(f'DIFFerential{differential_cmd_val}:PSIGnal:STATe {param}')
[docs]
def get(self, differential=repcap.Differential.Default) -> bool:
"""
``DIFFerential<*>:PSIGnal:STATe`` \n
Snippet: ``value: bool = driver.differential.psignal.state.get(differential = repcap.Differential.Default)`` \n
The commands enable the output waveforms if deembedding by software is active. In this case, all output waveforms can be
displayed at the same time, and each output is enabled separately.
: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}:PSIGnal:STATe?')
return Conversions.str_to_bool(response)