from .....Internal.Core import Core
from .....Internal.CommandsGroup import CommandsGroup
from .....Internal import Conversions
from ..... import enums
from ..... import repcap
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class CoUnitCls:
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("coUnit", core, parent)
[docs]
def set(self, arith_cst_unt: enums.SelectUnit, measurement=repcap.Measurement.Default) -> None:
"""
``MEASurement<*>:AMPTime:ARIThmetic:COUNit`` \n
Snippet: ``driver.measurement.ampTime.arithmetic.coUnit.set(arith_cst_unt = enums.SelectUnit.A, measurement = repcap.Measurement.Default)`` \n
Sets the unit of the constant, which is used as operand of the amplitude/time arithmetic measurement.
:param arith_cst_unt: DBM | DB | DB_HZ | DB_GHZ | DBC | DBC_HZ | DBPW_HZ | DBW | DBPW | DBM_HZ | DBMW | W | MW | W_HZ | J | V_S | A_S | DBV | DBMV | DBMV_HZ | DBMV_MHZ | DBUV | DBUV_HZ | DBUV_SQRT_HZ | DBUV_MHZ | DBUV_M | DBMV_M_HZ | DBUV_M_MHZ | V | MV | UV | VPP | VV | UV_HZ | UV_M_HZ | V_SQRT_HZ | DBA | DBMA | DBMA_HZ | DBMA_MHZ | DBUA | DBUA_HZ | DBUA_SQRT_HZ | DBUA_MHZ | DBUA_M | DBUA_M_HZ | DBUA_M_MHZ | A | UA_HZ | UA_M_HZ | A_SQRT_HZ | PCT | DBPT | DBPT_HZ | H | PH_GHZ | F | FF_GHZ | OHM | SIEMENS | S | DBPS | DBNS | DBUS | DBMS | DBS | HZ | DBHZ | DBKHZ | DBMHZ | DBGHZ | M | IN | DEG | RAD | CNTN | PCT | SYMB | VA_LIN | VA_LOG | NDEF | NONE | IRE | MILES | SYMB_S | MSYMB_S | MBIT_S | BIT_S | BIT | WORD | PPM | DB | PER_SEC | S_DIV | HZ_DIV | V_DIV | A_DIV | OHM_DIV | NONE_DIV | DIV | BER | S | S_S | BAUD | TDEG | VS | USER | UINV | W_DIV | V_V | A_V | W_V | BYTS | V_A | V_W | VA | VAR | UI | LN | HRS | MIN
:param measurement: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Measurement')
"""
param = Conversions.enum_scalar_to_str(arith_cst_unt, enums.SelectUnit)
measurement_cmd_val = self._cmd_group.get_repcap_cmd_value(measurement, repcap.Measurement)
self._core.io.write_with_opc(f'MEASurement{measurement_cmd_val}:AMPTime:ARIThmetic:COUNit {param}')
# noinspection PyTypeChecker
[docs]
def get(self, measurement=repcap.Measurement.Default) -> enums.SelectUnit:
"""
``MEASurement<*>:AMPTime:ARIThmetic:COUNit`` \n
Snippet: ``value: enums.SelectUnit = driver.measurement.ampTime.arithmetic.coUnit.get(measurement = repcap.Measurement.Default)`` \n
Sets the unit of the constant, which is used as operand of the amplitude/time arithmetic measurement.
:param measurement: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Measurement')
"""
measurement_cmd_val = self._cmd_group.get_repcap_cmd_value(measurement, repcap.Measurement)
response = self._core.io.query_str_with_opc(f'MEASurement{measurement_cmd_val}:AMPTime:ARIThmetic:COUNit?')
return Conversions.str_to_scalar_enum(response, enums.SelectUnit)