from .....Internal.Core import Core
from .....Internal.CommandsGroup import CommandsGroup
from .....Internal import Conversions
from ..... import enums
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class TpcCls:
"""
| Commands in total: 6
| Subgroups: 1
| Direct child commands: 4
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("tpc", core, parent)
@property
def limit(self):
"""
| Commands in total: 2
| Subgroups: 1
| 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>:TPC:TOUT`` \n
Snippet: ``value: float = driver.configure.nrSubMeas.tpc.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>:TPC:TOUT?')
return Conversions.str_to_float(response)
[docs]
def set_timeout(self, timeout: float) -> None:
"""
``CONFigure:NRSub:MEASurement<Instance>:TPC:TOUT`` \n
Snippet: ``driver.configure.nrSubMeas.tpc.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>:TPC:TOUT {param}')
# noinspection PyTypeChecker
[docs]
def get_direction(self) -> enums.Direction:
"""
``CONFigure:NRSub:MEASurement<Instance>:TPC:DIRection`` \n
Snippet: ``value: enums.Direction = driver.configure.nrSubMeas.tpc.get_direction()`` \n
Specifies the direction of the power pattern corresponding to the UL signal configuration.
:return: direction: Ramping up, ramping down, alternating
"""
response = self._core.io.query_str('CONFigure:NRSub:MEASurement<Instance>:TPC:DIRection?')
return Conversions.str_to_scalar_enum(response, enums.Direction)
[docs]
def set_direction(self, direction: enums.Direction) -> None:
"""
``CONFigure:NRSub:MEASurement<Instance>:TPC:DIRection`` \n
Snippet: ``driver.configure.nrSubMeas.tpc.set_direction(direction = enums.Direction.ALTernating)`` \n
Specifies the direction of the power pattern corresponding to the UL signal configuration.
:param direction: Ramping up, ramping down, alternating
"""
param = Conversions.enum_scalar_to_str(direction, enums.Direction)
self._core.io.write(f'CONFigure:NRSub:MEASurement<Instance>:TPC:DIRection {param}')
[docs]
def get_st_id(self) -> int:
"""
``CONFigure:NRSub:MEASurement<Instance>:TPC:STID`` \n
Snippet: ``value: int = driver.configure.nrSubMeas.tpc.get_st_id()`` \n
Specifies the subtest ID corresponding to the UL signal configuration.
:return: sub_test_id: numeric
"""
response = self._core.io.query_str('CONFigure:NRSub:MEASurement<Instance>:TPC:STID?')
return Conversions.str_to_int(response)
[docs]
def set_st_id(self, sub_test_id: int) -> None:
"""
``CONFigure:NRSub:MEASurement<Instance>:TPC:STID`` \n
Snippet: ``driver.configure.nrSubMeas.tpc.set_st_id(sub_test_id = 1)`` \n
Specifies the subtest ID corresponding to the UL signal configuration.
:param sub_test_id: numeric
"""
param = Conversions.decimal_value_to_str(sub_test_id)
self._core.io.write(f'CONFigure:NRSub:MEASurement<Instance>:TPC:STID {param}')
# noinspection PyTypeChecker
[docs]
def get_pattern(self) -> enums.Pattern:
"""
``CONFigure:NRSub:MEASurement<Instance>:TPC:PATTern`` \n
Snippet: ``value: enums.Pattern = driver.configure.nrSubMeas.tpc.get_pattern()`` \n
Selects the power pattern corresponding to the UL signal configuration. The power pattern determines the position of the
RB allocation change in ramping up and ramping down tests.
:return: pattern: A | B | C
"""
response = self._core.io.query_str('CONFigure:NRSub:MEASurement<Instance>:TPC:PATTern?')
return Conversions.str_to_scalar_enum(response, enums.Pattern)
[docs]
def set_pattern(self, pattern: enums.Pattern) -> None:
"""
``CONFigure:NRSub:MEASurement<Instance>:TPC:PATTern`` \n
Snippet: ``driver.configure.nrSubMeas.tpc.set_pattern(pattern = enums.Pattern.A)`` \n
Selects the power pattern corresponding to the UL signal configuration. The power pattern determines the position of the
RB allocation change in ramping up and ramping down tests.
:param pattern: A | B | C
"""
param = Conversions.enum_scalar_to_str(pattern, enums.Pattern)
self._core.io.write(f'CONFigure:NRSub:MEASurement<Instance>:TPC:PATTern {param}')
def clone(self) -> 'TpcCls':
"""
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 = TpcCls(self._core, self._cmd_group.parent)
self._cmd_group.synchronize_repcaps(new_group)
return new_group