from ....Internal.Core import Core
from ....Internal.CommandsGroup import CommandsGroup
from ....Internal import Conversions
from .... import enums
from .... import repcap
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class PrSingleCls:
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("prSingle", core, parent)
[docs]
def set(self, preset_sg_end: enums.BusFlxrayPreset, bus=repcap.Bus.Default) -> None:
"""
``BUS<*>:FLXRay:PRSingle`` \n
Snippet: ``driver.bus.flxRay.prSingle.set(preset_sg_end = enums.BusFlxrayPreset.MANual, bus = repcap.Bus.Default)`` \n
Selects a default threshold voltage if method ``RsRtx.bus.flxRay.srcType.set()`` is set to SINGle.
:param preset_sg_end: MV150 | MV200 | MV250 | MV300 | MANual \n
- MV150 | MV200 | MV250 | MV300: 2.5 ± 0.15 V; 2.5 ± 0.2 V; 2.5 ± 0.25 V; 2.5 ± 0.3 V, respectively
- MANual: Manual setting of user-defined values with BUSb:FLXRay:THResholdn.
:param bus: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Bus')
"""
param = Conversions.enum_scalar_to_str(preset_sg_end, enums.BusFlxrayPreset)
bus_cmd_val = self._cmd_group.get_repcap_cmd_value(bus, repcap.Bus)
self._core.io.write(f'BUS{bus_cmd_val}:FLXRay:PRSingle {param}')
# noinspection PyTypeChecker
[docs]
def get(self, bus=repcap.Bus.Default) -> enums.BusFlxrayPreset:
"""
``BUS<*>:FLXRay:PRSingle`` \n
Snippet: ``value: enums.BusFlxrayPreset = driver.bus.flxRay.prSingle.get(bus = repcap.Bus.Default)`` \n
Selects a default threshold voltage if method ``RsRtx.bus.flxRay.srcType.set()`` is set to SINGle.
:param bus: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Bus')
"""
bus_cmd_val = self._cmd_group.get_repcap_cmd_value(bus, repcap.Bus)
response = self._core.io.query_str(f'BUS{bus_cmd_val}:FLXRay:PRSingle?')
return Conversions.str_to_scalar_enum(response, enums.BusFlxrayPreset)