from .....Internal.Core import Core
from .....Internal.CommandsGroup import CommandsGroup
from .....Internal import Conversions
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class EgateCls:
"""
| Commands in total: 16
| Subgroups: 8
| Direct child commands: 1
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("egate", core, parent)
@property
def typePy(self):
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
if not hasattr(self, '_typePy'):
from .TypePy import TypePyCls
self._typePy = TypePyCls(self._core, self._cmd_group)
return self._typePy
@property
def polarity(self):
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
if not hasattr(self, '_polarity'):
from .Polarity import PolarityCls
self._polarity = PolarityCls(self._core, self._cmd_group)
return self._polarity
@property
def holdoff(self):
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
if not hasattr(self, '_holdoff'):
from .Holdoff import HoldoffCls
self._holdoff = HoldoffCls(self._core, self._cmd_group)
return self._holdoff
@property
def length(self):
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
if not hasattr(self, '_length'):
from .Length import LengthCls
self._length = LengthCls(self._core, self._cmd_group)
return self._length
@property
def source(self):
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
if not hasattr(self, '_source'):
from .Source import SourceCls
self._source = SourceCls(self._core, self._cmd_group)
return self._source
@property
def auto(self):
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
if not hasattr(self, '_auto'):
from .Auto import AutoCls
self._auto = AutoCls(self._core, self._cmd_group)
return self._auto
@property
def level(self):
"""
| Commands in total: 4
| Subgroups: 3
| Direct child commands: 1
"""
if not hasattr(self, '_level'):
from .Level import LevelCls
self._level = LevelCls(self._core, self._cmd_group)
return self._level
@property
def trace(self):
"""
| Commands in total: 5
| Subgroups: 5
| Direct child commands: 0
"""
if not hasattr(self, '_trace'):
from .Trace import TraceCls
self._trace = TraceCls(self._core, self._cmd_group)
return self._trace
[docs]
def set(self, state: bool) -> None:
"""
``[SENSe]:SWEep:EGATe`` \n
Snippet: ``driver.sense.sweep.egate.set(state = False)`` \n
Turns gated measurements on and off. For measurements with an external trigger gate, the measured values are recorded as
long as the gate is opened. During a sweep the gate can be opened and closed several times. The synchronization
mechanisms with ``*OPC``, ``*OPC?`` and ``*WAI`` remain completely unaffected. The measurement ends when a particular
number of measurement points has been recorded. (See method ``RsFsw.sense.sweep.window.points.set()`` ) . Performing
gated measurements turns the squelch off.
:param state: ON | OFF | 0 | 1 OFF | 0 Switches the function off ON | 1 Switches the function on
"""
param = Conversions.bool_to_str(state)
self._core.io.write(f'SENSe:SWEep:EGATe {param}')
[docs]
def get(self) -> bool:
"""
``[SENSe]:SWEep:EGATe`` \n
Snippet: ``value: bool = driver.sense.sweep.egate.get()`` \n
Turns gated measurements on and off. For measurements with an external trigger gate, the measured values are recorded as
long as the gate is opened. During a sweep the gate can be opened and closed several times. The synchronization
mechanisms with ``*OPC``, ``*OPC?`` and ``*WAI`` remain completely unaffected. The measurement ends when a particular
number of measurement points has been recorded. (See method ``RsFsw.sense.sweep.window.points.set()`` ) . Performing
gated measurements turns the squelch off.
:return: state: ON | OFF | 0 | 1 OFF | 0 Switches the function off ON | 1 Switches the function on
"""
response = self._core.io.query_str(f'SENSe:SWEep:EGATe?')
return Conversions.str_to_bool(response)
def clone(self) -> 'EgateCls':
"""
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 = EgateCls(self._core, self._cmd_group.parent)
self._cmd_group.synchronize_repcaps(new_group)
return new_group