from .....Internal.Core import Core
from .....Internal.CommandsGroup import CommandsGroup
from .....Internal import Conversions
from ..... import enums
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class TputCls:
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("tput", core, parent)
[docs]
def set(self, unit: enums.ThroughputUnit) -> None:
"""
``UNIT:TPUT`` \n
Snippet: ``driver.applications.k14Xnr5G.unit.tput.set(unit = enums.ThroughputUnit.MBPS)`` \n
Selects the unit for the throughput measurement.
Prerequisites for this command \n
- Turn on throughput measurement (method ``RsFsw.applications.k14Xnr5G.sense.nr5G.tracking.tput.state.set()`` ) .
:param unit: MBPS Unit is Mbit/s. PCT Unit is percent.
"""
param = Conversions.enum_scalar_to_str(unit, enums.ThroughputUnit)
self._core.io.write(f'UNIT:TPUT {param}')
# noinspection PyTypeChecker
[docs]
def get(self) -> enums.ThroughputUnit:
"""
``UNIT:TPUT`` \n
Snippet: ``value: enums.ThroughputUnit = driver.applications.k14Xnr5G.unit.tput.get()`` \n
Selects the unit for the throughput measurement.
Prerequisites for this command \n
- Turn on throughput measurement (method ``RsFsw.applications.k14Xnr5G.sense.nr5G.tracking.tput.state.set()`` ) .
:return: unit: MBPS Unit is Mbit/s. PCT Unit is percent.
"""
response = self._core.io.query_str(f'UNIT:TPUT?')
return Conversions.str_to_scalar_enum(response, enums.ThroughputUnit)