Source code for rsmxo.Implementations.Calculate.Math.Data.ValuesPartial

from typing import List

from .....Internal.Core import Core
from .....Internal.CommandsGroup import CommandsGroup
from .....Internal.Types import DataType
from .....Internal.ArgSingleList import ArgSingleList
from .....Internal.ArgSingle import ArgSingle
from ..... import repcap


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

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

[docs] def get(self, offset: int, length: int, math=repcap.Math.Default) -> List[float]: """ ``CALCulate:MATH<*>:DATA[:VALues]`` \n Snippet: ``value: List[float] = driver.calculate.math.data.valuesPartial.get(offset = 1, length = 1, math = repcap.Math.Default)`` \n Returns the data of the specified math waveform. To set the export format, use method ``RsMxo.formatPy.data.set()`` . :param offset: See 'Offset and Length parameters in ...DATA[:VALues] commands'. :param length: See 'Offset and Length parameters in ...DATA[:VALues] commands'. :param math: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Math') """ param = ArgSingleList().compose_cmd_string(ArgSingle('offset', offset, DataType.Integer), ArgSingle('length', length, DataType.Integer)) math_cmd_val = self._cmd_group.get_repcap_cmd_value(math, repcap.Math) response = self._core.io.query_bin_or_ascii_float_list(f'FORMAT REAL,32;CALCulate:MATH{math_cmd_val}:DATA:VALues? {param}'.rstrip()) return response