from ...Internal.Core import Core
from ...Internal.CommandsGroup import CommandsGroup
from ...Internal import Conversions
from ... import enums
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class ZvcCls:
"""
| Commands in total: 37
| Subgroups: 1
| Direct child commands: 3
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("zvc", core, parent)
@property
def z(self):
"""
| Commands in total: 34
| Subgroups: 3
| Direct child commands: 0
"""
if not hasattr(self, '_z'):
from .Z import ZCls
self._z = ZCls(self._core, self._cmd_group)
return self._z
# noinspection PyTypeChecker
[docs]
def get_type_py(self) -> enums.DecimationMode:
"""
``ZVC:TYPE`` \n
Snippet: ``value: enums.DecimationMode = driver.zvc.get_type_py()`` \n
Sets the decimation mode for the R&S RT-ZVC probe. Decimation reduces the data stream of the ADC to a stream of waveform
points with lower sample rate and a less precise time resolution.
:return: decimation_mode: SAMPle | PDETect | HRESolution
"""
response = self._core.io.query_str_with_opc('ZVC:TYPE?')
return Conversions.str_to_scalar_enum(response, enums.DecimationMode)
[docs]
def set_type_py(self, decimation_mode: enums.DecimationMode) -> None:
"""
``ZVC:TYPE`` \n
Snippet: ``driver.zvc.set_type_py(decimation_mode = enums.DecimationMode.HRESolution)`` \n
Sets the decimation mode for the R&S RT-ZVC probe. Decimation reduces the data stream of the ADC to a stream of waveform
points with lower sample rate and a less precise time resolution.
:param decimation_mode: SAMPle | PDETect | HRESolution
"""
param = Conversions.enum_scalar_to_str(decimation_mode, enums.DecimationMode)
self._core.io.write_with_opc(f'ZVC:TYPE {param}')
[docs]
def get_res_coupled(self) -> bool:
"""
``ZVC:RESCoupled`` \n
Snippet: ``value: bool = driver.zvc.get_res_coupled()`` \n
Sets the resolution of all R&S RT-ZVC channels.
"""
response = self._core.io.query_str_with_opc('ZVC:RESCoupled?')
return Conversions.str_to_bool(response)
[docs]
def set_res_coupled(self, zui_res_coupled_analog_chs: bool) -> None:
"""
``ZVC:RESCoupled`` \n
Snippet: ``driver.zvc.set_res_coupled(zui_res_coupled_analog_chs = False)`` \n
Sets the resolution of all R&S RT-ZVC channels.
:param zui_res_coupled_analog_chs: OFF | ON \n
- ON: The resolution of the analog channels is applied to R&S RT-ZVC channels. The signal is automatically interpolated or decimated to get the analog resolution.
- OFF: The resolution of R&S RT-ZVC channels is set in a way so that the record length of the waveforms is minimum 1000 samples.
"""
param = Conversions.bool_to_str(zui_res_coupled_analog_chs)
self._core.io.write_with_opc(f'ZVC:RESCoupled {param}')
[docs]
def get_bandwidth(self) -> float:
"""
``ZVC:BANDwidth`` \n
Snippet: ``value: float = driver.zvc.get_bandwidth()`` \n
Sets the bandwidth limit of the probe. The bandwidth specifies the maximum frequency at which a purely sinusoidal signal
is still transferred at 89 % (0.1 dB) of its amplitude.
:return: bandwidth: 5000 to 1E+6
"""
response = self._core.io.query_str_with_opc('ZVC:BANDwidth?')
return Conversions.str_to_float(response)
[docs]
def set_bandwidth(self, bandwidth: float) -> None:
"""
``ZVC:BANDwidth`` \n
Snippet: ``driver.zvc.set_bandwidth(bandwidth = 1.0)`` \n
Sets the bandwidth limit of the probe. The bandwidth specifies the maximum frequency at which a purely sinusoidal signal
is still transferred at 89 % (0.1 dB) of its amplitude.
:param bandwidth: 5000 to 1E+6
"""
param = Conversions.decimal_value_to_str(bandwidth)
self._core.io.write_with_opc(f'ZVC:BANDwidth {param}')
def clone(self) -> 'ZvcCls':
"""
Clones the group by creating new object from it and its whole existing subgroups.
Also copies all the existing default Repeated Capabilities setting,
which you can change independently without affecting the original group.
"""
new_group = ZvcCls(self._core, self._cmd_group.parent)
self._cmd_group.synchronize_repcaps(new_group)
return new_group