from .....Internal.Core import Core
from .....Internal.CommandsGroup import CommandsGroup
from .....Internal import Conversions
from ..... import enums
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class PrachCls:
"""
| Commands in total: 41
| Subgroups: 7
| Direct child commands: 12
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("prach", core, parent)
@property
def rsetting(self):
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
if not hasattr(self, '_rsetting'):
from .Rsetting import RsettingCls
self._rsetting = RsettingCls(self._core, self._cmd_group)
return self._rsetting
@property
def pfOffset(self):
"""
| Commands in total: 2
| Subgroups: 0
| Direct child commands: 2
"""
if not hasattr(self, '_pfOffset'):
from .PfOffset import PfOffsetCls
self._pfOffset = PfOffsetCls(self._core, self._cmd_group)
return self._pfOffset
@property
def sindex(self):
"""
| Commands in total: 2
| Subgroups: 0
| Direct child commands: 2
"""
if not hasattr(self, '_sindex'):
from .Sindex import SindexCls
self._sindex = SindexCls(self._core, self._cmd_group)
return self._sindex
@property
def modulation(self):
"""
| Commands in total: 3
| Subgroups: 1
| Direct child commands: 1
"""
if not hasattr(self, '_modulation'):
from .Modulation import ModulationCls
self._modulation = ModulationCls(self._core, self._cmd_group)
return self._modulation
@property
def scount(self):
"""
| Commands in total: 2
| Subgroups: 0
| Direct child commands: 2
"""
if not hasattr(self, '_scount'):
from .Scount import ScountCls
self._scount = ScountCls(self._core, self._cmd_group)
return self._scount
@property
def result(self):
"""
| Commands in total: 10
| Subgroups: 0
| Direct child commands: 10
"""
if not hasattr(self, '_result'):
from .Result import ResultCls
self._result = ResultCls(self._core, self._cmd_group)
return self._result
@property
def limit(self):
"""
| Commands in total: 9
| Subgroups: 4
| Direct child commands: 1
"""
if not hasattr(self, '_limit'):
from .Limit import LimitCls
self._limit = LimitCls(self._core, self._cmd_group)
return self._limit
[docs]
def get_timeout(self) -> float:
"""
``CONFigure:NRSub:MEASurement<Instance>:PRACh:TOUT`` \n
Snippet: ``value: float = driver.configure.nrSubMeas.prach.get_timeout()`` \n
Defines a timeout for the measurement. The timer is started when the measurement is initiated via a READ or INIT command.
It is not started if the measurement is initiated manually. When the measurement has completed the first measurement
cycle (first single shot) , the statistical depth is reached and the timer is reset. If the first measurement cycle has
not been completed when the timer expires, the measurement is stopped. The measurement state changes to RDY.
The reliability indicator is set to 1, indicating that a measurement timeout occurred. Still running READ, FETCh or
CALCulate commands are completed, returning the available results. At least for some results, there are no values at all
or the statistical depth has not been reached. A timeout of 0 s corresponds to an infinite measurement timeout.
:return: timeout: numeric
"""
response = self._core.io.query_str('CONFigure:NRSub:MEASurement<Instance>:PRACh:TOUT?')
return Conversions.str_to_float(response)
[docs]
def set_timeout(self, timeout: float) -> None:
"""
``CONFigure:NRSub:MEASurement<Instance>:PRACh:TOUT`` \n
Snippet: ``driver.configure.nrSubMeas.prach.set_timeout(timeout = 1.0)`` \n
Defines a timeout for the measurement. The timer is started when the measurement is initiated via a READ or INIT command.
It is not started if the measurement is initiated manually. When the measurement has completed the first measurement
cycle (first single shot) , the statistical depth is reached and the timer is reset. If the first measurement cycle has
not been completed when the timer expires, the measurement is stopped. The measurement state changes to RDY.
The reliability indicator is set to 1, indicating that a measurement timeout occurred. Still running READ, FETCh or
CALCulate commands are completed, returning the available results. At least for some results, there are no values at all
or the statistical depth has not been reached. A timeout of 0 s corresponds to an infinite measurement timeout.
:param timeout: numeric
"""
param = Conversions.decimal_value_to_str(timeout)
self._core.io.write(f'CONFigure:NRSub:MEASurement<Instance>:PRACh:TOUT {param}')
# noinspection PyTypeChecker
[docs]
def get_repetition(self) -> enums.Repeat:
"""
``CONFigure:NRSub:MEASurement<Instance>:PRACh:REPetition`` \n
Snippet: ``value: enums.Repeat = driver.configure.nrSubMeas.prach.get_repetition()`` \n
Specifies the repetition mode of the measurement. The repetition mode specifies whether the measurement is stopped after
a single shot or repeated continuously. Use the CONFigure:...:MEAS<i>:...:SCOunt commands to specify the number of
measurement intervals per single shot.
:return: repetition: SINGleshot: Single-shot measurement CONTinuous: Continuous measurement
"""
response = self._core.io.query_str('CONFigure:NRSub:MEASurement<Instance>:PRACh:REPetition?')
return Conversions.str_to_scalar_enum(response, enums.Repeat)
[docs]
def set_repetition(self, repetition: enums.Repeat) -> None:
"""
``CONFigure:NRSub:MEASurement<Instance>:PRACh:REPetition`` \n
Snippet: ``driver.configure.nrSubMeas.prach.set_repetition(repetition = enums.Repeat.CONTinuous)`` \n
Specifies the repetition mode of the measurement. The repetition mode specifies whether the measurement is stopped after
a single shot or repeated continuously. Use the CONFigure:...:MEAS<i>:...:SCOunt commands to specify the number of
measurement intervals per single shot.
:param repetition: SINGleshot: Single-shot measurement CONTinuous: Continuous measurement
"""
param = Conversions.enum_scalar_to_str(repetition, enums.Repeat)
self._core.io.write(f'CONFigure:NRSub:MEASurement<Instance>:PRACh:REPetition {param}')
# noinspection PyTypeChecker
[docs]
def get_scondition(self) -> enums.StopCondition:
"""
``CONFigure:NRSub:MEASurement<Instance>:PRACh:SCONdition`` \n
Snippet: ``value: enums.StopCondition = driver.configure.nrSubMeas.prach.get_scondition()`` \n
Qualifies whether the measurement is stopped after a failed limit check or continued. With SLFail, the measurement is
stopped and reaches the RDY state when one of the results exceeds the limits.
:return: stop_condition: NONE: Continue measurement irrespective of the limit check. SLFail: Stop measurement on limit failure.
"""
response = self._core.io.query_str('CONFigure:NRSub:MEASurement<Instance>:PRACh:SCONdition?')
return Conversions.str_to_scalar_enum(response, enums.StopCondition)
[docs]
def set_scondition(self, stop_condition: enums.StopCondition) -> None:
"""
``CONFigure:NRSub:MEASurement<Instance>:PRACh:SCONdition`` \n
Snippet: ``driver.configure.nrSubMeas.prach.set_scondition(stop_condition = enums.StopCondition.NONE)`` \n
Qualifies whether the measurement is stopped after a failed limit check or continued. With SLFail, the measurement is
stopped and reaches the RDY state when one of the results exceeds the limits.
:param stop_condition: NONE: Continue measurement irrespective of the limit check. SLFail: Stop measurement on limit failure.
"""
param = Conversions.enum_scalar_to_str(stop_condition, enums.StopCondition)
self._core.io.write(f'CONFigure:NRSub:MEASurement<Instance>:PRACh:SCONdition {param}')
[docs]
def get_mo_exception(self) -> bool:
"""
``CONFigure:NRSub:MEASurement<Instance>:PRACh:MOEXception`` \n
Snippet: ``value: bool = driver.configure.nrSubMeas.prach.get_mo_exception()`` \n
Specifies whether measurement results that the CMP180 identifies as faulty or inaccurate are rejected.
:return: meas_on_exception: OFF: Faulty results are rejected. ON: Results are never rejected.
"""
response = self._core.io.query_str('CONFigure:NRSub:MEASurement<Instance>:PRACh:MOEXception?')
return Conversions.str_to_bool(response)
[docs]
def set_mo_exception(self, meas_on_exception: bool) -> None:
"""
``CONFigure:NRSub:MEASurement<Instance>:PRACh:MOEXception`` \n
Snippet: ``driver.configure.nrSubMeas.prach.set_mo_exception(meas_on_exception = False)`` \n
Specifies whether measurement results that the CMP180 identifies as faulty or inaccurate are rejected.
:param meas_on_exception: OFF: Faulty results are rejected. ON: Results are never rejected.
"""
param = Conversions.bool_to_str(meas_on_exception)
self._core.io.write(f'CONFigure:NRSub:MEASurement<Instance>:PRACh:MOEXception {param}')
[docs]
def get_pc_index(self) -> int:
"""
``CONFigure:NRSub:MEASurement<Instance>:PRACh:PCINdex`` \n
Snippet: ``value: int = driver.configure.nrSubMeas.prach.get_pc_index()`` \n
The PRACH configuration index identifies the PRACH configuration used by the UE (preamble format, which resources in the
time domain are allowed for transmission of preambles etc.) . The range depends on the duplex mode, see 'Preambles in the
time domain'.
:return: prach_conf_index: numeric
"""
response = self._core.io.query_str('CONFigure:NRSub:MEASurement<Instance>:PRACh:PCINdex?')
return Conversions.str_to_int(response)
[docs]
def set_pc_index(self, prach_conf_index: int) -> None:
"""
``CONFigure:NRSub:MEASurement<Instance>:PRACh:PCINdex`` \n
Snippet: ``driver.configure.nrSubMeas.prach.set_pc_index(prach_conf_index = 1)`` \n
The PRACH configuration index identifies the PRACH configuration used by the UE (preamble format, which resources in the
time domain are allowed for transmission of preambles etc.) . The range depends on the duplex mode, see 'Preambles in the
time domain'.
:param prach_conf_index: numeric
"""
param = Conversions.decimal_value_to_str(prach_conf_index)
self._core.io.write(f'CONFigure:NRSub:MEASurement<Instance>:PRACh:PCINdex {param}')
# noinspection PyTypeChecker
[docs]
def get_ssymbol(self) -> int:
"""
``CONFigure:NRSub:MEASurement<Instance>:PRACh:SSYMbol`` \n
Snippet: ``value: int = driver.configure.nrSubMeas.prach.get_ssymbol()`` \n
Selects the OFDM symbol to be evaluated for single-symbol modulation result diagrams. The number of OFDM symbols in the
preamble (<no of symbols>) depends on the preamble format, see Table 'Preambles in the time domain'.
:return: selected_symbol: numeric
"""
response = self._core.io.query_str('CONFigure:NRSub:MEASurement<Instance>:PRACh:SSYMbol?')
return Conversions.str_to_int(response)
[docs]
def set_ssymbol(self, selected_symbol: int) -> None:
"""
``CONFigure:NRSub:MEASurement<Instance>:PRACh:SSYMbol`` \n
Snippet: ``driver.configure.nrSubMeas.prach.set_ssymbol(selected_symbol = 1)`` \n
Selects the OFDM symbol to be evaluated for single-symbol modulation result diagrams. The number of OFDM symbols in the
preamble (<no of symbols>) depends on the preamble format, see Table 'Preambles in the time domain'.
:param selected_symbol: numeric
"""
param = Conversions.decimal_value_to_str(selected_symbol)
self._core.io.write(f'CONFigure:NRSub:MEASurement<Instance>:PRACh:SSYMbol {param}')
# noinspection PyTypeChecker
[docs]
def get_sc_spacing(self) -> enums.SubCarrSpacingB:
"""
``CONFigure:NRSub:MEASurement<Instance>:PRACh:SCSPacing`` \n
Snippet: ``value: enums.SubCarrSpacingB = driver.configure.nrSubMeas.prach.get_sc_spacing()`` \n
Specifies the subcarrier spacing used by the UE for the preambles. The allowed subset of values depends on the preamble
format, see Table 'Preambles in the frequency domain'.
:return: sub_carr_spacing: 1.25 kHz, 5 kHz, 15 kHz, 30 kHz, 60 kHz
"""
response = self._core.io.query_str('CONFigure:NRSub:MEASurement<Instance>:PRACh:SCSPacing?')
return Conversions.str_to_scalar_enum(response, enums.SubCarrSpacingB)
[docs]
def set_sc_spacing(self, sub_carr_spacing: enums.SubCarrSpacingB) -> None:
"""
``CONFigure:NRSub:MEASurement<Instance>:PRACh:SCSPacing`` \n
Snippet: ``driver.configure.nrSubMeas.prach.set_sc_spacing(sub_carr_spacing = enums.SubCarrSpacingB.S15K)`` \n
Specifies the subcarrier spacing used by the UE for the preambles. The allowed subset of values depends on the preamble
format, see Table 'Preambles in the frequency domain'.
:param sub_carr_spacing: 1.25 kHz, 5 kHz, 15 kHz, 30 kHz, 60 kHz
"""
param = Conversions.enum_scalar_to_str(sub_carr_spacing, enums.SubCarrSpacingB)
self._core.io.write(f'CONFigure:NRSub:MEASurement<Instance>:PRACh:SCSPacing {param}')
[docs]
def get_no_preambles(self) -> int:
"""
``CONFigure:NRSub:MEASurement<Instance>:PRACh:NOPReambles`` \n
Snippet: ``value: int = driver.configure.nrSubMeas.prach.get_no_preambles()`` \n
Specifies the number of preambles to be captured per measurement interval.
:return: number_preamble: numeric
"""
response = self._core.io.query_str('CONFigure:NRSub:MEASurement<Instance>:PRACh:NOPReambles?')
return Conversions.str_to_int(response)
[docs]
def set_no_preambles(self, number_preamble: int) -> None:
"""
``CONFigure:NRSub:MEASurement<Instance>:PRACh:NOPReambles`` \n
Snippet: ``driver.configure.nrSubMeas.prach.set_no_preambles(number_preamble = 1)`` \n
Specifies the number of preambles to be captured per measurement interval.
:param number_preamble: numeric
"""
param = Conversions.decimal_value_to_str(number_preamble)
self._core.io.write(f'CONFigure:NRSub:MEASurement<Instance>:PRACh:NOPReambles {param}')
# noinspection PyTypeChecker
[docs]
def get_po_preambles(self) -> enums.PeriodPreamble:
"""
``CONFigure:NRSub:MEASurement<Instance>:PRACh:POPReambles`` \n
Snippet: ``value: enums.PeriodPreamble = driver.configure.nrSubMeas.prach.get_po_preambles()`` \n
Specifies the periodicity of preambles to be captured for multi-preamble result squares.
:return: period_preamble: 10 ms, 20 ms, 5 ms
"""
response = self._core.io.query_str('CONFigure:NRSub:MEASurement<Instance>:PRACh:POPReambles?')
return Conversions.str_to_scalar_enum(response, enums.PeriodPreamble)
[docs]
def set_po_preambles(self, period_preamble: enums.PeriodPreamble) -> None:
"""
``CONFigure:NRSub:MEASurement<Instance>:PRACh:POPReambles`` \n
Snippet: ``driver.configure.nrSubMeas.prach.set_po_preambles(period_preamble = enums.PeriodPreamble.MS05)`` \n
Specifies the periodicity of preambles to be captured for multi-preamble result squares.
:param period_preamble: 10 ms, 20 ms, 5 ms
"""
param = Conversions.enum_scalar_to_str(period_preamble, enums.PeriodPreamble)
self._core.io.write(f'CONFigure:NRSub:MEASurement<Instance>:PRACh:POPReambles {param}')
[docs]
def get_lrs_index(self) -> int:
"""
``CONFigure:NRSub:MEASurement<Instance>:PRACh:LRSindex`` \n
Snippet: ``value: int = driver.configure.nrSubMeas.prach.get_lrs_index()`` \n
Specifies the logical root sequence index to be used for generation of the preamble sequence.
:return: log_root_seq_index: numeric
"""
response = self._core.io.query_str('CONFigure:NRSub:MEASurement<Instance>:PRACh:LRSindex?')
return Conversions.str_to_int(response)
[docs]
def set_lrs_index(self, log_root_seq_index: int) -> None:
"""
``CONFigure:NRSub:MEASurement<Instance>:PRACh:LRSindex`` \n
Snippet: ``driver.configure.nrSubMeas.prach.set_lrs_index(log_root_seq_index = 1)`` \n
Specifies the logical root sequence index to be used for generation of the preamble sequence.
:param log_root_seq_index: numeric
"""
param = Conversions.decimal_value_to_str(log_root_seq_index)
self._core.io.write(f'CONFigure:NRSub:MEASurement<Instance>:PRACh:LRSindex {param}')
[docs]
def get_zc_zone(self) -> int:
"""
``CONFigure:NRSub:MEASurement<Instance>:PRACh:ZCZone`` \n
Snippet: ``value: int = driver.configure.nrSubMeas.prach.get_zc_zone()`` \n
Specifies the zero correlation zone config, i.e. which NCS value of an NCS set is used for generation of the preamble
sequence.
:return: zero_corr_zone: numeric
"""
response = self._core.io.query_str('CONFigure:NRSub:MEASurement<Instance>:PRACh:ZCZone?')
return Conversions.str_to_int(response)
[docs]
def set_zc_zone(self, zero_corr_zone: int) -> None:
"""
``CONFigure:NRSub:MEASurement<Instance>:PRACh:ZCZone`` \n
Snippet: ``driver.configure.nrSubMeas.prach.set_zc_zone(zero_corr_zone = 1)`` \n
Specifies the zero correlation zone config, i.e. which NCS value of an NCS set is used for generation of the preamble
sequence.
:param zero_corr_zone: numeric
"""
param = Conversions.decimal_value_to_str(zero_corr_zone)
self._core.io.write(f'CONFigure:NRSub:MEASurement<Instance>:PRACh:ZCZone {param}')
def clone(self) -> 'PrachCls':
"""
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 = PrachCls(self._core, self._cmd_group.parent)
self._cmd_group.synchronize_repcaps(new_group)
return new_group