from ......Internal.Core import Core
from ......Internal.CommandsGroup import CommandsGroup
from ......Internal import Conversions
from ......Internal.Utilities import trim_str_response
from ...... import enums
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class EstreamingCls:
"""
| Commands in total: 19
| Subgroups: 3
| Direct child commands: 2
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("estreaming", core, parent)
@property
def stream(self):
"""
| Commands in total: 8
| Subgroups: 8
| Direct child commands: 0
"""
if not hasattr(self, '_stream'):
from .Stream import StreamCls
self._stream = StreamCls(self._core, self._cmd_group)
return self._stream
@property
def waveform(self):
"""
| Commands in total: 2
| Subgroups: 1
| Direct child commands: 1
"""
if not hasattr(self, '_waveform'):
from .Waveform import WaveformCls
self._waveform = WaveformCls(self._core, self._cmd_group)
return self._waveform
@property
def sequencer(self):
"""
| Commands in total: 7
| Subgroups: 1
| Direct child commands: 0
"""
if not hasattr(self, '_sequencer'):
from .Sequencer import SequencerCls
self._sequencer = SequencerCls(self._core, self._cmd_group)
return self._sequencer
# noinspection PyTypeChecker
[docs]
def get_omode(self) -> enums.ExtSeqEthOper:
"""
``[SOURce<HW>]:BB:ESEQuencer:ESTReaming:OMODe`` \n
Snippet: ``value: enums.ExtSeqEthOper = driver.source.bb.esequencer.estreaming.get_omode()`` \n
Sets the operation mode.
:return: operation_mode: TOA | INSTant TOA Mode for streaming ODWs with a time-of-arrival timestamp. INSTant Mode for streaming ODWs without a time-of-arrival timestamp.
"""
response = self._core.io.query_str('SOURce<HwInstance>:BB:ESEQuencer:ESTReaming:OMODe?')
return Conversions.str_to_scalar_enum(response, enums.ExtSeqEthOper)
[docs]
def set_omode(self, operation_mode: enums.ExtSeqEthOper) -> None:
"""
``[SOURce<HW>]:BB:ESEQuencer:ESTReaming:OMODe`` \n
Snippet: ``driver.source.bb.esequencer.estreaming.set_omode(operation_mode = enums.ExtSeqEthOper.INSTant)`` \n
Sets the operation mode.
:param operation_mode: TOA | INSTant TOA Mode for streaming ODWs with a time-of-arrival timestamp. INSTant Mode for streaming ODWs without a time-of-arrival timestamp.
"""
param = Conversions.enum_scalar_to_str(operation_mode, enums.ExtSeqEthOper)
self._core.io.write(f'SOURce<HwInstance>:BB:ESEQuencer:ESTReaming:OMODe {param}')
[docs]
def get_status(self) -> str:
"""
``[SOURce<HW>]:BB:ESEQuencer:ESTReaming:STATus`` \n
Snippet: ``value: str = driver.source.bb.esequencer.estreaming.get_status()`` \n
Queries the streaming status.
:return: streaming_status: string 'Configured' The configuration for I/Q data streaming is completed and ready for streaming. 'Running' The streaming of I/Q data is running. 'Stopped' The streaming of I/Q data is stopped.
"""
response = self._core.io.query_str('SOURce<HwInstance>:BB:ESEQuencer:ESTReaming:STATus?')
return trim_str_response(response)
def clone(self) -> 'EstreamingCls':
"""
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 = EstreamingCls(self._core, self._cmd_group.parent)
self._cmd_group.synchronize_repcaps(new_group)
return new_group