Source code for RsSmw.Implementations.Source.ListPy.Dwell.ListPy

from typing import List

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


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

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

[docs] def get_points(self) -> int: """ ``[SOURce<HW>]:LIST:DWELl:LIST:POINts`` \n Snippet: ``value: int = driver.source.listPy.dwell.listPy.get_points()`` \n Queries the number (points) of dwell time entries in the selected list. :return: points: integer Range: 0 to INT_MAX """ response = self._core.io.query_str('SOURce<HwInstance>:LIST:DWELl:LIST:POINts?') return Conversions.str_to_int(response)
[docs] def get_value(self) -> List[int]: """ ``[SOURce<HW>]:LIST:DWELl:LIST`` \n Snippet: ``value: List[int] = driver.source.listPy.dwell.listPy.get_value()`` \n Enters the dwell time values in the selected list in us. :return: dwell: Dwell#1{, Dwell#2, ...} | block data You can either enter the data as a list of numbers, or as binary block data. The list of numbers can be of any length, with the list entries separated by commas. In binary block format, 8 (4) bytes are always interpreted as a floating-point number with double accuracy. See also method ``RsSmw.formatPy.data()`` for more details. """ response = self._core.io.query_bin_or_ascii_int_list('SOURce<HwInstance>:LIST:DWELl:LIST?') return response
[docs] def set_value(self, dwell: List[int]) -> None: """ ``[SOURce<HW>]:LIST:DWELl:LIST`` \n Snippet: ``driver.source.listPy.dwell.listPy.set_value(dwell = [1, 2, 3])`` \n Enters the dwell time values in the selected list in us. :param dwell: Dwell#1{, Dwell#2, ...} | block data You can either enter the data as a list of numbers, or as binary block data. The list of numbers can be of any length, with the list entries separated by commas. In binary block format, 8 (4) bytes are always interpreted as a floating-point number with double accuracy. See also method ``RsSmw.formatPy.data()`` for more details. """ param = Conversions.list_to_csv_str(dwell) self._core.io.write(f'SOURce<HwInstance>:LIST:DWELl:LIST {param}')