Source code for rsmxo.Implementations.Synchronize.Device.Skew.Value

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


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

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

[docs] def set(self, skew: float, device=repcap.Device.Default) -> None: """ ``SYNChronize:DEVice<*>:SKEW[:VALue]`` \n Snippet: ``driver.synchronize.device.skew.value.set(skew = 1.0, device = repcap.Device.Default)`` \n Returns the skew value that was measured by method ``RsMxo.synchronize.device.skew.auto.set()`` . If you know the skew, or measure it manually, you can also set the value. :param skew: -0.02 to 0.02 :param device: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Device') """ param = Conversions.decimal_value_to_str(skew) device_cmd_val = self._cmd_group.get_repcap_cmd_value(device, repcap.Device) self._core.io.write(f'SYNChronize:DEVice{device_cmd_val}:SKEW:VALue {param}')
[docs] def get(self, device=repcap.Device.Default) -> float: """ ``SYNChronize:DEVice<*>:SKEW[:VALue]`` \n Snippet: ``value: float = driver.synchronize.device.skew.value.get(device = repcap.Device.Default)`` \n Returns the skew value that was measured by method ``RsMxo.synchronize.device.skew.auto.set()`` . If you know the skew, or measure it manually, you can also set the value. :param device: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Device') :return: skew: -0.02 to 0.02 """ device_cmd_val = self._cmd_group.get_repcap_cmd_value(device, repcap.Device) response = self._core.io.query_str(f'SYNChronize:DEVice{device_cmd_val}:SKEW:VALue?') return Conversions.str_to_float(response)