from ...Internal.Core import Core
from ...Internal.CommandsGroup import CommandsGroup
from ...Internal import Conversions
from ... import repcap
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class RealtimeCls:
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("realtime", core, parent)
[docs]
def set(self, is_real_time: bool, deembedding=repcap.Deembedding.Default) -> None:
"""
``DEEMbedding<*>:REALtime`` \n
Snippet: ``driver.deembedding.realtime.set(is_real_time = False, deembedding = repcap.Deembedding.Default)`` \n
Requires realtime extension option R&S RTP-K122. If ON, the deembedding calculation is done by the hardware in real time.
You can trigger on the corrected signal, and the acquisition rate remains unchanged. If OFF, the deembedding calculation
is done by software. This method is slower, therefore, triggering on the corrected signal is not possible.
:param is_real_time: OFF | ON
:param deembedding: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Deembedding')
"""
param = Conversions.bool_to_str(is_real_time)
deembedding_cmd_val = self._cmd_group.get_repcap_cmd_value(deembedding, repcap.Deembedding)
self._core.io.write_with_opc(f'DEEMbedding{deembedding_cmd_val}:REALtime {param}')
[docs]
def get(self, deembedding=repcap.Deembedding.Default) -> bool:
"""
``DEEMbedding<*>:REALtime`` \n
Snippet: ``value: bool = driver.deembedding.realtime.get(deembedding = repcap.Deembedding.Default)`` \n
Requires realtime extension option R&S RTP-K122. If ON, the deembedding calculation is done by the hardware in real time.
You can trigger on the corrected signal, and the acquisition rate remains unchanged. If OFF, the deembedding calculation
is done by software. This method is slower, therefore, triggering on the corrected signal is not possible.
:param deembedding: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Deembedding')
:return: is_real_time: OFF | ON
"""
deembedding_cmd_val = self._cmd_group.get_repcap_cmd_value(deembedding, repcap.Deembedding)
response = self._core.io.query_str_with_opc(f'DEEMbedding{deembedding_cmd_val}:REALtime?')
return Conversions.str_to_bool(response)