from .....Internal.Core import Core
from .....Internal.CommandsGroup import CommandsGroup
from .....Internal import Conversions
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class PpstCls:
"""
| Commands in total: 2
| Subgroups: 0
| Direct child commands: 2
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("ppst", core, parent)
[docs]
def get_enabled(self) -> bool:
"""
``[SOURce<HW>]:BB:DME:PPST:ENABled`` \n
Snippet: ``value: bool = driver.source.bb.dme.ppst.get_enabled()`` \n
Enables the pulse pair spacing tolerance. If this function is not enabled, the response is sent after the first pulse,
without checking whether the second pulse is within the pulse pair spacing tolerance time. You can set the pulse pair
spacing tolerance with method ``RsSmbv.source.bb.dme.ppst.value()`` .
:return: toler_enabled: 1 | ON | 0| OFF
"""
response = self._core.io.query_str('SOURce<HwInstance>:BB:DME:PPST:ENABled?')
return Conversions.str_to_bool(response)
[docs]
def set_enabled(self, toler_enabled: bool) -> None:
"""
``[SOURce<HW>]:BB:DME:PPST:ENABled`` \n
Snippet: ``driver.source.bb.dme.ppst.set_enabled(toler_enabled = False)`` \n
Enables the pulse pair spacing tolerance. If this function is not enabled, the response is sent after the first pulse,
without checking whether the second pulse is within the pulse pair spacing tolerance time. You can set the pulse pair
spacing tolerance with method ``RsSmbv.source.bb.dme.ppst.value()`` .
:param toler_enabled: 1 | ON | 0| OFF
"""
param = Conversions.bool_to_str(toler_enabled)
self._core.io.write(f'SOURce<HwInstance>:BB:DME:PPST:ENABled {param}')
[docs]
def get_value(self) -> float:
"""
``[SOURce<HW>]:[BB]:DME:PPST`` \n
Snippet: ``value: float = driver.source.bb.dme.ppst.get_value()`` \n
Sets the pulse pair spacing tolerance. You have to enable the pulse pair spacing tolerance with the method
``RsSmbv.source.bb.dme.pps()`` for this value to be considered.
:return: spac_tolerance: float Range: 0 to (200E-6) /2
"""
response = self._core.io.query_str('SOURce<HwInstance>:BB:DME:PPST?')
return Conversions.str_to_float(response)
[docs]
def set_value(self, spac_tolerance: float) -> None:
"""
``[SOURce<HW>]:[BB]:DME:PPST`` \n
Snippet: ``driver.source.bb.dme.ppst.set_value(spac_tolerance = 1.0)`` \n
Sets the pulse pair spacing tolerance. You have to enable the pulse pair spacing tolerance with the method
``RsSmbv.source.bb.dme.pps()`` for this value to be considered.
:param spac_tolerance: float Range: 0 to (200E-6) /2
"""
param = Conversions.decimal_value_to_str(spac_tolerance)
self._core.io.write(f'SOURce<HwInstance>:BB:DME:PPST {param}')