from ....Internal.Core import Core
from ....Internal.CommandsGroup import CommandsGroup
from ....Internal import Conversions
from .... import repcap
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class BandwidthCls:
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("bandwidth", core, parent)
[docs]
def set(self, bandwidth: float, lane=repcap.Lane.Default) -> None:
"""
``LANE<*>:EMBedding:BANDwidth`` \n
Snippet: ``driver.lane.embedding.bandwidth.set(bandwidth = 1.0, lane = repcap.Lane.Default)`` \n
Sets the maximum bandwidth until which the signal is corrected. This maximum value is the minimum bandwidth value of
probe, probe tip and oscilloscope bandwidth, and can not be higher than the highest frequency in a used S-parameter file.
:param bandwidth: 1E+9 to 16E+9
:param lane: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Lane')
"""
param = Conversions.decimal_value_to_str(bandwidth)
lane_cmd_val = self._cmd_group.get_repcap_cmd_value(lane, repcap.Lane)
self._core.io.write_with_opc(f'LANE{lane_cmd_val}:EMBedding:BANDwidth {param}')
[docs]
def get(self, lane=repcap.Lane.Default) -> float:
"""
``LANE<*>:EMBedding:BANDwidth`` \n
Snippet: ``value: float = driver.lane.embedding.bandwidth.get(lane = repcap.Lane.Default)`` \n
Sets the maximum bandwidth until which the signal is corrected. This maximum value is the minimum bandwidth value of
probe, probe tip and oscilloscope bandwidth, and can not be higher than the highest frequency in a used S-parameter file.
:param lane: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Lane')
:return: bandwidth: 1E+9 to 16E+9
"""
lane_cmd_val = self._cmd_group.get_repcap_cmd_value(lane, repcap.Lane)
response = self._core.io.query_str_with_opc(f'LANE{lane_cmd_val}:EMBedding:BANDwidth?')
return Conversions.str_to_float(response)