from .....Internal.Core import Core
from .....Internal.CommandsGroup import CommandsGroup
from .....Internal import Conversions
from ..... import enums
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class DmCls:
"""
| Commands in total: 112
| Subgroups: 20
| Direct child commands: 8
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("dm", core, parent)
@property
def apsk16(self):
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
if not hasattr(self, '_apsk16'):
from .Apsk16 import Apsk16Cls
self._apsk16 = Apsk16Cls(self._core, self._cmd_group)
return self._apsk16
@property
def apsk32(self):
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
if not hasattr(self, '_apsk32'):
from .Apsk32 import Apsk32Cls
self._apsk32 = Apsk32Cls(self._core, self._cmd_group)
return self._apsk32
@property
def aqPsk(self):
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
if not hasattr(self, '_aqPsk'):
from .AqPsk import AqPskCls
self._aqPsk = AqPskCls(self._core, self._cmd_group)
return self._aqPsk
@property
def ask(self):
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
if not hasattr(self, '_ask'):
from .Ask import AskCls
self._ask = AskCls(self._core, self._cmd_group)
return self._ask
@property
def clist(self):
"""
| Commands in total: 8
| Subgroups: 0
| Direct child commands: 8
"""
if not hasattr(self, '_clist'):
from .Clist import ClistCls
self._clist = ClistCls(self._core, self._cmd_group)
return self._clist
@property
def clock(self):
"""
| Commands in total: 3
| Subgroups: 0
| Direct child commands: 3
"""
if not hasattr(self, '_clock'):
from .Clock import ClockCls
self._clock = ClockCls(self._core, self._cmd_group)
return self._clock
@property
def dlist(self):
"""
| Commands in total: 9
| Subgroups: 1
| Direct child commands: 7
"""
if not hasattr(self, '_dlist'):
from .Dlist import DlistCls
self._dlist = DlistCls(self._core, self._cmd_group)
return self._dlist
@property
def filterPy(self):
"""
| Commands in total: 12
| Subgroups: 1
| Direct child commands: 1
"""
if not hasattr(self, '_filterPy'):
from .FilterPy import FilterPyCls
self._filterPy = FilterPyCls(self._core, self._cmd_group)
return self._filterPy
@property
def flist(self):
"""
| Commands in total: 5
| Subgroups: 0
| Direct child commands: 5
"""
if not hasattr(self, '_flist'):
from .Flist import FlistCls
self._flist = FlistCls(self._core, self._cmd_group)
return self._flist
@property
def fsk(self):
"""
| Commands in total: 3
| Subgroups: 1
| Direct child commands: 1
"""
if not hasattr(self, '_fsk'):
from .Fsk import FskCls
self._fsk = FskCls(self._core, self._cmd_group)
return self._fsk
@property
def mlist(self):
"""
| Commands in total: 5
| Subgroups: 0
| Direct child commands: 5
"""
if not hasattr(self, '_mlist'):
from .Mlist import MlistCls
self._mlist = MlistCls(self._core, self._cmd_group)
return self._mlist
@property
def pattern(self):
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
if not hasattr(self, '_pattern'):
from .Pattern import PatternCls
self._pattern = PatternCls(self._core, self._cmd_group)
return self._pattern
@property
def pramp(self):
"""
| Commands in total: 8
| Subgroups: 1
| Direct child commands: 7
"""
if not hasattr(self, '_pramp'):
from .Pramp import PrampCls
self._pramp = PrampCls(self._core, self._cmd_group)
return self._pramp
@property
def prbs(self):
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
if not hasattr(self, '_prbs'):
from .Prbs import PrbsCls
self._prbs = PrbsCls(self._core, self._cmd_group)
return self._prbs
@property
def setting(self):
"""
| Commands in total: 4
| Subgroups: 0
| Direct child commands: 4
"""
if not hasattr(self, '_setting'):
from .Setting import SettingCls
self._setting = SettingCls(self._core, self._cmd_group)
return self._setting
@property
def smodulation(self):
"""
| Commands in total: 7
| Subgroups: 4
| Direct child commands: 2
"""
if not hasattr(self, '_smodulation'):
from .Smodulation import SmodulationCls
self._smodulation = SmodulationCls(self._core, self._cmd_group)
return self._smodulation
@property
def standard(self):
"""
| Commands in total: 5
| Subgroups: 1
| Direct child commands: 1
"""
if not hasattr(self, '_standard'):
from .Standard import StandardCls
self._standard = StandardCls(self._core, self._cmd_group)
return self._standard
@property
def switching(self):
"""
| Commands in total: 2
| Subgroups: 0
| Direct child commands: 2
"""
if not hasattr(self, '_switching'):
from .Switching import SwitchingCls
self._switching = SwitchingCls(self._core, self._cmd_group)
return self._switching
@property
def trigger(self):
"""
| Commands in total: 26
| Subgroups: 7
| Direct child commands: 4
"""
if not hasattr(self, '_trigger'):
from .Trigger import TriggerCls
self._trigger = TriggerCls(self._core, self._cmd_group)
return self._trigger
@property
def waveform(self):
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
if not hasattr(self, '_waveform'):
from .Waveform import WaveformCls
self._waveform = WaveformCls(self._core, self._cmd_group)
return self._waveform
# noinspection PyTypeChecker
[docs]
def get_coding(self) -> enums.DmCod:
"""
``[SOURce<HW>]:BB:DM:CODing`` \n
Snippet: ``value: enums.DmCod = driver.source.bb.dm.get_coding()`` \n
Selects the modulation coding.
:return: coding: OFF | DIFF | DPHS | DGRay | GRAY | GSM | NADC | PDC | PHS | TETRa | APCO25 | PWT | TFTS | INMarsat | VDL | EDGE | APCO25FSK | ICO | CDMA2000 | WCDMA | APCO258PSK OFF The coding is automatically disabled if the selected modulation type is not possible with the coding that has been set. DPHS Phase Difference DGRay Difference + Gray
"""
response = self._core.io.query_str('SOURce<HwInstance>:BB:DM:CODing?')
return Conversions.str_to_scalar_enum(response, enums.DmCod)
[docs]
def set_coding(self, coding: enums.DmCod) -> None:
"""
``[SOURce<HW>]:BB:DM:CODing`` \n
Snippet: ``driver.source.bb.dm.set_coding(coding = enums.DmCod.APCO25)`` \n
Selects the modulation coding.
:param coding: OFF | DIFF | DPHS | DGRay | GRAY | GSM | NADC | PDC | PHS | TETRa | APCO25 | PWT | TFTS | INMarsat | VDL | EDGE | APCO25FSK | ICO | CDMA2000 | WCDMA | APCO258PSK OFF The coding is automatically disabled if the selected modulation type is not possible with the coding that has been set. DPHS Phase Difference DGRay Difference + Gray
"""
param = Conversions.enum_scalar_to_str(coding, enums.DmCod)
self._core.io.write(f'SOURce<HwInstance>:BB:DM:CODing {param}')
# noinspection PyTypeChecker
[docs]
def get_mdelay(self) -> float:
"""
``[SOURce<HW>]:BB:DM:MDELay`` \n
Snippet: ``value: float = driver.source.bb.dm.get_mdelay()`` \n
No help available
"""
response = self._core.io.query_str('SOURce<HwInstance>:BB:DM:MDELay?')
return Conversions.str_to_float(response)
[docs]
def preset(self) -> None:
"""
``[SOURce<HW>]:BB:DM:PRESet`` \n
Snippet: ``driver.source.bb.dm.preset()`` \n
Sets the default settings for digital modulation (``*RST`` values specified for the commands) . Not affected is the state
set with the following command: SOURce<hw>:BB:DM:STATe
"""
self._core.io.write(f'SOURce<HwInstance>:BB:DM:PRESet')
[docs]
def preset_with_opc(self, opc_timeout_ms: int = -1) -> None:
"""
``[SOURce<HW>]:BB:DM:PRESet`` \n
Snippet: ``driver.source.bb.dm.preset_with_opc()`` \n
Sets the default settings for digital modulation (``*RST`` values specified for the commands) . Not affected is the state
set with the following command: SOURce<hw>:BB:DM:STATe
Same as preset, but waits for the operation to complete before continuing further. Use the RsSmw.utilities.opc_timeout_set() to set the timeout value.
:param opc_timeout_ms: Maximum time to wait in milliseconds, valid only for this call.
"""
self._core.io.write_with_opc(f'SOURce<HwInstance>:BB:DM:PRESet', opc_timeout_ms)
[docs]
def get_slength(self) -> int:
"""
``[SOURce<HW>]:BB:DM:SLENgth`` \n
Snippet: ``value: int = driver.source.bb.dm.get_slength()`` \n
Sets the sequence length of the waveform signal in symbols. The maximum number of symbols depends on the ARB memory and
its installed option. The R&S SMW200A creates an ARB file with this length. The length equals the input sequence in
symbols. It is not the length of the I/Q sequence after an upsampling. The product of the 'Sequence Length' *
'Oversampling' is limited by the maximum number of samples of the selected ARB.
:return: slength: integer Range: 1 to depends on options
"""
response = self._core.io.query_str('SOURce<HwInstance>:BB:DM:SLENgth?')
return Conversions.str_to_int(response)
[docs]
def set_slength(self, slength: int) -> None:
"""
``[SOURce<HW>]:BB:DM:SLENgth`` \n
Snippet: ``driver.source.bb.dm.set_slength(slength = 1)`` \n
Sets the sequence length of the waveform signal in symbols. The maximum number of symbols depends on the ARB memory and
its installed option. The R&S SMW200A creates an ARB file with this length. The length equals the input sequence in
symbols. It is not the length of the I/Q sequence after an upsampling. The product of the 'Sequence Length' *
'Oversampling' is limited by the maximum number of samples of the selected ARB.
:param slength: integer Range: 1 to depends on options
"""
param = Conversions.decimal_value_to_str(slength)
self._core.io.write(f'SOURce<HwInstance>:BB:DM:SLENgth {param}')
# noinspection PyTypeChecker
[docs]
def get_source(self) -> enums.DmDataSourW:
"""
``[SOURce<HW>]:BB:DM:SOURce`` \n
Snippet: ``value: enums.DmDataSourW = driver.source.bb.dm.get_source()`` \n
Selects the data source.
:return: source: ZERO | ONE | PRBS | PATTern | DLISt | SERial A sequence of 0 or 1, a pseudo-random sequence with different length, a pattern, a data list, or external serial data.
"""
response = self._core.io.query_str('SOURce<HwInstance>:BB:DM:SOURce?')
return Conversions.str_to_scalar_enum(response, enums.DmDataSourW)
[docs]
def set_source(self, source: enums.DmDataSourW) -> None:
"""
``[SOURce<HW>]:BB:DM:SOURce`` \n
Snippet: ``driver.source.bb.dm.set_source(source = enums.DmDataSourW.DLISt)`` \n
Selects the data source.
:param source: ZERO | ONE | PRBS | PATTern | DLISt | SERial A sequence of 0 or 1, a pseudo-random sequence with different length, a pattern, a data list, or external serial data.
"""
param = Conversions.enum_scalar_to_str(source, enums.DmDataSourW)
self._core.io.write(f'SOURce<HwInstance>:BB:DM:SOURce {param}')
[docs]
def get_symbol_rate(self) -> float:
"""
``[SOURce<HW>]:BB:DM:SRATe`` \n
Snippet: ``value: float = driver.source.bb.dm.get_symbol_rate()`` \n
Sets the symbol rate in Hz/kHz/MHz or sym/s, ksym/s and Msym/s.
:return: srate: float Range: 50 to depends on options, Unit: Hz or dym/s
"""
response = self._core.io.query_str('SOURce<HwInstance>:BB:DM:SRATe?')
return Conversions.str_to_float(response)
[docs]
def set_symbol_rate(self, srate: float) -> None:
"""
``[SOURce<HW>]:BB:DM:SRATe`` \n
Snippet: ``driver.source.bb.dm.set_symbol_rate(srate = 1.0)`` \n
Sets the symbol rate in Hz/kHz/MHz or sym/s, ksym/s and Msym/s.
:param srate: float Range: 50 to depends on options, Unit: Hz or dym/s
"""
param = Conversions.decimal_value_to_str(srate)
self._core.io.write(f'SOURce<HwInstance>:BB:DM:SRATe {param}')
[docs]
def get_state(self) -> bool:
"""
``[SOURce<HW>]:BB:DM:STATe`` \n
Snippet: ``value: bool = driver.source.bb.dm.get_state()`` \n
Enables digital modulation. Switching on digital modulation turns off all the other digital standards in the same signal
path.
:return: state: 1 | ON | 0| OFF
"""
response = self._core.io.query_str('SOURce<HwInstance>:BB:DM:STATe?')
return Conversions.str_to_bool(response)
[docs]
def set_state(self, state: bool) -> None:
"""
``[SOURce<HW>]:BB:DM:STATe`` \n
Snippet: ``driver.source.bb.dm.set_state(state = False)`` \n
Enables digital modulation. Switching on digital modulation turns off all the other digital standards in the same signal
path.
:param state: 1 | ON | 0| OFF
"""
param = Conversions.bool_to_str(state)
self._core.io.write(f'SOURce<HwInstance>:BB:DM:STATe {param}')
def clone(self) -> 'DmCls':
"""
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 = DmCls(self._core, self._cmd_group.parent)
self._cmd_group.synchronize_repcaps(new_group)
return new_group