Source code for RsSmw.Implementations.Source.Bb.Arbitrary.Waveform
from ......Internal.Core import Core
from ......Internal.CommandsGroup import CommandsGroup
from ......Internal import Conversions
from ......Internal.Utilities import trim_str_response
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class WaveformCls:
"""
| Commands in total: 9
| Subgroups: 2
| Direct child commands: 5
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("waveform", core, parent)
@property
def catalog(self):
"""
| Commands in total: 2
| Subgroups: 0
| Direct child commands: 2
"""
if not hasattr(self, '_catalog'):
from .Catalog import CatalogCls
self._catalog = CatalogCls(self._core, self._cmd_group)
return self._catalog
@property
def hddStreaming(self):
"""
| Commands in total: 2
| Subgroups: 0
| Direct child commands: 2
"""
if not hasattr(self, '_hddStreaming'):
from .HddStreaming import HddStreamingCls
self._hddStreaming = HddStreamingCls(self._core, self._cmd_group)
return self._hddStreaming
[docs]
def delete(self, filename: str) -> None:
"""
``[SOURce<HW>]:BB:ARBitrary:WAVeform:DELete`` \n
Snippet: ``driver.source.bb.arbitrary.waveform.delete(filename = 'abc')`` \n
Deletes the specified waveform file. If the file is not on the default path, the path must be specified at the same time.
The file extension may be omitted. Only files with the file extension wv are deleted.
:param filename: string
"""
param = Conversions.value_to_quoted_str(filename)
self._core.io.write(f'SOURce<HwInstance>:BB:ARBitrary:WAVeform:DELete {param}')
[docs]
def get_free(self) -> int:
"""
``[SOURce<HW>]:BB:ARBitrary:WAVeform:FREE`` \n
Snippet: ``value: int = driver.source.bb.arbitrary.waveform.get_free()`` \n
Queries the free disk space on the default path of the instrument's hard disk.
:return: free: integer Range: 0 to INT_MAX
"""
response = self._core.io.query_str('SOURce<HwInstance>:BB:ARBitrary:WAVeform:FREE?')
return Conversions.str_to_int(response)
[docs]
def get_points(self) -> int:
"""
``[SOURce<HW>]:BB:ARBitrary:WAVeform:POINts`` \n
Snippet: ``value: int = driver.source.bb.arbitrary.waveform.get_points()`` \n
Queries the number of samples (the number of I/Q values pairs) in the selected waveform file.
:return: points: waveform filename Range: 0 to 1000
"""
response = self._core.io.query_str('SOURce<HwInstance>:BB:ARBitrary:WAVeform:POINts?')
return Conversions.str_to_int(response)
[docs]
def get_select(self) -> str:
"""
``[SOURce<HW>]:BB:ARBitrary:WAVeform:SELect`` \n
Snippet: ``value: str = driver.source.bb.arbitrary.waveform.get_select()`` \n
Selects a waveform file in the default directory. You can omit the file extension. For supported file formats, see 'About
ARB file formats'.
:return: filename: string
"""
response = self._core.io.query_str('SOURce<HwInstance>:BB:ARBitrary:WAVeform:SELect?')
return trim_str_response(response)
[docs]
def set_select(self, filename: str) -> None:
"""
``[SOURce<HW>]:BB:ARBitrary:WAVeform:SELect`` \n
Snippet: ``driver.source.bb.arbitrary.waveform.set_select(filename = 'abc')`` \n
Selects a waveform file in the default directory. You can omit the file extension. For supported file formats, see 'About
ARB file formats'.
:param filename: string
"""
param = Conversions.value_to_quoted_str(filename)
self._core.io.write(f'SOURce<HwInstance>:BB:ARBitrary:WAVeform:SELect {param}')
[docs]
def get_tag(self) -> str:
"""
``[SOURce<HW>]:BB:ARBitrary:WAVeform:TAG`` \n
Snippet: ``value: str = driver.source.bb.arbitrary.waveform.get_tag()`` \n
Queries the content of the specified tag of the selected waveform file (see also 'Tags for waveforms, data and control
lists') .
:return: tag: 'comment'| 'copyright'| 'date'| 'lacpfilter'| 'marker name'| 'poweroffset'| 'samples'
"""
response = self._core.io.query_str('SOURce<HwInstance>:BB:ARBitrary:WAVeform:TAG?')
return trim_str_response(response)
def clone(self) -> 'WaveformCls':
"""
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 = WaveformCls(self._core, self._cmd_group.parent)
self._cmd_group.synchronize_repcaps(new_group)
return new_group