Source code for rsrtx.Implementations.Measurement.Protocol.F2Frame.ValTo

from .....Internal.Core import Core
from .....Internal.CommandsGroup import CommandsGroup
from .....Internal import Conversions
from ..... import repcap


# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class ValToCls:
	"""
	| Commands in total: 1
	| Subgroups: 0
	| Direct child commands: 1
	"""

	def __init__(self, core: Core, parent):
		self._core = core
		self._cmd_group = CommandsGroup("valTo", core, parent)

[docs] def set(self, frm_frm_val: int, measurement=repcap.Measurement.Default) -> None: """ ``MEASurement<*>:PROTocol:F2FRame:VALTo`` \n Snippet: ``driver.measurement.protocol.f2Frame.valTo.set(frm_frm_val = 1, measurement = repcap.Measurement.Default)`` \n Sets the field value of the end frame for the frame to frame protocol measurement. :param measurement: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Measurement') """ param = Conversions.decimal_value_to_str(frm_frm_val) measurement_cmd_val = self._cmd_group.get_repcap_cmd_value(measurement, repcap.Measurement) self._core.io.write_with_opc(f'MEASurement{measurement_cmd_val}:PROTocol:F2FRame:VALTo {param}')
[docs] def get(self, measurement=repcap.Measurement.Default) -> int: """ ``MEASurement<*>:PROTocol:F2FRame:VALTo`` \n Snippet: ``value: int = driver.measurement.protocol.f2Frame.valTo.get(measurement = repcap.Measurement.Default)`` \n Sets the field value of the end frame for the frame to frame protocol 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}:PROTocol:F2FRame:VALTo?') return Conversions.str_to_int(response)